diff options
Diffstat (limited to 'quantum/quantum.c')
-rw-r--r-- | quantum/quantum.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c index 7e2b90ea7f..141a153400 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -1081,10 +1081,30 @@ void api_send_unicode(uint32_t unicode) { #endif } +/** \brief Lock LED set callback - keymap/user level + * + * \deprecated Use led_update_user() instead. + */ __attribute__((weak)) void led_set_user(uint8_t usb_led) {} +/** \brief Lock LED set callback - keyboard level + * + * \deprecated Use led_update_kb() instead. + */ __attribute__((weak)) void led_set_kb(uint8_t usb_led) { led_set_user(usb_led); } +/** \brief Lock LED update callback - keymap/user level + * + * \return True if led_update_kb() should run its own code, false otherwise. + */ +__attribute__((weak)) bool led_update_user(led_t led_state) { return true; } + +/** \brief Lock LED update callback - keyboard level + * + * \return Ignored for now. + */ +__attribute__((weak)) bool led_update_kb(led_t led_state) { return led_update_user(led_state); } + __attribute__((weak)) void led_init_ports(void) {} __attribute__((weak)) void led_set(uint8_t usb_led) { @@ -1107,6 +1127,7 @@ __attribute__((weak)) void led_set(uint8_t usb_led) { #endif led_set_kb(usb_led); + led_update_kb((led_t) usb_led); } //------------------------------------------------------------------------------ |