Implement dcd_edpt_close_all() for Renesas RX family
@@ -735,8 +735,14 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * ep_desc)
void dcd_edpt_close_all(uint8_t rhport)
{
- (void) rhport;
- // TODO implement dcd_edpt_close_all()
+ unsigned i = TU_ARRAY_SIZE(_dcd.pipe);
+ dcd_int_disable(rhport);
+ while (--i) { /* Close all pipes except 0 */
+ const unsigned ep_addr = _dcd.pipe[i].ep;
+ if (!ep_addr) continue;
+ dcd_edpt_close(rhport, ep_addr);
+ }
+ dcd_int_enable(rhport);
}
void dcd_edpt_close(uint8_t rhport, uint8_t ep_addr)
