diff options
| author | Ha Thach <[email protected]> | 2023-03-21 13:58:44 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-03-21 13:58:44 +0700 |
| commit | 096b6ec462efe612613498b44ec596e4bac763a7 (patch) | |
| tree | 2f9863be549be4cc4e5791eab36d5faaa9dfb79f /src/class | |
| parent | cbcf5d8c0866e6c0090b98ad9b3d6d504e313135 (diff) | |
| parent | ccf17e3cde4c3ca42731829107ca18217aab541e (diff) | |
Merge pull request #1964 from hathach/add-tuh-set-interface
add tuh_set_interface
Diffstat (limited to 'src/class')
| -rw-r--r-- | src/class/cdc/cdc_host.c | 6 | ||||
| -rw-r--r-- | src/class/cdc/cdc_host.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/class/cdc/cdc_host.c b/src/class/cdc/cdc_host.c index 011ee49dc..d34662cb7 100644 --- a/src/class/cdc/cdc_host.c +++ b/src/class/cdc/cdc_host.c @@ -97,7 +97,7 @@ static inline uint8_t get_idx_by_ep_addr(uint8_t daddr, uint8_t ep_addr) } } - return TU_INDEX_INVALID_8; + return TUSB_INDEX_INVALID_8; } @@ -124,7 +124,7 @@ uint8_t tuh_cdc_itf_get_index(uint8_t daddr, uint8_t itf_num) if (p_cdc->daddr == daddr && p_cdc->bInterfaceNumber == itf_num) return i; } - return TU_INDEX_INVALID_8; + return TUSB_INDEX_INVALID_8; } bool tuh_cdc_itf_get_info(uint8_t idx, tuh_cdc_itf_info_t* info) @@ -533,7 +533,7 @@ static void process_cdc_config(tuh_xfer_t* xfer) uintptr_t const state = xfer->user_data; uint8_t const itf_num = (uint8_t) tu_le16toh(xfer->setup->wIndex); uint8_t const idx = tuh_cdc_itf_get_index(xfer->daddr, itf_num); - TU_ASSERT(idx != TU_INDEX_INVALID_8, ); + TU_ASSERT(idx != TUSB_INDEX_INVALID_8, ); switch(state) { diff --git a/src/class/cdc/cdc_host.h b/src/class/cdc/cdc_host.h index 4090d0e9f..03f32e542 100644 --- a/src/class/cdc/cdc_host.h +++ b/src/class/cdc/cdc_host.h @@ -80,7 +80,7 @@ typedef struct } tuh_cdc_itf_info_t; // Get Interface index from device address + interface number -// return TUSB_INDEX_INVALID (0xFF) if not found +// return TUSB_INDEX_INVALID_8 (0xFF) if not found uint8_t tuh_cdc_itf_get_index(uint8_t daddr, uint8_t itf_num); // Get Interface information |
