From ae5490e5a5cd8650a45578b4ac70dbe89b002fb1 Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 27 Apr 2022 20:52:56 +0700 Subject: [PATCH] clean up --- examples/device/hid_boot_interface/src/tusb_config.h | 6 ++---- examples/host/cdc_msc_hid/src/tusb_config.h | 7 +++---- src/common/tusb_debug.h | 6 +++--- src/device/usbd.c | 2 +- src/host/usbh.c | 6 +++--- src/portable/raspberrypi/pio_usb/dcd_pio_usb.c | 1 - src/portable/raspberrypi/pio_usb/hcd_pio_usb.c | 1 - 7 files changed, 12 insertions(+), 17 deletions(-) diff --git a/examples/device/hid_boot_interface/src/tusb_config.h b/examples/device/hid_boot_interface/src/tusb_config.h index c8bb8a807..8bc85b722 100644 --- a/examples/device/hid_boot_interface/src/tusb_config.h +++ b/examples/device/hid_boot_interface/src/tusb_config.h @@ -40,10 +40,8 @@ #endif // Use raspberry pio-usb for device -#define CFG_TUD_RPI_PIO_USB 1 -#if CFG_TUD_RPI_PIO_USB -#define BOARD_DEVICE_RHPORT_NUM 1 -#endif +// #define CFG_TUD_RPI_PIO_USB 1 +// #define BOARD_DEVICE_RHPORT_NUM 1 // RHPort number used for device can be defined by board.mk, default to port 0 #ifndef BOARD_DEVICE_RHPORT_NUM diff --git a/examples/host/cdc_msc_hid/src/tusb_config.h b/examples/host/cdc_msc_hid/src/tusb_config.h index 9d083c771..e9e68cf5a 100644 --- a/examples/host/cdc_msc_hid/src/tusb_config.h +++ b/examples/host/cdc_msc_hid/src/tusb_config.h @@ -40,13 +40,12 @@ #endif // Use raspberry pio-usb for host -#define CFG_TUH_RPI_PIO_USB 1 -//#define CFG_TUSB_RPI_PIO_INC_PATH 1 - +// #define CFG_TUH_RPI_PIO_USB 1 +// #define CFG_TUH_RPI_PIO_USB 1 #if CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX #define CFG_TUSB_RHPORT0_MODE (OPT_MODE_HOST | OPT_MODE_HIGH_SPEED) -#elif CFG_TUH_RPI_PIO_USB +#elif defined(CFG_TUH_RPI_PIO_USB) && CFG_TUH_RPI_PIO_USB // rp2040: port0 is native, port 1 for PIO-USB #define CFG_TUSB_RHPORT1_MODE OPT_MODE_HOST #else diff --git a/src/common/tusb_debug.h b/src/common/tusb_debug.h index 1ea2c19f5..ac5bee6ec 100644 --- a/src/common/tusb_debug.h +++ b/src/common/tusb_debug.h @@ -57,7 +57,7 @@ void tu_print_mem(void const *buf, uint32_t count, uint8_t indent); #define tu_printf printf #endif -static inline void tu_print_var(uint8_t const* buf, uint32_t bufsize) +static inline void tu_print_arr(uint8_t const* buf, uint32_t bufsize) { for(uint32_t i=0; i