Просмотр исходного кода

rename CFG_TUSB_HOST_CDC/MSC to CFG_TUH_CDC/MSC

hathach 7 лет назад
Родитель
Сommit
7d3ff7aff6

+ 2 - 2
docs/configuration.txt

@@ -44,8 +44,8 @@
 #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_GENERIC   ///< Enable HID Class for Generic (not supported yet)
-#define CFG_TUSB_HOST_MSC           ///< Enable Mass Storage Class (SCSI subclass only)
-#define CFG_TUSB_HOST_CDC           ///< Enable Virtual Serial (Communication Device Class)
+#define CFG_TUH_MSC           ///< Enable Mass Storage Class (SCSI subclass only)
+#define CFG_TUH_CDC           ///< Enable Virtual Serial (Communication Device Class)
 /** @} */
 
 /** @} */ // group Host

+ 2 - 2
examples/host/cdc_msc_hid/src/main.c

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

+ 2 - 2
examples/host/cdc_msc_hid/src/tusb_config.h

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

+ 1 - 1
examples/obsolete/host/src/cdc_serial_host_app.c

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

+ 1 - 1
examples/obsolete/host/src/cdc_serial_host_app.h

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

+ 2 - 2
examples/obsolete/host/src/main.c

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

+ 1 - 1
examples/obsolete/host/src/msc_cli.c

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

+ 1 - 1
examples/obsolete/host/src/msc_host_app.c

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

+ 1 - 1
examples/obsolete/host/src/msc_host_app.h

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

+ 1 - 1
examples/obsolete/host/src/rndis_host_app.c

@@ -39,7 +39,7 @@
 #include "rndis_host_app.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

+ 1 - 1
examples/obsolete/host/src/rndis_host_app.h

@@ -53,7 +53,7 @@
  extern "C" {
 #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_task(void* param);

+ 2 - 2
examples/obsolete/host/src/tusb_config.h

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

+ 2 - 2
lib/fatfs/ccsbcs.c

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

+ 2 - 2
lib/fatfs/diskio.c

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

+ 2 - 2
lib/fatfs/ff.c

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

+ 1 - 1
src/class/cdc/cdc_host.c

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

+ 1 - 1
src/class/cdc/cdc_rndis_host.c

@@ -38,7 +38,7 @@
 
 #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_
 

+ 1 - 1
src/class/msc/msc_host.c

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

+ 1 - 1
src/host/hcd.h

@@ -82,7 +82,7 @@ typedef struct
 // Max number of endpoints per device
 enum {
   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,
 };

+ 2 - 2
src/tusb.h

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

+ 1 - 1
tests/lpc18xx_43xx/test/host/cdc/test_cdc_host.c

@@ -51,7 +51,7 @@
 #include "descriptor_cdc.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"
 #endif
 

+ 2 - 2
tests/lpc18xx_43xx/test/host/host_helper.h

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

+ 3 - 3
tests/support/tusb_config.h

@@ -58,10 +58,10 @@
 #define CFG_TUH_HUB                 0
 #define CFG_TUSB_HOST_HID_KEYBOARD        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_CDC                 1
-#define CFG_TUSB_HOST_CDC_RNDIS           0
+#define CFG_TUH_CDC                 1
+#define CFG_TUH_CDC_RNDIS           0
 
 // Test support
 #define TEST_CONTROLLER_HOST_START_INDEX \