summaryrefslogtreecommitdiff
path: root/tests/test/support/ehci_controller.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test/support/ehci_controller.c')
-rw-r--r--tests/test/support/ehci_controller.c10
1 files changed, 10 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;
+}