aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/common/led.h
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/common/led.h')
-rw-r--r--tmk_core/common/led.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/tmk_core/common/led.h b/tmk_core/common/led.h
index 2c28fe540..daf974bed 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/>.
18#ifndef LED_H 18#ifndef LED_H
19#define LED_H 19#define LED_H
20#include "stdint.h" 20#include "stdint.h"
21#include "stdbool.h"
21 22
22/* FIXME: Add doxygen comments here. */ 23/* FIXME: Add doxygen comments here. */
23 24
@@ -32,6 +33,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
32extern "C" { 33extern "C" {
33#endif 34#endif
34 35
36typedef union {
37 uint8_t raw;
38 struct {
39 bool num_lock : 1;
40 bool caps_lock : 1;
41 bool scroll_lock : 1;
42 bool compose : 1;
43 bool kana : 1;
44 uint8_t reserved : 3;
45 };
46} led_t;
47
35void led_set(uint8_t usb_led); 48void led_set(uint8_t usb_led);
36 49
37void led_init_ports(void); 50void led_init_ports(void);