diff options
| author | hathach <[email protected]> | 2013-09-21 00:42:39 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-09-21 00:42:39 +0700 |
| commit | 295612b48f396fa2234c109be4b73294e5c6c27c (patch) | |
| tree | 9e614d97ed6e16e615c8e1b7e23cf01a9c699f39 /tinyusb/class/hid_host.c | |
| parent | f8f398a6813567306acd2e9dcfae199c3ecbad3a (diff) | |
remove ATTR_WEAK for all necessary driver callback
fix ceedling tests
Diffstat (limited to 'tinyusb/class/hid_host.c')
| -rw-r--r-- | tinyusb/class/hid_host.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tinyusb/class/hid_host.c b/tinyusb/class/hid_host.c index e3d74fa12..f3dff2eed 100644 --- a/tinyusb/class/hid_host.c +++ b/tinyusb/class/hid_host.c @@ -310,17 +310,17 @@ void hidh_isr(pipe_handle_t pipe_hdl, tusb_event_t event, uint32_t xferred_bytes void hidh_close(uint8_t dev_addr) { #if TUSB_CFG_HOST_HID_KEYBOARD - hidh_interface_close(dev_addr, &keyboard_data[dev_addr-1]); - if (tusbh_hid_keyboard_unmounted_isr) + if ( pipehandle_is_valid( keyboard_data[dev_addr-1].pipe_hdl ) ) { + hidh_interface_close(dev_addr, &keyboard_data[dev_addr-1]); tusbh_hid_keyboard_unmounted_isr(dev_addr); } #endif #if TUSB_CFG_HOST_HID_MOUSE - hidh_interface_close(dev_addr, &mouse_data[dev_addr-1]); - if( tusbh_hid_mouse_unmounted_isr ) + if( pipehandle_is_valid( mouse_data[dev_addr-1].pipe_hdl ) ) { + hidh_interface_close(dev_addr, &mouse_data[dev_addr-1]); tusbh_hid_mouse_unmounted_isr( dev_addr ); } #endif |
