diff options
| author | hathach <[email protected]> | 2013-03-12 16:42:19 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-03-12 16:42:19 +0700 |
| commit | 80facf6f2ec06b3c0c6cb1061ea27d75c26557d2 (patch) | |
| tree | 93fbddf37daab714b3f8913292883a6238506e64 /tests | |
| parent | c6b220c32750042d3ae7dca379af24b274696b16 (diff) | |
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
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test/support/ehci_controller.c | 10 | ||||
| -rw-r--r-- | tests/test/support/ehci_controller.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/test/support/ehci_controller.c b/tests/test/support/ehci_controller.c index fed3c730e..0bc09f53a 100644 --- a/tests/test/support/ehci_controller.c +++ b/tests/test/support/ehci_controller.c @@ -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; +} diff --git a/tests/test/support/ehci_controller.h b/tests/test/support/ehci_controller.h index 945e8e13f..aee3f0116 100644 --- a/tests/test/support/ehci_controller.h +++ b/tests/test/support/ehci_controller.h @@ -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 } |
