summaryrefslogtreecommitdiff
path: root/tinyusb/class/hid_host.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-09-20 23:53:48 +0700
committerhathach <[email protected]>2013-09-20 23:53:48 +0700
commitf8f398a6813567306acd2e9dcfae199c3ecbad3a (patch)
tree2a0acf048ae44a4ee439c3928a8f74f91ea30bf5 /tinyusb/class/hid_host.c
parent52ae0afeb6dc781b82e6e71b864a02184eaf62bf (diff)
start to add msc host, fix dangerous problem with unstable device when plugged --> 200 ms delay. 50ms delay after each port reset
Diffstat (limited to 'tinyusb/class/hid_host.c')
-rw-r--r--tinyusb/class/hid_host.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/tinyusb/class/hid_host.c b/tinyusb/class/hid_host.c
index 60e0ab6d3..e3d74fa12 100644
--- a/tinyusb/class/hid_host.c
+++ b/tinyusb/class/hid_host.c
@@ -83,12 +83,8 @@ static inline tusb_error_t hidh_interface_open(uint8_t dev_addr, uint8_t interfa
static inline void hidh_interface_close(uint8_t dev_addr, hidh_interface_info_t *p_hid) ATTR_ALWAYS_INLINE;
static inline void hidh_interface_close(uint8_t dev_addr, hidh_interface_info_t *p_hid)
{
- pipe_handle_t pipe_hdl = p_hid->pipe_hdl;
- if ( pipehandle_is_valid(pipe_hdl) )
- {
- memclr_(p_hid, sizeof(hidh_interface_info_t));
- ASSERT_INT( TUSB_ERROR_NONE, hcd_pipe_close(pipe_hdl), VOID_RETURN );
- }
+ (void) hcd_pipe_close(p_hid->pipe_hdl);
+ memclr_(p_hid, sizeof(hidh_interface_info_t));
}
// called from public API need to validate parameters