add isr api for usbh_hcd
- void usbh_device_plugged_isr(uint8_t hostid, tusb_speed_t speed); - void usbh_device_unplugged_isr(uint8_t hostid); implement port_connect_status_isr
This commit is contained in:
@@ -76,3 +76,13 @@ void ehci_controller_run(uint8_t hostid)
|
||||
|
||||
regs->usb_sts = EHCI_INT_MASK_NXP_ASYNC;
|
||||
}
|
||||
|
||||
void ehci_controller_device_plug(uint8_t hostid, tusb_speed_t speed)
|
||||
{
|
||||
ehci_registers_t* const regs = get_operational_register(hostid);
|
||||
|
||||
regs->usb_sts_bit.port_change_detect = 1;
|
||||
regs->portsc_bit.connect_status_change = 1;
|
||||
regs->portsc_bit.current_connect_status = 1;
|
||||
regs->portsc_bit.nxp_port_speed = speed;
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
#endif
|
||||
|
||||
void ehci_controller_run(uint8_t hostid);
|
||||
void ehci_controller_device_plug(uint8_t hostid, tusb_speed_t speed);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user