rename CFG_TUSB_HOST_CDC/MSC to CFG_TUH_CDC/MSC

This commit is contained in:
hathach 2018-12-06 22:24:31 +07:00
parent 5b09774ae0
commit 7d3ff7aff6
23 changed files with 35 additions and 35 deletions

View File

@ -44,8 +44,8 @@
#define CFG_TUSB_HOST_HID_KEYBOARD ///< Enable HID Class for Keyboard #define CFG_TUSB_HOST_HID_KEYBOARD ///< Enable HID Class for Keyboard
#define CFG_TUSB_HOST_HID_MOUSE ///< Enable HID Class for Mouse #define CFG_TUSB_HOST_HID_MOUSE ///< Enable HID Class for Mouse
#define CFG_TUSB_HOST_HID_GENERIC ///< Enable HID Class for Generic (not supported yet) #define CFG_TUSB_HOST_HID_GENERIC ///< Enable HID Class for Generic (not supported yet)
#define CFG_TUSB_HOST_MSC ///< Enable Mass Storage Class (SCSI subclass only) #define CFG_TUH_MSC ///< Enable Mass Storage Class (SCSI subclass only)
#define CFG_TUSB_HOST_CDC ///< Enable Virtual Serial (Communication Device Class) #define CFG_TUH_CDC ///< Enable Virtual Serial (Communication Device Class)
/** @} */ /** @} */
/** @} */ // group Host /** @} */ // group Host

View File

@ -66,7 +66,7 @@ int main(void)
led_blinking_task(); led_blinking_task();
#if CFG_TUSB_HOST_CDC #if CFG_TUH_CDC
virtual_com_task(); virtual_com_task();
#endif #endif
@ -81,7 +81,7 @@ int main(void)
//--------------------------------------------------------------------+ //--------------------------------------------------------------------+
// USB CDC // USB CDC
//--------------------------------------------------------------------+ //--------------------------------------------------------------------+
#if CFG_TUSB_HOST_CDC #if CFG_TUH_CDC
void tuh_cdc_mounted_cb(uint8_t dev_addr) void tuh_cdc_mounted_cb(uint8_t dev_addr)
{ {

View File

@ -84,11 +84,11 @@
//-------------------------------------------------------------------- //--------------------------------------------------------------------
#define CFG_TUH_HUB 1 #define CFG_TUH_HUB 1
#define CFG_TUH_CDC 1
#define CFG_TUSB_HOST_HID_KEYBOARD 0 #define CFG_TUSB_HOST_HID_KEYBOARD 0
#define CFG_TUSB_HOST_HID_MOUSE 0 #define CFG_TUSB_HOST_HID_MOUSE 0
#define CFG_TUSB_HOST_HID_GENERIC 0 // (not yet supported) #define CFG_TUSB_HOST_HID_GENERIC 0 // (not yet supported)
#define CFG_TUSB_HOST_MSC 0 #define CFG_TUH_MSC 0
#define CFG_TUSB_HOST_CDC 1
#define CFG_TUSB_HOST_DEVICE_MAX (CFG_TUH_HUB ? 5 : 1) // normal hub has 4 ports #define CFG_TUSB_HOST_DEVICE_MAX (CFG_TUH_HUB ? 5 : 1) // normal hub has 4 ports

View File

@ -39,7 +39,7 @@
#include "cdc_serial_host_app.h" #include "cdc_serial_host_app.h"
#include "app_os_prio.h" #include "app_os_prio.h"
#if CFG_TUSB_HOST_CDC #if CFG_TUH_CDC
#define QUEUE_SERIAL_DEPTH 100 #define QUEUE_SERIAL_DEPTH 100

View File

@ -53,7 +53,7 @@
extern "C" { extern "C" {
#endif #endif
#if CFG_TUSB_HOST_CDC #if CFG_TUH_CDC
void cdc_serial_host_app_init(void); void cdc_serial_host_app_init(void);
void cdc_serial_host_app_task(void* param); void cdc_serial_host_app_task(void* param);

View File

@ -138,6 +138,6 @@ void print_greeting(void)
if (CFG_TUH_HUB ) puts(" - Hub (1 level only)"); if (CFG_TUH_HUB ) puts(" - Hub (1 level only)");
if (CFG_TUSB_HOST_HID_MOUSE ) puts(" - HID Mouse"); if (CFG_TUSB_HOST_HID_MOUSE ) puts(" - HID Mouse");
if (CFG_TUSB_HOST_HID_KEYBOARD ) puts(" - HID Keyboard"); if (CFG_TUSB_HOST_HID_KEYBOARD ) puts(" - HID Keyboard");
if (CFG_TUSB_HOST_MSC ) puts(" - Mass Storage"); if (CFG_TUH_MSC ) puts(" - Mass Storage");
if (CFG_TUSB_HOST_CDC ) puts(" - Communication Device Class"); if (CFG_TUH_CDC ) puts(" - Communication Device Class");
} }

View File

@ -39,7 +39,7 @@
#include "msc_cli.h" #include "msc_cli.h"
#include "ctype.h" #include "ctype.h"
#if CFG_TUSB_HOST_MSC #if CFG_TUH_MSC
#include "ff.h" #include "ff.h"
#include "diskio.h" #include "diskio.h"

View File

@ -42,7 +42,7 @@
#include "msc_host_app.h" #include "msc_host_app.h"
#include "app_os_prio.h" #include "app_os_prio.h"
#if CFG_TUSB_HOST_MSC #if CFG_TUH_MSC
#include "msc_cli.h" #include "msc_cli.h"
#include "ff.h" #include "ff.h"

View File

@ -54,7 +54,7 @@
extern "C" { extern "C" {
#endif #endif
#if CFG_TUSB_HOST_MSC #if CFG_TUH_MSC
void msc_host_app_init(void); void msc_host_app_init(void);
void msc_host_app_task(void* param); void msc_host_app_task(void* param);

View File

@ -39,7 +39,7 @@
#include "rndis_host_app.h" #include "rndis_host_app.h"
#include "app_os_prio.h" #include "app_os_prio.h"
#if CFG_TUSB_HOST_CDC && CFG_TUSB_HOST_CDC_RNDIS #if CFG_TUH_CDC && CFG_TUH_CDC_RNDIS
//--------------------------------------------------------------------+ //--------------------------------------------------------------------+
// MACRO CONSTANT TYPEDEF // MACRO CONSTANT TYPEDEF

View File

@ -53,7 +53,7 @@
extern "C" { extern "C" {
#endif #endif
#if CFG_TUSB_HOST_CDC && CFG_TUSB_HOST_CDC_RNDIS #if CFG_TUH_CDC && CFG_TUH_CDC_RNDIS
void rndis_host_app_init(void); void rndis_host_app_init(void);
void rndis_host_app_task(void* param); void rndis_host_app_task(void* param);

View File

@ -58,8 +58,8 @@
#define CFG_TUSB_HOST_HID_KEYBOARD 1 #define CFG_TUSB_HOST_HID_KEYBOARD 1
#define CFG_TUSB_HOST_HID_MOUSE 1 #define CFG_TUSB_HOST_HID_MOUSE 1
#define CFG_TUSB_HOST_HID_GENERIC 0 // (not yet supported) #define CFG_TUSB_HOST_HID_GENERIC 0 // (not yet supported)
#define CFG_TUSB_HOST_MSC 1 #define CFG_TUH_MSC 1
#define CFG_TUSB_HOST_CDC 1 #define CFG_TUH_CDC 1
#define CFG_TUSB_HOST_DEVICE_MAX (CFG_TUH_HUB ? 5 : 1) // normal hub has 4 ports #define CFG_TUSB_HOST_DEVICE_MAX (CFG_TUH_HUB ? 5 : 1) // normal hub has 4 ports

View File

@ -27,7 +27,7 @@
#include "ff.h" #include "ff.h"
#if CFG_TUSB_HOST_MSC #if CFG_TUH_MSC
#if _CODE_PAGE == 437 #if _CODE_PAGE == 437
#define _TBLDEF 1 #define _TBLDEF 1
@ -540,4 +540,4 @@ WCHAR ff_wtoupper ( /* Upper converted character */
return tbl_lower[i] ? tbl_upper[i] : chr; return tbl_lower[i] ? tbl_upper[i] : chr;
} }
#endif // CFG_TUSB_HOST_MSC #endif // CFG_TUH_MSC

View File

@ -38,7 +38,7 @@
#include "tusb.h" #include "tusb.h"
#if CFG_TUSB_HOST_MSC #if CFG_TUH_MSC
//--------------------------------------------------------------------+ //--------------------------------------------------------------------+
// INCLUDE // INCLUDE
//--------------------------------------------------------------------+ //--------------------------------------------------------------------+
@ -204,4 +204,4 @@ DWORD get_fattime (void)
return timestamp.value; return timestamp.value;
} }
#endif // CFG_TUSB_HOST_MSC #endif // CFG_TUH_MSC

View File

@ -99,7 +99,7 @@
#include "ff.h" /* FatFs configurations and declarations */ #include "ff.h" /* FatFs configurations and declarations */
#include "diskio.h" /* Declarations of low level disk I/O functions */ #include "diskio.h" /* Declarations of low level disk I/O functions */
#if CFG_TUSB_HOST_MSC #if CFG_TUH_MSC
/*-------------------------------------------------------------------------- /*--------------------------------------------------------------------------
Module Private Definitions Module Private Definitions
@ -4327,4 +4327,4 @@ int f_printf (
#endif /* !_FS_READONLY */ #endif /* !_FS_READONLY */
#endif /* _USE_STRFUNC */ #endif /* _USE_STRFUNC */
#endif // CFG_TUSB_HOST_MSC #endif // CFG_TUH_MSC

View File

@ -38,7 +38,7 @@
#include "tusb_option.h" #include "tusb_option.h"
#if (MODE_HOST_SUPPORTED && CFG_TUSB_HOST_CDC) #if (MODE_HOST_SUPPORTED && CFG_TUH_CDC)
#define _TINY_USB_SOURCE_FILE_ #define _TINY_USB_SOURCE_FILE_

View File

@ -38,7 +38,7 @@
#include "tusb_option.h" #include "tusb_option.h"
#if (MODE_HOST_SUPPORTED && CFG_TUSB_HOST_CDC && CFG_TUSB_HOST_CDC_RNDIS) #if (MODE_HOST_SUPPORTED && CFG_TUH_CDC && CFG_TUH_CDC_RNDIS)
#define _TINY_USB_SOURCE_FILE_ #define _TINY_USB_SOURCE_FILE_

View File

@ -38,7 +38,7 @@
#include "tusb_option.h" #include "tusb_option.h"
#if MODE_HOST_SUPPORTED & CFG_TUSB_HOST_MSC #if MODE_HOST_SUPPORTED & CFG_TUH_MSC
#define _TINY_USB_SOURCE_FILE_ #define _TINY_USB_SOURCE_FILE_

View File

@ -82,7 +82,7 @@ typedef struct
// Max number of endpoints per device // Max number of endpoints per device
enum { enum {
HCD_MAX_ENDPOINT = CFG_TUH_HUB + CFG_TUSB_HOST_HID_KEYBOARD + CFG_TUSB_HOST_HID_MOUSE + CFG_TUSB_HOST_HID_GENERIC + HCD_MAX_ENDPOINT = CFG_TUH_HUB + CFG_TUSB_HOST_HID_KEYBOARD + CFG_TUSB_HOST_HID_MOUSE + CFG_TUSB_HOST_HID_GENERIC +
CFG_TUSB_HOST_MSC*2 + CFG_TUSB_HOST_CDC*3, CFG_TUH_MSC*2 + CFG_TUH_CDC*3,
HCD_MAX_XFER = HCD_MAX_ENDPOINT*2, HCD_MAX_XFER = HCD_MAX_ENDPOINT*2,
}; };

View File

@ -59,11 +59,11 @@
#include "class/hid/hid_host.h" #include "class/hid/hid_host.h"
#endif #endif
#if CFG_TUSB_HOST_MSC #if CFG_TUH_MSC
#include "class/msc/msc_host.h" #include "class/msc/msc_host.h"
#endif #endif
#if CFG_TUSB_HOST_CDC #if CFG_TUH_CDC
#include "class/cdc/cdc_host.h" #include "class/cdc/cdc_host.h"
#endif #endif

View File

@ -51,7 +51,7 @@
#include "descriptor_cdc.h" #include "descriptor_cdc.h"
#include "cdc_host.h" #include "cdc_host.h"
#if CFG_TUSB_HOST_CDC_RNDIS // TODO enable #if CFG_TUH_CDC_RNDIS // TODO enable
#include "cdc_rndis_host.h" #include "cdc_rndis_host.h"
#endif #endif

View File

@ -42,7 +42,7 @@
static inline void helper_class_init_expect(void) static inline void helper_class_init_expect(void)
{ // class code number order { // class code number order
#if CFG_TUSB_HOST_CDC #if CFG_TUH_CDC
cdch_init_Expect(); cdch_init_Expect();
#endif #endif
@ -50,7 +50,7 @@ static inline void helper_class_init_expect(void)
hidh_init_Expect(); hidh_init_Expect();
#endif #endif
#if CFG_TUSB_HOST_MSC #if CFG_TUH_MSC
msch_init_Expect(); msch_init_Expect();
#endif #endif

View File

@ -58,10 +58,10 @@
#define CFG_TUH_HUB 0 #define CFG_TUH_HUB 0
#define CFG_TUSB_HOST_HID_KEYBOARD 1 #define CFG_TUSB_HOST_HID_KEYBOARD 1
#define CFG_TUSB_HOST_HID_MOUSE 1 #define CFG_TUSB_HOST_HID_MOUSE 1
#define CFG_TUSB_HOST_MSC 1 #define CFG_TUH_MSC 1
#define CFG_TUSB_HOST_HID_GENERIC 0 #define CFG_TUSB_HOST_HID_GENERIC 0
#define CFG_TUSB_HOST_CDC 1 #define CFG_TUH_CDC 1
#define CFG_TUSB_HOST_CDC_RNDIS 0 #define CFG_TUH_CDC_RNDIS 0
// Test support // Test support
#define TEST_CONTROLLER_HOST_START_INDEX \ #define TEST_CONTROLLER_HOST_START_INDEX \