summaryrefslogtreecommitdiff
path: root/tests/test/support
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-03-13 10:57:30 +0700
committerhathach <[email protected]>2013-03-13 10:57:30 +0700
commit97c9001d401b217b383046b6af3b8fd957e835f4 (patch)
tree565b4ff5ad55cebd0dea9425bc533848b17a825e /tests/test/support
parent63765b37c7ebab2a7586122924cfb8b134db17f8 (diff)
add hard fault handler to bsp.c
rename class_install_subtask to class_open_subtask add class_close for unmount adding code for usbh_device_unplugged_isr & invoke it in hcd_isr
Diffstat (limited to 'tests/test/support')
-rw-r--r--tests/test/support/ehci_controller.c9
-rw-r--r--tests/test/support/ehci_controller.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/test/support/ehci_controller.c b/tests/test/support/ehci_controller.c
index 0bc09f53a..484348566 100644
--- a/tests/test/support/ehci_controller.c
+++ b/tests/test/support/ehci_controller.c
@@ -86,3 +86,12 @@ void ehci_controller_device_plug(uint8_t hostid, tusb_speed_t speed)
regs->portsc_bit.current_connect_status = 1;
regs->portsc_bit.nxp_port_speed = speed;
}
+
+void ehci_controller_device_unplug(uint8_t hostid)
+{
+ 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 = 0;
+}
diff --git a/tests/test/support/ehci_controller.h b/tests/test/support/ehci_controller.h
index aee3f0116..cb5c69313 100644
--- a/tests/test/support/ehci_controller.h
+++ b/tests/test/support/ehci_controller.h
@@ -57,6 +57,7 @@
void ehci_controller_run(uint8_t hostid);
void ehci_controller_device_plug(uint8_t hostid, tusb_speed_t speed);
+void ehci_controller_device_unplug(uint8_t hostid);
#ifdef __cplusplus
}