add class driver deinit

This commit is contained in:
hathach
2024-04-08 22:07:56 +07:00
parent 47c12a07f2
commit c3c0648456
33 changed files with 292 additions and 113 deletions

View File

@@ -407,16 +407,17 @@ void dcd_init(uint8_t rhport) {
dcd_connect(rhport);
}
void dcd_deinit(uint8_t rhport) {
bool dcd_deinit(uint8_t rhport) {
assert(rhport == 0);
dcd_disconnect(rhport);
reset_non_control_endpoints();
irq_remove_handler(USBCTRL_IRQ, dcd_rp2040_irq);
// reset usb hardware into initial state
reset_block(RESETS_RESET_USBCTRL_BITS);
unreset_block_wait(RESETS_RESET_USBCTRL_BITS);
return true;
}
void dcd_int_enable(__unused uint8_t rhport) {