]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - keyboards/gh60/gh60.c
[Keyboard] GH60 Configurator updates and modernization (#6232)
[qmk_firmware.git] / keyboards / gh60 / gh60.c
index 6da4d8ee3e1d291d62f998f365d289fc94771f35..10ae8935949ccafea037e88de67f9fb43a3d4455 100644 (file)
@@ -1,68 +1,27 @@
-#include "gh60.h"\r
-#include "led.h"\r
-\r
-__attribute__ ((weak))\r
-void matrix_init_user(void) {\r
-       // leave this function blank - it can be defined in a keymap file\r
-};\r
-\r
-__attribute__ ((weak))\r
-void matrix_scan_user(void) {\r
-       // leave this function blank - it can be defined in a keymap file\r
-}\r
-\r
-__attribute__ ((weak))\r
-bool process_action_user(keyrecord_t *record) {\r
-       // leave this function blank - it can be defined in a keymap file\r
-       return true;\r
-}\r
-\r
-__attribute__ ((weak))\r
-void led_set_user(uint8_t usb_led) {\r
-       // leave this function blank - it can be defined in a keymap file\r
-}\r
-\r
-void matrix_init_kb(void) {\r
-       // put your keyboard start-up code here\r
-       // runs once when the firmware starts up\r
-\r
-       matrix_init_user();\r
-}\r
-\r
-void matrix_scan_kb(void) {\r
-       // put your looping keyboard code here\r
-       // runs every cycle (a lot)\r
-\r
-       matrix_scan_user();\r
-}\r
-\r
-bool process_action_kb(keyrecord_t *record) {\r
-       // put your per-action keyboard code here\r
-       // runs for every action, just before processing by the firmware\r
-\r
-       return process_action_user(record);\r
-}\r
-\r
-void led_set_kb(uint8_t usb_led) {\r
-       // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here\r
-       \r
-    if (usb_led & (1<<USB_LED_CAPS_LOCK)) {\r
-               gh60_caps_led_on();\r
-               } else {\r
-               gh60_caps_led_off(); \r
-    }\r
-       \r
-    // if (usb_led & (1<<USB_LED_NUM_LOCK)) {\r
-               // gh60_esc_led_on();\r
-               // } else {\r
-               // gh60_esc_led_off(); \r
-    // }\r
-       \r
-    // if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {\r
-               // gh60_fn_led_on();\r
-               // } else {\r
-               // gh60_fn_led_off();   \r
-    // }\r
-\r
-       led_set_user(usb_led);  \r
-}\r
+#include "gh60.h"
+
+
+extern inline void gh60_caps_led_on(void);
+extern inline void gh60_poker_leds_on(void);
+extern inline void gh60_fn_led_on(void);
+extern inline void gh60_esc_led_on(void);
+extern inline void gh60_wasd_leds_on(void);
+
+extern inline void gh60_caps_led_off(void);
+extern inline void gh60_poker_leds_off(void);
+extern inline void gh60_fn_led_off(void);
+extern inline void gh60_esc_led_off(void);
+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
+
+    if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
+        gh60_caps_led_on();
+    } else {
+        gh60_caps_led_off();
+    }
+
+    led_set_user(usb_led);
+}