From 6a076d8aae25a21a2592f654aa7b86e3e6d072a4 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 19 Jul 2019 16:31:51 +0700 Subject: [PATCH] rename CFG_TUSB_HOST_CUSTOM_CLASS to CFG_TUH_VENDOR --- examples/host/cdc_msc_hid/src/tusb_config.h | 22 ++++----------------- src/class/custom/custom_host.c | 2 +- src/host/usbh.c | 2 +- src/tusb.h | 2 +- 4 files changed, 7 insertions(+), 21 deletions(-) diff --git a/examples/host/cdc_msc_hid/src/tusb_config.h b/examples/host/cdc_msc_hid/src/tusb_config.h index 56208e771..7a18c692b 100644 --- a/examples/host/cdc_msc_hid/src/tusb_config.h +++ b/examples/host/cdc_msc_hid/src/tusb_config.h @@ -67,7 +67,7 @@ #endif //-------------------------------------------------------------------- -// DEVICE CONFIGURATION +// CONFIGURATION //-------------------------------------------------------------------- #define CFG_TUH_HUB 1 @@ -82,30 +82,16 @@ //------------- CLASS -------------// #define CFG_TUD_CDC 0 #define CFG_TUD_MSC 0 -#define CFG_TUD_VENDOR 0 - #define CFG_TUD_HID 0 -#define CFG_TUD_HID_KEYBOARD 0 -#define CFG_TUD_HID_MOUSE 0 +#define CFG_TUD_VENDOR 0 -//-------------------------------------------------------------------- -// CDC -//-------------------------------------------------------------------- - -// FIFO size of CDC TX and RX +// 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 +// MSC Buffer size of Device Mass storage #define CFG_TUD_MSC_BUFSIZE 512 -//-------------------------------------------------------------------- -// HID -//-------------------------------------------------------------------- #ifdef __cplusplus } diff --git a/src/class/custom/custom_host.c b/src/class/custom/custom_host.c index a4f04af31..ebe257e61 100644 --- a/src/class/custom/custom_host.c +++ b/src/class/custom/custom_host.c @@ -26,7 +26,7 @@ #include "tusb_option.h" -#if (TUSB_OPT_HOST_ENABLED && CFG_TUSB_HOST_CUSTOM_CLASS) +#if (TUSB_OPT_HOST_ENABLED && CFG_TUH_VENDOR) //--------------------------------------------------------------------+ // INCLUDE diff --git a/src/host/usbh.c b/src/host/usbh.c index 655e3dd4b..42a99f3d2 100644 --- a/src/host/usbh.c +++ b/src/host/usbh.c @@ -84,7 +84,7 @@ static host_class_driver_t const usbh_class_drivers[] = }, #endif - #if CFG_TUSB_HOST_CUSTOM_CLASS + #if CFG_TUH_VENDOR { .class_code = TUSB_CLASS_VENDOR_SPECIFIC, .init = cush_init, diff --git a/src/tusb.h b/src/tusb.h index 6072218de..3f6673ae1 100644 --- a/src/tusb.h +++ b/src/tusb.h @@ -54,7 +54,7 @@ #include "class/cdc/cdc_host.h" #endif - #if CFG_TUSB_HOST_CUSTOM_CLASS + #if CFG_TUH_VENDOR #include "class/custom_host.h" #endif