replace all hcd pipe close by hcd_device_remove
This commit is contained in:
@@ -233,11 +233,6 @@ void cdch_isr(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t event, uint32_t x
|
||||
void cdch_close(uint8_t dev_addr)
|
||||
{
|
||||
cdch_data_t * p_cdc = &cdch_data[dev_addr-1];
|
||||
|
||||
hcd_pipe_close(TUH_OPT_RHPORT, dev_addr, p_cdc->ep_notif);
|
||||
hcd_pipe_close(TUH_OPT_RHPORT, dev_addr, p_cdc->ep_in);
|
||||
hcd_pipe_close(TUH_OPT_RHPORT, dev_addr, p_cdc->ep_out);
|
||||
|
||||
tu_memclr(p_cdc, sizeof(cdch_data_t));
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,6 @@ static inline bool hidh_interface_open(uint8_t dev_addr, uint8_t interface_numbe
|
||||
|
||||
static inline void hidh_interface_close(hidh_interface_info_t *p_hid)
|
||||
{
|
||||
(void) hcd_pipe_close(p_hid->pipe_hdl);
|
||||
tu_memclr(p_hid, sizeof(hidh_interface_info_t));
|
||||
}
|
||||
|
||||
|
||||
@@ -413,9 +413,6 @@ void msch_isr(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t event, uint32_t x
|
||||
|
||||
void msch_close(uint8_t dev_addr)
|
||||
{
|
||||
(void) hcd_pipe_close(TUH_OPT_RHPORT, dev_addr, msch_data[dev_addr-1].ep_in);
|
||||
(void) hcd_pipe_close(TUH_OPT_RHPORT, dev_addr, msch_data[dev_addr-1].ep_out);
|
||||
|
||||
tu_memclr(&msch_data[dev_addr-1], sizeof(msch_interface_t));
|
||||
osal_semaphore_reset(msch_sem_hdl);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user