diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/host/cdc_msc_hid/Makefile | 22 | ||||
| -rw-r--r-- | examples/host/cdc_msc_hid/ses/lpc18xx/lpc18xx.emProject | 21 | ||||
| -rw-r--r-- | examples/host/cdc_msc_hid/ses/lpc43xx/lpc43xx.emProject | 19 | ||||
| -rw-r--r-- | examples/host/cdc_msc_hid/src/main.c | 2 | ||||
| -rw-r--r-- | examples/host/cdc_msc_hid/src/tusb_config.h | 15 |
5 files changed, 49 insertions, 30 deletions
diff --git a/examples/host/cdc_msc_hid/Makefile b/examples/host/cdc_msc_hid/Makefile new file mode 100644 index 000000000..20cd7ba69 --- /dev/null +++ b/examples/host/cdc_msc_hid/Makefile @@ -0,0 +1,22 @@ +include ../../../tools/top.mk +include ../../make.mk + +INC += \ + src \ + $(TOP)/hw \ + +# Example source +EXAMPLE_SOURCE += $(wildcard src/*.c) +SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE)) + + +# TinyUSB Host Stack source +SRC_C += \ + src/host/usbh.c \ + src/host/hub.c \ + src/host/ehci/ehci.c \ + src/class/cdc/cdc_host.c \ + src/host/ehci/ehci.c \ + src/portable/nxp/lpc18_43/hcd_lpc18_43.c + +include ../../rules.mk diff --git a/examples/host/cdc_msc_hid/ses/lpc18xx/lpc18xx.emProject b/examples/host/cdc_msc_hid/ses/lpc18xx/lpc18xx.emProject index 2dd7de552..2b68bfa23 100644 --- a/examples/host/cdc_msc_hid/ses/lpc18xx/lpc18xx.emProject +++ b/examples/host/cdc_msc_hid/ses/lpc18xx/lpc18xx.emProject @@ -17,8 +17,8 @@ arm_target_debug_interface_type="ADIv5" arm_target_device_name="LPC1857" arm_target_interface_type="SWD" - 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(".bss2")))" - c_user_include_directories="../../src;$(rootDir)/hw;$(rootDir)/src;$(lpcDir)//inc;$(lpcDir)//inc/config_18xx" + 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(".bss2")));CFG_TUSB_DEBUG=2" + c_user_include_directories="../../src;$(rootDir)/hw;$(rootDir)/src;$(lpcDir)//inc;$(lpcDir)//inc/config_18xx;$(rootDir)/lib/SEGGER_RTT/RTT" debug_register_definition_file="$(ProjectDir)/LPC18xx_Registers.xml" debug_target_connection="J-Link" gcc_entry_point="Reset_Handler" @@ -102,12 +102,6 @@ </folder> </folder> <folder - Name="segger_rtt" - exclude="" - filter="*.c;*.h" - path="../../../../../lib/segger_rtt" - recurse="No" /> - <folder Name="src" exclude="" filter="*.c;*.h" @@ -119,6 +113,17 @@ filter="*.c;*.h" path="../../../../../src" recurse="Yes" /> + <folder Name="lib"> + <folder Name="SEGGER_RTT"> + <folder Name="RTT"> + <file file_name="../../../../../lib/SEGGER_RTT/RTT/SEGGER_RTT.c" /> + <file file_name="../../../../../lib/SEGGER_RTT/RTT/SEGGER_RTT_printf.c" /> + </folder> + <folder Name="Syscalls"> + <file file_name="../../../../../lib/SEGGER_RTT/Syscalls/SEGGER_RTT_Syscalls_SES.c" /> + </folder> + </folder> + </folder> </project> <configuration Name="MCB1800" diff --git a/examples/host/cdc_msc_hid/ses/lpc43xx/lpc43xx.emProject b/examples/host/cdc_msc_hid/ses/lpc43xx/lpc43xx.emProject index 3b93c623c..2d99ae6c8 100644 --- a/examples/host/cdc_msc_hid/ses/lpc43xx/lpc43xx.emProject +++ b/examples/host/cdc_msc_hid/ses/lpc43xx/lpc43xx.emProject @@ -20,7 +20,7 @@ arm_target_interface_type="SWD" build_treat_warnings_as_errors="No" 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(".bss2")))" - c_user_include_directories="../../src;$(rootDir)/hw;$(rootDir)/src;$(lpcDir)//inc;$(lpcDir)//inc/config_43xx" + c_user_include_directories="../../src;$(rootDir)/hw;$(rootDir)/src;$(lpcDir)//inc;$(rootDir)/lib/SEGGER_RTT/RTT;$(lpcDir)//inc/config_43xx" debug_register_definition_file="LPC43xx_Registers.xml" debug_target_connection="J-Link" gcc_enable_all_warnings="Yes" @@ -122,11 +122,16 @@ <file file_name="LPC43xx_Vectors.s" /> <file file_name="thumb_crt0.s" /> </folder> - <folder - Name="segger_rtt" - exclude="" - filter="*.c;*.h" - path="../../../../../lib/segger_rtt" - recurse="No" /> + <folder Name="lib"> + <folder Name="SEGGER_RTT"> + <folder Name="RTT"> + <file file_name="../../../../../lib/SEGGER_RTT/RTT/SEGGER_RTT.c" /> + <file file_name="../../../../../lib/SEGGER_RTT/RTT/SEGGER_RTT_printf.c" /> + </folder> + <folder Name="Syscalls"> + <file file_name="../../../../../lib/SEGGER_RTT/Syscalls/SEGGER_RTT_Syscalls_SES.c" /> + </folder> + </folder> + </folder> </project> </solution> diff --git a/examples/host/cdc_msc_hid/src/main.c b/examples/host/cdc_msc_hid/src/main.c index 0fbbd4534..6f5df1250 100644 --- a/examples/host/cdc_msc_hid/src/main.c +++ b/examples/host/cdc_msc_hid/src/main.c @@ -193,7 +193,7 @@ void print_greeting(void) printf("- issue at https://github.com/hathach/tinyusb\n"); printf("--------------------------------------------------------------------\n\n"); - printf("This Host demo is configured to support:"); + printf("This Host demo is configured to support:\r\n"); printf(" - RTOS = %s\n", rtos_name[CFG_TUSB_OS]); // if (CFG_TUH_CDC ) puts(" - Communication Device Class"); // if (CFG_TUH_MSC ) puts(" - Mass Storage"); diff --git a/examples/host/cdc_msc_hid/src/tusb_config.h b/examples/host/cdc_msc_hid/src/tusb_config.h index aa259dafd..235402180 100644 --- a/examples/host/cdc_msc_hid/src/tusb_config.h +++ b/examples/host/cdc_msc_hid/src/tusb_config.h @@ -75,23 +75,10 @@ #define CFG_TUH_HID_MOUSE 0 #define CFG_TUSB_HOST_HID_GENERIC 0 // (not yet supported) #define CFG_TUH_MSC 0 +#define CFG_TUH_VENDOR 0 #define CFG_TUSB_HOST_DEVICE_MAX (CFG_TUH_HUB ? 5 : 1) // normal hub has 4 ports -//------------- CLASS -------------// -#define CFG_TUD_CDC 0 -#define CFG_TUD_MSC 0 -#define CFG_TUD_HID 0 -#define CFG_TUD_VENDOR 0 - -// CDC FIFO size of TX and RX -#define CFG_TUD_CDC_RX_BUFSIZE 64 -#define CFG_TUD_CDC_TX_BUFSIZE 64 - -// MSC Buffer size of Device Mass storage -#define CFG_TUD_MSC_BUFSIZE 512 - - #ifdef __cplusplus } #endif |
