diff options
author | noroadsleft <18669334+noroadsleft@users.noreply.github.com> | 2019-07-02 09:22:56 -0700 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-07-02 09:22:56 -0700 |
commit | 308275909d081398231b4aa766846b63ffe7381a (patch) | |
tree | e43bc3330dbcb0aef2275cc7c24b155d61e0d2f9 /keyboards/gh60/gh60.c | |
parent | adda4e137e980d1597f7df7317a3419584e10d4f (diff) |
[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
Diffstat (limited to 'keyboards/gh60/gh60.c')
-rw-r--r-- | keyboards/gh60/gh60.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/keyboards/gh60/gh60.c b/keyboards/gh60/gh60.c index 441c799fa3..10ae893594 100644 --- a/keyboards/gh60/gh60.c +++ b/keyboards/gh60/gh60.c @@ -15,25 +15,13 @@ extern inline void gh60_wasd_leds_off(void); void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - if (usb_led & (1<<USB_LED_CAPS_LOCK)) { - gh60_caps_led_on(); - } else { - gh60_caps_led_off(); + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + gh60_caps_led_on(); + } else { + gh60_caps_led_off(); } - // if (usb_led & (1<<USB_LED_NUM_LOCK)) { - // gh60_esc_led_on(); - // } else { - // gh60_esc_led_off(); - // } - - // if (usb_led & (1<<USB_LED_SCROLL_LOCK)) { - // gh60_fn_led_on(); - // } else { - // gh60_fn_led_off(); - // } - - led_set_user(usb_led); + led_set_user(usb_led); } |