diff options
author | tmk <nobody@nowhere> | 2010-10-24 01:17:26 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2010-10-24 01:17:26 +0900 |
commit | 06eb50be07ff16e4bfb046e4773185d9bcf048e9 (patch) | |
tree | 86a8fb688282004893eedd28641f8300c9d812d1 /usb_keyboard.h | |
parent | 9d7979931e0037fc5ddc77a2cb895eb055501f34 (diff) |
hhkb: refactored
Diffstat (limited to 'usb_keyboard.h')
-rw-r--r-- | usb_keyboard.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/usb_keyboard.h b/usb_keyboard.h index 90c2c5af62..2420745eee 100644 --- a/usb_keyboard.h +++ b/usb_keyboard.h @@ -2,6 +2,7 @@ #define USB_KEYBOARD_H 1 #include <stdint.h> +#include <stdbool.h> #include "usb.h" @@ -10,6 +11,7 @@ #define KEYBOARD_SIZE 8 #define KEYBOARD_BUFFER EP_DOUBLE_BUFFER +// TODO: move to usb_keycodes.h ? // modifier bits #define MOD_LCTRL (1<<0) #define MOD_LSHIFT (1<<1) @@ -21,15 +23,24 @@ #define MOD_RGUI (1<<7) +// TODO: change variable name: usb_keyboard_ or usb_kb_ extern uint8_t keyboard_modifier_keys; extern uint8_t keyboard_keys[6]; extern uint8_t keyboard_protocol; extern uint8_t keyboard_idle_config; extern uint8_t keyboard_idle_count; -extern volatile uint8_t keyboard_leds; +extern volatile uint8_t keyboard_leds; // TODO: delete NOT USED? int8_t usb_keyboard_press(uint8_t key, uint8_t modifier); int8_t usb_keyboard_send(void); +void usb_keyboard_init(void); +void usb_keyboard_clear(void); +void usb_keyboard_clear_key(void); +void usb_keyboard_clear_mod(void); +bool usb_keyboard_is_sent(void); +bool usb_keyboard_has_key(void); +bool usb_keyboard_has_mod(void); +void usb_keyboard_print(void); #endif |