qmk_firmware/keyboards/gh60/revc/revc.h

26 lines
981 B
C
Raw Normal View History

[Keyboard] GH60 Configurator updates and modernization (#6232) * Convert gh60.h to #pragma once include guard * Lint gh60.h This commit only changes white space. * Convert info.json to debug linting Making this file easier to read. * Put the label keys first for LAYOUT_60_ansi * Complete and correct key labels in info.json * Duplicate LAYOUT as LAYOUT_all Doing this for backwards compatibility. Has implications for user keymaps. * Update LAYOUT_all to make sense The original macro LAYOUT submitted for the GH60 gets a couple of things wrong: - K49 is placed between Space and Right Alt, when it's actually the right half of a split Backspace - K3C is assigned before K3D, when K3C is the 1u portion of a 1.75u/1u split Right Shift, and therefore K3D is actually to the left of K3C The LAYOUT_all macro corrects these issues, but the LAYOUT macro is unchanged, so as to not break user keymaps that depend on it. This commit also updates the default keymap to use the LAYOUT_all macro, and makes a minor change to the base layer to be more as a user would expect for the corresponding physical layout. * Correct the layout data for the LAYOUT macro in info.json Gives proper Configurator rendering. * Modernize default keymap Update the default keymap to use more modern QMK conventions. * Modernize the LED management code Update the LED management functions to use the GPIO functions, and clean up the led_set_kb() function. * Update key labels in info.json for LAYOUT_60_ansi_split_rshift Makes them consistent with the the rest of the file. * Update Docs links in readme file
2019-07-02 18:22:56 +02:00
#pragma once
2016-08-27 17:40:50 +02:00
#include "quantum.h"
#include "led.h"
/* GH60 LEDs
2016-08-27 17:40:50 +02:00
* GPIO pads
* 0 F7 WASD LEDs
* 1 F6 ESC LED
* 2 F5 FN LED
* 3 F4 POKER Arrow LEDs
* B2 Capslock LED
* B0 not connected
*/
static inline void gh60_caps_led_on(void) { setPinOutput(B2); writePinLow(B2); }
static inline void gh60_poker_leds_on(void) { setPinOutput(F4); writePinLow(F4); }
static inline void gh60_fn_led_on(void) { setPinOutput(F5); writePinLow(F5); }
static inline void gh60_esc_led_on(void) { setPinOutput(F6); writePinLow(F6); }
static inline void gh60_wasd_leds_on(void) { setPinOutput(F7); writePinLow(F7); }
2016-08-27 17:40:50 +02:00
static inline void gh60_caps_led_off(void) { setPinInput(B2); }
static inline void gh60_poker_leds_off(void) { setPinInput(F4); }
static inline void gh60_fn_led_off(void) { setPinInput(F5); }
static inline void gh60_esc_led_off(void) { setPinInput(F6); }
static inline void gh60_wasd_leds_off(void) { setPinInput(F7); }