summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-04-12 13:23:52 +0700
committerhathach <[email protected]>2018-04-12 13:23:52 +0700
commit4b660175beea2c76a1a761e3840937d9784ab201 (patch)
tree2d3b595aa8bf9e1ffcb7dd1feafd92275e92994e /examples
parent3d31f921068d906f6f63f59a3b10784f28e97d4d (diff)
rename CFG_TUSB_DEVICE_* to CFG_TUD_*
Diffstat (limited to 'examples')
-rw-r--r--examples/device/device_virtual_com/src/main.c8
-rw-r--r--examples/device/device_virtual_com/src/tusb_config.h12
-rw-r--r--examples/device/device_virtual_com/src/tusb_descriptors.c2
-rw-r--r--examples/device/device_virtual_com/src/tusb_descriptors.h2
-rw-r--r--examples/device/nrf52840/src/main.c8
-rw-r--r--examples/device/nrf52840/src/msc_device_app.c2
-rw-r--r--examples/device/nrf52840/src/msc_device_app.h2
-rw-r--r--examples/device/nrf52840/src/msc_device_ramdisk.c2
-rw-r--r--examples/device/nrf52840/src/tusb_config.h12
-rw-r--r--examples/device/nrf52840/src/tusb_descriptors.c2
-rw-r--r--examples/device/nrf52840/src/tusb_descriptors.h2
-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.c2
-rw-r--r--examples/obsolete/device/src/keyboard_device_app.h2
-rw-r--r--examples/obsolete/device/src/main.c8
-rw-r--r--examples/obsolete/device/src/mouse_device_app.c2
-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.h2
-rw-r--r--examples/obsolete/device/src/msc_device_ramdisk.c2
-rw-r--r--examples/obsolete/device/src/msc_device_romdisk.c2
-rw-r--r--examples/obsolete/device/src/tusb_config.h12
-rw-r--r--examples/obsolete/device/src/tusb_descriptors.c20
-rw-r--r--examples/obsolete/device/src/tusb_descriptors.h22
25 files changed, 68 insertions, 68 deletions
diff --git a/examples/device/device_virtual_com/src/main.c b/examples/device/device_virtual_com/src/main.c
index 68837e134..531733cdc 100644
--- a/examples/device/device_virtual_com/src/main.c
+++ b/examples/device/device_virtual_com/src/main.c
@@ -147,8 +147,8 @@ void print_greeting(void)
puts("This DEVICE demo is configured to support:");
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");
+ if (CFG_TUD_HID_MOUSE ) puts(" - HID Mouse");
+ if (CFG_TUD_HID_KEYBOARD ) puts(" - HID Keyboard");
+ if (CFG_TUD_MSC ) puts(" - Mass Storage");
+ if (CFG_TUD_CDC ) puts(" - Communication Device Class");
}
diff --git a/examples/device/device_virtual_com/src/tusb_config.h b/examples/device/device_virtual_com/src/tusb_config.h
index 26ed087bc..7d2a9c539 100644
--- a/examples/device/device_virtual_com/src/tusb_config.h
+++ b/examples/device/device_virtual_com/src/tusb_config.h
@@ -54,14 +54,14 @@
//--------------------------------------------------------------------+
// DEVICE CONFIGURATION
//--------------------------------------------------------------------+
-#define CFG_TUSB_DEVICE_ENDOINT0_SIZE 64
+#define CFG_TUD_ENDOINT0_SIZE 64
//------------- CLASS -------------//
-#define CFG_TUSB_DEVICE_HID_KEYBOARD 0
-#define CFG_TUSB_DEVICE_HID_MOUSE 0
-#define CFG_TUSB_DEVICE_HID_GENERIC 0 // not supported yet
-#define CFG_TUSB_DEVICE_MSC 0
-#define CFG_TUSB_DEVICE_CDC 1
+#define CFG_TUD_HID_KEYBOARD 0
+#define CFG_TUD_HID_MOUSE 0
+#define CFG_TUD_HID_GENERIC 0 // not supported yet
+#define CFG_TUD_MSC 0
+#define CFG_TUD_CDC 1
//--------------------------------------------------------------------+
// COMMON CONFIGURATION
diff --git a/examples/device/device_virtual_com/src/tusb_descriptors.c b/examples/device/device_virtual_com/src/tusb_descriptors.c
index 6a057d0a4..09543e0de 100644
--- a/examples/device/device_virtual_com/src/tusb_descriptors.c
+++ b/examples/device/device_virtual_com/src/tusb_descriptors.c
@@ -53,7 +53,7 @@ tusb_desc_device_t const desc_device =
.bDeviceSubClass = MISC_SUBCLASS_COMMON,
.bDeviceProtocol = MISC_PROTOCOL_IAD,
- .bMaxPacketSize0 = CFG_TUSB_DEVICE_ENDOINT0_SIZE,
+ .bMaxPacketSize0 = CFG_TUD_ENDOINT0_SIZE,
.idVendor = CFG_VENDORID,
.idProduct = CFG_PRODUCTID,
diff --git a/examples/device/device_virtual_com/src/tusb_descriptors.h b/examples/device/device_virtual_com/src/tusb_descriptors.h
index 2d362bc0b..0c80579e1 100644
--- a/examples/device/device_virtual_com/src/tusb_descriptors.h
+++ b/examples/device/device_virtual_com/src/tusb_descriptors.h
@@ -50,7 +50,7 @@
// 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) ( (CFG_TUSB_DEVICE_##interface) << (n) )
+ #define PRODUCTID_BITMAP(interface, n) ( (CFG_TUD_##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) ) )
diff --git a/examples/device/nrf52840/src/main.c b/examples/device/nrf52840/src/main.c
index 42dfaaaa5..9b173c802 100644
--- a/examples/device/nrf52840/src/main.c
+++ b/examples/device/nrf52840/src/main.c
@@ -145,8 +145,8 @@ void print_greeting(void)
printf("This DEVICE demo is configured to support:");
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");
+ if (CFG_TUD_HID_MOUSE ) puts(" - HID Mouse");
+ if (CFG_TUD_HID_KEYBOARD ) puts(" - HID Keyboard");
+ if (CFG_TUD_MSC ) puts(" - Mass Storage");
+ if (CFG_TUD_CDC ) puts(" - Communication Device Class");
}
diff --git a/examples/device/nrf52840/src/msc_device_app.c b/examples/device/nrf52840/src/msc_device_app.c
index 6609257e2..1730975dd 100644
--- a/examples/device/nrf52840/src/msc_device_app.c
+++ b/examples/device/nrf52840/src/msc_device_app.c
@@ -38,7 +38,7 @@
#include "msc_device_app.h"
-#if CFG_TUSB_DEVICE_MSC
+#if CFG_TUD_MSC
//--------------------------------------------------------------------+
// INCLUDE
//--------------------------------------------------------------------+
diff --git a/examples/device/nrf52840/src/msc_device_app.h b/examples/device/nrf52840/src/msc_device_app.h
index 83b460743..0ed04d285 100644
--- a/examples/device/nrf52840/src/msc_device_app.h
+++ b/examples/device/nrf52840/src/msc_device_app.h
@@ -50,7 +50,7 @@
extern "C" {
#endif
-#if CFG_TUSB_DEVICE_MSC
+#if CFG_TUD_MSC
enum
{
diff --git a/examples/device/nrf52840/src/msc_device_ramdisk.c b/examples/device/nrf52840/src/msc_device_ramdisk.c
index 45932e0c3..bb9c53e4c 100644
--- a/examples/device/nrf52840/src/msc_device_ramdisk.c
+++ b/examples/device/nrf52840/src/msc_device_ramdisk.c
@@ -38,7 +38,7 @@
#include "msc_device_app.h"
-#if CFG_TUSB_DEVICE_MSC && defined (MSCD_APP_RAMDISK)
+#if CFG_TUD_MSC && defined (MSCD_APP_RAMDISK)
//--------------------------------------------------------------------+
// MACRO CONSTANT TYPEDEF
diff --git a/examples/device/nrf52840/src/tusb_config.h b/examples/device/nrf52840/src/tusb_config.h
index 0f7ff7b8c..c58798040 100644
--- a/examples/device/nrf52840/src/tusb_config.h
+++ b/examples/device/nrf52840/src/tusb_config.h
@@ -54,14 +54,14 @@
//--------------------------------------------------------------------+
// DEVICE CONFIGURATION
//--------------------------------------------------------------------+
-#define CFG_TUSB_DEVICE_ENDOINT0_SIZE 64
+#define CFG_TUD_ENDOINT0_SIZE 64
//------------- CLASS -------------//
-#define CFG_TUSB_DEVICE_HID_KEYBOARD 0
-#define CFG_TUSB_DEVICE_HID_MOUSE 0
-#define CFG_TUSB_DEVICE_HID_GENERIC 0 // not supported yet
-#define CFG_TUSB_DEVICE_MSC 1
-#define CFG_TUSB_DEVICE_CDC 1
+#define CFG_TUD_HID_KEYBOARD 0
+#define CFG_TUD_HID_MOUSE 0
+#define CFG_TUD_HID_GENERIC 0 // not supported yet
+#define CFG_TUD_MSC 1
+#define CFG_TUD_CDC 1
//--------------------------------------------------------------------+
// COMMON CONFIGURATION
diff --git a/examples/device/nrf52840/src/tusb_descriptors.c b/examples/device/nrf52840/src/tusb_descriptors.c
index b8f0a89d9..b7256c2e7 100644
--- a/examples/device/nrf52840/src/tusb_descriptors.c
+++ b/examples/device/nrf52840/src/tusb_descriptors.c
@@ -53,7 +53,7 @@ tusb_desc_device_t const desc_device =
.bDeviceSubClass = MISC_SUBCLASS_COMMON,
.bDeviceProtocol = MISC_PROTOCOL_IAD,
- .bMaxPacketSize0 = CFG_TUSB_DEVICE_ENDOINT0_SIZE,
+ .bMaxPacketSize0 = CFG_TUD_ENDOINT0_SIZE,
.idVendor = CFG_VENDORID,
.idProduct = CFG_PRODUCTID,
diff --git a/examples/device/nrf52840/src/tusb_descriptors.h b/examples/device/nrf52840/src/tusb_descriptors.h
index b8d07357e..03269cca7 100644
--- a/examples/device/nrf52840/src/tusb_descriptors.h
+++ b/examples/device/nrf52840/src/tusb_descriptors.h
@@ -50,7 +50,7 @@
// 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) ( (CFG_TUSB_DEVICE_##interface) << (n) )
+ #define PRODUCTID_BITMAP(interface, n) ( (CFG_TUD_##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) ) )
diff --git a/examples/obsolete/device/src/cdc_device_app.c b/examples/obsolete/device/src/cdc_device_app.c
index d72e6bcd9..c6e903fcf 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 CFG_TUSB_DEVICE_CDC
+#if CFG_TUD_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 45f02baef..71b4bdf28 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 CFG_TUSB_DEVICE_CDC
+#if CFG_TUD_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 a4ae81a46..df9172c68 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 CFG_TUSB_DEVICE_HID_KEYBOARD
+#if CFG_TUD_HID_KEYBOARD
//--------------------------------------------------------------------+
// INCLUDE
//--------------------------------------------------------------------+
diff --git a/examples/obsolete/device/src/keyboard_device_app.h b/examples/obsolete/device/src/keyboard_device_app.h
index 1d2a8b39e..45c843876 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 CFG_TUSB_DEVICE_HID_KEYBOARD
+#if CFG_TUD_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 5d1a4bb5f..e11bbc7cd 100644
--- a/examples/obsolete/device/src/main.c
+++ b/examples/obsolete/device/src/main.c
@@ -194,8 +194,8 @@ void print_greeting(void)
puts("This DEVICE demo is configured to support:");
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");
+ if (CFG_TUD_HID_MOUSE ) puts(" - HID Mouse");
+ if (CFG_TUD_HID_KEYBOARD ) puts(" - HID Keyboard");
+ if (CFG_TUD_MSC ) puts(" - Mass Storage");
+ if (CFG_TUD_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 3cc2e0d68..9bbb799df 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 CFG_TUSB_DEVICE_HID_MOUSE
+#if CFG_TUD_HID_MOUSE
//--------------------------------------------------------------------+
// INCLUDE
//--------------------------------------------------------------------+
diff --git a/examples/obsolete/device/src/mouse_device_app.h b/examples/obsolete/device/src/mouse_device_app.h
index 48bfb3315..2eeb5794a 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 CFG_TUSB_DEVICE_HID_MOUSE
+#if CFG_TUD_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 df78ccd6e..81dab9258 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 CFG_TUSB_DEVICE_MSC
+#if CFG_TUD_MSC
//--------------------------------------------------------------------+
// INCLUDE
//--------------------------------------------------------------------+
diff --git a/examples/obsolete/device/src/msc_device_app.h b/examples/obsolete/device/src/msc_device_app.h
index 83b460743..0ed04d285 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 CFG_TUSB_DEVICE_MSC
+#if CFG_TUD_MSC
enum
{
diff --git a/examples/obsolete/device/src/msc_device_ramdisk.c b/examples/obsolete/device/src/msc_device_ramdisk.c
index e2a7a110f..74b64d4e0 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 CFG_TUSB_DEVICE_MSC && defined (MSCD_APP_RAMDISK)
+#if CFG_TUD_MSC && defined (MSCD_APP_RAMDISK)
//--------------------------------------------------------------------+
// MACRO CONSTANT TYPEDEF
diff --git a/examples/obsolete/device/src/msc_device_romdisk.c b/examples/obsolete/device/src/msc_device_romdisk.c
index 9f80c8001..135532b61 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 CFG_TUSB_DEVICE_MSC && defined (MSCD_APP_ROMDISK)
+#if CFG_TUD_MSC && defined (MSCD_APP_ROMDISK)
//--------------------------------------------------------------------+
// INCLUDE
diff --git a/examples/obsolete/device/src/tusb_config.h b/examples/obsolete/device/src/tusb_config.h
index 20dd2bcfa..35101ff98 100644
--- a/examples/obsolete/device/src/tusb_config.h
+++ b/examples/obsolete/device/src/tusb_config.h
@@ -54,14 +54,14 @@
//--------------------------------------------------------------------+
// DEVICE CONFIGURATION
//--------------------------------------------------------------------+
-#define CFG_TUSB_DEVICE_ENDOINT0_SIZE 64
+#define CFG_TUD_ENDOINT0_SIZE 64
//------------- CLASS -------------//
-#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
+#define CFG_TUD_HID_KEYBOARD 1
+#define CFG_TUD_HID_MOUSE 1
+#define CFG_TUD_HID_GENERIC 0 // not supported yet
+#define CFG_TUD_MSC 1
+#define CFG_TUD_CDC 1
//--------------------------------------------------------------------+
// COMMON CONFIGURATION
diff --git a/examples/obsolete/device/src/tusb_descriptors.c b/examples/obsolete/device/src/tusb_descriptors.c
index 75ea1a88a..51e9b2b79 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 CFG_TUSB_DEVICE_HID_KEYBOARD
+#if CFG_TUD_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 CFG_TUSB_DEVICE_HID_MOUSE
+#if CFG_TUD_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 CFG_TUSB_DEVICE_CDC
+ #if CFG_TUD_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 = CFG_TUSB_DEVICE_ENDOINT0_SIZE,
+ .bMaxPacketSize0 = CFG_TUD_ENDOINT0_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 CFG_TUSB_DEVICE_CDC
+ #if CFG_TUD_CDC
// IAD points to CDC Interfaces
.cdc_iad =
{
@@ -296,7 +296,7 @@ app_descriptor_configuration_t const desc_configuration =
#endif
//------------- HID Keyboard -------------//
- #if CFG_TUSB_DEVICE_HID_KEYBOARD
+ #if CFG_TUD_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 CFG_TUSB_DEVICE_HID_MOUSE
+ #if CFG_TUD_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 CFG_TUSB_DEVICE_MSC
+ #if CFG_TUD_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 CFG_TUSB_DEVICE_HID_KEYBOARD
+ #if CFG_TUD_HID_KEYBOARD
.p_hid_keyboard_report = (uint8_t const *) desc_keyboard_report,
#endif
- #if CFG_TUSB_DEVICE_HID_MOUSE
+ #if CFG_TUD_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 56ba60002..7aa4c806c 100644
--- a/examples/obsolete/device/src/tusb_descriptors.h
+++ b/examples/obsolete/device/src/tusb_descriptors.h
@@ -50,20 +50,20 @@
// 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) ( (CFG_TUSB_DEVICE_##interface) << (n) )
+ #define PRODUCTID_BITMAP(interface, n) ( (CFG_TUD_##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*(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 INTERFACE_NO_HID_KEYBOARD (ITF_NUM_CDC + 2*(CFG_TUD_CDC ? 1 : 0) )
+#define INTERFACE_NO_HID_MOUSE (INTERFACE_NO_HID_KEYBOARD + CFG_TUD_HID_KEYBOARD )
+#define INTERFACE_NO_HID_GENERIC (INTERFACE_NO_HID_MOUSE + CFG_TUD_HID_MOUSE )
+#define ITF_NUM_MSC (INTERFACE_NO_HID_GENERIC + CFG_TUD_HID_GENERIC )
-#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)
+#define ITF_TOTAL (2*CFG_TUD_CDC + CFG_TUD_HID_KEYBOARD + CFG_TUD_HID_MOUSE + \
+ CFG_TUD_HID_GENERIC + CFG_TUD_MSC)
#if (CFG_TUSB_MCU == OPT_MCU_LPC11UXX || CFG_TUSB_MCU == OPT_MCU_LPC13UXX) && (ITF_TOTAL > 4)
#error These MCUs do not have enough number of endpoints for the current configuration
@@ -135,7 +135,7 @@ typedef struct ATTR_PACKED
tusb_desc_configuration_t configuration;
//------------- CDC -------------//
-#if CFG_TUSB_DEVICE_CDC
+#if CFG_TUD_CDC
tusb_desc_interface_assoc_t cdc_iad;
//CDC Control Interface
@@ -153,21 +153,21 @@ typedef struct ATTR_PACKED
#endif
//------------- HID Keyboard -------------//
-#if CFG_TUSB_DEVICE_HID_KEYBOARD
+#if CFG_TUD_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 CFG_TUSB_DEVICE_HID_MOUSE
+#if CFG_TUD_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 CFG_TUSB_DEVICE_MSC
+#if CFG_TUD_MSC
tusb_desc_interface_t msc_interface;
tusb_desc_endpoint_t msc_endpoint_in;
tusb_desc_endpoint_t msc_endpoint_out;