summaryrefslogtreecommitdiff
path: root/examples/device
diff options
context:
space:
mode:
authorhathach <[email protected]>2019-03-27 08:52:25 -0700
committerGitHub <[email protected]>2019-03-27 08:52:25 -0700
commit86c24b310509a368cc6a9dfbec43ce531e71d598 (patch)
tree81fec0b3724083a3515ef09e0b7d601ce01ec621 /examples/device
parent547cc045fa1d8862e7e00c1d7b4a0026531d0098 (diff)
parent38f7d281d44c69593f1de3885a292ee7c5c39355 (diff)
Merge pull request #49 from hathach/develop
clean up porting API
Diffstat (limited to 'examples/device')
-rw-r--r--examples/device/cdc_msc_hid/Makefile4
-rw-r--r--examples/device/cdc_msc_hid/ses/lpc11u6x/lpc11u6x.emProject3
-rw-r--r--examples/device/cdc_msc_hid/ses/lpc13xx/lpc13xx.emProject6
-rw-r--r--examples/device/cdc_msc_hid/ses/lpc175x_6x/lpc175x_6x.emProject64
-rw-r--r--examples/device/cdc_msc_hid/ses/lpc18xx/lpc18xx.emProject6
-rw-r--r--examples/device/cdc_msc_hid/ses/lpc40xx/lpc40xx.emProject4
-rw-r--r--examples/device/cdc_msc_hid/ses/lpc43xx/lpc43xx.emProject5
-rw-r--r--examples/device/cdc_msc_hid/ses/nrf5x/nrf5x.emProject6
-rw-r--r--examples/device/cdc_msc_hid/ses/samd21/samd21.emProject6
-rw-r--r--examples/device/cdc_msc_hid/ses/samd51/samd51.emProject6
-rw-r--r--examples/device/cdc_msc_hid/ses/stm32f4/stm32f4.emProject6
-rw-r--r--examples/device/cdc_msc_hid/src/main.c16
-rw-r--r--examples/device/cdc_msc_hid_freertos/ses/lpc175x_6x/FreeRTOSConfig.h2
-rw-r--r--examples/device/cdc_msc_hid_freertos/ses/lpc175x_6x/lpc175x_6x.emProject34
-rw-r--r--examples/device/cdc_msc_hid_freertos/ses/nrf5x/FreeRTOSConfig.h2
-rw-r--r--examples/device/cdc_msc_hid_freertos/ses/nrf5x/nrf5x.emProject8
-rw-r--r--examples/device/cdc_msc_hid_freertos/ses/samd21/samd21.emProject2
-rw-r--r--examples/device/cdc_msc_hid_freertos/ses/samd51/samd51.emProject2
-rw-r--r--examples/device/cdc_msc_hid_freertos/src/main.c9
-rw-r--r--examples/device/cdc_msc_hid_mynewt/readme.md2
20 files changed, 104 insertions, 89 deletions
diff --git a/examples/device/cdc_msc_hid/Makefile b/examples/device/cdc_msc_hid/Makefile
index fffabee9d..a2156e1b1 100644
--- a/examples/device/cdc_msc_hid/Makefile
+++ b/examples/device/cdc_msc_hid/Makefile
@@ -69,7 +69,7 @@ else
CFLAGS += -flto -Os
endif
-CFLAGS += $(INC) -Wall -Werror -std=gnu11 -DBOARD_$(shell echo $(BOARD) | tr a-z\- A-Z_)
+CFLAGS += $(INC) -Wall -Werror -std=gnu11 -DBOARD_$(shell echo $(BOARD) | tr '[:lower:]' '[:upper:]')
LDFLAGS += $(CFLAGS) -fshort-enums -Wl,-T,$(TOP)/$(LD_FILE) -Wl,[email protected] -Wl,-cref -Wl,-gc-sections -specs=nosys.specs -specs=nano.specs
ifeq ("$(V)","1")
@@ -161,7 +161,7 @@ $(BUILD)/obj/%.o: %.S
@echo AS $(notdir $@)
$(QUIET)$(CC) -x assembler-with-cpp $(ASFLAGS) -c -o $@ $<
-# Flash binary using Jlink
+# Flash binary using Jlink, should be added into system path
ifeq ($(OS),Windows_NT)
JLINKEXE = JLink.exe
else
diff --git a/examples/device/cdc_msc_hid/ses/lpc11u6x/lpc11u6x.emProject b/examples/device/cdc_msc_hid/ses/lpc11u6x/lpc11u6x.emProject
index 80acd6fae..3904cda3b 100644
--- a/examples/device/cdc_msc_hid/ses/lpc11u6x/lpc11u6x.emProject
+++ b/examples/device/cdc_msc_hid/ses/lpc11u6x/lpc11u6x.emProject
@@ -19,7 +19,7 @@
arm_target_device_name="LPC11U68"
arm_target_interface_type="SWD"
build_treat_warnings_as_errors="Yes"
- c_preprocessor_definitions="__LPC11U68__;__LPC1100_FAMILY;__LPC11U00_SUBFAMILY;ARM_MATH_CM0PLUS;FLASH_PLACEMENT=1;CORE_M0PLUS;BOARD_LPCXPRESSO11U68;CFG_TUSB_MCU=OPT_MCU_LPC11UXX;CFG_TUSB_MEM_SECTION= __attribute__((section(&quot;.bss3&quot;)));CFG_TUSB_MEM_ALIGN=__attribute__ ((aligned(64)))"
+ c_preprocessor_definitions="__LPC11U68__;__LPC1100_FAMILY;__LPC11U00_SUBFAMILY;ARM_MATH_CM0PLUS;FLASH_PLACEMENT=1;CORE_M0PLUS;CFG_TUSB_MCU=OPT_MCU_LPC11UXX;CFG_TUSB_MEM_SECTION= __attribute__((section(&quot;.bss3&quot;)));CFG_TUSB_MEM_ALIGN=__attribute__ ((aligned(64)))"
c_user_include_directories="../../src;$(rootDir)/hw;$(rootDir)/hw/mcu/nxp/lpcopen/lpc_chip_11u6x/inc;$(rootDir)/src"
debug_register_definition_file="$(ProjectDir)/LPC11U6x_Registers.xml"
debug_target_connection="J-Link"
@@ -47,6 +47,7 @@
</folder>
<configuration
Name="LPCXpresso 11U68"
+ c_preprocessor_definitions="BOARD_LPCXPRESSO11U68"
link_use_linker_script_file="No"
linker_section_placement_file="flash_placement.xml" />
<folder Name="hw">
diff --git a/examples/device/cdc_msc_hid/ses/lpc13xx/lpc13xx.emProject b/examples/device/cdc_msc_hid/ses/lpc13xx/lpc13xx.emProject
index 2cd92ca4c..a3a59af71 100644
--- a/examples/device/cdc_msc_hid/ses/lpc13xx/lpc13xx.emProject
+++ b/examples/device/cdc_msc_hid/ses/lpc13xx/lpc13xx.emProject
@@ -18,7 +18,7 @@
arm_target_device_name="LPC1347"
arm_target_interface_type="SWD"
build_treat_warnings_as_errors="Yes"
- c_preprocessor_definitions="__LPC1347FBD64__;__LPC1300_FAMILY;__LPC134x_SUBFAMILY;ARM_MATH_CM3;FLASH_PLACEMENT=1;CORE_M3;BOARD_LPCXPRESSO1347;CFG_TUSB_MCU=OPT_MCU_LPC13XX;CFG_TUSB_MEM_SECTION= __attribute__((section(&quot;.bss3&quot;)));CFG_TUSB_MEM_ALIGN=__attribute__ ((aligned(64)))"
+ c_preprocessor_definitions="__LPC1347FBD64__;__LPC1300_FAMILY;__LPC134x_SUBFAMILY;ARM_MATH_CM3;FLASH_PLACEMENT=1;CORE_M3;CFG_TUSB_MCU=OPT_MCU_LPC13XX;CFG_TUSB_MEM_SECTION= __attribute__((section(&quot;.bss3&quot;)));CFG_TUSB_MEM_ALIGN=__attribute__ ((aligned(64)))"
c_user_include_directories="../../src;$(rootDir)/hw;$(rootDir)/hw/mcu/nxp/lpcopen/lpc_chip_13xx/inc;$(rootDir)/src"
debug_register_definition_file="$(ProjectDir)/LPC13Uxx_Registers.xml"
debug_target_connection="J-Link"
@@ -54,7 +54,6 @@
<file file_name="../../../../../hw/bsp/board.h" />
<folder Name="lpcxpresso1347">
<file file_name="../../../../../hw/bsp/lpcxpresso1347/board_lpcxpresso1347.c" />
- <file file_name="../../../../../hw/bsp/lpcxpresso1347/board_lpcxpresso1347.h" />
</folder>
</folder>
<folder Name="mcu">
@@ -107,6 +106,9 @@
filter="*.c;*.h"
path="../../../../../lib/segger_rtt"
recurse="No" />
+ <configuration
+ Name="LPCXpresso 1347"
+ c_preprocessor_definitions="BOARD_LPCXPRESSO1347" />
</project>
<configuration
Name="LPCXpresso 1347"
diff --git a/examples/device/cdc_msc_hid/ses/lpc175x_6x/lpc175x_6x.emProject b/examples/device/cdc_msc_hid/ses/lpc175x_6x/lpc175x_6x.emProject
index 2e17348b9..d0b065370 100644
--- a/examples/device/cdc_msc_hid/ses/lpc175x_6x/lpc175x_6x.emProject
+++ b/examples/device/cdc_msc_hid/ses/lpc175x_6x/lpc175x_6x.emProject
@@ -19,7 +19,7 @@
arm_target_device_name="LPC1769"
arm_target_interface_type="SWD"
build_treat_warnings_as_errors="Yes"
- c_preprocessor_definitions="LPC175x_6x;__LPC1700_FAMILY;__LPC176x_SUBFAMILY;ARM_MATH_CM3;FLASH_PLACEMENT=1;CORE_M3;BOARD_LPCXPRESSO1769;CFG_TUSB_MCU=OPT_MCU_LPC175X_6X"
+ c_preprocessor_definitions="LPC175x_6x;__LPC1700_FAMILY;__LPC176x_SUBFAMILY;ARM_MATH_CM3;FLASH_PLACEMENT=1;CORE_M3;CFG_TUSB_MCU=OPT_MCU_LPC175X_6X"
c_user_include_directories="../../src;$(rootDir)/hw;$(rootDir)/hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc;$(rootDir)/src"
debug_register_definition_file="LPC176x5x_Registers.xml"
debug_target_connection="J-Link"
@@ -47,39 +47,40 @@
<file file_name="../../../../../hw/bsp/board.h" />
<folder Name="lpcxpresso1769">
<file file_name="../../../../../hw/bsp/lpcxpresso1769/board_lpcxpresso1769.c" />
- <file file_name="../../../../../hw/bsp/lpcxpresso1769/board_lpcxpresso1769.h" />
</folder>
</folder>
<folder Name="mcu">
<folder Name="nxp">
- <folder Name="lpc_chip_175x_6x">
- <folder Name="inc">
- <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/chip.h" />
- <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/chip_lpc175x_6x.h" />
- <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/chip_lpc177x_8x.h" />
- <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/chip_lpc407x_8x.h" />
- <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/clock_17xx_40xx.h" />
- <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/cmsis.h" />
- <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/cmsis_175x_6x.h" />
- <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/core_cm3.h" />
- <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/core_cmFunc.h" />
- <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/core_cmInstr.h" />
- <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/gpio_17xx_40xx.h" />
- <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/gpioint_17xx_40xx.h" />
- <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/iocon_17xx_40xx.h" />
- <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/lpc_types.h" />
- <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/sys_config.h" />
- <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/sysctl_17xx_40xx.h" />
- <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/uart_17xx_40xx.h" />
- </folder>
- <folder Name="src">
- <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/chip_17xx_40xx.c" />
- <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/clock_17xx_40xx.c" />
- <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/gpio_17xx_40xx.c" />
- <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/iocon_17xx_40xx.c" />
- <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/sysctl_17xx_40xx.c" />
- <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/sysinit_17xx_40xx.c" />
- <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/uart_17xx_40xx.c" />
+ <folder Name="lpcopen">
+ <folder Name="lpc_chip_175x_6x">
+ <folder Name="inc">
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/chip.h" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/chip_lpc175x_6x.h" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/chip_lpc177x_8x.h" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/chip_lpc407x_8x.h" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/clock_17xx_40xx.h" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/cmsis.h" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/cmsis_175x_6x.h" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/core_cm3.h" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/core_cmFunc.h" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/core_cmInstr.h" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/gpio_17xx_40xx.h" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/gpioint_17xx_40xx.h" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/iocon_17xx_40xx.h" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/lpc_types.h" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/sys_config.h" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/sysctl_17xx_40xx.h" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/uart_17xx_40xx.h" />
+ </folder>
+ <folder Name="src">
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/chip_17xx_40xx.c" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/clock_17xx_40xx.c" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/gpio_17xx_40xx.c" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/iocon_17xx_40xx.c" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/sysctl_17xx_40xx.c" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/sysinit_17xx_40xx.c" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/uart_17xx_40xx.c" />
+ </folder>
</folder>
</folder>
</folder>
@@ -107,6 +108,9 @@
filter="*.c;*.h"
path="../../../../../lib/segger_rtt"
recurse="No" />
+ <configuration
+ Name="LPCXpresso 1769"
+ c_preprocessor_definitions="BOARD_LPCXPRESSO1769" />
</project>
<configuration Name="LPCXpresso 1769" />
</solution>
diff --git a/examples/device/cdc_msc_hid/ses/lpc18xx/lpc18xx.emProject b/examples/device/cdc_msc_hid/ses/lpc18xx/lpc18xx.emProject
index e3b2d4ce0..e7ce7a02a 100644
--- a/examples/device/cdc_msc_hid/ses/lpc18xx/lpc18xx.emProject
+++ b/examples/device/cdc_msc_hid/ses/lpc18xx/lpc18xx.emProject
@@ -18,7 +18,7 @@
arm_target_device_name="LPC1857"
arm_target_interface_type="SWD"
build_treat_warnings_as_errors="Yes"
- c_preprocessor_definitions="LPC18xx;__LPC1800_FAMILY;__LPC185x_SUBFAMILY;ARM_MATH_CM3;FLASH_PLACEMENT=1;CORE_M3;BOARD_MCB1800;CFG_TUSB_MCU=OPT_MCU_LPC18XX;CFG_TUSB_MEM_SECTION= __attribute__((section(&quot;.bss2&quot;)))"
+ c_preprocessor_definitions="LPC18xx;__LPC1800_FAMILY;__LPC185x_SUBFAMILY;ARM_MATH_CM3;FLASH_PLACEMENT=1;CORE_M3;CFG_TUSB_MCU=OPT_MCU_LPC18XX;CFG_TUSB_MEM_SECTION= __attribute__((section(&quot;.bss2&quot;)))"
c_user_include_directories="../../src;$(rootDir)/hw;$(rootDir)/hw/mcu/nxp/lpcopen/lpc_chip_18xx/inc;$(rootDir)/hw/mcu/nxp/lpcopen/lpc_chip_18xx/inc/config_18xx;$(rootDir)/src"
debug_register_definition_file="$(ProjectDir)/LPC18xx_Registers.xml"
debug_target_connection="J-Link"
@@ -54,7 +54,6 @@
<file file_name="../../../../../hw/bsp/board.h" />
<folder Name="mcb1800">
<file file_name="../../../../../hw/bsp/mcb1800/board_mcb1800.c" />
- <file file_name="../../../../../hw/bsp/mcb1800/board_mcb1800.h" />
</folder>
</folder>
<folder Name="mcu">
@@ -122,6 +121,9 @@
filter="*.c;*.h"
path="../../../../../src"
recurse="Yes" />
+ <configuration
+ Name="MCB1800"
+ c_preprocessor_definitions="BOARD_MCB1800" />
</project>
<configuration
Name="MCB1800"
diff --git a/examples/device/cdc_msc_hid/ses/lpc40xx/lpc40xx.emProject b/examples/device/cdc_msc_hid/ses/lpc40xx/lpc40xx.emProject
index 47b7b6262..5a1cbe52b 100644
--- a/examples/device/cdc_msc_hid/ses/lpc40xx/lpc40xx.emProject
+++ b/examples/device/cdc_msc_hid/ses/lpc40xx/lpc40xx.emProject
@@ -19,7 +19,7 @@
arm_target_device_name="LPC4088"
arm_target_interface_type="SWD"
build_treat_warnings_as_errors="Yes"
- c_preprocessor_definitions="CORE_M4;__LPC4000_FAMILY;__LPC408x_SUBFAMILY;ARM_MATH_CM4;FLASH_PLACEMENT=1;BOARD_EA4088QS;CFG_TUSB_MCU=OPT_MCU_LPC40XX;CFG_TUSB_MEM_SECTION= __attribute__((section(&quot;.bss2&quot;)))"
+ c_preprocessor_definitions="CORE_M4;__LPC4000_FAMILY;__LPC408x_SUBFAMILY;ARM_MATH_CM4;FLASH_PLACEMENT=1;CFG_TUSB_MCU=OPT_MCU_LPC40XX;CFG_TUSB_MEM_SECTION= __attribute__((section(&quot;.bss2&quot;)))"
c_user_include_directories="../../src;$(rootDir)/hw;$(rootDir)/hw/mcu/nxp/lpcopen/lpc_chip_40xx/inc;$(rootDir)/src"
debug_register_definition_file="$(ProjectDir)/LPC408x_7x_Registers.xml"
debug_target_connection="J-Link"
@@ -47,6 +47,7 @@
</folder>
<configuration
Name="EA4088 QuickStart"
+ c_preprocessor_definitions="BOARD_EA4088QS"
link_use_linker_script_file="No"
linker_section_placement_file="flash_placement.xml" />
<folder Name="hw">
@@ -55,7 +56,6 @@
<file file_name="../../../../../hw/bsp/board.h" />
<folder Name="ea4088qs">
<file file_name="../../../../../hw/bsp/ea4088qs/board_ea4088qs.c" />
- <file file_name="../../../../../hw/bsp/ea4088qs/board_ea4088qs.h" />
</folder>
</folder>
<folder Name="mcu">
diff --git a/examples/device/cdc_msc_hid/ses/lpc43xx/lpc43xx.emProject b/examples/device/cdc_msc_hid/ses/lpc43xx/lpc43xx.emProject
index e742159fa..26444c469 100644
--- a/examples/device/cdc_msc_hid/ses/lpc43xx/lpc43xx.emProject
+++ b/examples/device/cdc_msc_hid/ses/lpc43xx/lpc43xx.emProject
@@ -19,7 +19,7 @@
arm_target_device_name="LPC4357_M4"
arm_target_interface_type="SWD"
build_treat_warnings_as_errors="Yes"
- c_preprocessor_definitions="CORE_M4;__LPC4300_FAMILY;__LPC435x_SUBFAMILY;ARM_MATH_CM4;FLASH_PLACEMENT=1;BOARD_EA4357;CFG_TUSB_MCU=OPT_MCU_LPC43XX;CFG_TUSB_MEM_SECTION= __attribute__((section(&quot;.bss2&quot;)))"
+ c_preprocessor_definitions="CORE_M4;__LPC4300_FAMILY;__LPC435x_SUBFAMILY;ARM_MATH_CM4;FLASH_PLACEMENT=1;CFG_TUSB_MCU=OPT_MCU_LPC43XX;CFG_TUSB_MEM_SECTION= __attribute__((section(&quot;.bss2&quot;)))"
c_user_include_directories="../../src;$(rootDir)/hw;$(rootDir)/hw/mcu/nxp/lpcopen/lpc_chip_43xx/inc;$(rootDir)/hw/mcu/nxp/lpcopen/lpc_chip_43xx/inc/config_43xx;$(rootDir)/src;$(lpcDir)//inc"
debug_register_definition_file="LPC43xx_Registers.xml"
debug_target_connection="J-Link"
@@ -47,7 +47,6 @@
<file file_name="../../../../../hw/bsp/board.h" />
<folder Name="ea4357">
<file file_name="../../../../../hw/bsp/ea4357/board_ea4357.c" />
- <file file_name="../../../../../hw/bsp/ea4357/board_ea4357.h" />
<file file_name="../../../../../hw/bsp/ea4357/pca9532.c" />
<file file_name="../../../../../hw/bsp/ea4357/pca9532.h" />
</folder>
@@ -129,5 +128,7 @@
filter="*.c;*.h"
path="../../../../../lib/segger_rtt"
recurse="No" />
+ <configuration Name="EA4357" c_preprocessor_definitions="BOARD_EA4357" />
</project>
+ <configuration Name="EA4357" />
</solution>
diff --git a/examples/device/cdc_msc_hid/ses/nrf5x/nrf5x.emProject b/examples/device/cdc_msc_hid/ses/nrf5x/nrf5x.emProject
index b94dac089..6f5614f27 100644
--- a/examples/device/cdc_msc_hid/ses/nrf5x/nrf5x.emProject
+++ b/examples/device/cdc_msc_hid/ses/nrf5x/nrf5x.emProject
@@ -19,7 +19,7 @@
arm_target_device_name="nRF52840_xxAA"
arm_target_interface_type="SWD"
build_treat_warnings_as_errors="Yes"
- c_preprocessor_definitions="NRF52840_XXAA;__nRF_FAMILY;ARM_MATH_CM4;FLASH_PLACEMENT=1;BOARD_PCA10056;CFG_TUSB_MCU=OPT_MCU_NRF5X"
+ c_preprocessor_definitions="NRF52840_XXAA;__nRF_FAMILY;ARM_MATH_CM4;FLASH_PLACEMENT=1;CFG_TUSB_MCU=OPT_MCU_NRF5X"
c_user_include_directories="../../src;$(rootDir)/hw/cmsis/Include;$(rootDir)/hw;$(rootDir)/src;$(nrfxDir)/..;$(nrfxDir);$(nrfxDir)/mdk;$(nrfxDir)/hal;$(nrfxDir)/drivers/include"
debug_register_definition_file="nrf52840_Registers.xml"
debug_target_connection="J-Link"
@@ -44,7 +44,6 @@
<folder Name="bsp">
<folder Name="pca10056">
<file file_name="../../../../../hw/bsp/pca10056/board_pca10056.c" />
- <file file_name="../../../../../hw/bsp/pca10056/board_pca10056.h" />
</folder>
<file file_name="../../../../../hw/bsp/ansi_escape.h" />
<file file_name="../../../../../hw/bsp/board.h" />
@@ -112,11 +111,12 @@
<configuration
Name="pca10056"
build_treat_warnings_as_errors="No"
+ c_preprocessor_definitions="BOARD_PCA10056"
linker_memory_map_file="nRF52840_xxAA_MemoryMap.xml" />
<configuration
Name="pca10056 s140v6"
build_treat_warnings_as_errors="No"
- c_preprocessor_definitions="SOFTDEVICE_PRESENT;S140;NO_VTOR_CONFIG"
+ c_preprocessor_definitions="SOFTDEVICE_PRESENT;S140;NO_VTOR_CONFIG;BOARD_PCA10056"
c_user_include_directories="$(nrfxDir)/../nrf5x/s140_nrf52_6.1.1_API/include;$(nrfxDir)/../nrf5x/s140_nrf52_6.1.1_API/include/nrf52"
debug_start_from_entry_point_symbol="No"
linker_memory_map_file="nRF52840_xxAA_s140v6_MemoryMap.xml" />
diff --git a/examples/device/cdc_msc_hid/ses/samd21/samd21.emProject b/examples/device/cdc_msc_hid/ses/samd21/samd21.emProject
index 4452699ef..e65873008 100644
--- a/examples/device/cdc_msc_hid/ses/samd21/samd21.emProject
+++ b/examples/device/cdc_msc_hid/ses/samd21/samd21.emProject
@@ -18,7 +18,7 @@
arm_target_device_name="ATSAMD21G18A"
arm_target_interface_type="SWD"
build_treat_warnings_as_errors="Yes"
- c_preprocessor_definitions="__SAMD21G18A__;__SAMD21_FAMILY;__SAM_D21_SUBFAMILY;ARM_MATH_CM0PLUS;FLASH_PLACEMENT=1;USE_SIMPLE_ASSERT;CONF_XOSC32K_CONFIG=1;CONF_OSC32K_ENABLE=1;CONF_OSC32K_EN32K=1;CONF_XOSC32K_STARTUP=CONF_XOSC32K_STARTUP_TIME_2000092MCS;CONF_DFLL_ONDEMAND=0;CONF_DFLL_OVERWRITE_CALIBRATION=0;BOARD_METRO_M0_EXPRESS;CFG_TUSB_MCU=OPT_MCU_SAMD21"
+ c_preprocessor_definitions="__SAMD21G18A__;__SAMD21_FAMILY;__SAM_D21_SUBFAMILY;ARM_MATH_CM0PLUS;FLASH_PLACEMENT=1;USE_SIMPLE_ASSERT;CONF_XOSC32K_CONFIG=1;CONF_OSC32K_ENABLE=1;CONF_OSC32K_EN32K=1;CONF_XOSC32K_STARTUP=CONF_XOSC32K_STARTUP_TIME_2000092MCS;CONF_DFLL_ONDEMAND=0;CONF_DFLL_OVERWRITE_CALIBRATION=0;CFG_TUSB_MCU=OPT_MCU_SAMD21"
c_user_include_directories="../../src;$(rootDir)/hw;$(rootDir)/src;$(asf4Dir);$(asf4Dir)/CMSIS/Include;$(asf4Dir)/include;$(asf4Dir)/config;$(asf4Dir)/hri;$(asf4Dir)/hal/include;$(asf4Dir)/hal/utils/include;$(asf4Dir)/hpl/port;$(asf4Dir)/hpl/gclk;$(asf4Dir)/hpl/pm"
debug_register_definition_file="ATSAMD21G18A_Registers.xml"
debug_target_connection="J-Link"
@@ -46,7 +46,6 @@
<file file_name="../../../../../hw/bsp/board.h" />
<folder Name="metro_m0_express">
<file file_name="../../../../../hw/bsp/metro_m0_express/board_metro_m0_express.c" />
- <file file_name="../../../../../hw/bsp/metro_m0_express/board_metro_m0_express.h" />
</folder>
</folder>
<folder Name="mcu">
@@ -96,6 +95,9 @@
filter="*.c;*.h"
path="../../../../../lib/segger_rtt"
recurse="No" />
+ <configuration
+ Name="Metro M0 Express"
+ c_preprocessor_definitions="BOARD_METRO_M0_EXPRESS" />
</project>
<configuration Name="Metro M0 Express" />
</solution>
diff --git a/examples/device/cdc_msc_hid/ses/samd51/samd51.emProject b/examples/device/cdc_msc_hid/ses/samd51/samd51.emProject
index 6d5c14507..280afdcd1 100644
--- a/examples/device/cdc_msc_hid/ses/samd51/samd51.emProject
+++ b/examples/device/cdc_msc_hid/ses/samd51/samd51.emProject
@@ -19,7 +19,7 @@
arm_target_device_name="ATSAMD51J19"
arm_target_interface_type="SWD"
build_treat_warnings_as_errors="Yes"
- c_preprocessor_definitions="__SAMD51_FAMILY;__SAMD51J19A__;ARM_MATH_CM4;FLASH_PLACEMENT=1;USE_SIMPLE_ASSERT;BOARD_METRO_M4_EXPRESS;CFG_TUSB_MCU=OPT_MCU_SAMD51"
+ c_preprocessor_definitions="__SAMD51_FAMILY;__SAMD51J19A__;ARM_MATH_CM4;FLASH_PLACEMENT=1;USE_SIMPLE_ASSERT;CFG_TUSB_MCU=OPT_MCU_SAMD51"
c_user_include_directories="../../src;$(rootDir)/hw;$(rootDir)/src;$(asf4Dir);$(asf4Dir)/CMSIS/Include;$(asf4Dir)/include;$(asf4Dir)/config;$(asf4Dir)/hri;$(asf4Dir)/hal/include;$(asf4Dir)/hal/utils/include;$(asf4Dir)/hpl/port;$(asf4Dir)/hpl/gclk"
debug_register_definition_file="ATSAMD51J19A_Registers.xml"
debug_target_connection="J-Link"
@@ -47,7 +47,6 @@
<file file_name="../../../../../hw/bsp/board.h" />
<folder Name="metro_m4_express">
<file file_name="../../../../../hw/bsp/metro_m4_express/board_metro_m4_express.c" />
- <file file_name="../../../../../hw/bsp/metro_m4_express/board_metro_m4_express.h" />
</folder>
</folder>
<folder Name="mcu">
@@ -100,6 +99,9 @@
filter="*.c;*.h"
path="../../../../../lib/segger_rtt"
recurse="No" />
+ <configuration
+ Name="Metro M4 Express"
+ c_preprocessor_definitions="BOARD_METRO_M4_EXPRESS" />
</project>
<configuration Name="Metro M4 Express" />
</solution>
diff --git a/examples/device/cdc_msc_hid/ses/stm32f4/stm32f4.emProject b/examples/device/cdc_msc_hid/ses/stm32f4/stm32f4.emProject
index 71119a878..83067fd09 100644
--- a/examples/device/cdc_msc_hid/ses/stm32f4/stm32f4.emProject
+++ b/examples/device/cdc_msc_hid/ses/stm32f4/stm32f4.emProject
@@ -18,7 +18,7 @@
arm_target_debug_interface_type="ADIv5"
arm_target_device_name="STM32F407VG"
arm_target_interface_type="SWD"
- c_preprocessor_definitions="STM32F407xx;__STM32F4xx_FAMILY;__STM32F407_SUBFAMILY;ARM_MATH_CM4;FLASH_PLACEMENT=1;CFG_TUSB_MCU=OPT_MCU_STM32F4;HSE_VALUE=8000000;BOARD_STM32F407G_DISC1"
+ c_preprocessor_definitions="STM32F407xx;__STM32F4xx_FAMILY;__STM32F407_SUBFAMILY;ARM_MATH_CM4;FLASH_PLACEMENT=1;CFG_TUSB_MCU=OPT_MCU_STM32F4;HSE_VALUE=8000000"
c_user_include_directories="../../src;$(rootDir)/src;$(rootDir)/hw;$(rootDir)/hw/mcu/st/cmsis;$(rootDir)/hw/mcu/st/stm32lib/CMSIS/STM32F4xx/Include"
debug_register_definition_file="$(ProjectDir)/STM32F40x_Registers.xml"
debug_target_connection="J-Link"
@@ -63,7 +63,6 @@
<folder Name="bsp">
<folder Name="stm32f407g_disc1">
<file file_name="../../../../../hw/bsp/stm32f407g_disc1/board_stm32f407g_disc1.c" />
- <file file_name="../../../../../hw/bsp/stm32f407g_disc1/board_stm32f407g_disc1.h" />
</folder>
<file file_name="../../../../../hw/bsp/board.h" />
</folder>
@@ -76,6 +75,9 @@
</folder>
</folder>
</folder>
+ <configuration
+ Name="stm32f407g_disc1"
+ c_preprocessor_definitions="BOARD_STM32F407G_DISC1" />
</project>
<configuration
Name="stm32f407g_disc1"
diff --git a/examples/device/cdc_msc_hid/src/main.c b/examples/device/cdc_msc_hid/src/main.c
index b2a902835..75d9a31dc 100644
--- a/examples/device/cdc_msc_hid/src/main.c
+++ b/examples/device/cdc_msc_hid/src/main.c
@@ -121,10 +121,11 @@ void tud_cdc_rx_cb(uint8_t itf)
void usb_hid_task(void)
{
// Poll every 10ms
- static tu_timeout_t tm = { .start = 0, .interval = 10 };
+ const uint32_t interval_ms = 10;
+ static uint32_t start_ms = 0;
- if ( !tu_timeout_expired(&tm) ) return; // not enough time
- tu_timeout_reset(&tm);
+ if ( board_millis() < start_ms + interval_ms) return; // not enough time
+ start_ms += interval_ms;
uint32_t const btn = board_buttons();
@@ -193,11 +194,14 @@ void tud_umount_cb(void)
//--------------------------------------------------------------------+
void led_blinking_task(void)
{
- static tu_timeout_t tm = { .start = 0, .interval = 1000 }; // Blink every 1000 ms
+ const uint32_t interval_ms = 1000;
+ static uint32_t start_ms = 0;
+
static bool led_state = false;
- if ( !tu_timeout_expired(&tm) ) return; // not enough time
- tu_timeout_reset(&tm);
+ // Blink every 1000 ms
+ if ( board_millis() < start_ms + interval_ms) return; // not enough time
+ start_ms += interval_ms;
board_led_control(led_state);
led_state = 1 - led_state; // toggle
diff --git a/examples/device/cdc_msc_hid_freertos/ses/lpc175x_6x/FreeRTOSConfig.h b/examples/device/cdc_msc_hid_freertos/ses/lpc175x_6x/FreeRTOSConfig.h
index 0fad1dc89..5d3ba479e 100644
--- a/examples/device/cdc_msc_hid_freertos/ses/lpc175x_6x/FreeRTOSConfig.h
+++ b/examples/device/cdc_msc_hid_freertos/ses/lpc175x_6x/FreeRTOSConfig.h
@@ -4,7 +4,7 @@
//--------------------------------------------------------------------+
// See http://www.freertos.org/a00110.html.
//--------------------------------------------------------------------+
-#include "LPC17xx.h"
+#include "chip.h"
#define configCPU_CLOCK_HZ SystemCoreClock
diff --git a/examples/device/cdc_msc_hid_freertos/ses/lpc175x_6x/lpc175x_6x.emProject b/examples/device/cdc_msc_hid_freertos/ses/lpc175x_6x/lpc175x_6x.emProject
index 893d6b507..5493af626 100644
--- a/examples/device/cdc_msc_hid_freertos/ses/lpc175x_6x/lpc175x_6x.emProject
+++ b/examples/device/cdc_msc_hid_freertos/ses/lpc175x_6x/lpc175x_6x.emProject
@@ -19,8 +19,8 @@
arm_target_device_name="LPC1769"
arm_target_interface_type="SWD"
build_treat_warnings_as_errors="No"
- c_preprocessor_definitions="LPC175x_6x;__LPC1700_FAMILY;__LPC176x_SUBFAMILY;ARM_MATH_CM3;FLASH_PLACEMENT=1;BOARD_LPCXPRESSO1769;CFG_TUSB_MCU=OPT_MCU_LPC175X_6X"
- c_user_include_directories=".;../../src;$(rootDir)/hw;$(rootDir)/src;$(lpcDir)/CMSIS_CORE_LPC17xx/inc;$(lpcDir)/LPC17xx_DriverLib/include;$(freertosDir)/Source/include;$(freertosDir)/Source/portable/GCC/ARM_CM3"
+ c_preprocessor_definitions="LPC175x_6x;__LPC1700_FAMILY;__LPC176x_SUBFAMILY;ARM_MATH_CM3;FLASH_PLACEMENT=1;CORE_M3;CFG_TUSB_MCU=OPT_MCU_LPC175X_6X"
+ c_user_include_directories=".;../../src;$(rootDir)/hw;$(rootDir)/src;$(rootDir)/hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc;$(rootDir)/lib/FreeRTOS/Source/include;$(rootDir)/lib/FreeRTOS/Source/portable/GCC/ARM_CM3"
debug_register_definition_file="LPC176x5x_Registers.xml"
debug_target_connection="J-Link"
gcc_enable_all_warnings="Yes"
@@ -29,7 +29,7 @@
linker_memory_map_file="LPC1769_MemoryMap.xml"
linker_section_placement_file="flash_placement.xml"
linker_section_placements_segments="FLASH RX 0x00000000 0x00080000;RAM RWX 0x10000000 0x00008000"
- macros="DeviceFamily=LPC1700;DeviceSubFamily=LPC176x;Target=LPC1769;Placement=Flash;rootDir=../../../../..;lpcDir=../../../../../hw/mcu/nxp/lpc175x_6x;freertosDir=../../../../../lib/FreeRTOS"
+ macros="DeviceFamily=LPC1700;DeviceSubFamily=LPC176x;Target=LPC1769;Placement=Flash;rootDir=../../../../.."
project_directory=""
project_type="Executable"
target_reset_script="Reset();"
@@ -43,30 +43,23 @@
recurse="Yes" />
<folder Name="hw">
<folder Name="bsp">
- <file file_name="../../../../../hw/bsp/ansi_escape.h" />
<file file_name="../../../../../hw/bsp/board.h" />
<folder Name="lpcxpresso1769">
<file file_name="../../../../../hw/bsp/lpcxpresso1769/board_lpcxpresso1769.c" />
- <file file_name="../../../../../hw/bsp/lpcxpresso1769/board_lpcxpresso1769.h" />
</folder>
</folder>
<folder Name="mcu">
<folder Name="nxp">
- <folder Name="lpc175x_6x">
- <folder Name="CMSIS_CORE_LPC17xx">
- <folder Name="inc">
- <file file_name="../../../../../hw/mcu/nxp/lpc175x_6x/CMSIS_CORE_LPC17xx/inc/LPC17xx.h" />
- <file file_name="../../../../../hw/mcu/nxp/lpc175x_6x/CMSIS_CORE_LPC17xx/inc/system_LPC17xx.h" />
- </folder>
+ <folder Name="lpcopen">
+ <folder Name="lpc_chip_175x_6x">
<folder Name="src">
- <file file_name="../../../../../hw/mcu/nxp/lpc175x_6x/CMSIS_CORE_LPC17xx/src/system_LPC17xx.c" />
- </folder>
- </folder>
- <folder Name="LPC17xx_DriverLib">
- <folder Name="include" />
- <folder Name="source">
- <file file_name="../../../../../hw/mcu/nxp/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_gpio.c" />
- <file file_name="../../../../../hw/mcu/nxp/lpc175x_6x/LPC17xx_DriverLib/source/lpc17xx_pinsel.c" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/chip_17xx_40xx.c" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/clock_17xx_40xx.c" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/gpio_17xx_40xx.c" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/iocon_17xx_40xx.c" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/sysctl_17xx_40xx.c" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/sysinit_17xx_40xx.c" />
+ <file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/uart_17xx_40xx.c" />
</folder>
</folder>
</folder>
@@ -136,6 +129,9 @@
<file file_name="../../../../../lib/FreeRTOS/freertos_hook.c" />
</folder>
</folder>
+ <configuration
+ Name="LPCXpresso 1769"
+ c_preprocessor_definitions="BOARD_LPCXPRESSO1769" />
</project>
<configuration Name="LPCXpresso 1769" />
</solution>
diff --git a/examples/device/cdc_msc_hid_freertos/ses/nrf5x/FreeRTOSConfig.h b/examples/device/cdc_msc_hid_freertos/ses/nrf5x/FreeRTOSConfig.h
index 26df38d3d..754158622 100644
--- a/examples/device/cdc_msc_hid_freertos/ses/nrf5x/FreeRTOSConfig.h
+++ b/examples/device/cdc_msc_hid_freertos/ses/nrf5x/FreeRTOSConfig.h
@@ -83,7 +83,7 @@
/* Software timer related definitions. */
#define configUSE_TIMERS 1
-#define configTIMER_TASK_PRIORITY 2
+#define configTIMER_TASK_PRIORITY (configMAX_PRIORITIES-2)
#define configTIMER_QUEUE_LENGTH 32
#define configTIMER_TASK_STACK_DEPTH configMINIMAL_STACK_SIZE
diff --git a/examples/device/cdc_msc_hid_freertos/ses/nrf5x/nrf5x.emProject b/examples/device/cdc_msc_hid_freertos/ses/nrf5x/nrf5x.emProject
index ea4950682..ad236ae66 100644
--- a/examples/device/cdc_msc_hid_freertos/ses/nrf5x/nrf5x.emProject
+++ b/examples/device/cdc_msc_hid_freertos/ses/nrf5x/nrf5x.emProject
@@ -19,7 +19,7 @@
arm_target_device_name="nRF52840_xxAA"
arm_target_interface_type="SWD"
build_treat_warnings_as_errors="No"
- c_preprocessor_definitions="NRF52840_XXAA;__nRF_FAMILY;ARM_MATH_CM4;FLASH_PLACEMENT=1;BOARD_PCA10056;CFG_TUSB_MCU=OPT_MCU_NRF5X"
+ c_preprocessor_definitions="NRF52840_XXAA;__nRF_FAMILY;ARM_MATH_CM4;FLASH_PLACEMENT=1;CFG_TUSB_MCU=OPT_MCU_NRF5X"
c_user_include_directories="./;../../src;$(rootDir)/hw/cmsis/Include;$(rootDir)/hw;$(rootDir)/src;$(nrfxDir)/..;$(nrfxDir);$(nrfxDir)/mdk;$(nrfxDir)/hal;$(nrfxDir)/drivers/include;$(freertosDir)/Source/include;$(freertosDir)/Source/portable/GCC/ARM_CM4F"
debug_register_definition_file="nrf52840_Registers.xml"
debug_target_connection="J-Link"
@@ -44,9 +44,7 @@
<folder Name="bsp">
<folder Name="pca10056">
<file file_name="../../../../../hw/bsp/pca10056/board_pca10056.c" />
- <file file_name="../../../../../hw/bsp/pca10056/board_pca10056.h" />
</folder>
- <file file_name="../../../../../hw/bsp/ansi_escape.h" />
<file file_name="../../../../../hw/bsp/board.h" />
</folder>
<folder Name="mcu">
@@ -143,10 +141,12 @@
<file file_name="../../../../../lib/FreeRTOS/Source/tasks.c" />
<file file_name="../../../../../lib/FreeRTOS/Source/timers.c" />
</folder>
- <file file_name="../../../../../lib/FreeRTOS/FreeRTOSConfig.h" />
<file file_name="../../../../../lib/FreeRTOS/freertos_hook.c" />
</folder>
</folder>
+ <configuration
+ Name="pca10056"
+ c_preprocessor_definitions="BOARD_PCA10056" />
</project>
<configuration Name="pca10056" />
</solution>
diff --git a/examples/device/cdc_msc_hid_freertos/ses/samd21/samd21.emProject b/examples/device/cdc_msc_hid_freertos/ses/samd21/samd21.emProject
index 07e902645..18291fbfd 100644
--- a/examples/device/cdc_msc_hid_freertos/ses/samd21/samd21.emProject
+++ b/examples/device/cdc_msc_hid_freertos/ses/samd21/samd21.emProject
@@ -41,11 +41,9 @@
recurse="Yes" />
<folder Name="hw">
<folder Name="bsp">
- <file file_name="../../../../../hw/bsp/ansi_escape.h" />
<file file_name="../../../../../hw/bsp/board.h" />
<folder Name="metro_m0_express">
<file file_name="../../../../../hw/bsp/metro_m0_express/board_metro_m0_express.c" />
- <file file_name="../../../../../hw/bsp/metro_m0_express/board_metro_m0_express.h" />
</folder>
</folder>
<folder Name="mcu">
diff --git a/examples/device/cdc_msc_hid_freertos/ses/samd51/samd51.emProject b/examples/device/cdc_msc_hid_freertos/ses/samd51/samd51.emProject
index 81758d177..c18aad2eb 100644
--- a/examples/device/cdc_msc_hid_freertos/ses/samd51/samd51.emProject
+++ b/examples/device/cdc_msc_hid_freertos/ses/samd51/samd51.emProject
@@ -42,11 +42,9 @@
recurse="Yes" />
<folder Name="hw">
<folder Name="bsp">
- <file file_name="../../../../../hw/bsp/ansi_escape.h" />
<file file_name="../../../../../hw/bsp/board.h" />
<folder Name="metro_m4_express">
<file file_name="../../../../../hw/bsp/metro_m4_express/board_metro_m4_express.c" />
- <file file_name="../../../../../hw/bsp/metro_m4_express/board_metro_m4_express.h" />
</folder>
</folder>
<folder Name="mcu">
diff --git a/examples/device/cdc_msc_hid_freertos/src/main.c b/examples/device/cdc_msc_hid_freertos/src/main.c
index 5705c1657..388bd9ad1 100644
--- a/examples/device/cdc_msc_hid_freertos/src/main.c
+++ b/examples/device/cdc_msc_hid_freertos/src/main.c
@@ -125,6 +125,8 @@ void cdc_task(void* params)
tud_cdc_write_flush();
}
}
+
+ taskYIELD();
}
}
@@ -150,10 +152,11 @@ void usb_hid_task(void* params)
(void) params;
// Poll every 10ms
- static tu_timeout_t tm = { .start = 0, .interval = 10 };
+ const uint32_t interval_ms = 10;
+ static uint32_t start_ms = 0;
- if ( !tu_timeout_expired(&tm) ) return; // not enough time
- tu_timeout_reset(&tm);
+ if ( board_millis() < start_ms + interval_ms) return; // not enough time
+ start_ms += interval_ms;
uint32_t const btn = board_buttons();
diff --git a/examples/device/cdc_msc_hid_mynewt/readme.md b/examples/device/cdc_msc_hid_mynewt/readme.md
index 2d2f579fa..0dac39a88 100644
--- a/examples/device/cdc_msc_hid_mynewt/readme.md
+++ b/examples/device/cdc_msc_hid_mynewt/readme.md
@@ -1 +1 @@
-Please check out this repo https://github.com/hathach/mynewt-tinyusb-exmaple For mynewt example \ No newline at end of file
+Please check out this repo https://github.com/hathach/mynewt-tinyusb-example For mynewt example \ No newline at end of file