summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRyzee119 <[email protected]>2022-06-04 14:18:53 +0930
committerRyan Wendland <[email protected]>2023-02-18 10:24:21 +1030
commite89e8ba392dae795663169d02952116b3f3980f3 (patch)
treea81dc9a4548457939b5267b040dd4b11151e27a4 /src
parent5d3c0fb922604989e7f7e7f628fe43553ac78df7 (diff)
ohci: Direct port commands to the correct rhport.
Diffstat (limited to 'src')
-rw-r--r--src/portable/ohci/ohci.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/portable/ohci/ohci.c b/src/portable/ohci/ohci.c
index 85795c5b4..b0c6bb63c 100644
--- a/src/portable/ohci/ohci.c
+++ b/src/portable/ohci/ohci.c
@@ -234,8 +234,7 @@ uint32_t hcd_frame_number(uint8_t rhport)
//--------------------------------------------------------------------+
void hcd_port_reset(uint8_t hostid)
{
- (void) hostid;
- OHCI_REG->rhport_status[0] = RHPORT_PORT_RESET_STATUS_MASK;
+ OHCI_REG->rhport_status[hostid] = RHPORT_PORT_RESET_STATUS_MASK;
}
void hcd_port_reset_end(uint8_t rhport)
@@ -245,14 +244,12 @@ void hcd_port_reset_end(uint8_t rhport)
bool hcd_port_connect_status(uint8_t hostid)
{
- (void) hostid;
- return OHCI_REG->rhport_status_bit[0].current_connect_status;
+ return OHCI_REG->rhport_status_bit[hostid].current_connect_status;
}
tusb_speed_t hcd_port_speed_get(uint8_t hostid)
{
- (void) hostid;
- return OHCI_REG->rhport_status_bit[0].low_speed_device_attached ? TUSB_SPEED_LOW : TUSB_SPEED_FULL;
+ return OHCI_REG->rhport_status_bit[hostid].low_speed_device_attached ? TUSB_SPEED_LOW : TUSB_SPEED_FULL;
}
// endpoints are tied to an address, which only reclaim after a long delay when enumerating