summaryrefslogtreecommitdiff
path: root/examples/obsolete/device/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-04-10 14:31:11 +0700
committerhathach <[email protected]>2018-04-10 14:31:11 +0700
commit3c2467196070eeedd4171e183db04fb815677246 (patch)
tree742e3f277776b025ee0f90ab63ef2f70a3b3d03a /examples/obsolete/device/src
parent3473c71a6a7cb22cb45f368dba4edda49ed8f7af (diff)
mass rename TUSB_CFG to CFG_TUSB
Diffstat (limited to 'examples/obsolete/device/src')
-rw-r--r--examples/obsolete/device/src/app_os_prio.h6
-rw-r--r--examples/obsolete/device/src/cdc_device_app.c2
-rw-r--r--examples/obsolete/device/src/cdc_device_app.h2
-rw-r--r--examples/obsolete/device/src/keyboard_device_app.c4
-rw-r--r--examples/obsolete/device/src/keyboard_device_app.h2
-rw-r--r--examples/obsolete/device/src/main.c16
-rw-r--r--examples/obsolete/device/src/mouse_device_app.c4
-rw-r--r--examples/obsolete/device/src/mouse_device_app.h2
-rw-r--r--examples/obsolete/device/src/msc_device_app.c2
-rw-r--r--examples/obsolete/device/src/msc_device_app.h4
-rw-r--r--examples/obsolete/device/src/msc_device_ramdisk.c4
-rw-r--r--examples/obsolete/device/src/msc_device_romdisk.c4
-rw-r--r--examples/obsolete/device/src/tusb_config.h62
-rw-r--r--examples/obsolete/device/src/tusb_descriptors.c20
-rw-r--r--examples/obsolete/device/src/tusb_descriptors.h28
15 files changed, 81 insertions, 81 deletions
diff --git a/examples/obsolete/device/src/app_os_prio.h b/examples/obsolete/device/src/app_os_prio.h
index 5d932a41e..e75b942ce 100644
--- a/examples/obsolete/device/src/app_os_prio.h
+++ b/examples/obsolete/device/src/app_os_prio.h
@@ -46,16 +46,16 @@
#include "tusb.h"
-#if TUSB_CFG_OS == TUSB_OS_NONE
+#if CFG_TUSB_OS == TUSB_OS_NONE
#define LOWER_PRIO(x) 0 // does not matter
-#elif TUSB_CFG_OS == TUSB_OS_FREERTOS
+#elif CFG_TUSB_OS == TUSB_OS_FREERTOS
#define LOWER_PRIO(x) ((x)-1) // freeRTOS lower number --> lower priority
#else
#error Priority is not configured for this RTOS
#endif
enum {
- STANDARD_APP_TASK_PRIO = LOWER_PRIO(TUSB_CFG_OS_TASK_PRIO), // Application Task is lower than usb system task
+ STANDARD_APP_TASK_PRIO = LOWER_PRIO(CFG_TUSB_OS_TASK_PRIO), // Application Task is lower than usb system task
LED_BLINKING_APP_TASK_PRIO = LOWER_PRIO(STANDARD_APP_TASK_PRIO), // Blinking task is lower than normal task
KEYBOARD_APP_TASK_PRIO = STANDARD_APP_TASK_PRIO,
diff --git a/examples/obsolete/device/src/cdc_device_app.c b/examples/obsolete/device/src/cdc_device_app.c
index 7f448de05..d72e6bcd9 100644
--- a/examples/obsolete/device/src/cdc_device_app.c
+++ b/examples/obsolete/device/src/cdc_device_app.c
@@ -38,7 +38,7 @@
#include "cdc_device_app.h"
-#if TUSB_CFG_DEVICE_CDC
+#if CFG_TUSB_DEVICE_CDC
#include "common/tusb_fifo.h" // TODO refractor
#include "app_os_prio.h"
diff --git a/examples/obsolete/device/src/cdc_device_app.h b/examples/obsolete/device/src/cdc_device_app.h
index a2cd70eb7..45f02baef 100644
--- a/examples/obsolete/device/src/cdc_device_app.h
+++ b/examples/obsolete/device/src/cdc_device_app.h
@@ -53,7 +53,7 @@
extern "C" {
#endif
-#if TUSB_CFG_DEVICE_CDC
+#if CFG_TUSB_DEVICE_CDC
void cdc_serial_app_init(void);
void cdc_serial_app_task(void* param);
diff --git a/examples/obsolete/device/src/keyboard_device_app.c b/examples/obsolete/device/src/keyboard_device_app.c
index 64087053a..a4ae81a46 100644
--- a/examples/obsolete/device/src/keyboard_device_app.c
+++ b/examples/obsolete/device/src/keyboard_device_app.c
@@ -38,7 +38,7 @@
#include "keyboard_device_app.h"
-#if TUSB_CFG_DEVICE_HID_KEYBOARD
+#if CFG_TUSB_DEVICE_HID_KEYBOARD
//--------------------------------------------------------------------+
// INCLUDE
//--------------------------------------------------------------------+
@@ -51,7 +51,7 @@
//--------------------------------------------------------------------+
// INTERNAL OBJECT & FUNCTION DECLARATION
//--------------------------------------------------------------------+
-TUSB_CFG_ATTR_USBRAM hid_keyboard_report_t keyboard_report;
+CFG_TUSB_ATTR_USBRAM hid_keyboard_report_t keyboard_report;
//--------------------------------------------------------------------+
// tinyusb callbacks
diff --git a/examples/obsolete/device/src/keyboard_device_app.h b/examples/obsolete/device/src/keyboard_device_app.h
index 4d069ae39..1d2a8b39e 100644
--- a/examples/obsolete/device/src/keyboard_device_app.h
+++ b/examples/obsolete/device/src/keyboard_device_app.h
@@ -53,7 +53,7 @@
extern "C" {
#endif
-#if TUSB_CFG_DEVICE_HID_KEYBOARD
+#if CFG_TUSB_DEVICE_HID_KEYBOARD
void keyboard_app_init(void);
void keyboard_app_task(void* param);
diff --git a/examples/obsolete/device/src/main.c b/examples/obsolete/device/src/main.c
index 0cd9eb3bc..802883ce4 100644
--- a/examples/obsolete/device/src/main.c
+++ b/examples/obsolete/device/src/main.c
@@ -64,7 +64,7 @@ void led_blinking_init(void);
void led_blinking_task(void* param);
-#if TUSB_CFG_OS == TUSB_OS_NONE
+#if CFG_TUSB_OS == TUSB_OS_NONE
// like a real RTOS, this function is a main loop invoking each task in application and never return
void os_none_start_scheduler(void)
{
@@ -97,9 +97,9 @@ int main(void)
cdc_serial_app_init();
//------------- start OS scheduler (never return) -------------//
-#if TUSB_CFG_OS == TUSB_OS_FREERTOS
+#if CFG_TUSB_OS == TUSB_OS_FREERTOS
vTaskStartScheduler();
-#elif TUSB_CFG_OS == TUSB_OS_NONE
+#elif CFG_TUSB_OS == TUSB_OS_NONE
os_none_start_scheduler();
#else
#error need to start RTOS schduler
@@ -193,9 +193,9 @@ void print_greeting(void)
);
puts("This DEVICE demo is configured to support:");
- printf(" - RTOS = %s\n", rtos_name[TUSB_CFG_OS]);
- if (TUSB_CFG_DEVICE_HID_MOUSE ) puts(" - HID Mouse");
- if (TUSB_CFG_DEVICE_HID_KEYBOARD ) puts(" - HID Keyboard");
- if (TUSB_CFG_DEVICE_MSC ) puts(" - Mass Storage");
- if (TUSB_CFG_DEVICE_CDC ) puts(" - Communication Device Class");
+ printf(" - RTOS = %s\n", rtos_name[CFG_TUSB_OS]);
+ if (CFG_TUSB_DEVICE_HID_MOUSE ) puts(" - HID Mouse");
+ if (CFG_TUSB_DEVICE_HID_KEYBOARD ) puts(" - HID Keyboard");
+ if (CFG_TUSB_DEVICE_MSC ) puts(" - Mass Storage");
+ if (CFG_TUSB_DEVICE_CDC ) puts(" - Communication Device Class");
}
diff --git a/examples/obsolete/device/src/mouse_device_app.c b/examples/obsolete/device/src/mouse_device_app.c
index b04ef7133..3cc2e0d68 100644
--- a/examples/obsolete/device/src/mouse_device_app.c
+++ b/examples/obsolete/device/src/mouse_device_app.c
@@ -38,7 +38,7 @@
#include "mouse_device_app.h"
-#if TUSB_CFG_DEVICE_HID_MOUSE
+#if CFG_TUSB_DEVICE_HID_MOUSE
//--------------------------------------------------------------------+
// INCLUDE
//--------------------------------------------------------------------+
@@ -51,7 +51,7 @@
//--------------------------------------------------------------------+
// INTERNAL OBJECT & FUNCTION DECLARATION
//--------------------------------------------------------------------+
-TUSB_CFG_ATTR_USBRAM hid_mouse_report_t mouse_report;
+CFG_TUSB_ATTR_USBRAM hid_mouse_report_t mouse_report;
//--------------------------------------------------------------------+
// tinyusb callbacks
diff --git a/examples/obsolete/device/src/mouse_device_app.h b/examples/obsolete/device/src/mouse_device_app.h
index f39f8e30f..48bfb3315 100644
--- a/examples/obsolete/device/src/mouse_device_app.h
+++ b/examples/obsolete/device/src/mouse_device_app.h
@@ -53,7 +53,7 @@
extern "C" {
#endif
-#if TUSB_CFG_DEVICE_HID_MOUSE
+#if CFG_TUSB_DEVICE_HID_MOUSE
void mouse_app_init(void);
void mouse_app_task(void * param);
diff --git a/examples/obsolete/device/src/msc_device_app.c b/examples/obsolete/device/src/msc_device_app.c
index 5650d8b71..df78ccd6e 100644
--- a/examples/obsolete/device/src/msc_device_app.c
+++ b/examples/obsolete/device/src/msc_device_app.c
@@ -38,7 +38,7 @@
#include "msc_device_app.h"
-#if TUSB_CFG_DEVICE_MSC
+#if CFG_TUSB_DEVICE_MSC
//--------------------------------------------------------------------+
// INCLUDE
//--------------------------------------------------------------------+
diff --git a/examples/obsolete/device/src/msc_device_app.h b/examples/obsolete/device/src/msc_device_app.h
index cd087b8a3..185ceb260 100644
--- a/examples/obsolete/device/src/msc_device_app.h
+++ b/examples/obsolete/device/src/msc_device_app.h
@@ -50,7 +50,7 @@
extern "C" {
#endif
-#if TUSB_CFG_DEVICE_MSC
+#if CFG_TUSB_DEVICE_MSC
enum
{
@@ -63,7 +63,7 @@ enum
If you find any bugs or get any questions, feel free to file an\r\n\
issue at github.com/hathach/tinyusb"
-#if TUSB_CFG_MCU==MCU_LPC11UXX || TUSB_CFG_MCU==MCU_LPC13UXX
+#if CFG_TUSB_MCU==MCU_LPC11UXX || CFG_TUSB_MCU==MCU_LPC13UXX
#define MSCD_APP_ROMDISK
#else // defaults is ram disk
#define MSCD_APP_RAMDISK
diff --git a/examples/obsolete/device/src/msc_device_ramdisk.c b/examples/obsolete/device/src/msc_device_ramdisk.c
index 294e0b792..e2a7a110f 100644
--- a/examples/obsolete/device/src/msc_device_ramdisk.c
+++ b/examples/obsolete/device/src/msc_device_ramdisk.c
@@ -38,7 +38,7 @@
#include "msc_device_app.h"
-#if TUSB_CFG_DEVICE_MSC && defined (MSCD_APP_RAMDISK)
+#if CFG_TUSB_DEVICE_MSC && defined (MSCD_APP_RAMDISK)
//--------------------------------------------------------------------+
// MACRO CONSTANT TYPEDEF
@@ -47,7 +47,7 @@
//--------------------------------------------------------------------+
// INTERNAL OBJECT & FUNCTION DECLARATION
//--------------------------------------------------------------------+
-TUSB_CFG_ATTR_USBRAM
+CFG_TUSB_ATTR_USBRAM
uint8_t msc_device_ramdisk[DISK_BLOCK_NUM][DISK_BLOCK_SIZE] =
{
//------------- Boot Sector -------------//
diff --git a/examples/obsolete/device/src/msc_device_romdisk.c b/examples/obsolete/device/src/msc_device_romdisk.c
index 16c8fe518..9f80c8001 100644
--- a/examples/obsolete/device/src/msc_device_romdisk.c
+++ b/examples/obsolete/device/src/msc_device_romdisk.c
@@ -38,7 +38,7 @@
#include "msc_device_app.h"
-#if TUSB_CFG_DEVICE_MSC && defined (MSCD_APP_ROMDISK)
+#if CFG_TUSB_DEVICE_MSC && defined (MSCD_APP_ROMDISK)
//--------------------------------------------------------------------+
// INCLUDE
@@ -91,7 +91,7 @@ const uint8_t msc_device_app_rommdisk[DISK_BLOCK_NUM][DISK_BLOCK_SIZE] =
[3] = README_CONTENTS
};
-TUSB_CFG_ATTR_USBRAM
+CFG_TUSB_ATTR_USBRAM
static uint8_t sector_buffer[DISK_BLOCK_SIZE];
//--------------------------------------------------------------------+
diff --git a/examples/obsolete/device/src/tusb_config.h b/examples/obsolete/device/src/tusb_config.h
index f33fb46ba..6a841d28c 100644
--- a/examples/obsolete/device/src/tusb_config.h
+++ b/examples/obsolete/device/src/tusb_config.h
@@ -46,62 +46,62 @@
//--------------------------------------------------------------------+
// CONTROLLER CONFIGURATION
//--------------------------------------------------------------------+
-//#define TUSB_CFG_MCU will be passed from IDE/command line for easy board/mcu switching
+//#define CFG_TUSB_MCU will be passed from IDE/command line for easy board/mcu switching
-#define TUSB_CFG_CONTROLLER_0_MODE (TUSB_MODE_DEVICE)
-//#define TUSB_CFG_CONTROLLER_1_MODE (TUSB_MODE_DEVICE)
+#define CFG_TUSB_CONTROLLER_0_MODE (TUSB_MODE_DEVICE)
+//#define CFG_TUSB_CONTROLLER_1_MODE (TUSB_MODE_DEVICE)
//--------------------------------------------------------------------+
// DEVICE CONFIGURATION
//--------------------------------------------------------------------+
-#define TUSB_CFG_DEVICE_CONTROL_ENDOINT_SIZE 64
+#define CFG_TUSB_DEVICE_CONTROL_ENDOINT_SIZE 64
//------------- CLASS -------------//
-#define TUSB_CFG_DEVICE_HID_KEYBOARD 1
-#define TUSB_CFG_DEVICE_HID_MOUSE 1
-#define TUSB_CFG_DEVICE_HID_GENERIC 0 // not supported yet
-#define TUSB_CFG_DEVICE_MSC 1
-#define TUSB_CFG_DEVICE_CDC 1
+#define CFG_TUSB_DEVICE_HID_KEYBOARD 1
+#define CFG_TUSB_DEVICE_HID_MOUSE 1
+#define CFG_TUSB_DEVICE_HID_GENERIC 0 // not supported yet
+#define CFG_TUSB_DEVICE_MSC 1
+#define CFG_TUSB_DEVICE_CDC 1
//--------------------------------------------------------------------+
// COMMON CONFIGURATION
//--------------------------------------------------------------------+
-#define TUSB_CFG_DEBUG 2
+#define CFG_TUSB_DEBUG 2
-//#define TUSB_CFG_OS TUSB_OS_NONE // be passed from IDE/command line for easy project switching
-//#define TUSB_CFG_OS_TASK_PRIO 0 // be passed from IDE/command line for easy project switching
+//#define CFG_TUSB_OS TUSB_OS_NONE // be passed from IDE/command line for easy project switching
+//#define CFG_TUSB_OS_TASK_PRIO 0 // be passed from IDE/command line for easy project switching
//--------------------------------------------------------------------+
// USB RAM PLACEMENT
//--------------------------------------------------------------------+
#ifdef __CODE_RED // compiled with lpcxpresso
- #if (TUSB_CFG_MCU == MCU_LPC11UXX) || (TUSB_CFG_MCU == MCU_LPC13UXX)
- #define TUSB_CFG_ATTR_USBRAM ATTR_SECTION(.data.$RAM2) ATTR_ALIGNED(64) // lp11u & lp13u requires data to be 64 byte aligned
- #elif TUSB_CFG_MCU == MCU_LPC175X_6X
- #define TUSB_CFG_ATTR_USBRAM // LPC17xx USB DMA can access all
- #elif (TUSB_CFG_MCU == MCU_LPC43XX)
- #define TUSB_CFG_ATTR_USBRAM ATTR_SECTION(.data.$RAM3)
+ #if (CFG_TUSB_MCU == MCU_LPC11UXX) || (CFG_TUSB_MCU == MCU_LPC13UXX)
+ #define CFG_TUSB_ATTR_USBRAM ATTR_SECTION(.data.$RAM2) ATTR_ALIGNED(64) // lp11u & lp13u requires data to be 64 byte aligned
+ #elif CFG_TUSB_MCU == MCU_LPC175X_6X
+ #define CFG_TUSB_ATTR_USBRAM // LPC17xx USB DMA can access all
+ #elif (CFG_TUSB_MCU == MCU_LPC43XX)
+ #define CFG_TUSB_ATTR_USBRAM ATTR_SECTION(.data.$RAM3)
#endif
#elif defined __CC_ARM // Compiled with Keil armcc, USBRAM_SECTION is defined in scatter files
- #if (TUSB_CFG_MCU == MCU_LPC11UXX) || (TUSB_CFG_MCU == MCU_LPC13UXX)
- #define TUSB_CFG_ATTR_USBRAM ATTR_SECTION(USBRAM_SECTION) ATTR_ALIGNED(64) // lp11u & lp13u requires data to be 64 byte aligned
- #elif (TUSB_CFG_MCU == MCU_LPC175X_6X)
- #define TUSB_CFG_ATTR_USBRAM // LPC17xx USB DMA can access all address
- #elif (TUSB_CFG_MCU == MCU_LPC43XX)
- #define TUSB_CFG_ATTR_USBRAM // Use keil tool configure to have AHB SRAM as default memory
+ #if (CFG_TUSB_MCU == MCU_LPC11UXX) || (CFG_TUSB_MCU == MCU_LPC13UXX)
+ #define CFG_TUSB_ATTR_USBRAM ATTR_SECTION(USBRAM_SECTION) ATTR_ALIGNED(64) // lp11u & lp13u requires data to be 64 byte aligned
+ #elif (CFG_TUSB_MCU == MCU_LPC175X_6X)
+ #define CFG_TUSB_ATTR_USBRAM // LPC17xx USB DMA can access all address
+ #elif (CFG_TUSB_MCU == MCU_LPC43XX)
+ #define CFG_TUSB_ATTR_USBRAM // Use keil tool configure to have AHB SRAM as default memory
#endif
#elif defined __ICCARM__ // compiled with IAR
- #if (TUSB_CFG_MCU == MCU_LPC11UXX) || (TUSB_CFG_MCU == MCU_LPC13UXX)
- #define TUSB_CFG_ATTR_USBRAM _Pragma("location=\"USB_PACKET_MEMORY\"") ATTR_ALIGNED(64)
- #elif (TUSB_CFG_MCU == MCU_LPC175X_6X)
- #define TUSB_CFG_ATTR_USBRAM
- #elif (TUSB_CFG_MCU == MCU_LPC43XX)
- #define TUSB_CFG_ATTR_USBRAM _Pragma("location=\".ahb_sram1\"")
+ #if (CFG_TUSB_MCU == MCU_LPC11UXX) || (CFG_TUSB_MCU == MCU_LPC13UXX)
+ #define CFG_TUSB_ATTR_USBRAM _Pragma("location=\"USB_PACKET_MEMORY\"") ATTR_ALIGNED(64)
+ #elif (CFG_TUSB_MCU == MCU_LPC175X_6X)
+ #define CFG_TUSB_ATTR_USBRAM
+ #elif (CFG_TUSB_MCU == MCU_LPC43XX)
+ #define CFG_TUSB_ATTR_USBRAM _Pragma("location=\".ahb_sram1\"")
#endif
#else
@@ -111,7 +111,7 @@
#endif
// LPC11uxx and LPC13uxx requires each buffer has to be 64-byte alignment
-#if TUSB_CFG_MCU == MCU_LPC11UXX || TUSB_CFG_MCU == MCU_LPC13UXX
+#if CFG_TUSB_MCU == MCU_LPC11UXX || CFG_TUSB_MCU == MCU_LPC13UXX
#define ATTR_USB_MIN_ALIGNMENT ATTR_ALIGNED(64)
#elif defined NRF52840_XXAA
#define ATTR_USB_MIN_ALIGNMENT ATTR_ALIGNED(4)
diff --git a/examples/obsolete/device/src/tusb_descriptors.c b/examples/obsolete/device/src/tusb_descriptors.c
index bd279dc93..ca71d60e3 100644
--- a/examples/obsolete/device/src/tusb_descriptors.c
+++ b/examples/obsolete/device/src/tusb_descriptors.c
@@ -41,7 +41,7 @@
//--------------------------------------------------------------------+
// Keyboard Report Descriptor
//--------------------------------------------------------------------+
-#if TUSB_CFG_DEVICE_HID_KEYBOARD
+#if CFG_TUSB_DEVICE_HID_KEYBOARD
uint8_t const desc_keyboard_report[] = {
HID_USAGE_PAGE ( HID_USAGE_PAGE_DESKTOP ),
HID_USAGE ( HID_USAGE_DESKTOP_KEYBOARD ),
@@ -87,7 +87,7 @@ uint8_t const desc_keyboard_report[] = {
//--------------------------------------------------------------------+
// Mouse Report Descriptor
//--------------------------------------------------------------------+
-#if TUSB_CFG_DEVICE_HID_MOUSE
+#if CFG_TUSB_DEVICE_HID_MOUSE
uint8_t const desc_mouse_report[] = {
HID_USAGE_PAGE ( HID_USAGE_PAGE_DESKTOP ),
HID_USAGE ( HID_USAGE_DESKTOP_MOUSE ),
@@ -140,7 +140,7 @@ tusb_desc_device_t const desc_device =
.bLength = sizeof(tusb_desc_device_t),
.bDescriptorType = TUSB_DESC_DEVICE,
.bcdUSB = 0x0200,
- #if TUSB_CFG_DEVICE_CDC
+ #if CFG_TUSB_DEVICE_CDC
// Use Interface Association Descriptor (IAD) for CDC
// As required by USB Specs IAD's subclass must be common class (2) and protocol must be IAD (1)
.bDeviceClass = TUSB_CLASS_MISC,
@@ -152,7 +152,7 @@ tusb_desc_device_t const desc_device =
.bDeviceProtocol = 0x00,
#endif
- .bMaxPacketSize0 = TUSB_CFG_DEVICE_CONTROL_ENDOINT_SIZE,
+ .bMaxPacketSize0 = CFG_TUSB_DEVICE_CONTROL_ENDOINT_SIZE,
.idVendor = CFG_VENDORID,
.idProduct = CFG_PRODUCTID,
@@ -184,7 +184,7 @@ app_descriptor_configuration_t const desc_configuration =
.bMaxPower = TUSB_DESC_CONFIG_POWER_MA(500)
},
- #if TUSB_CFG_DEVICE_CDC
+ #if CFG_TUSB_DEVICE_CDC
// IAD points to CDC Interfaces
.cdc_iad =
{
@@ -296,7 +296,7 @@ app_descriptor_configuration_t const desc_configuration =
#endif
//------------- HID Keyboard -------------//
- #if TUSB_CFG_DEVICE_HID_KEYBOARD
+ #if CFG_TUSB_DEVICE_HID_KEYBOARD
.keyboard_interface =
{
.bLength = sizeof(tusb_desc_interface_t),
@@ -333,7 +333,7 @@ app_descriptor_configuration_t const desc_configuration =
#endif
//------------- HID Mouse -------------//
- #if TUSB_CFG_DEVICE_HID_MOUSE
+ #if CFG_TUSB_DEVICE_HID_MOUSE
.mouse_interface =
{
.bLength = sizeof(tusb_desc_interface_t),
@@ -370,7 +370,7 @@ app_descriptor_configuration_t const desc_configuration =
#endif
//------------- Mass Storage -------------//
- #if TUSB_CFG_DEVICE_MSC
+ #if CFG_TUSB_DEVICE_MSC
.msc_interface =
{
.bLength = sizeof(tusb_desc_interface_t),
@@ -465,11 +465,11 @@ tusbd_descriptor_pointer_t tusbd_descriptor_pointers =
.p_configuration = (uint8_t const * ) &desc_configuration,
.p_string_arr = (uint8_t const **) string_descriptor_arr,
- #if TUSB_CFG_DEVICE_HID_KEYBOARD
+ #if CFG_TUSB_DEVICE_HID_KEYBOARD
.p_hid_keyboard_report = (uint8_t const *) desc_keyboard_report,
#endif
- #if TUSB_CFG_DEVICE_HID_MOUSE
+ #if CFG_TUSB_DEVICE_HID_MOUSE
.p_hid_mouse_report = (uint8_t const *) desc_mouse_report,
#endif
};
diff --git a/examples/obsolete/device/src/tusb_descriptors.h b/examples/obsolete/device/src/tusb_descriptors.h
index 0ef98e695..274ad00e2 100644
--- a/examples/obsolete/device/src/tusb_descriptors.h
+++ b/examples/obsolete/device/src/tusb_descriptors.h
@@ -50,22 +50,22 @@
// each combination of interfaces need to have a unique productid, as windows will bind & remember device driver after the first plug.
// Auto ProductID layout's Bitmap: (MSB) MassStorage | Generic | Mouse | Key | CDC (LSB)
#ifndef CFG_PRODUCTID
- #define PRODUCTID_BITMAP(interface, n) ( (TUSB_CFG_DEVICE_##interface) << (n) )
+ #define PRODUCTID_BITMAP(interface, n) ( (CFG_TUSB_DEVICE_##interface) << (n) )
#define CFG_PRODUCTID (0x4000 | ( PRODUCTID_BITMAP(CDC, 0) | PRODUCTID_BITMAP(HID_KEYBOARD, 1) | \
PRODUCTID_BITMAP(HID_MOUSE, 2) | PRODUCTID_BITMAP(HID_GENERIC, 3) | \
PRODUCTID_BITMAP(MSC, 4) ) )
#endif
#define ITF_NUM_CDC 0
-#define INTERFACE_NO_HID_KEYBOARD (ITF_NUM_CDC + 2*(TUSB_CFG_DEVICE_CDC ? 1 : 0) )
-#define INTERFACE_NO_HID_MOUSE (INTERFACE_NO_HID_KEYBOARD + TUSB_CFG_DEVICE_HID_KEYBOARD )
-#define INTERFACE_NO_HID_GENERIC (INTERFACE_NO_HID_MOUSE + TUSB_CFG_DEVICE_HID_MOUSE )
-#define ITF_NUM_MSC (INTERFACE_NO_HID_GENERIC + TUSB_CFG_DEVICE_HID_GENERIC )
+#define INTERFACE_NO_HID_KEYBOARD (ITF_NUM_CDC + 2*(CFG_TUSB_DEVICE_CDC ? 1 : 0) )
+#define INTERFACE_NO_HID_MOUSE (INTERFACE_NO_HID_KEYBOARD + CFG_TUSB_DEVICE_HID_KEYBOARD )
+#define INTERFACE_NO_HID_GENERIC (INTERFACE_NO_HID_MOUSE + CFG_TUSB_DEVICE_HID_MOUSE )
+#define ITF_NUM_MSC (INTERFACE_NO_HID_GENERIC + CFG_TUSB_DEVICE_HID_GENERIC )
-#define ITF_TOTAL (2*TUSB_CFG_DEVICE_CDC + TUSB_CFG_DEVICE_HID_KEYBOARD + TUSB_CFG_DEVICE_HID_MOUSE + \
- TUSB_CFG_DEVICE_HID_GENERIC + TUSB_CFG_DEVICE_MSC)
+#define ITF_TOTAL (2*CFG_TUSB_DEVICE_CDC + CFG_TUSB_DEVICE_HID_KEYBOARD + CFG_TUSB_DEVICE_HID_MOUSE + \
+ CFG_TUSB_DEVICE_HID_GENERIC + CFG_TUSB_DEVICE_MSC)
-#if (TUSB_CFG_MCU == MCU_LPC11UXX || TUSB_CFG_MCU == MCU_LPC13UXX) && (ITF_TOTAL > 4)
+#if (CFG_TUSB_MCU == MCU_LPC11UXX || CFG_TUSB_MCU == MCU_LPC13UXX) && (ITF_TOTAL > 4)
#error These MCUs do not have enough number of endpoints for the current configuration
#endif
@@ -75,7 +75,7 @@
#define EDPT_IN(x) (0x80 | (x))
#define EDPT_OUT(x) (x)
-#if TUSB_CFG_MCU == MCU_LPC175X_6X // MCUs's endpoint number has a fixed type
+#if CFG_TUSB_MCU == MCU_LPC175X_6X // MCUs's endpoint number has a fixed type
//------------- CDC -------------//
#define CDC_EDPT_NOTIF EDPT_IN (1)
@@ -125,7 +125,7 @@
#endif
-#define MSC_EDPT_PACKETSIZE (TUSB_CFG_MCU == MCU_LPC43XX ? 512 : 64)
+#define MSC_EDPT_PACKETSIZE (CFG_TUSB_MCU == MCU_LPC43XX ? 512 : 64)
//--------------------------------------------------------------------+
// CONFIGURATION DESCRIPTOR
@@ -135,7 +135,7 @@ typedef struct ATTR_PACKED
tusb_desc_configuration_t configuration;
//------------- CDC -------------//
-#if TUSB_CFG_DEVICE_CDC
+#if CFG_TUSB_DEVICE_CDC
tusb_desc_interface_assoc_t cdc_iad;
//CDC Control Interface
@@ -153,21 +153,21 @@ typedef struct ATTR_PACKED
#endif
//------------- HID Keyboard -------------//
-#if TUSB_CFG_DEVICE_HID_KEYBOARD
+#if CFG_TUSB_DEVICE_HID_KEYBOARD
tusb_desc_interface_t keyboard_interface;
tusb_hid_descriptor_hid_t keyboard_hid;
tusb_desc_endpoint_t keyboard_endpoint;
#endif
//------------- HID Mouse -------------//
-#if TUSB_CFG_DEVICE_HID_MOUSE
+#if CFG_TUSB_DEVICE_HID_MOUSE
tusb_desc_interface_t mouse_interface;
tusb_hid_descriptor_hid_t mouse_hid;
tusb_desc_endpoint_t mouse_endpoint;
#endif
//------------- Mass Storage -------------//
-#if TUSB_CFG_DEVICE_MSC
+#if CFG_TUSB_DEVICE_MSC
tusb_desc_interface_t msc_interface;
tusb_desc_endpoint_t msc_endpoint_in;
tusb_desc_endpoint_t msc_endpoint_out;