diff options
author | fauxpark <fauxpark@gmail.com> | 2019-11-06 11:42:16 +1100 |
---|---|---|
committer | Joel Challis <git@zvecr.com> | 2019-11-06 00:42:16 +0000 |
commit | dfb78d2a086daa2ceb3fd043afce03785abfa23a (patch) | |
tree | 7cd724b1cd12a65025bbc9d3cb32d7dd39cb9928 /tmk_core/common/led.h | |
parent | ed0575fc8aacdfdd83a31fc98df2b1cad2e977f4 (diff) |
New and improved lock LED callbacks (#7215)
* New and improved lock LED callbacks
* Include stdbool
* Update documentation
* Use full function signatures and add keyboard-level example
Diffstat (limited to 'tmk_core/common/led.h')
-rw-r--r-- | tmk_core/common/led.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tmk_core/common/led.h b/tmk_core/common/led.h index 2c28fe5401..daf974bed4 100644 --- a/tmk_core/common/led.h +++ b/tmk_core/common/led.h @@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifndef LED_H #define LED_H #include "stdint.h" +#include "stdbool.h" /* FIXME: Add doxygen comments here. */ @@ -32,6 +33,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. extern "C" { #endif +typedef union { + uint8_t raw; + struct { + bool num_lock : 1; + bool caps_lock : 1; + bool scroll_lock : 1; + bool compose : 1; + bool kana : 1; + uint8_t reserved : 3; + }; +} led_t; + void led_set(uint8_t usb_led); void led_init_ports(void); |