summaryrefslogtreecommitdiff
path: root/examples/device
diff options
context:
space:
mode:
authorhathach <[email protected]>2019-07-22 19:23:48 +0700
committerhathach <[email protected]>2019-07-22 19:23:48 +0700
commit8fad8fb5c2d4b586431c1893f912ad2ebedc9b33 (patch)
tree57950c378a0984a7f4e9f47671eb702e375779ca /examples/device
parent33de35504abf27801286b1f3760862d3909e2ae6 (diff)
parentb041b23ba3b6d3e8127ab19899219eeaf4b15fbb (diff)
Merge branch 'master' into develop
Diffstat (limited to 'examples/device')
-rw-r--r--examples/device/cdc_msc_hid/ses/stm32f4/stm32f4.emProject8
-rw-r--r--examples/device/midi_test/src/usb_descriptors.c11
-rw-r--r--examples/device/msc_dual_lun/src/usb_descriptors.c11
3 files changed, 18 insertions, 12 deletions
diff --git a/examples/device/cdc_msc_hid/ses/stm32f4/stm32f4.emProject b/examples/device/cdc_msc_hid/ses/stm32f4/stm32f4.emProject
index 83067fd09..6f6690d21 100644
--- a/examples/device/cdc_msc_hid/ses/stm32f4/stm32f4.emProject
+++ b/examples/device/cdc_msc_hid/ses/stm32f4/stm32f4.emProject
@@ -61,8 +61,8 @@
recurse="No" />
<folder Name="hw">
<folder Name="bsp">
- <folder Name="stm32f407g_disc1">
- <file file_name="../../../../../hw/bsp/stm32f407g_disc1/board_stm32f407g_disc1.c" />
+ <folder Name="stm32f407disco">
+ <file file_name="../../../../../hw/bsp/stm32f407disco/board_stm32f407disco.c" />
</folder>
<file file_name="../../../../../hw/bsp/board.h" />
</folder>
@@ -76,11 +76,11 @@
</folder>
</folder>
<configuration
- Name="stm32f407g_disc1"
+ Name="stm32f407disco"
c_preprocessor_definitions="BOARD_STM32F407G_DISC1" />
</project>
<configuration
- Name="stm32f407g_disc1"
+ Name="stm32f407disco"
c_preprocessor_definitions="DEBUG"
gcc_debugging_level="Level 3"
gcc_optimization_level="None" />
diff --git a/examples/device/midi_test/src/usb_descriptors.c b/examples/device/midi_test/src/usb_descriptors.c
index 85cffffcc..d9ab42f09 100644
--- a/examples/device/midi_test/src/usb_descriptors.c
+++ b/examples/device/midi_test/src/usb_descriptors.c
@@ -79,10 +79,13 @@ enum
#define 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 585588a9c..0875f4848 100644
--- a/examples/device/msc_dual_lun/src/usb_descriptors.c
+++ b/examples/device/msc_dual_lun/src/usb_descriptors.c
@@ -77,10 +77,13 @@ enum
#define 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[] =
{