diff options
| author | hathach <[email protected]> | 2019-07-22 18:58:45 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2019-07-22 18:58:45 +0700 |
| commit | 97e2629d647584681b2883f2081fa2cddb3d61cc (patch) | |
| tree | 593bc9539777049432b1470ba82a89b7318c3fe0 /examples/device | |
| parent | 2b43bba4531e46c3004481c7d1ec86390956e87d (diff) | |
change EPNUM for example
Diffstat (limited to 'examples/device')
| -rw-r--r-- | examples/device/midi_test/src/usb_descriptors.c | 11 | ||||
| -rw-r--r-- | examples/device/msc_dual_lun/src/usb_descriptors.c | 11 |
2 files changed, 14 insertions, 8 deletions
diff --git a/examples/device/midi_test/src/usb_descriptors.c b/examples/device/midi_test/src/usb_descriptors.c index 192dacfbe..3eef02bb2 100644 --- a/examples/device/midi_test/src/usb_descriptors.c +++ b/examples/device/midi_test/src/usb_descriptors.c @@ -71,10 +71,13 @@ enum CONFIG_TOTAL_LEN = TUD_CONFIG_DESC_LEN + TUD_MIDI_DESC_LEN }; -// Use Endpoint 2 instead of 1 due to NXP MCU -// 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_MIDI 0x02 +#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_MIDI 0x02 +#else + #define EPNUM_MIDI 0x01 +#endif uint8_t const desc_configuration[] = { diff --git a/examples/device/msc_dual_lun/src/usb_descriptors.c b/examples/device/msc_dual_lun/src/usb_descriptors.c index 26ebe190c..1a71b7fcc 100644 --- a/examples/device/msc_dual_lun/src/usb_descriptors.c +++ b/examples/device/msc_dual_lun/src/usb_descriptors.c @@ -68,10 +68,13 @@ enum CONFIG_TOTAL_LEN = TUD_CONFIG_DESC_LEN + TUD_MSC_DESC_LEN }; -// Use Endpoint 2 instead of 1 due to NXP MCU -// 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_MSC 0x02 +#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_MSC 0x02 +#else + #define EPNUM_MSC 0x01 +#endif uint8_t const desc_configuration[] = { |
