diff options
| author | hathach <[email protected]> | 2013-03-26 02:02:54 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-03-26 02:02:54 +0700 |
| commit | 086a8e4a2dbd78dc42a6359c40e1920c9b93a701 (patch) | |
| tree | 8f84a2563c448f02c57165ed486cab5c5615fbbf /tinyusb/class | |
| parent | ff03b452d9097c8fc40bebe115f6d5979aa6ed08 (diff) | |
add flag_supported_class to usbh_devices
remove all ATTR_WEAK in init,open,isr,close driver functions of USBH-CLASS API
- prefer testing
Diffstat (limited to 'tinyusb/class')
| -rw-r--r-- | tinyusb/class/hid_host.c | 10 | ||||
| -rw-r--r-- | tinyusb/class/hid_host.h | 10 |
2 files changed, 15 insertions, 5 deletions
diff --git a/tinyusb/class/hid_host.c b/tinyusb/class/hid_host.c index 944339344..a01c57963 100644 --- a/tinyusb/class/hid_host.c +++ b/tinyusb/class/hid_host.c @@ -111,7 +111,17 @@ void hidh_isr(pipe_handle_t pipe_hdl, tusb_bus_event_t event) void hidh_close(uint8_t dev_addr) { +#if TUSB_CFG_HOST_HID_KEYBOARD + hidh_keyboard_close(dev_addr); +#endif +#if TUSB_CFG_HOST_HID_MOUSE + hidh_mouse_close(dev_addr); +#endif + +#if TUSB_CFG_HOST_HID_GENERIC + hidh_generic_close(dev_addr); +#endif } #endif diff --git a/tinyusb/class/hid_host.h b/tinyusb/class/hid_host.h index f4f1cbb9b..b06d74eed 100644 --- a/tinyusb/class/hid_host.h +++ b/tinyusb/class/hid_host.h @@ -72,14 +72,14 @@ //--------------------------------------------------------------------+ //--------------------------------------------------------------------+ -// CLASS DRIVER FUNCTION (all declared with WEAK) +// CLASS DRIVER FUNCTION //--------------------------------------------------------------------+ #ifdef _TINY_USB_SOURCE_FILE_ -void hidh_init(void) ATTR_WEAK; -tusb_error_t hidh_open_subtask(uint8_t dev_addr, uint8_t const *descriptor, uint16_t *p_length) ATTR_WEAK ATTR_WARN_UNUSED_RESULT; -void hidh_isr(pipe_handle_t pipe_hdl, tusb_bus_event_t event) ATTR_WEAK; -void hidh_close(uint8_t dev_addr) ATTR_WEAK; +void hidh_init(void); +tusb_error_t hidh_open_subtask(uint8_t dev_addr, uint8_t const *descriptor, uint16_t *p_length) ATTR_WARN_UNUSED_RESULT; +void hidh_isr(pipe_handle_t pipe_hdl, tusb_bus_event_t event); +void hidh_close(uint8_t dev_addr); #endif |
