diff options
| author | hathach <[email protected]> | 2013-04-07 05:09:18 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-04-07 05:09:18 +0700 |
| commit | 27f860db9ffd46bb8cb43046f9203f510a554d7c (patch) | |
| tree | bb25a7ee341c943f76b394a3bfc6fa270c57099a /tinyusb/class/hid_host.h | |
| parent | 24ade0458e0fe3831615d7ddb1be0e3b8ed64ba6 (diff) | |
rename hidh_keyboard_info_t to hidh_interface_info_t
rename tusb_bus_event_t to tusb_event_t
add test_mouse_init and more stuff for hidh mouse
move delay after port reset to only for speed detection
prioritize port change interrupt over xfer interrupt
- in case of unplugged, current connect change & xfer error both set
- xfer error only break to debugger if not because of unplugged
fix bug: set dev addr0 state to UNPLUG after close its control pipe in enumeration process
Diffstat (limited to 'tinyusb/class/hid_host.h')
| -rw-r--r-- | tinyusb/class/hid_host.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/tinyusb/class/hid_host.h b/tinyusb/class/hid_host.h index 5d5fa1fc9..81a443bd5 100644 --- a/tinyusb/class/hid_host.h +++ b/tinyusb/class/hid_host.h @@ -62,12 +62,6 @@ //--------------------------------------------------------------------+ // KEYBOARD Public API //--------------------------------------------------------------------+ -typedef struct { - pipe_handle_t pipe_hdl; - uint16_t report_size; - volatile tusb_interface_status_t status; -}hidh_keyboard_info_t; - bool tusbh_hid_keyboard_is_supported(uint8_t dev_addr) ATTR_PURE ATTR_WARN_UNUSED_RESULT; tusb_error_t tusbh_hid_keyboard_get_report(uint8_t dev_addr, uint8_t instance_num, uint8_t * const report) ATTR_WARN_UNUSED_RESULT; tusb_interface_status_t tusbh_hid_keyboard_status(uint8_t dev_addr, uint8_t instance_num) ATTR_WARN_UNUSED_RESULT; @@ -75,6 +69,9 @@ tusb_interface_status_t tusbh_hid_keyboard_status(uint8_t dev_addr, uint8_t inst //--------------------------------------------------------------------+ // MOUSE Public API //--------------------------------------------------------------------+ +bool tusbh_hid_mouse_is_supported(uint8_t dev_addr) ATTR_PURE ATTR_WARN_UNUSED_RESULT; +tusb_error_t tusbh_hid_mouse_get_report(uint8_t dev_addr, uint8_t instance_num, uint8_t * const report) ATTR_WARN_UNUSED_RESULT; +tusb_interface_status_t tusbh_hid_mouse_status(uint8_t dev_addr, uint8_t instance_num) ATTR_WARN_UNUSED_RESULT; //--------------------------------------------------------------------+ // GENERIC Public API @@ -85,9 +82,15 @@ tusb_interface_status_t tusbh_hid_keyboard_status(uint8_t dev_addr, uint8_t inst //--------------------------------------------------------------------+ #ifdef _TINY_USB_SOURCE_FILE_ +typedef struct { + pipe_handle_t pipe_hdl; + uint16_t report_size; + volatile tusb_interface_status_t status; +}hidh_interface_info_t; + void hidh_init(void); tusb_error_t hidh_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t const *p_interface_desc, uint16_t *p_length) ATTR_WARN_UNUSED_RESULT; -void hidh_isr(pipe_handle_t pipe_hdl, tusb_bus_event_t event); +void hidh_isr(pipe_handle_t pipe_hdl, tusb_event_t event); void hidh_close(uint8_t dev_addr); #endif |
