diff options
| author | hathach <[email protected]> | 2022-03-18 16:39:35 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2022-03-18 16:39:35 +0700 |
| commit | 8750e3b57756e4377bb737c578e2742b653c314c (patch) | |
| tree | e0fae0d6e28b68ec2a771e2e761fc8f46f5e858a /examples/host/bare_api/src | |
| parent | 2ff8978dde779607ddf01ba8e9d8dfeb70bfbd03 (diff) | |
move daddr into xfer struct
Diffstat (limited to 'examples/host/bare_api/src')
| -rw-r--r-- | examples/host/bare_api/src/main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/host/bare_api/src/main.c b/examples/host/bare_api/src/main.c index b472c40c4..e2e0f4ff3 100644 --- a/examples/host/bare_api/src/main.c +++ b/examples/host/bare_api/src/main.c @@ -115,7 +115,7 @@ static void utf16_to_utf8(uint16_t *temp_buf, size_t buf_len) { ((uint8_t*) temp_buf)[utf8_len] = '\0'; } -void print_device_descriptor(uint8_t daddr, tuh_xfer_t* xfer) +void print_device_descriptor(tuh_xfer_t* xfer) { if ( XFER_RESULT_SUCCESS != xfer->result ) { @@ -123,6 +123,8 @@ void print_device_descriptor(uint8_t daddr, tuh_xfer_t* xfer) return; } + uint8_t const daddr = xfer->daddr; + printf("Device %u: ID %04x:%04x\r\n", daddr, desc_device.idVendor, desc_device.idProduct); printf("Device Descriptor:\r\n"); printf(" bLength %u\r\n" , desc_device.bLength); |
