From f4e3c6fd8ee125123e2cfa704d61dab34be576c5 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 1 Sep 2020 17:12:31 +0700 Subject: [PATCH] clean up --- examples/host/cdc_msc_hid/src/main.c | 16 ++++++++-------- hw/bsp/mcb1800/board.mk | 4 ++-- test/test/support/tusb_config.h | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/host/cdc_msc_hid/src/main.c b/examples/host/cdc_msc_hid/src/main.c index 273c95c77..9ec213090 100644 --- a/examples/host/cdc_msc_hid/src/main.c +++ b/examples/host/cdc_msc_hid/src/main.c @@ -75,7 +75,7 @@ CFG_TUSB_MEM_SECTION static char serial_in_buffer[64] = { 0 }; void tuh_mount_cb(uint8_t dev_addr) { // application set-up - printf("\na device with address %d is mounted\n", dev_addr); + printf("A device with address %d is mounted\r\n", dev_addr); tuh_cdc_receive(dev_addr, serial_in_buffer, sizeof(serial_in_buffer), true); // schedule first transfer } @@ -83,7 +83,7 @@ void tuh_mount_cb(uint8_t dev_addr) void tuh_umount_cb(uint8_t dev_addr) { // application tear-down - printf("\na device with address %d is unmounted \n", dev_addr); + printf("A device with address %d is unmounted \r\n", dev_addr); } // invoked ISR context @@ -187,14 +187,14 @@ void print_greeting(void) [OPT_OS_FREERTOS] = "FreeRTOS", }; - printf("\n--------------------------------------------------------------------\n"); - printf("- Host example\n"); - printf("- if you find any bugs or get any questions, feel free to file an\n"); - printf("- issue at https://github.com/hathach/tinyusb\n"); - printf("--------------------------------------------------------------------\n\n"); + printf("--------------------------------------------------------------------\r\n"); + printf("- Host example\r\n"); + printf("- if you find any bugs or get any questions, feel free to file an\r\n"); + printf("- issue at https://github.com/hathach/tinyusb\r\n"); + printf("--------------------------------------------------------------------\r\n\r\n"); printf("This Host demo is configured to support:\r\n"); - printf(" - RTOS = %s\n", rtos_name[CFG_TUSB_OS]); + printf(" - RTOS = %s\r\n", rtos_name[CFG_TUSB_OS]); #if CFG_TUH_CDC printf(" - Communication Device Class\r\n"); diff --git a/hw/bsp/mcb1800/board.mk b/hw/bsp/mcb1800/board.mk index 6037310a6..7ff17dae3 100644 --- a/hw/bsp/mcb1800/board.mk +++ b/hw/bsp/mcb1800/board.mk @@ -5,7 +5,7 @@ CFLAGS += \ -mcpu=cortex-m3 \ -nostdlib \ -DCORE_M3 \ - -D__USE_LPCOPEN + -D__USE_LPCOPEN \ -DCFG_TUSB_MCU=OPT_MCU_LPC18XX \ # mcu driver cause following warnings @@ -37,7 +37,7 @@ FREERTOS_PORT = ARM_CM3 # For flash-jlink target JLINK_DEVICE = LPC1857 -JLINK_IF = jtag +JLINK_IF = swd # flash using jlink flash: flash-jlink diff --git a/test/test/support/tusb_config.h b/test/test/support/tusb_config.h index 80ea0a1ea..a18d86598 100644 --- a/test/test/support/tusb_config.h +++ b/test/test/support/tusb_config.h @@ -43,7 +43,7 @@ #define CFG_TUSB_MCU OPT_MCU_NRF5X #endif -#define CFG_TUSB_RHPORT0_MODE (OPT_MODE_DEVICE | OPT_MODE_HIGH_SPEED) +#define CFG_TUSB_RHPORT0_MODE (OPT_MODE_DEVICE | OPT_MODE_HOST | OPT_MODE_HIGH_SPEED) #define CFG_TUSB_OS OPT_OS_NONE // CFG_TUSB_DEBUG is defined by compiler in DEBUG build