diff options
| author | hathach <[email protected]> | 2021-09-14 21:02:38 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2021-09-14 21:02:38 +0700 |
| commit | 25ea8f9c9e65d1617382a7896df07afd0dc90ce3 (patch) | |
| tree | a110117d5afefb674a50ea318e30fc2d66578061 /examples | |
| parent | 5404d6d8ae02fac16eb8dbfd4a9d15de8e6c1342 (diff) | |
update configuration parser
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/device/audio_4_channel_mic/src/usb_descriptors.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/examples/device/audio_4_channel_mic/src/usb_descriptors.c b/examples/device/audio_4_channel_mic/src/usb_descriptors.c index 018919bf3..2b66bfe34 100644 --- a/examples/device/audio_4_channel_mic/src/usb_descriptors.c +++ b/examples/device/audio_4_channel_mic/src/usb_descriptors.c @@ -81,12 +81,15 @@ enum #define CONFIG_TOTAL_LEN (TUD_CONFIG_DESC_LEN + CFG_TUD_AUDIO * TUD_AUDIO_MIC_FOUR_CH_DESC_LEN) -#if CFG_TUSB_MCU == OPT_MCU_LPC175X_6X || CFG_TUSB_MCU == OPT_MCU_LPC177X_8X || CFG_TUSB_MCU == OPT_MCU_LPC40XX -// LPC 17xx and 40xx endpoint type (bulk/interrupt/iso) are fixed by its number -// 0 control, 1 In, 2 Bulk, 3 Iso, 4 In etc ... -#define EPNUM_AUDIO 0x03 +#if TU_CHECK_MCU(LPC175X_6X) || TU_CHECK_MCU(LPC177X_8X) || TU_CHECK_MCU(LPC40XX) + // LPC 17xx and 40xx endpoint type (bulk/interrupt/iso) are fixed by its number + // 0 control, 1 In, 2 Bulk, 3 Iso, 4 In etc ... + #define EPNUM_AUDIO 0x03 +#elif TU_CHECK_MCU(NRF5X) + // nRF5x ISO can only be endpoint 8 + #define EPNUM_AUDIO 0x08 #else -#define EPNUM_AUDIO 0x01 + #define EPNUM_AUDIO 0x01 #endif uint8_t const desc_configuration[] = |
