diff options
| author | Ryzee119 <[email protected]> | 2022-08-15 17:34:13 +0930 |
|---|---|---|
| committer | Ryan Wendland <[email protected]> | 2022-08-15 17:42:56 +0930 |
| commit | 5efef4393c2f67773843c4ccc0a50f07dac6ece9 (patch) | |
| tree | a083ba7b83416e48af3e37bc1374cc58bf6aace8 | |
| parent | 8a28e7cd75b6bba4f84188f7e1dcf52f9da29edc (diff) | |
Hub: Expand hub helpers to handle device events
| -rw-r--r-- | src/host/hub.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/host/hub.c b/src/host/hub.c index 3400b154a..e3b81ad23 100644 --- a/src/host/hub.c +++ b/src/host/hub.c @@ -85,7 +85,7 @@ bool hub_port_clear_feature(uint8_t hub_addr, uint8_t hub_port, uint8_t feature, { .bmRequestType_bit = { - .recipient = TUSB_REQ_RCPT_OTHER, + .recipient = (hub_port == 0) ? TUSB_REQ_RCPT_DEVICE : TUSB_REQ_RCPT_OTHER, .type = TUSB_REQ_TYPE_CLASS, .direction = TUSB_DIR_OUT }, @@ -117,7 +117,7 @@ bool hub_port_set_feature(uint8_t hub_addr, uint8_t hub_port, uint8_t feature, { .bmRequestType_bit = { - .recipient = TUSB_REQ_RCPT_OTHER, + .recipient = (hub_port == 0) ? TUSB_REQ_RCPT_DEVICE : TUSB_REQ_RCPT_OTHER, .type = TUSB_REQ_TYPE_CLASS, .direction = TUSB_DIR_OUT }, @@ -149,7 +149,7 @@ bool hub_port_get_status(uint8_t hub_addr, uint8_t hub_port, void* resp, { .bmRequestType_bit = { - .recipient = TUSB_REQ_RCPT_OTHER, + .recipient = (hub_port == 0) ? TUSB_REQ_RCPT_DEVICE : TUSB_REQ_RCPT_OTHER, .type = TUSB_REQ_TYPE_CLASS, .direction = TUSB_DIR_IN }, |
