mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-18 11:42:25 +00:00
Hub: Expand hub helpers to handle device events
This commit is contained in:
parent
8a28e7cd75
commit
5efef4393c
@ -85,7 +85,7 @@ bool hub_port_clear_feature(uint8_t hub_addr, uint8_t hub_port, uint8_t feature,
|
|||||||
{
|
{
|
||||||
.bmRequestType_bit =
|
.bmRequestType_bit =
|
||||||
{
|
{
|
||||||
.recipient = TUSB_REQ_RCPT_OTHER,
|
.recipient = (hub_port == 0) ? TUSB_REQ_RCPT_DEVICE : TUSB_REQ_RCPT_OTHER,
|
||||||
.type = TUSB_REQ_TYPE_CLASS,
|
.type = TUSB_REQ_TYPE_CLASS,
|
||||||
.direction = TUSB_DIR_OUT
|
.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 =
|
.bmRequestType_bit =
|
||||||
{
|
{
|
||||||
.recipient = TUSB_REQ_RCPT_OTHER,
|
.recipient = (hub_port == 0) ? TUSB_REQ_RCPT_DEVICE : TUSB_REQ_RCPT_OTHER,
|
||||||
.type = TUSB_REQ_TYPE_CLASS,
|
.type = TUSB_REQ_TYPE_CLASS,
|
||||||
.direction = TUSB_DIR_OUT
|
.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 =
|
.bmRequestType_bit =
|
||||||
{
|
{
|
||||||
.recipient = TUSB_REQ_RCPT_OTHER,
|
.recipient = (hub_port == 0) ? TUSB_REQ_RCPT_DEVICE : TUSB_REQ_RCPT_OTHER,
|
||||||
.type = TUSB_REQ_TYPE_CLASS,
|
.type = TUSB_REQ_TYPE_CLASS,
|
||||||
.direction = TUSB_DIR_IN
|
.direction = TUSB_DIR_IN
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user