mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-14 04:18:56 +00:00
rename CFG_TUSB_HOST_CDC/MSC to CFG_TUH_CDC/MSC
This commit is contained in:
parent
5b09774ae0
commit
7d3ff7aff6
@ -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
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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");
|
||||
}
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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_
|
||||
|
||||
|
@ -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_
|
||||
|
||||
|
@ -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_
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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 \
|
||||
|
Loading…
x
Reference in New Issue
Block a user