diff options
Diffstat (limited to 'common/host.h')
| -rw-r--r-- | common/host.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/common/host.h b/common/host.h index a0a661af5..207b68310 100644 --- a/common/host.h +++ b/common/host.h | |||
| @@ -31,38 +31,40 @@ extern "C" { | |||
| 31 | extern bool keyboard_nkro; | 31 | extern bool keyboard_nkro; |
| 32 | #endif | 32 | #endif |
| 33 | 33 | ||
| 34 | /* report */ | ||
| 34 | extern report_keyboard_t *keyboard_report; | 35 | extern report_keyboard_t *keyboard_report; |
| 35 | extern report_keyboard_t *keyboard_report_prev; | 36 | extern report_mouse_t mouse_report; |
| 36 | 37 | ||
| 37 | 38 | ||
| 38 | /* host driver */ | 39 | /* host driver */ |
| 39 | void host_set_driver(host_driver_t *driver); | 40 | void host_set_driver(host_driver_t *driver); |
| 40 | host_driver_t *host_get_driver(void); | 41 | host_driver_t *host_get_driver(void); |
| 41 | 42 | ||
| 43 | /* host driver interface */ | ||
| 42 | uint8_t host_keyboard_leds(void); | 44 | uint8_t host_keyboard_leds(void); |
| 45 | void host_keyboard_send(report_keyboard_t *report); | ||
| 46 | void host_mouse_send(report_mouse_t *report); | ||
| 47 | void host_system_send(uint16_t data); | ||
| 48 | void host_consumer_send(uint16_t data); | ||
| 43 | 49 | ||
| 44 | 50 | /* keyboard report utils */ | |
| 45 | /* keyboard report operations */ | ||
| 46 | /* key */ | ||
| 47 | void host_add_key(uint8_t key); | 51 | void host_add_key(uint8_t key); |
| 48 | void host_del_key(uint8_t key); | 52 | void host_del_key(uint8_t key); |
| 49 | void host_clear_keys(void); | 53 | void host_clear_keys(void); |
| 50 | /* modifier */ | ||
| 51 | void host_add_mod_bit(uint8_t mod); | 54 | void host_add_mod_bit(uint8_t mod); |
| 52 | void host_del_mod_bit(uint8_t mod); | 55 | void host_del_mod_bit(uint8_t mod); |
| 53 | void host_set_mods(uint8_t mods); | 56 | void host_set_mods(uint8_t mods); |
| 54 | void host_clear_mods(void); | 57 | void host_clear_mods(void); |
| 55 | /* query */ | ||
| 56 | uint8_t host_has_anykey(void); | 58 | uint8_t host_has_anykey(void); |
| 59 | uint8_t host_has_anymod(void); | ||
| 57 | uint8_t host_get_first_key(void); | 60 | uint8_t host_get_first_key(void); |
| 58 | /* send report */ | ||
| 59 | void host_send_keyboard_report(void); | 61 | void host_send_keyboard_report(void); |
| 60 | 62 | ||
| 63 | /* mouse report utils */ | ||
| 64 | uint8_t host_mouse_in_use(void); | ||
| 61 | 65 | ||
| 62 | /* send report: mouse, system contorl and consumer page */ | 66 | uint16_t host_last_sysytem_report(void); |
| 63 | void host_mouse_send(report_mouse_t *report); | 67 | uint16_t host_last_consumer_report(void); |
| 64 | void host_system_send(uint16_t data); | ||
| 65 | void host_consumer_send(uint16_t data); | ||
| 66 | 68 | ||
| 67 | #ifdef __cplusplus | 69 | #ifdef __cplusplus |
| 68 | } | 70 | } |
