diff options
Diffstat (limited to 'usb_keyboard.c')
| -rw-r--r-- | usb_keyboard.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usb_keyboard.c b/usb_keyboard.c index 3b071e336..57e23d5fc 100644 --- a/usb_keyboard.c +++ b/usb_keyboard.c | |||
| @@ -28,7 +28,7 @@ uint8_t usb_keyboard_idle_count=0; | |||
| 28 | // 1=num lock, 2=caps lock, 4=scroll lock, 8=compose, 16=kana | 28 | // 1=num lock, 2=caps lock, 4=scroll lock, 8=compose, 16=kana |
| 29 | volatile uint8_t usb_keyboard_leds=0; | 29 | volatile uint8_t usb_keyboard_leds=0; |
| 30 | 30 | ||
| 31 | // enable NKRO | 31 | // enable USB NKRO |
| 32 | bool usb_keyboard_nkro = false; | 32 | bool usb_keyboard_nkro = false; |
| 33 | 33 | ||
| 34 | 34 | ||
| @@ -42,7 +42,7 @@ int8_t usb_keyboard_send_report(usb_keyboard_report_t *report) | |||
| 42 | { | 42 | { |
| 43 | int8_t result = 0; | 43 | int8_t result = 0; |
| 44 | 44 | ||
| 45 | #ifdef NKRO_ENABLE | 45 | #ifdef USB_NKRO_ENABLE |
| 46 | if (usb_keyboard_nkro) | 46 | if (usb_keyboard_nkro) |
| 47 | result = _send_report(report, KBD2_ENDPOINT, 0, KBD2_REPORT_KEYS); | 47 | result = _send_report(report, KBD2_ENDPOINT, 0, KBD2_REPORT_KEYS); |
| 48 | else | 48 | else |
| @@ -106,7 +106,7 @@ static inline void _add_key_byte(uint8_t code); | |||
| 106 | static inline void _add_key_bit(uint8_t code); | 106 | static inline void _add_key_bit(uint8_t code); |
| 107 | void usb_keyboard_add_key(uint8_t code) | 107 | void usb_keyboard_add_key(uint8_t code) |
| 108 | { | 108 | { |
| 109 | #ifdef NKRO_ENABLE | 109 | #ifdef USB_NKRO_ENABLE |
| 110 | if (usb_keyboard_nkro) { | 110 | if (usb_keyboard_nkro) { |
| 111 | _add_key_bit(code); | 111 | _add_key_bit(code); |
| 112 | return; | 112 | return; |
| @@ -131,7 +131,7 @@ void usb_keyboard_del_code(uint8_t code) | |||
| 131 | 131 | ||
| 132 | void usb_keyboard_del_key(uint8_t code) | 132 | void usb_keyboard_del_key(uint8_t code) |
| 133 | { | 133 | { |
| 134 | #ifdef NKRO_ENABLE | 134 | #ifdef USB_NKRO_ENABLE |
| 135 | if ((code>>3) < KEYS_MAX) { | 135 | if ((code>>3) < KEYS_MAX) { |
| 136 | usb_keyboard_keys[code>>3] &= ~(1<<(code&7)); | 136 | usb_keyboard_keys[code>>3] &= ~(1<<(code&7)); |
| 137 | } | 137 | } |
| @@ -169,7 +169,7 @@ bool usb_keyboard_has_mod(void) | |||
| 169 | 169 | ||
| 170 | uint8_t usb_keyboard_get_key(void) | 170 | uint8_t usb_keyboard_get_key(void) |
| 171 | { | 171 | { |
| 172 | #ifdef NKRO_ENABLE | 172 | #ifdef USB_NKRO_ENABLE |
| 173 | if (usb_keyboard_nkro) { | 173 | if (usb_keyboard_nkro) { |
| 174 | uint8_t i = 0; | 174 | uint8_t i = 0; |
| 175 | for (; i < KEYS_MAX && !usb_keyboard_keys[i]; i++); | 175 | for (; i < KEYS_MAX && !usb_keyboard_keys[i]; i++); |
