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

mass rename TUSB_CFG to CFG_TUSB

hathach 8 лет назад
Родитель
Сommit
3c24671960
100 измененных файлов с 433 добавлено и 433 удалено
  1. 24 24
      doxygen/configuration.txt
  2. 1 1
      doxygen/getting_started.md
  3. 1 1
      doxygen/started_demo.md
  4. 1 1
      examples/device/device_virtual_com/segger/device_virtual_com.emProject
  5. 5 5
      examples/device/device_virtual_com/src/main.c
  6. 33 33
      examples/device/device_virtual_com/src/tusb_config.h
  7. 1 1
      examples/device/device_virtual_com/src/tusb_descriptors.c
  8. 1 1
      examples/device/device_virtual_com/src/tusb_descriptors.h
  9. 1 1
      examples/device/device_virtual_com/xpresso/.cproject
  10. 5 5
      examples/device/nrf52840/src/main.c
  11. 1 1
      examples/device/nrf52840/src/msc_device_app.c
  12. 2 2
      examples/device/nrf52840/src/msc_device_app.h
  13. 2 2
      examples/device/nrf52840/src/msc_device_ramdisk.c
  14. 16 16
      examples/device/nrf52840/src/tusb_config.h
  15. 1 1
      examples/device/nrf52840/src/tusb_descriptors.c
  16. 1 1
      examples/device/nrf52840/src/tusb_descriptors.h
  17. 18 18
      examples/obsolete/device/device_freertos/.cproject
  18. 12 12
      examples/obsolete/device/device_os_none/.cproject
  19. 3 3
      examples/obsolete/device/src/app_os_prio.h
  20. 1 1
      examples/obsolete/device/src/cdc_device_app.c
  21. 1 1
      examples/obsolete/device/src/cdc_device_app.h
  22. 2 2
      examples/obsolete/device/src/keyboard_device_app.c
  23. 1 1
      examples/obsolete/device/src/keyboard_device_app.h
  24. 8 8
      examples/obsolete/device/src/main.c
  25. 2 2
      examples/obsolete/device/src/mouse_device_app.c
  26. 1 1
      examples/obsolete/device/src/mouse_device_app.h
  27. 1 1
      examples/obsolete/device/src/msc_device_app.c
  28. 2 2
      examples/obsolete/device/src/msc_device_app.h
  29. 2 2
      examples/obsolete/device/src/msc_device_ramdisk.c
  30. 2 2
      examples/obsolete/device/src/msc_device_romdisk.c
  31. 31 31
      examples/obsolete/device/src/tusb_config.h
  32. 10 10
      examples/obsolete/device/src/tusb_descriptors.c
  33. 14 14
      examples/obsolete/device/src/tusb_descriptors.h
  34. 14 14
      examples/obsolete/host/host_freertos/.cproject
  35. 8 8
      examples/obsolete/host/host_os_none/.cproject
  36. 4 4
      examples/obsolete/host/src/app_os_prio.h
  37. 5 5
      examples/obsolete/host/src/cdc_serial_host_app.c
  38. 1 1
      examples/obsolete/host/src/cdc_serial_host_app.h
  39. 2 2
      examples/obsolete/host/src/keyboard_host_app.c
  40. 1 1
      examples/obsolete/host/src/keyboard_host_app.h
  41. 11 11
      examples/obsolete/host/src/main.c
  42. 2 2
      examples/obsolete/host/src/mouse_host_app.c
  43. 1 1
      examples/obsolete/host/src/mouse_host_app.h
  44. 2 2
      examples/obsolete/host/src/msc_cli.c
  45. 4 4
      examples/obsolete/host/src/msc_host_app.c
  46. 1 1
      examples/obsolete/host/src/msc_host_app.h
  47. 1 1
      examples/obsolete/host/src/rndis_host_app.c
  48. 1 1
      examples/obsolete/host/src/rndis_host_app.h
  49. 24 24
      examples/obsolete/host/src/tusb_config.h
  50. 1 1
      examples/readme.md
  51. 3 3
      hw/bsp/ea4357/board_ea4357.c
  52. 1 1
      hw/bsp/keil/board_mcb4300.c
  53. 1 1
      hw/bsp/lpcxpresso/board_lpclink2.c
  54. 1 1
      hw/bsp/lpcxpresso/board_lpcxpresso11u14.c
  55. 1 1
      hw/bsp/lpcxpresso11u68/board_lpcxpresso11u68.c
  56. 1 1
      hw/bsp/lpcxpresso1347/board_lpcxpresso1347.c
  57. 1 1
      hw/bsp/lpcxpresso1769/board_lpcxpresso1769.c
  58. 1 1
      hw/bsp/ngx/board_ngx4330.c
  59. 1 1
      hw/mcu/nxp/lpc11uxx/hal_mcu/hal_lpc11uxx.c
  60. 1 1
      hw/mcu/nxp/lpc13uxx/hal_mcu/hal_lpc13uxx.c
  61. 1 1
      readme.markdown
  62. 1 1
      tests/.cproject
  63. 1 1
      tests/lpc175x_6x/project.yml
  64. 6 6
      tests/lpc175x_6x/test/test_usbd.c
  65. 1 1
      tests/lpc18xx_43xx/project.yml
  66. 2 2
      tests/lpc18xx_43xx/test/host/cdc/descriptor_cdc.c
  67. 3 3
      tests/lpc18xx_43xx/test/host/cdc/test_cdc_host.c
  68. 3 3
      tests/lpc18xx_43xx/test/host/cdc/test_cdc_rndis_host.c
  69. 1 1
      tests/lpc18xx_43xx/test/host/ehci/test_ehci_init.c
  70. 1 1
      tests/lpc18xx_43xx/test/host/ehci/test_ehci_isr.c
  71. 1 1
      tests/lpc18xx_43xx/test/host/ehci/test_ehci_structure.c
  72. 2 2
      tests/lpc18xx_43xx/test/host/ehci/test_pipe_bulk_open.c
  73. 2 2
      tests/lpc18xx_43xx/test/host/ehci/test_pipe_bulk_xfer.c
  74. 2 2
      tests/lpc18xx_43xx/test/host/ehci/test_pipe_control_open.c
  75. 2 2
      tests/lpc18xx_43xx/test/host/ehci/test_pipe_control_xfer.c
  76. 2 2
      tests/lpc18xx_43xx/test/host/ehci/test_pipe_interrupt_open.c
  77. 2 2
      tests/lpc18xx_43xx/test/host/ehci/test_pipe_interrupt_xfer.c
  78. 2 2
      tests/lpc18xx_43xx/test/host/ehci/test_pipe_isochronous_open.c
  79. 2 2
      tests/lpc18xx_43xx/test/host/hid/test_hid_host.c
  80. 3 3
      tests/lpc18xx_43xx/test/host/hid/test_hidh_generic.c
  81. 3 3
      tests/lpc18xx_43xx/test/host/hid/test_hidh_keyboard.c
  82. 3 3
      tests/lpc18xx_43xx/test/host/hid/test_hidh_mouse.c
  83. 2 2
      tests/lpc18xx_43xx/test/host/host_helper.h
  84. 1 1
      tests/lpc18xx_43xx/test/host/integration/test_hidh_keyboard_integrate.c
  85. 3 3
      tests/lpc18xx_43xx/test/host/msc/test_msc_host.c
  86. 4 4
      tests/lpc18xx_43xx/test/host/usbh/test_enum_task.c
  87. 3 3
      tests/lpc18xx_43xx/test/host/usbh/test_usbh.c
  88. 9 9
      tests/lpc18xx_43xx/test/test_osal_none.c
  89. 4 4
      tests/support/descriptor_test.c
  90. 1 1
      tests/support/descriptor_test.h
  91. 1 1
      tests/support/ehci_controller_fake.c
  92. 21 21
      tests/support/tusb_config.h
  93. 5 5
      tinyusb.Doxyfile
  94. 4 4
      tinyusb/class/cdc/cdc_device.c
  95. 3 3
      tinyusb/class/cdc/cdc_host.c
  96. 5 5
      tinyusb/class/cdc/cdc_host.h
  97. 7 7
      tinyusb/class/cdc/cdc_rndis_host.c
  98. 3 3
      tinyusb/class/custom_class_host.c
  99. 5 5
      tinyusb/class/hid/hid_device.c
  100. 4 4
      tinyusb/class/hid/hid_device.h

+ 24 - 24
doxygen/configuration.txt

@@ -7,46 +7,46 @@
 
 
 /// \brief tell the stack which mode (host/device/otg) the usb controller0 will be operated on. Possible value is
 /// \brief tell the stack which mode (host/device/otg) the usb controller0 will be operated on. Possible value is
 /// from \ref group_mode. Note the hardware usb controller must support the selected mode.
 /// from \ref group_mode. Note the hardware usb controller must support the selected mode.
-#define TUSB_CFG_CONTROLLER_0_MODE
+#define CFG_TUSB_CONTROLLER_0_MODE
 
 
 /** USB controller in MCU often has limited access to specific RAM section. The Stack will use this macro to place internal variables
 /** USB controller in MCU often has limited access to specific RAM section. The Stack will use this macro to place internal variables
-  into the USB RAM section as follows. if your mcu's usb controller has no such limit, define TUSB_CFG_ATTR_USBRAM as empty macro.
+  into the USB RAM section as follows. if your mcu's usb controller has no such limit, define CFG_TUSB_ATTR_USBRAM as empty macro.
 
 
   @code
   @code
-  TUSB_CFG_ATTR_USBRAM uint8_t usb_xfer_buffer[10];
+  CFG_TUSB_ATTR_USBRAM uint8_t usb_xfer_buffer[10];
   @endcode
   @endcode
  */
  */
-#define TUSB_CFG_ATTR_USBRAM
+#define CFG_TUSB_ATTR_USBRAM
 
 
-#define TUSB_CFG_MCU          ///< Select one of the supported MCU, the value must be from \ref group_mcu
-#define TUSB_CFG_OS           ///< Select one of the supported RTOS, the value must be from \ref group_supported_os.
-#define TUSB_CFG_OS_TASK_PRIO ///< If \ref TUSB_CFG_OS is configured to use a real RTOS (other than TUSB_OS_NONE). This determines the priority of the usb stack task.
-#define TUSB_CFG_TICKS_HZ     ///< The rate ticks in hert. This is used in conjunction with \ref tusb_tick_get to calculate timing.
+#define CFG_TUSB_MCU          ///< Select one of the supported MCU, the value must be from \ref group_mcu
+#define CFG_TUSB_OS           ///< Select one of the supported RTOS, the value must be from \ref group_supported_os.
+#define CFG_TUSB_OS_TASK_PRIO ///< If \ref CFG_TUSB_OS is configured to use a real RTOS (other than TUSB_OS_NONE). This determines the priority of the usb stack task.
+#define CFG_TUSB_TICKS_HZ     ///< The rate ticks in hert. This is used in conjunction with \ref tusb_tick_get to calculate timing.
 
 
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // HOST CONFIGURATION
 // HOST CONFIGURATION
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
-/** \defgroup TUSB_CFG_HOST Host Options
+/** \defgroup CFG_TUSB_HOST Host Options
  *  @{ */
  *  @{ */
 
 
 /** \brief Maximum number of device host stack can manage
 /** \brief Maximum number of device host stack can manage
  * \n If hub class is not enabled, set this equal to number of controllers in host mode
  * \n If hub class is not enabled, set this equal to number of controllers in host mode
  * \n If hub class is enabled, make sure hub is also counted */
  * \n If hub class is enabled, make sure hub is also counted */
-#define TUSB_CFG_HOST_DEVICE_MAX
+#define CFG_TUSB_HOST_DEVICE_MAX
 
 
 /// \brief Buffer size used for getting device configuration descriptor. You may want to increase this from default (256)
 /// \brief Buffer size used for getting device configuration descriptor. You may want to increase this from default (256)
 /// to support lengthy composite device especially with Audio or Video class
 /// to support lengthy composite device especially with Audio or Video class
-#define TUSB_CFG_HOST_ENUM_BUFFER_SIZE
+#define CFG_TUSB_HOST_ENUM_BUFFER_SIZE
 
 
 /** \defgroup config_host_class Class Driver
 /** \defgroup config_host_class Class Driver
  * \brief For each Class Driver a value of 1 means enable, value of 0 mean disable
  * \brief For each Class Driver a value of 1 means enable, value of 0 mean disable
  * @{ */
  * @{ */
-#define TUSB_CFG_HOST_HUB           ///< Enable Hub Class
-#define TUSB_CFG_HOST_HID_KEYBOARD  ///< Enable HID Class for Keyboard
-#define TUSB_CFG_HOST_HID_MOUSE     ///< Enable HID Class for Mouse
-#define TUSB_CFG_HOST_HID_GENERIC   ///< Enable HID Class for Generic (not supported yet)
-#define TUSB_CFG_HOST_MSC           ///< Enable Mass Storage Class (SCSI subclass only)
-#define TUSB_CFG_HOST_CDC           ///< Enable Virtual Serial (Communication Device Class)
+#define CFG_TUSB_HOST_HUB           ///< Enable Hub Class
+#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)
 /** @} */
 /** @} */
 
 
 /** @} */ // group Host
 /** @} */ // group Host
@@ -54,10 +54,10 @@
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // DEVICE CONFIGURATION
 // DEVICE CONFIGURATION
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
-/** \defgroup TUSB_CFG_DEVICE Device Options
+/** \defgroup CFG_TUSB_DEVICE Device Options
  *  @{ */
  *  @{ */
 
 
-#define TUSB_CFG_DEVICE_CONTROL_ENDOINT_SIZE ///< Max packet size of Cotnrol Endpoint, default is 64
+#define CFG_TUSB_DEVICE_CONTROL_ENDOINT_SIZE ///< Max packet size of Cotnrol Endpoint, default is 64
 
 
 /// Application MUST define this variable and initialize its pointers's member to all required USB descriptors including
 /// Application MUST define this variable and initialize its pointers's member to all required USB descriptors including
 /// Device Descriptor, Configuration Descriptor, String Descriptors, HID Report Descriptors etc ...
 /// Device Descriptor, Configuration Descriptor, String Descriptors, HID Report Descriptors etc ...
@@ -66,11 +66,11 @@ tusbd_descriptor_pointer_t tusbd_descriptor_pointers;
 /** \defgroup config_device_class Class Driver
 /** \defgroup config_device_class Class Driver
  * \brief For each Class Driver a value of 1 means enable, value of 0 mean disable
  * \brief For each Class Driver a value of 1 means enable, value of 0 mean disable
  * @{ */
  * @{ */
-#define TUSB_CFG_DEVICE_HID_KEYBOARD ///< Enable HID Class for Keyboard
-#define TUSB_CFG_DEVICE_HID_MOUSE 	 ///< Enable HID Class for Mouse
-#define TUSB_CFG_DEVICE_HID_GENERIC  ///< Enable HID Class for Generic (not supported yet)
-#define TUSB_CFG_DEVICE_MSC 				 ///< Enable Mass Storage Class (SCSI subclass only)
-#define TUSB_CFG_DEVICE_CDC 				 ///< Enable Virtual Serial (Communication Device Class)
+#define CFG_TUSB_DEVICE_HID_KEYBOARD ///< Enable HID Class for Keyboard
+#define CFG_TUSB_DEVICE_HID_MOUSE 	 ///< Enable HID Class for Mouse
+#define CFG_TUSB_DEVICE_HID_GENERIC  ///< Enable HID Class for Generic (not supported yet)
+#define CFG_TUSB_DEVICE_MSC 				 ///< Enable Mass Storage Class (SCSI subclass only)
+#define CFG_TUSB_DEVICE_CDC 				 ///< Enable Virtual Serial (Communication Device Class)
 /** @} */
 /** @} */
 
 
 /** @} */ // group Device
 /** @} */ // group Device

+ 1 - 1
doxygen/getting_started.md

@@ -35,7 +35,7 @@ It is relatively simple to incorporate tinyusb to your (existing) project
 1. Copy core folder **tinyusb** to your project. Let's say it is *your_project/tinyusb*
 1. Copy core folder **tinyusb** to your project. Let's say it is *your_project/tinyusb*
 2. Add all the .c in the core folder to your project settings (uvproj, ewp, makefile)
 2. Add all the .c in the core folder to your project settings (uvproj, ewp, makefile)
 3. Add *your_project/tinysb* to your include path. Also make sure your current include path also contains the configuration file tusb_config.h. Or you could simply put the tusb_config.h into the tinyusb folder as well.
 3. Add *your_project/tinysb* to your include path. Also make sure your current include path also contains the configuration file tusb_config.h. Or you could simply put the tusb_config.h into the tinyusb folder as well.
-4. Make sure all required macros are all defined properly in tusb_config.h (configure file in demo application is sufficient, but you need to add a few more such as TUSB_CFG_MCU, TUSB_CFG_OS, TUSB_CFG_OS_TASK_PRIO since they are passed by IDE/compiler to maintain a unique configure for all demo projects).
+4. Make sure all required macros are all defined properly in tusb_config.h (configure file in demo application is sufficient, but you need to add a few more such as CFG_TUSB_MCU, CFG_TUSB_OS, CFG_TUSB_OS_TASK_PRIO since they are passed by IDE/compiler to maintain a unique configure for all demo projects).
 5. If you use the device stack, make sure you have created/modified usb descriptors for your own need. Ultimately you need to fill out required pointers in tusbd_descriptor_pointers for that stack to work.
 5. If you use the device stack, make sure you have created/modified usb descriptors for your own need. Ultimately you need to fill out required pointers in tusbd_descriptor_pointers for that stack to work.
 6. Add tusb_init() call to your reset initialization code.
 6. Add tusb_init() call to your reset initialization code.
 7. Implement all enabled classes's callbacks.
 7. Implement all enabled classes's callbacks.

+ 1 - 1
doxygen/started_demo.md

@@ -34,7 +34,7 @@ void led_blinking_task( void * p_task_para )
     static uint32_t led_on_mask = 0;
     static uint32_t led_on_mask = 0;
 
 
     // FreeRTOS API's vTaskDelay is used in place of osal_task_delay. Note it takes input parameter in tick
     // FreeRTOS API's vTaskDelay is used in place of osal_task_delay. Note it takes input parameter in tick
-    vTaskDelay( (led_blink_interval_ms * TUSB_CFG_TICKS_HZ) / 1000);
+    vTaskDelay( (led_blink_interval_ms * CFG_TUSB_TICKS_HZ) / 1000);
 
 
     board_leds(led_on_mask, 1 - led_on_mask);
     board_leds(led_on_mask, 1 - led_on_mask);
     led_on_mask = 1 - led_on_mask; // toggle
     led_on_mask = 1 - led_on_mask; // toggle

+ 1 - 1
examples/device/device_virtual_com/segger/device_virtual_com.emProject

@@ -201,7 +201,7 @@
     </folder>
     </folder>
     <configuration
     <configuration
       Name="EA4357"
       Name="EA4357"
-      c_preprocessor_definitions="BOARD=BOARD_EA4357;TUSB_CFG_MCU=MCU_LPC43XX" />
+      c_preprocessor_definitions="BOARD=BOARD_EA4357;CFG_TUSB_MCU=MCU_LPC43XX" />
   </project>
   </project>
   <configuration
   <configuration
     Name="Debug"
     Name="Debug"

+ 5 - 5
examples/device/device_virtual_com/src/main.c

@@ -146,9 +146,9 @@ void print_greeting(void)
   );
   );
 
 
   puts("This DEVICE demo is configured to support:");
   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");
 }
 }

+ 33 - 33
examples/device/device_virtual_com/src/tusb_config.h

@@ -46,70 +46,70 @@
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // CONTROLLER CONFIGURATION
 // 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
 // DEVICE CONFIGURATION
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
-#define TUSB_CFG_DEVICE_CONTROL_ENDOINT_SIZE    64
+#define CFG_TUSB_DEVICE_CONTROL_ENDOINT_SIZE    64
 
 
 //------------- CLASS -------------//
 //------------- CLASS -------------//
-#define TUSB_CFG_DEVICE_HID_KEYBOARD            0
-#define TUSB_CFG_DEVICE_HID_MOUSE               0
-#define TUSB_CFG_DEVICE_HID_GENERIC             0 // not supported yet
-#define TUSB_CFG_DEVICE_MSC                     0
-#define TUSB_CFG_DEVICE_CDC                     1
+#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
 
 
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // COMMON CONFIGURATION
 // 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 TUSB_CFG_TICKS_HZ             1000
+//#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
+#define CFG_TUSB_TICKS_HZ             1000
 
 
-//#define TUSB_CFG_OS       TUSB_OS_NONE
+//#define CFG_TUSB_OS       TUSB_OS_NONE
 
 
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // USB RAM PLACEMENT
 // USB RAM PLACEMENT
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 #ifdef __CODE_RED // compiled with lpcxpresso
 #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
   #endif
 
 
 #elif defined  __CC_ARM // Compiled with Keil armcc, USBRAM_SECTION is defined in scatter files
 #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
   #endif
 
 
 #elif defined __ICCARM__ // compiled with IAR
 #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
   #endif
 
 
 #elif defined __SES_ARM
 #elif defined __SES_ARM
 
 
-#define TUSB_CFG_ATTR_USBRAM  ATTR_SECTION(.bss2)
+#define CFG_TUSB_ATTR_USBRAM  ATTR_SECTION(.bss2)
 
 
 #else
 #else
 
 

+ 1 - 1
examples/device/device_virtual_com/src/tusb_descriptors.c

@@ -53,7 +53,7 @@ tusb_desc_device_t const desc_device =
     .bDeviceSubClass    = MISC_SUBCLASS_COMMON,
     .bDeviceSubClass    = MISC_SUBCLASS_COMMON,
     .bDeviceProtocol    = MISC_PROTOCOL_IAD,
     .bDeviceProtocol    = MISC_PROTOCOL_IAD,
 
 
-    .bMaxPacketSize0    = TUSB_CFG_DEVICE_CONTROL_ENDOINT_SIZE,
+    .bMaxPacketSize0    = CFG_TUSB_DEVICE_CONTROL_ENDOINT_SIZE,
 
 
     .idVendor           = CFG_VENDORID,
     .idVendor           = CFG_VENDORID,
     .idProduct          = CFG_PRODUCTID,
     .idProduct          = CFG_PRODUCTID,

+ 1 - 1
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.
 // 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)
 // Auto ProductID layout's Bitmap: (MSB) MassStorage | Generic | Mouse | Key | CDC (LSB)
 #ifndef CFG_PRODUCTID
 #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) | \
   #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(HID_MOUSE, 2) | PRODUCTID_BITMAP(HID_GENERIC, 3) | \
                                            PRODUCTID_BITMAP(MSC, 4) ) )
                                            PRODUCTID_BITMAP(MSC, 4) ) )

+ 1 - 1
examples/device/device_virtual_com/xpresso/.cproject

@@ -31,7 +31,7 @@
 									<listOptionValue builtIn="false" value="__LPC43XX__"/>
 									<listOptionValue builtIn="false" value="__LPC43XX__"/>
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__MULTICORE_NONE"/>
 									<listOptionValue builtIn="false" value="__MULTICORE_NONE"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_MCU=MCU_LPC43XX"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_MCU=MCU_LPC43XX"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_EA4357"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_EA4357"/>
 								</option>
 								</option>
 								<option id="gnu.c.compiler.option.misc.other.1756693195" name="Other flags" superClass="gnu.c.compiler.option.misc.other" useByScannerDiscovery="false" value="-c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -fsingle-precision-constant" valueType="string"/>
 								<option id="gnu.c.compiler.option.misc.other.1756693195" name="Other flags" superClass="gnu.c.compiler.option.misc.other" useByScannerDiscovery="false" value="-c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -fsingle-precision-constant" valueType="string"/>

+ 5 - 5
examples/device/nrf52840/src/main.c

@@ -144,9 +144,9 @@ void print_greeting(void)
   printf("--------------------------------------------------------------------\n\n");
   printf("--------------------------------------------------------------------\n\n");
 
 
   printf("This DEVICE demo is configured to support:");
   printf("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");
 }
 }

+ 1 - 1
examples/device/nrf52840/src/msc_device_app.c

@@ -38,7 +38,7 @@
 
 
 #include "msc_device_app.h"
 #include "msc_device_app.h"
 
 
-#if TUSB_CFG_DEVICE_MSC
+#if CFG_TUSB_DEVICE_MSC
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // INCLUDE
 // INCLUDE
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+

+ 2 - 2
examples/device/nrf52840/src/msc_device_app.h

@@ -50,7 +50,7 @@
  extern "C" {
  extern "C" {
 #endif
 #endif
 
 
-#if TUSB_CFG_DEVICE_MSC
+#if CFG_TUSB_DEVICE_MSC
 
 
 enum
 enum
 {
 {
@@ -63,7 +63,7 @@ enum
 If you find any bugs or get any questions, feel free to file an\r\n\
 If you find any bugs or get any questions, feel free to file an\r\n\
 issue at github.com/hathach/tinyusb"
 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
   #define MSCD_APP_ROMDISK
 #else // defaults is ram disk
 #else // defaults is ram disk
   #define MSCD_APP_RAMDISK
   #define MSCD_APP_RAMDISK

+ 2 - 2
examples/device/nrf52840/src/msc_device_ramdisk.c

@@ -38,7 +38,7 @@
 
 
 #include "msc_device_app.h"
 #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
 // MACRO CONSTANT TYPEDEF
@@ -47,7 +47,7 @@
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // INTERNAL OBJECT & FUNCTION DECLARATION
 // INTERNAL OBJECT & FUNCTION DECLARATION
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
-TUSB_CFG_ATTR_USBRAM ATTR_USB_MIN_ALIGNMENT
+CFG_TUSB_ATTR_USBRAM ATTR_USB_MIN_ALIGNMENT
 uint8_t msc_device_ramdisk[DISK_BLOCK_NUM][DISK_BLOCK_SIZE] =
 uint8_t msc_device_ramdisk[DISK_BLOCK_NUM][DISK_BLOCK_SIZE] =
 {
 {
   //------------- Boot Sector -------------//
   //------------- Boot Sector -------------//

+ 16 - 16
examples/device/nrf52840/src/tusb_config.h

@@ -46,41 +46,41 @@
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // CONTROLLER CONFIGURATION
 // 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
 // DEVICE CONFIGURATION
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
-#define TUSB_CFG_DEVICE_CONTROL_ENDOINT_SIZE    64
+#define CFG_TUSB_DEVICE_CONTROL_ENDOINT_SIZE    64
 
 
 //------------- CLASS -------------//
 //------------- CLASS -------------//
-#define TUSB_CFG_DEVICE_HID_KEYBOARD            0
-#define TUSB_CFG_DEVICE_HID_MOUSE               0
-#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            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
 
 
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // COMMON CONFIGURATION
 // 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 TUSB_CFG_TICKS_HZ             1000
+#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
+#define CFG_TUSB_TICKS_HZ             1000
 
 
-//#define TUSB_CFG_OS       TUSB_OS_NONE
+//#define CFG_TUSB_OS       TUSB_OS_NONE
 
 
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // USB RAM PLACEMENT
 // USB RAM PLACEMENT
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
-#define TUSB_CFG_ATTR_USBRAM
+#define CFG_TUSB_ATTR_USBRAM
 
 
 // LPC11uxx and LPC13uxx requires each buffer has to be 64-byte alignment
 // 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)
  #define ATTR_USB_MIN_ALIGNMENT   ATTR_ALIGNED(64)
 #elif defined NRF52840_XXAA
 #elif defined NRF52840_XXAA
  #define ATTR_USB_MIN_ALIGNMENT   ATTR_ALIGNED(4)
  #define ATTR_USB_MIN_ALIGNMENT   ATTR_ALIGNED(4)

+ 1 - 1
examples/device/nrf52840/src/tusb_descriptors.c

@@ -53,7 +53,7 @@ tusb_desc_device_t const desc_device =
     .bDeviceSubClass    = MISC_SUBCLASS_COMMON,
     .bDeviceSubClass    = MISC_SUBCLASS_COMMON,
     .bDeviceProtocol    = MISC_PROTOCOL_IAD,
     .bDeviceProtocol    = MISC_PROTOCOL_IAD,
 
 
-    .bMaxPacketSize0    = TUSB_CFG_DEVICE_CONTROL_ENDOINT_SIZE,
+    .bMaxPacketSize0    = CFG_TUSB_DEVICE_CONTROL_ENDOINT_SIZE,
 
 
     .idVendor           = CFG_VENDORID,
     .idVendor           = CFG_VENDORID,
     .idProduct          = CFG_PRODUCTID,
     .idProduct          = CFG_PRODUCTID,

+ 1 - 1
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.
 // 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)
 // Auto ProductID layout's Bitmap: (MSB) MassStorage | Generic | Mouse | Key | CDC (LSB)
 #ifndef CFG_PRODUCTID
 #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) | \
   #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(HID_MOUSE, 2) | PRODUCTID_BITMAP(HID_GENERIC, 3) | \
                                            PRODUCTID_BITMAP(MSC, 4) ) )
                                            PRODUCTID_BITMAP(MSC, 4) ) )

+ 18 - 18
examples/obsolete/device/device_freertos/.cproject

@@ -32,9 +32,9 @@
 								<option id="com.crt.advproject.gcc.thumb.697143257" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" value="true" valueType="boolean"/>
 								<option id="com.crt.advproject.gcc.thumb.697143257" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" value="true" valueType="boolean"/>
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.371325215" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.371325215" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS=TUSB_OS_FREERTOS"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS_TASK_PRIO=configMAX_PRIORITIES-5"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_MCU=MCU_LPC13UXX"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS=TUSB_OS_FREERTOS"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS_TASK_PRIO=configMAX_PRIORITIES-5"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_MCU=MCU_LPC13UXX"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_LPCXPRESSO1347"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_LPCXPRESSO1347"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
@@ -129,10 +129,10 @@
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.690334585" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.690334585" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_MCU=MCU_LPC11UXX"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_MCU=MCU_LPC11UXX"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_LPCXPRESSO11U68"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_LPCXPRESSO11U68"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS=TUSB_OS_FREERTOS"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS_TASK_PRIO=configMAX_PRIORITIES-5"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS=TUSB_OS_FREERTOS"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS_TASK_PRIO=configMAX_PRIORITIES-5"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__MULTICORE_NONE"/>
 									<listOptionValue builtIn="false" value="__MULTICORE_NONE"/>
@@ -226,10 +226,10 @@
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.211439980" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.211439980" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS_TASK_PRIO=configMAX_PRIORITIES-5"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS=TUSB_OS_FREERTOS"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS_TASK_PRIO=configMAX_PRIORITIES-5"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS=TUSB_OS_FREERTOS"/>
 									<listOptionValue builtIn="false" value="CORE_M4"/>
 									<listOptionValue builtIn="false" value="CORE_M4"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_MCU=MCU_LPC43XX"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_MCU=MCU_LPC43XX"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_EA4357"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_EA4357"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
@@ -330,10 +330,10 @@
 								<option id="com.crt.advproject.gcc.thumb.530159727" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" value="true" valueType="boolean"/>
 								<option id="com.crt.advproject.gcc.thumb.530159727" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" value="true" valueType="boolean"/>
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.216849614" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.216849614" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_MCU=MCU_LPC175X_6X "/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_MCU=MCU_LPC175X_6X "/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_LPCXPRESSO1769"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_LPCXPRESSO1769"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS=TUSB_OS_FREERTOS"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS_TASK_PRIO=configMAX_PRIORITIES-5"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS=TUSB_OS_FREERTOS"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS_TASK_PRIO=configMAX_PRIORITIES-5"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__MULTICORE_NONE"/>
 									<listOptionValue builtIn="false" value="__MULTICORE_NONE"/>
@@ -428,10 +428,10 @@
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS"/>
 									<listOptionValue builtIn="false" value="CORE_M4"/>
 									<listOptionValue builtIn="false" value="CORE_M4"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_MCU=MCU_LPC43XX"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_MCU=MCU_LPC43XX"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_NGX4330"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_NGX4330"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS=TUSB_OS_FREERTOS"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS_TASK_PRIO=configMAX_PRIORITIES-5"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS=TUSB_OS_FREERTOS"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS_TASK_PRIO=configMAX_PRIORITIES-5"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__MULTICORE_NONE"/>
 									<listOptionValue builtIn="false" value="__MULTICORE_NONE"/>
@@ -527,10 +527,10 @@
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.2019019201" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.2019019201" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_MCU=MCU_LPC11UXX"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_MCU=MCU_LPC11UXX"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_LPCXPRESSO11U14"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_LPCXPRESSO11U14"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS=TUSB_OS_FREERTOS"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS_TASK_PRIO=configMAX_PRIORITIES-5"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS=TUSB_OS_FREERTOS"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS_TASK_PRIO=configMAX_PRIORITIES-5"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__MULTICORE_NONE"/>
 									<listOptionValue builtIn="false" value="__MULTICORE_NONE"/>

+ 12 - 12
examples/obsolete/device/device_os_none/.cproject

@@ -32,8 +32,8 @@
 								<option id="com.crt.advproject.gcc.thumb.697143257" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" value="true" valueType="boolean"/>
 								<option id="com.crt.advproject.gcc.thumb.697143257" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" value="true" valueType="boolean"/>
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.371325215" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.371325215" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS=TUSB_OS_NONE"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_MCU=MCU_LPC13UXX"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS=TUSB_OS_NONE"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_MCU=MCU_LPC13UXX"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_LPCXPRESSO1347"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_LPCXPRESSO1347"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
@@ -125,9 +125,9 @@
 								<option id="com.crt.advproject.gcc.thumb.1429919562" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" value="true" valueType="boolean"/>
 								<option id="com.crt.advproject.gcc.thumb.1429919562" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" value="true" valueType="boolean"/>
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.690334585" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.690334585" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS=TUSB_OS_NONE"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS=TUSB_OS_NONE"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_MCU=MCU_LPC11UXX"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_MCU=MCU_LPC11UXX"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_LPCXPRESSO11U68"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_LPCXPRESSO11U68"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
@@ -218,10 +218,10 @@
 								<option id="com.crt.advproject.gcc.arch.1901283003" name="Architecture" superClass="com.crt.advproject.gcc.arch" useByScannerDiscovery="false" value="com.crt.advproject.gcc.target.cm4" valueType="enumerated"/>
 								<option id="com.crt.advproject.gcc.arch.1901283003" name="Architecture" superClass="com.crt.advproject.gcc.arch" useByScannerDiscovery="false" value="com.crt.advproject.gcc.target.cm4" valueType="enumerated"/>
 								<option id="com.crt.advproject.gcc.thumb.1993301691" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" useByScannerDiscovery="false" value="true" valueType="boolean"/>
 								<option id="com.crt.advproject.gcc.thumb.1993301691" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" useByScannerDiscovery="false" value="true" valueType="boolean"/>
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.211439980" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.211439980" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS=TUSB_OS_NONE"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS=TUSB_OS_NONE"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS"/>
 									<listOptionValue builtIn="false" value="CORE_M4"/>
 									<listOptionValue builtIn="false" value="CORE_M4"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_MCU=MCU_LPC43XX"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_MCU=MCU_LPC43XX"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_EA4357"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_EA4357"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
@@ -323,8 +323,8 @@
 								<option id="com.crt.advproject.gcc.thumb.530159727" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" useByScannerDiscovery="false" value="true" valueType="boolean"/>
 								<option id="com.crt.advproject.gcc.thumb.530159727" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" useByScannerDiscovery="false" value="true" valueType="boolean"/>
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.216849614" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.216849614" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS=TUSB_OS_NONE"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_MCU=MCU_LPC175X_6X"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS=TUSB_OS_NONE"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_MCU=MCU_LPC175X_6X"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_LPCXPRESSO1769"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_LPCXPRESSO1769"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
@@ -418,10 +418,10 @@
 								<option id="com.crt.advproject.gcc.thumb.1913988235" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" value="true" valueType="boolean"/>
 								<option id="com.crt.advproject.gcc.thumb.1913988235" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" value="true" valueType="boolean"/>
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.752273048" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.752273048" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS=TUSB_OS_NONE"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS=TUSB_OS_NONE"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS"/>
 									<listOptionValue builtIn="false" value="CORE_M4"/>
 									<listOptionValue builtIn="false" value="CORE_M4"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_MCU=MCU_LPC43XX"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_MCU=MCU_LPC43XX"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_NGX4330"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_NGX4330"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
@@ -515,9 +515,9 @@
 								<option id="com.crt.advproject.gcc.thumb.2139107433" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" value="true" valueType="boolean"/>
 								<option id="com.crt.advproject.gcc.thumb.2139107433" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" value="true" valueType="boolean"/>
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.2019019201" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.2019019201" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS=TUSB_OS_NONE"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS=TUSB_OS_NONE"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_MCU=MCU_LPC11UXX"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_MCU=MCU_LPC11UXX"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_LPCXPRESSO11U14"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_LPCXPRESSO11U14"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>

+ 3 - 3
examples/obsolete/device/src/app_os_prio.h

@@ -46,16 +46,16 @@
 
 
 #include "tusb.h"
 #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
   #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
   #define LOWER_PRIO(x)   ((x)-1) // freeRTOS lower number --> lower priority
 #else
 #else
   #error Priority is not configured for this RTOS
   #error Priority is not configured for this RTOS
 #endif
 #endif
 
 
 enum {
 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
   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,
   KEYBOARD_APP_TASK_PRIO     = STANDARD_APP_TASK_PRIO,

+ 1 - 1
examples/obsolete/device/src/cdc_device_app.c

@@ -38,7 +38,7 @@
 
 
 #include "cdc_device_app.h"
 #include "cdc_device_app.h"
 
 
-#if TUSB_CFG_DEVICE_CDC
+#if CFG_TUSB_DEVICE_CDC
 
 
 #include "common/tusb_fifo.h" // TODO refractor
 #include "common/tusb_fifo.h" // TODO refractor
 #include "app_os_prio.h"
 #include "app_os_prio.h"

+ 1 - 1
examples/obsolete/device/src/cdc_device_app.h

@@ -53,7 +53,7 @@
  extern "C" {
  extern "C" {
 #endif
 #endif
 
 
-#if TUSB_CFG_DEVICE_CDC
+#if CFG_TUSB_DEVICE_CDC
 
 
 void cdc_serial_app_init(void);
 void cdc_serial_app_init(void);
 void cdc_serial_app_task(void* param);
 void cdc_serial_app_task(void* param);

+ 2 - 2
examples/obsolete/device/src/keyboard_device_app.c

@@ -38,7 +38,7 @@
 
 
 #include "keyboard_device_app.h"
 #include "keyboard_device_app.h"
 
 
-#if TUSB_CFG_DEVICE_HID_KEYBOARD
+#if CFG_TUSB_DEVICE_HID_KEYBOARD
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // INCLUDE
 // INCLUDE
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
@@ -51,7 +51,7 @@
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // INTERNAL OBJECT & FUNCTION DECLARATION
 // 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
 // tinyusb callbacks

+ 1 - 1
examples/obsolete/device/src/keyboard_device_app.h

@@ -53,7 +53,7 @@
  extern "C" {
  extern "C" {
 #endif
 #endif
 
 
-#if TUSB_CFG_DEVICE_HID_KEYBOARD
+#if CFG_TUSB_DEVICE_HID_KEYBOARD
 
 
 void keyboard_app_init(void);
 void keyboard_app_init(void);
 void keyboard_app_task(void* param);
 void keyboard_app_task(void* param);

+ 8 - 8
examples/obsolete/device/src/main.c

@@ -64,7 +64,7 @@ void led_blinking_init(void);
 void led_blinking_task(void* param);
 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
 // like a real RTOS, this function is a main loop invoking each task in application and never return
 void os_none_start_scheduler(void)
 void os_none_start_scheduler(void)
 {
 {
@@ -97,9 +97,9 @@ int main(void)
   cdc_serial_app_init();
   cdc_serial_app_init();
 
 
   //------------- start OS scheduler (never return) -------------//
   //------------- start OS scheduler (never return) -------------//
-#if TUSB_CFG_OS == TUSB_OS_FREERTOS
+#if CFG_TUSB_OS == TUSB_OS_FREERTOS
   vTaskStartScheduler();
   vTaskStartScheduler();
-#elif TUSB_CFG_OS == TUSB_OS_NONE
+#elif CFG_TUSB_OS == TUSB_OS_NONE
   os_none_start_scheduler();
   os_none_start_scheduler();
 #else
 #else
   #error need to start RTOS schduler
   #error need to start RTOS schduler
@@ -193,9 +193,9 @@ void print_greeting(void)
   );
   );
 
 
   puts("This DEVICE demo is configured to support:");
   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");
 }
 }

+ 2 - 2
examples/obsolete/device/src/mouse_device_app.c

@@ -38,7 +38,7 @@
 
 
 #include "mouse_device_app.h"
 #include "mouse_device_app.h"
 
 
-#if TUSB_CFG_DEVICE_HID_MOUSE
+#if CFG_TUSB_DEVICE_HID_MOUSE
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // INCLUDE
 // INCLUDE
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
@@ -51,7 +51,7 @@
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // INTERNAL OBJECT & FUNCTION DECLARATION
 // 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
 // tinyusb callbacks

+ 1 - 1
examples/obsolete/device/src/mouse_device_app.h

@@ -53,7 +53,7 @@
  extern "C" {
  extern "C" {
 #endif
 #endif
 
 
-#if TUSB_CFG_DEVICE_HID_MOUSE
+#if CFG_TUSB_DEVICE_HID_MOUSE
 
 
 void mouse_app_init(void);
 void mouse_app_init(void);
 void mouse_app_task(void * param);
 void mouse_app_task(void * param);

+ 1 - 1
examples/obsolete/device/src/msc_device_app.c

@@ -38,7 +38,7 @@
 
 
 #include "msc_device_app.h"
 #include "msc_device_app.h"
 
 
-#if TUSB_CFG_DEVICE_MSC
+#if CFG_TUSB_DEVICE_MSC
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // INCLUDE
 // INCLUDE
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+

+ 2 - 2
examples/obsolete/device/src/msc_device_app.h

@@ -50,7 +50,7 @@
  extern "C" {
  extern "C" {
 #endif
 #endif
 
 
-#if TUSB_CFG_DEVICE_MSC
+#if CFG_TUSB_DEVICE_MSC
 
 
 enum
 enum
 {
 {
@@ -63,7 +63,7 @@ enum
 If you find any bugs or get any questions, feel free to file an\r\n\
 If you find any bugs or get any questions, feel free to file an\r\n\
 issue at github.com/hathach/tinyusb"
 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
   #define MSCD_APP_ROMDISK
 #else // defaults is ram disk
 #else // defaults is ram disk
   #define MSCD_APP_RAMDISK
   #define MSCD_APP_RAMDISK

+ 2 - 2
examples/obsolete/device/src/msc_device_ramdisk.c

@@ -38,7 +38,7 @@
 
 
 #include "msc_device_app.h"
 #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
 // MACRO CONSTANT TYPEDEF
@@ -47,7 +47,7 @@
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // INTERNAL OBJECT & FUNCTION DECLARATION
 // INTERNAL OBJECT & FUNCTION DECLARATION
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
-TUSB_CFG_ATTR_USBRAM
+CFG_TUSB_ATTR_USBRAM
 uint8_t msc_device_ramdisk[DISK_BLOCK_NUM][DISK_BLOCK_SIZE] =
 uint8_t msc_device_ramdisk[DISK_BLOCK_NUM][DISK_BLOCK_SIZE] =
 {
 {
   //------------- Boot Sector -------------//
   //------------- Boot Sector -------------//

+ 2 - 2
examples/obsolete/device/src/msc_device_romdisk.c

@@ -38,7 +38,7 @@
 
 
 #include "msc_device_app.h"
 #include "msc_device_app.h"
 
 
-#if TUSB_CFG_DEVICE_MSC && defined (MSCD_APP_ROMDISK)
+#if CFG_TUSB_DEVICE_MSC && defined (MSCD_APP_ROMDISK)
 
 
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // INCLUDE
 // INCLUDE
@@ -91,7 +91,7 @@ const uint8_t msc_device_app_rommdisk[DISK_BLOCK_NUM][DISK_BLOCK_SIZE] =
   [3] = README_CONTENTS
   [3] = README_CONTENTS
 };
 };
 
 
-TUSB_CFG_ATTR_USBRAM
+CFG_TUSB_ATTR_USBRAM
 static uint8_t sector_buffer[DISK_BLOCK_SIZE];
 static uint8_t sector_buffer[DISK_BLOCK_SIZE];
 
 
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+

+ 31 - 31
examples/obsolete/device/src/tusb_config.h

@@ -46,62 +46,62 @@
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // CONTROLLER CONFIGURATION
 // 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
 // DEVICE CONFIGURATION
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
-#define TUSB_CFG_DEVICE_CONTROL_ENDOINT_SIZE    64
+#define CFG_TUSB_DEVICE_CONTROL_ENDOINT_SIZE    64
 
 
 //------------- CLASS -------------//
 //------------- 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
 // 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
 // USB RAM PLACEMENT
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 #ifdef __CODE_RED // compiled with lpcxpresso
 #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
   #endif
 
 
 #elif defined  __CC_ARM // Compiled with Keil armcc, USBRAM_SECTION is defined in scatter files
 #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
   #endif
 
 
 #elif defined __ICCARM__ // compiled with IAR
 #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
   #endif
 
 
 #else
 #else
@@ -111,7 +111,7 @@
 #endif
 #endif
 
 
 // LPC11uxx and LPC13uxx requires each buffer has to be 64-byte alignment
 // 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)
  #define ATTR_USB_MIN_ALIGNMENT   ATTR_ALIGNED(64)
 #elif defined NRF52840_XXAA
 #elif defined NRF52840_XXAA
  #define ATTR_USB_MIN_ALIGNMENT   ATTR_ALIGNED(4)
  #define ATTR_USB_MIN_ALIGNMENT   ATTR_ALIGNED(4)

+ 10 - 10
examples/obsolete/device/src/tusb_descriptors.c

@@ -41,7 +41,7 @@
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // Keyboard Report Descriptor
 // Keyboard Report Descriptor
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
-#if TUSB_CFG_DEVICE_HID_KEYBOARD
+#if CFG_TUSB_DEVICE_HID_KEYBOARD
 uint8_t const desc_keyboard_report[] = {
 uint8_t const desc_keyboard_report[] = {
   HID_USAGE_PAGE ( HID_USAGE_PAGE_DESKTOP     ),
   HID_USAGE_PAGE ( HID_USAGE_PAGE_DESKTOP     ),
   HID_USAGE      ( HID_USAGE_DESKTOP_KEYBOARD ),
   HID_USAGE      ( HID_USAGE_DESKTOP_KEYBOARD ),
@@ -87,7 +87,7 @@ uint8_t const desc_keyboard_report[] = {
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // Mouse Report Descriptor
 // Mouse Report Descriptor
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
-#if TUSB_CFG_DEVICE_HID_MOUSE
+#if CFG_TUSB_DEVICE_HID_MOUSE
 uint8_t const desc_mouse_report[] = {
 uint8_t const desc_mouse_report[] = {
   HID_USAGE_PAGE ( HID_USAGE_PAGE_DESKTOP     ),
   HID_USAGE_PAGE ( HID_USAGE_PAGE_DESKTOP     ),
   HID_USAGE      ( HID_USAGE_DESKTOP_MOUSE    ),
   HID_USAGE      ( HID_USAGE_DESKTOP_MOUSE    ),
@@ -140,7 +140,7 @@ tusb_desc_device_t const desc_device =
     .bLength            = sizeof(tusb_desc_device_t),
     .bLength            = sizeof(tusb_desc_device_t),
     .bDescriptorType    = TUSB_DESC_DEVICE,
     .bDescriptorType    = TUSB_DESC_DEVICE,
     .bcdUSB             = 0x0200,
     .bcdUSB             = 0x0200,
-  #if TUSB_CFG_DEVICE_CDC
+  #if CFG_TUSB_DEVICE_CDC
     // Use Interface Association Descriptor (IAD) for 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)
     // As required by USB Specs IAD's subclass must be common class (2) and protocol must be IAD (1)
     .bDeviceClass       = TUSB_CLASS_MISC,
     .bDeviceClass       = TUSB_CLASS_MISC,
@@ -152,7 +152,7 @@ tusb_desc_device_t const desc_device =
     .bDeviceProtocol    = 0x00,
     .bDeviceProtocol    = 0x00,
   #endif
   #endif
 
 
-    .bMaxPacketSize0    = TUSB_CFG_DEVICE_CONTROL_ENDOINT_SIZE,
+    .bMaxPacketSize0    = CFG_TUSB_DEVICE_CONTROL_ENDOINT_SIZE,
 
 
     .idVendor           = CFG_VENDORID,
     .idVendor           = CFG_VENDORID,
     .idProduct          = CFG_PRODUCTID,
     .idProduct          = CFG_PRODUCTID,
@@ -184,7 +184,7 @@ app_descriptor_configuration_t const desc_configuration =
         .bMaxPower           = TUSB_DESC_CONFIG_POWER_MA(500)
         .bMaxPower           = TUSB_DESC_CONFIG_POWER_MA(500)
     },
     },
 
 
-    #if TUSB_CFG_DEVICE_CDC
+    #if CFG_TUSB_DEVICE_CDC
     // IAD points to CDC Interfaces
     // IAD points to CDC Interfaces
     .cdc_iad =
     .cdc_iad =
     {
     {
@@ -296,7 +296,7 @@ app_descriptor_configuration_t const desc_configuration =
     #endif
     #endif
 
 
     //------------- HID Keyboard -------------//
     //------------- HID Keyboard -------------//
-    #if TUSB_CFG_DEVICE_HID_KEYBOARD
+    #if CFG_TUSB_DEVICE_HID_KEYBOARD
     .keyboard_interface =
     .keyboard_interface =
     {
     {
         .bLength            = sizeof(tusb_desc_interface_t),
         .bLength            = sizeof(tusb_desc_interface_t),
@@ -333,7 +333,7 @@ app_descriptor_configuration_t const desc_configuration =
     #endif
     #endif
 
 
     //------------- HID Mouse -------------//
     //------------- HID Mouse -------------//
-    #if TUSB_CFG_DEVICE_HID_MOUSE
+    #if CFG_TUSB_DEVICE_HID_MOUSE
     .mouse_interface =
     .mouse_interface =
     {
     {
         .bLength            = sizeof(tusb_desc_interface_t),
         .bLength            = sizeof(tusb_desc_interface_t),
@@ -370,7 +370,7 @@ app_descriptor_configuration_t const desc_configuration =
     #endif
     #endif
 
 
     //------------- Mass Storage -------------//
     //------------- Mass Storage -------------//
-    #if TUSB_CFG_DEVICE_MSC
+    #if CFG_TUSB_DEVICE_MSC
     .msc_interface =
     .msc_interface =
     {
     {
         .bLength            = sizeof(tusb_desc_interface_t),
         .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_configuration       = (uint8_t const * ) &desc_configuration,
     .p_string_arr          = (uint8_t const **) string_descriptor_arr,
     .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,
     .p_hid_keyboard_report = (uint8_t const *) desc_keyboard_report,
     #endif
     #endif
 
 
-    #if TUSB_CFG_DEVICE_HID_MOUSE
+    #if CFG_TUSB_DEVICE_HID_MOUSE
     .p_hid_mouse_report    = (uint8_t const *)  desc_mouse_report,
     .p_hid_mouse_report    = (uint8_t const *)  desc_mouse_report,
     #endif
     #endif
 };
 };

+ 14 - 14
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.
 // 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)
 // Auto ProductID layout's Bitmap: (MSB) MassStorage | Generic | Mouse | Key | CDC (LSB)
 #ifndef CFG_PRODUCTID
 #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) | \
   #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(HID_MOUSE, 2) | PRODUCTID_BITMAP(HID_GENERIC, 3) | \
                                            PRODUCTID_BITMAP(MSC, 4) ) )
                                            PRODUCTID_BITMAP(MSC, 4) ) )
 #endif
 #endif
 
 
 #define ITF_NUM_CDC           0
 #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
   #error These MCUs do not have enough number of endpoints for the current configuration
 #endif
 #endif
 
 
@@ -75,7 +75,7 @@
 #define EDPT_IN(x)    (0x80 | (x))
 #define EDPT_IN(x)    (0x80 | (x))
 #define EDPT_OUT(x)   (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 -------------//
   //------------- CDC -------------//
   #define CDC_EDPT_NOTIF            EDPT_IN (1)
   #define CDC_EDPT_NOTIF            EDPT_IN (1)
@@ -125,7 +125,7 @@
 
 
 #endif
 #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
 // CONFIGURATION DESCRIPTOR
@@ -135,7 +135,7 @@ typedef struct ATTR_PACKED
   tusb_desc_configuration_t              configuration;
   tusb_desc_configuration_t              configuration;
 
 
   //------------- CDC -------------//
   //------------- CDC -------------//
-#if TUSB_CFG_DEVICE_CDC
+#if CFG_TUSB_DEVICE_CDC
   tusb_desc_interface_assoc_t      cdc_iad;
   tusb_desc_interface_assoc_t      cdc_iad;
 
 
   //CDC Control Interface
   //CDC Control Interface
@@ -153,21 +153,21 @@ typedef struct ATTR_PACKED
 #endif
 #endif
 
 
   //------------- HID Keyboard -------------//
   //------------- HID Keyboard -------------//
-#if TUSB_CFG_DEVICE_HID_KEYBOARD
+#if CFG_TUSB_DEVICE_HID_KEYBOARD
   tusb_desc_interface_t                    keyboard_interface;
   tusb_desc_interface_t                    keyboard_interface;
   tusb_hid_descriptor_hid_t                      keyboard_hid;
   tusb_hid_descriptor_hid_t                      keyboard_hid;
   tusb_desc_endpoint_t                     keyboard_endpoint;
   tusb_desc_endpoint_t                     keyboard_endpoint;
 #endif
 #endif
 
 
 //------------- HID Mouse -------------//
 //------------- HID Mouse -------------//
-#if TUSB_CFG_DEVICE_HID_MOUSE
+#if CFG_TUSB_DEVICE_HID_MOUSE
   tusb_desc_interface_t                    mouse_interface;
   tusb_desc_interface_t                    mouse_interface;
   tusb_hid_descriptor_hid_t                      mouse_hid;
   tusb_hid_descriptor_hid_t                      mouse_hid;
   tusb_desc_endpoint_t                     mouse_endpoint;
   tusb_desc_endpoint_t                     mouse_endpoint;
 #endif
 #endif
 
 
 //------------- Mass Storage -------------//
 //------------- Mass Storage -------------//
-#if TUSB_CFG_DEVICE_MSC
+#if CFG_TUSB_DEVICE_MSC
   tusb_desc_interface_t                    msc_interface;
   tusb_desc_interface_t                    msc_interface;
   tusb_desc_endpoint_t                     msc_endpoint_in;
   tusb_desc_endpoint_t                     msc_endpoint_in;
   tusb_desc_endpoint_t                     msc_endpoint_out;
   tusb_desc_endpoint_t                     msc_endpoint_out;

+ 14 - 14
examples/obsolete/host/host_freertos/.cproject

@@ -35,10 +35,10 @@
 									<listOptionValue builtIn="false" value="__FPU_PRESENT"/>
 									<listOptionValue builtIn="false" value="__FPU_PRESENT"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS=CMSIS_LPC43xx_DriverLib"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS=CMSIS_LPC43xx_DriverLib"/>
 									<listOptionValue builtIn="false" value="CORE_M4"/>
 									<listOptionValue builtIn="false" value="CORE_M4"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_MCU=MCU_LPC43XX"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_MCU=MCU_LPC43XX"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_NGX4330"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_NGX4330"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS=TUSB_OS_FREERTOS"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS_TASK_PRIO=(configMAX_PRIORITIES-5)"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS=TUSB_OS_FREERTOS"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS_TASK_PRIO=(configMAX_PRIORITIES-5)"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__MULTICORE_NONE"/>
 									<listOptionValue builtIn="false" value="__MULTICORE_NONE"/>
@@ -134,10 +134,10 @@
 									<listOptionValue builtIn="false" value="__FPU_PRESENT"/>
 									<listOptionValue builtIn="false" value="__FPU_PRESENT"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS=CMSIS_LPC43xx_DriverLib"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS=CMSIS_LPC43xx_DriverLib"/>
 									<listOptionValue builtIn="false" value="CORE_M4"/>
 									<listOptionValue builtIn="false" value="CORE_M4"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_MCU=MCU_LPC43XX"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_MCU=MCU_LPC43XX"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_EA4357"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_EA4357"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS=TUSB_OS_FREERTOS"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS_TASK_PRIO=configMAX_PRIORITIES-5"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS=TUSB_OS_FREERTOS"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS_TASK_PRIO=configMAX_PRIORITIES-5"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__MULTICORE_NONE"/>
 									<listOptionValue builtIn="false" value="__MULTICORE_NONE"/>
@@ -231,9 +231,9 @@
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.1650588201" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.1650588201" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_MCU=MCU_LPC175X_6X"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_MCU=MCU_LPC175X_6X"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_LPCXPRESSO1769"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_LPCXPRESSO1769"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS=TUSB_OS_NONE"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS=TUSB_OS_NONE"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 								</option>
 								</option>
@@ -305,10 +305,10 @@
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.1650588201" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.1650588201" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_MCU=MCU_LPC175X_6X"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_MCU=MCU_LPC175X_6X"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_LPCXPRESSO1769"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_LPCXPRESSO1769"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS=TUSB_OS_FREERTOS"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS_TASK_PRIO=(configMAX_PRIORITIES-5)"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS=TUSB_OS_FREERTOS"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS_TASK_PRIO=(configMAX_PRIORITIES-5)"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__MULTICORE_NONE"/>
 									<listOptionValue builtIn="false" value="__MULTICORE_NONE"/>
@@ -422,10 +422,10 @@
 									<listOptionValue builtIn="false" value="__FPU_PRESENT"/>
 									<listOptionValue builtIn="false" value="__FPU_PRESENT"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS"/>
 									<listOptionValue builtIn="false" value="CORE_M4"/>
 									<listOptionValue builtIn="false" value="CORE_M4"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_MCU=MCU_LPC43XX"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_MCU=MCU_LPC43XX"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_MCB4300"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_MCB4300"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS=TUSB_OS_FREERTOS"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS_TASK_PRIO=(configMAX_PRIORITIES-5)"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS=TUSB_OS_FREERTOS"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS_TASK_PRIO=(configMAX_PRIORITIES-5)"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__MULTICORE_NONE"/>
 									<listOptionValue builtIn="false" value="__MULTICORE_NONE"/>

+ 8 - 8
examples/obsolete/host/host_os_none/.cproject

@@ -34,9 +34,9 @@
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS=CMSIS_LPC43xx_DriverLib"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS=CMSIS_LPC43xx_DriverLib"/>
 									<listOptionValue builtIn="false" value="CORE_M4"/>
 									<listOptionValue builtIn="false" value="CORE_M4"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_MCU=MCU_LPC43XX"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_MCU=MCU_LPC43XX"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_NGX4330"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_NGX4330"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS=TUSB_OS_NONE"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS=TUSB_OS_NONE"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__MULTICORE_NONE"/>
 									<listOptionValue builtIn="false" value="__MULTICORE_NONE"/>
@@ -128,9 +128,9 @@
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS=CMSIS_LPC43xx_DriverLib"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS=CMSIS_LPC43xx_DriverLib"/>
 									<listOptionValue builtIn="false" value="CORE_M4"/>
 									<listOptionValue builtIn="false" value="CORE_M4"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_MCU=MCU_LPC43XX"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_MCU=MCU_LPC43XX"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_EA4357"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_EA4357"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS=TUSB_OS_NONE"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS=TUSB_OS_NONE"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__MULTICORE_NONE"/>
 									<listOptionValue builtIn="false" value="__MULTICORE_NONE"/>
@@ -223,9 +223,9 @@
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS"/>
 									<listOptionValue builtIn="false" value="CORE_M4"/>
 									<listOptionValue builtIn="false" value="CORE_M4"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_MCU=MCU_LPC43XX"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_MCU=MCU_LPC43XX"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_MCB4300"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_MCB4300"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS=TUSB_OS_NONE"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS=TUSB_OS_NONE"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__MULTICORE_NONE"/>
 									<listOptionValue builtIn="false" value="__MULTICORE_NONE"/>
@@ -315,9 +315,9 @@
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.1650588201" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.1650588201" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__REDLIB__"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS"/>
 									<listOptionValue builtIn="false" value="__USE_CMSIS"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_MCU=MCU_LPC175X_6X"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_MCU=MCU_LPC175X_6X"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_LPCXPRESSO1769"/>
 									<listOptionValue builtIn="false" value="BOARD=BOARD_LPCXPRESSO1769"/>
-									<listOptionValue builtIn="false" value="TUSB_CFG_OS=TUSB_OS_NONE"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_OS=TUSB_OS_NONE"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="DEBUG"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__CODE_RED"/>
 									<listOptionValue builtIn="false" value="__MULTICORE_NONE"/>
 									<listOptionValue builtIn="false" value="__MULTICORE_NONE"/>

+ 4 - 4
examples/obsolete/host/src/app_os_prio.h

@@ -53,18 +53,18 @@
 
 
 #include "tusb.h"
 #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
   #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
   #define LOWER_PRIO(x)   ((x)-1) // freeRTOS lower number --> lower priority
-#elif TUSB_CFG_OS == TUSB_OS_CMSIS_RTX
+#elif CFG_TUSB_OS == TUSB_OS_CMSIS_RTX
   #define LOWER_PRIO(x)   ((x)-1) // CMSIS-RTOS lower number --> lower priority
   #define LOWER_PRIO(x)   ((x)-1) // CMSIS-RTOS lower number --> lower priority
 #else
 #else
   #error Priority is not configured for this RTOS
   #error Priority is not configured for this RTOS
 #endif
 #endif
 
 
 enum {
 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
   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,
   KEYBOARD_APP_TASK_PRIO     = STANDARD_APP_TASK_PRIO,

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

@@ -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 TUSB_CFG_HOST_CDC
+#if CFG_TUSB_HOST_CDC
 
 
 #define QUEUE_SERIAL_DEPTH   100
 #define QUEUE_SERIAL_DEPTH   100
 
 
@@ -49,8 +49,8 @@
 static osal_semaphore_t sem_hdl;
 static osal_semaphore_t sem_hdl;
 
 
 enum { SERIAL_BUFFER_SIZE = 64 };
 enum { SERIAL_BUFFER_SIZE = 64 };
-TUSB_CFG_ATTR_USBRAM static uint8_t serial_in_buffer[SERIAL_BUFFER_SIZE];
-TUSB_CFG_ATTR_USBRAM static uint8_t serial_out_buffer[SERIAL_BUFFER_SIZE];
+CFG_TUSB_ATTR_USBRAM static uint8_t serial_in_buffer[SERIAL_BUFFER_SIZE];
+CFG_TUSB_ATTR_USBRAM static uint8_t serial_out_buffer[SERIAL_BUFFER_SIZE];
 
 
 static uint8_t received_bytes; // set by transfer complete callback
 static uint8_t received_bytes; // set by transfer complete callback
 
 
@@ -126,7 +126,7 @@ void cdc_serial_host_app_task( void* param )
   OSAL_TASK_BEGIN
   OSAL_TASK_BEGIN
 
 
   //------------- send characters got from uart terminal to the first CDC device -------------//
   //------------- send characters got from uart terminal to the first CDC device -------------//
-  for(uint8_t dev_addr=1; dev_addr <= TUSB_CFG_HOST_DEVICE_MAX; dev_addr++)
+  for(uint8_t dev_addr=1; dev_addr <= CFG_TUSB_HOST_DEVICE_MAX; dev_addr++)
   {
   {
     if ( tuh_cdc_serial_is_mounted(dev_addr) )
     if ( tuh_cdc_serial_is_mounted(dev_addr) )
     {
     {
@@ -152,7 +152,7 @@ void cdc_serial_host_app_task( void* param )
   {
   {
     for(uint8_t i=0; i<received_bytes; i++) putchar(serial_in_buffer[i]);
     for(uint8_t i=0; i<received_bytes; i++) putchar(serial_in_buffer[i]);
 
 
-    for(uint8_t dev_addr=1; dev_addr <= TUSB_CFG_HOST_DEVICE_MAX; dev_addr++)
+    for(uint8_t dev_addr=1; dev_addr <= CFG_TUSB_HOST_DEVICE_MAX; dev_addr++)
     {
     {
       if ( tuh_cdc_serial_is_mounted(dev_addr) )
       if ( tuh_cdc_serial_is_mounted(dev_addr) )
       {
       {

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

@@ -53,7 +53,7 @@
  extern "C" {
  extern "C" {
 #endif
 #endif
 
 
-#if TUSB_CFG_HOST_CDC
+#if CFG_TUSB_HOST_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);

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

@@ -42,7 +42,7 @@
 #include "keyboard_host_app.h"
 #include "keyboard_host_app.h"
 #include "app_os_prio.h"
 #include "app_os_prio.h"
 
 
-#if TUSB_CFG_HOST_HID_KEYBOARD
+#if CFG_TUSB_HOST_HID_KEYBOARD
 
 
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // MACRO CONSTANT TYPEDEF
 // MACRO CONSTANT TYPEDEF
@@ -53,7 +53,7 @@
 // INTERNAL OBJECT & FUNCTION DECLARATION
 // INTERNAL OBJECT & FUNCTION DECLARATION
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 static osal_queue_t queue_kbd_hdl;
 static osal_queue_t queue_kbd_hdl;
-TUSB_CFG_ATTR_USBRAM static hid_keyboard_report_t usb_keyboard_report;
+CFG_TUSB_ATTR_USBRAM static hid_keyboard_report_t usb_keyboard_report;
 
 
 static inline uint8_t keycode_to_ascii(uint8_t modifier, uint8_t keycode) ATTR_CONST ATTR_ALWAYS_INLINE;
 static inline uint8_t keycode_to_ascii(uint8_t modifier, uint8_t keycode) ATTR_CONST ATTR_ALWAYS_INLINE;
 static inline void process_kbd_report(hid_keyboard_report_t const * report);
 static inline void process_kbd_report(hid_keyboard_report_t const * report);

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

@@ -59,7 +59,7 @@
  extern "C" {
  extern "C" {
 #endif
 #endif
 
 
-#if TUSB_CFG_HOST_HID_KEYBOARD
+#if CFG_TUSB_HOST_HID_KEYBOARD
 
 
 void keyboard_host_app_init(void);
 void keyboard_host_app_init(void);
 void keyboard_host_app_task(void* param);
 void keyboard_host_app_task(void* param);

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

@@ -64,7 +64,7 @@ void print_greeting(void);
 // IMPLEMENTATION
 // IMPLEMENTATION
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 
 
-#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
 // like a real RTOS, this function is a main loop invoking each task in application and never return
 void os_none_start_scheduler(void)
 void os_none_start_scheduler(void)
 {
 {
@@ -83,7 +83,7 @@ void os_none_start_scheduler(void)
 
 
 int main(void)
 int main(void)
 {
 {
-#if TUSB_CFG_OS == TUSB_OS_CMSIS_RTX
+#if CFG_TUSB_OS == TUSB_OS_CMSIS_RTX
   osKernelInitialize(); // CMSIS RTX requires kernel init before any other OS functions
   osKernelInitialize(); // CMSIS RTX requires kernel init before any other OS functions
 #endif
 #endif
 
 
@@ -101,11 +101,11 @@ int main(void)
   cdc_serial_host_app_init();
   cdc_serial_host_app_init();
 
 
   //------------- start OS scheduler (never return) -------------//
   //------------- start OS scheduler (never return) -------------//
-#if TUSB_CFG_OS == TUSB_OS_FREERTOS
+#if CFG_TUSB_OS == TUSB_OS_FREERTOS
   vTaskStartScheduler();
   vTaskStartScheduler();
-#elif TUSB_CFG_OS == TUSB_OS_NONE
+#elif CFG_TUSB_OS == TUSB_OS_NONE
   os_none_start_scheduler();
   os_none_start_scheduler();
-#elif TUSB_CFG_OS == TUSB_OS_CMSIS_RTX
+#elif CFG_TUSB_OS == TUSB_OS_CMSIS_RTX
   osKernelStart();
   osKernelStart();
 #else
 #else
   #error need to start RTOS schduler
   #error need to start RTOS schduler
@@ -134,10 +134,10 @@ void print_greeting(void)
   );
   );
 
 
   puts("This HOST demo is configured to support:");
   puts("This HOST demo is configured to support:");
-  printf("  - RTOS = %s\n", rtos_name[TUSB_CFG_OS]);
-  if (TUSB_CFG_HOST_HUB          ) puts("  - Hub (1 level only)");
-  if (TUSB_CFG_HOST_HID_MOUSE    ) puts("  - HID Mouse");
-  if (TUSB_CFG_HOST_HID_KEYBOARD ) puts("  - HID Keyboard");
-  if (TUSB_CFG_HOST_MSC          ) puts("  - Mass Storage");
-  if (TUSB_CFG_HOST_CDC          ) puts("  - Communication Device Class");
+  printf("  - RTOS = %s\n", rtos_name[CFG_TUSB_OS]);
+  if (CFG_TUSB_HOST_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");
 }
 }

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

@@ -42,7 +42,7 @@
 #include "mouse_host_app.h"
 #include "mouse_host_app.h"
 #include "app_os_prio.h"
 #include "app_os_prio.h"
 
 
-#if TUSB_CFG_HOST_HID_MOUSE
+#if CFG_TUSB_HOST_HID_MOUSE
 
 
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // MACRO CONSTANT TYPEDEF
 // MACRO CONSTANT TYPEDEF
@@ -53,7 +53,7 @@
 // INTERNAL OBJECT & FUNCTION DECLARATION
 // INTERNAL OBJECT & FUNCTION DECLARATION
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 static osal_queue_t queue_mouse_hdl;
 static osal_queue_t queue_mouse_hdl;
-TUSB_CFG_ATTR_USBRAM static hid_mouse_report_t usb_mouse_report;
+CFG_TUSB_ATTR_USBRAM static hid_mouse_report_t usb_mouse_report;
 
 
 static inline void process_mouse_report(hid_mouse_report_t const * p_report);
 static inline void process_mouse_report(hid_mouse_report_t const * p_report);
 
 

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

@@ -62,7 +62,7 @@
  extern "C" {
  extern "C" {
 #endif
 #endif
 
 
-#if TUSB_CFG_HOST_HID_MOUSE
+#if CFG_TUSB_HOST_HID_MOUSE
 
 
 void mouse_host_app_init(void);
 void mouse_host_app_init(void);
 void mouse_host_app_task(void* param);
 void mouse_host_app_task(void* param);

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

@@ -37,7 +37,7 @@
 #include "msc_cli.h"
 #include "msc_cli.h"
 #include "ctype.h"
 #include "ctype.h"
 
 
-#if TUSB_CFG_HOST_MSC
+#if CFG_TUSB_HOST_MSC
 
 
 #include "ff.h"
 #include "ff.h"
 #include "diskio.h"
 #include "diskio.h"
@@ -139,7 +139,7 @@ static cli_cmdfunc_t cli_command_tbl[] =
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // INTERNAL OBJECT & FUNCTION DECLARATION
 // INTERNAL OBJECT & FUNCTION DECLARATION
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
-TUSB_CFG_ATTR_USBRAM uint8_t fileread_buffer[CLI_FILE_READ_BUFFER];
+CFG_TUSB_ATTR_USBRAM uint8_t fileread_buffer[CLI_FILE_READ_BUFFER];
 static char cli_buffer[CLI_MAX_BUFFER];
 static char cli_buffer[CLI_MAX_BUFFER];
 static char volume_label[20];
 static char volume_label[20];
 
 

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

@@ -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 TUSB_CFG_HOST_MSC
+#if CFG_TUSB_HOST_MSC
 
 
 #include "msc_cli.h"
 #include "msc_cli.h"
 #include "ff.h"
 #include "ff.h"
@@ -55,7 +55,7 @@
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // INTERNAL OBJECT & FUNCTION DECLARATION
 // INTERNAL OBJECT & FUNCTION DECLARATION
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
-TUSB_CFG_ATTR_USBRAM static FATFS fatfs[TUSB_CFG_HOST_DEVICE_MAX];
+CFG_TUSB_ATTR_USBRAM static FATFS fatfs[CFG_TUSB_HOST_DEVICE_MAX];
 
 
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // tinyusb callbacks
 // tinyusb callbacks
@@ -117,7 +117,7 @@ void tuh_msc_unmounted_cb(uint8_t dev_addr)
 
 
   if ( phy_disk == f_get_current_drive() )
   if ( phy_disk == f_get_current_drive() )
   { // active drive is unplugged --> change to other drive
   { // active drive is unplugged --> change to other drive
-    for(uint8_t i=0; i<TUSB_CFG_HOST_DEVICE_MAX; i++)
+    for(uint8_t i=0; i<CFG_TUSB_HOST_DEVICE_MAX; i++)
     {
     {
       if ( disk_is_ready(i) )
       if ( disk_is_ready(i) )
       {
       {
@@ -158,7 +158,7 @@ void msc_host_app_task(void* param)
 
 
   is_any_disk_mounted = false;
   is_any_disk_mounted = false;
   
   
-  for(uint8_t phy_disk=0; phy_disk < TUSB_CFG_HOST_DEVICE_MAX; phy_disk++)
+  for(uint8_t phy_disk=0; phy_disk < CFG_TUSB_HOST_DEVICE_MAX; phy_disk++)
   {
   {
     if ( disk_is_ready(phy_disk) )
     if ( disk_is_ready(phy_disk) )
     {
     {

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

@@ -54,7 +54,7 @@
  extern "C" {
  extern "C" {
 #endif
 #endif
 
 
-#if TUSB_CFG_HOST_MSC
+#if CFG_TUSB_HOST_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);

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

@@ -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 TUSB_CFG_HOST_CDC && TUSB_CFG_HOST_CDC_RNDIS
+#if CFG_TUSB_HOST_CDC && CFG_TUSB_HOST_CDC_RNDIS
 
 
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // MACRO CONSTANT TYPEDEF
 // MACRO CONSTANT TYPEDEF

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

@@ -53,7 +53,7 @@
  extern "C" {
  extern "C" {
 #endif
 #endif
 
 
-#if TUSB_CFG_HOST_CDC && TUSB_CFG_HOST_CDC_RNDIS
+#if CFG_TUSB_HOST_CDC && CFG_TUSB_HOST_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);

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

@@ -46,57 +46,57 @@
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // CONTROLLER CONFIGURATION
 // CONTROLLER CONFIGURATION
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
-//#define TUSB_CFG_MCU will be passed from IDE for easy board/mcu switching
-#define TUSB_CFG_CONTROLLER_0_MODE  (TUSB_MODE_HOST)
+//#define CFG_TUSB_MCU will be passed from IDE for easy board/mcu switching
+#define CFG_TUSB_CONTROLLER_0_MODE  (TUSB_MODE_HOST)
 
 
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // HOST CONFIGURATION
 // HOST CONFIGURATION
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 
 
 //------------- CLASS -------------//
 //------------- CLASS -------------//
-#define TUSB_CFG_HOST_HUB                       1
-#define TUSB_CFG_HOST_HID_KEYBOARD              1
-#define TUSB_CFG_HOST_HID_MOUSE                 1
-#define TUSB_CFG_HOST_HID_GENERIC               0 // (not yet supported)
-#define TUSB_CFG_HOST_MSC                       1
-#define TUSB_CFG_HOST_CDC                       1
+#define CFG_TUSB_HOST_HUB                       1
+#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 TUSB_CFG_HOST_DEVICE_MAX                (TUSB_CFG_HOST_HUB ? 5 : 1) // normal hub has 4 ports
+#define CFG_TUSB_HOST_DEVICE_MAX                (CFG_TUSB_HOST_HUB ? 5 : 1) // normal hub has 4 ports
 
 
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // COMMON CONFIGURATION
 // COMMON CONFIGURATION
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
-#define TUSB_CFG_DEBUG                2
+#define CFG_TUSB_DEBUG                2
 
 
-//#define TUSB_CFG_OS                   TUSB_OS_NONE // defined using eclipse build
-//#define TUSB_CFG_OS_TASK_PRIO         0            // defined using eclipse build
+//#define CFG_TUSB_OS                   TUSB_OS_NONE // defined using eclipse build
+//#define CFG_TUSB_OS_TASK_PRIO         0            // defined using eclipse build
 
 
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // USB RAM PLACEMENT
 // USB RAM PLACEMENT
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 #ifdef __CODE_RED // make use of code red's support for ram region macros
 #ifdef __CODE_RED // make use of code red's support for ram region macros
 
 
-  #if 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  ATTR_SECTION(.data.$RAM3)
+  #if 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  ATTR_SECTION(.data.$RAM3)
   #endif
   #endif
 
 
 #elif defined __CC_ARM // Compiled with Keil armcc
 #elif defined __CC_ARM // Compiled with Keil armcc
 
 
-  #if (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_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
   #endif
 
 
 #elif defined __ICCARM__ // compiled with IAR
 #elif defined __ICCARM__ // compiled with IAR
 
 
-  #if (TUSB_CFG_MCU == MCU_LPC175X_6X)
+  #if (CFG_TUSB_MCU == MCU_LPC175X_6X)
     // LP175x_6x can access all but CMSIS-RTX causes overflow in 32KB SRAM --> move to AHB ram
     // LP175x_6x can access all but CMSIS-RTX causes overflow in 32KB SRAM --> move to AHB ram
-    #define TUSB_CFG_ATTR_USBRAM _Pragma("location=\".sram\"")
-  #elif  (TUSB_CFG_MCU == MCU_LPC43XX)
-    #define TUSB_CFG_ATTR_USBRAM _Pragma("location=\".ahb_sram1\"")
+    #define CFG_TUSB_ATTR_USBRAM _Pragma("location=\".sram\"")
+  #elif  (CFG_TUSB_MCU == MCU_LPC43XX)
+    #define CFG_TUSB_ATTR_USBRAM _Pragma("location=\".ahb_sram1\"")
   #endif
   #endif
 
 
 #else
 #else

+ 1 - 1
examples/readme.md

@@ -55,7 +55,7 @@ IAR is just as easy as Keil
 
 
 ## Configure demo
 ## Configure demo
 
 
-Application demo is written to have the code excluded if its required option is not enabled in [tusb_config.h](). Some of combination may exceed the 32KB limit of IAR/Keil so you may want to re-configure to disable some class support, decrease TUSB_CFG_DEBUG or increase the compiler optimization level.
+Application demo is written to have the code excluded if its required option is not enabled in [tusb_config.h](). Some of combination may exceed the 32KB limit of IAR/Keil so you may want to re-configure to disable some class support, decrease CFG_TUSB_DEBUG or increase the compiler optimization level.
 
 
 In addition, there are some configuration you can change such as
 In addition, there are some configuration you can change such as
 
 

+ 3 - 3
hw/bsp/ea4357/board_ea4357.c

@@ -68,7 +68,7 @@ enum {
 /*------------------------------------------------------------------*/
 /*------------------------------------------------------------------*/
 /* TUSB HAL MILLISECOND
 /* TUSB HAL MILLISECOND
  *------------------------------------------------------------------*/
  *------------------------------------------------------------------*/
-#if TUSB_CFG_OS == TUSB_OS_NONE
+#if CFG_TUSB_OS == TUSB_OS_NONE
 
 
 volatile uint32_t system_ticks = 0;
 volatile uint32_t system_ticks = 0;
 
 
@@ -91,7 +91,7 @@ void board_init(void)
 {
 {
   CGU_Init();
   CGU_Init();
 
 
-#if TUSB_CFG_OS == TUSB_OS_NONE // TODO may move to main.c
+#if CFG_TUSB_OS == TUSB_OS_NONE // TODO may move to main.c
   SysTick_Config(CGU_GetPCLKFrequency(CGU_PERIPHERAL_M4CORE) / BOARD_TICKS_HZ); // 1 msec tick timer
   SysTick_Config(CGU_GetPCLKFrequency(CGU_PERIPHERAL_M4CORE) / BOARD_TICKS_HZ); // 1 msec tick timer
 #endif
 #endif
 
 
@@ -99,7 +99,7 @@ void board_init(void)
   // USB0 Power: EA4357 channel B U20 GPIO26 active low (base board), P2_3 on LPC4357
   // USB0 Power: EA4357 channel B U20 GPIO26 active low (base board), P2_3 on LPC4357
   scu_pinmux(0x02, 3, MD_PUP | MD_EZI, FUNC7);		// USB0 VBus Power
   scu_pinmux(0x02, 3, MD_PUP | MD_EZI, FUNC7);		// USB0 VBus Power
 
 
-  #if TUSB_CFG_CONTROLLER_0_MODE & TUSB_MODE_DEVICE
+  #if CFG_TUSB_CONTROLLER_0_MODE & TUSB_MODE_DEVICE
   scu_pinmux(0x09, 5, GPIO_PDN, FUNC4); // P9_5 (GPIO5[18]) (GPIO28 on oem base) as USB connect, active low.
   scu_pinmux(0x09, 5, GPIO_PDN, FUNC4); // P9_5 (GPIO5[18]) (GPIO28 on oem base) as USB connect, active low.
   GPIO_SetDir(5, BIT_(18), 1);
   GPIO_SetDir(5, BIT_(18), 1);
   #endif
   #endif

+ 1 - 1
hw/bsp/keil/board_mcb4300.c

@@ -74,7 +74,7 @@ void board_init(void)
 {
 {
   CGU_Init();
   CGU_Init();
 
 
-#if TUSB_CFG_OS == TUSB_OS_NONE // TODO may move to main.c
+#if CFG_TUSB_OS == TUSB_OS_NONE // TODO may move to main.c
   SysTick_Config(CGU_GetPCLKFrequency(CGU_PERIPHERAL_M4CORE) / BOARD_TICKS_HZ); // 1 msec tick timer
   SysTick_Config(CGU_GetPCLKFrequency(CGU_PERIPHERAL_M4CORE) / BOARD_TICKS_HZ); // 1 msec tick timer
 #endif
 #endif
 
 

+ 1 - 1
hw/bsp/lpcxpresso/board_lpclink2.c

@@ -56,7 +56,7 @@ void board_init(void)
 {
 {
   CGU_Init();
   CGU_Init();
 
 
-#if TUSB_CFG_OS == TUSB_OS_NONE // TODO may move to main.c
+#if CFG_TUSB_OS == TUSB_OS_NONE // TODO may move to main.c
   SysTick_Config(CGU_GetPCLKFrequency(CGU_PERIPHERAL_M4CORE) / BOARD_TICKS_HZ); // 1 msec tick timer
   SysTick_Config(CGU_GetPCLKFrequency(CGU_PERIPHERAL_M4CORE) / BOARD_TICKS_HZ); // 1 msec tick timer
 #endif
 #endif
 
 

+ 1 - 1
hw/bsp/lpcxpresso/board_lpcxpresso11u14.c

@@ -67,7 +67,7 @@ void board_init(void)
 {
 {
   SystemInit();
   SystemInit();
 
 
-#if TUSB_CFG_OS == TUSB_OS_NONE // TODO may move to main.c
+#if CFG_TUSB_OS == TUSB_OS_NONE // TODO may move to main.c
   SysTick_Config(SystemCoreClock / BOARD_TICKS_HZ); // 1 msec tick timer
   SysTick_Config(SystemCoreClock / BOARD_TICKS_HZ); // 1 msec tick timer
 #endif
 #endif
 
 

+ 1 - 1
hw/bsp/lpcxpresso11u68/board_lpcxpresso11u68.c

@@ -58,7 +58,7 @@ void board_init(void)
 {
 {
   SystemInit();
   SystemInit();
 
 
-#if TUSB_CFG_OS == TUSB_OS_NONE // TODO may move to main.c
+#if CFG_TUSB_OS == TUSB_OS_NONE // TODO may move to main.c
   SysTick_Config(SystemCoreClock / BOARD_TICKS_HZ); // 1 msec tick timer
   SysTick_Config(SystemCoreClock / BOARD_TICKS_HZ); // 1 msec tick timer
 #endif
 #endif
 
 

+ 1 - 1
hw/bsp/lpcxpresso1347/board_lpcxpresso1347.c

@@ -68,7 +68,7 @@ void board_init(void)
 {
 {
   SystemInit();
   SystemInit();
 
 
-#if TUSB_CFG_OS == TUSB_OS_NONE // TODO may move to main.c
+#if CFG_TUSB_OS == TUSB_OS_NONE // TODO may move to main.c
   SysTick_Config(SystemCoreClock / BOARD_TICKS_HZ); // 1 msec tick timer
   SysTick_Config(SystemCoreClock / BOARD_TICKS_HZ); // 1 msec tick timer
 #endif
 #endif
 
 

+ 1 - 1
hw/bsp/lpcxpresso1769/board_lpcxpresso1769.c

@@ -67,7 +67,7 @@ void board_init(void)
 {
 {
   SystemInit();
   SystemInit();
 
 
-#if TUSB_CFG_OS == TUSB_OS_NONE // TODO may move to main.c
+#if CFG_TUSB_OS == TUSB_OS_NONE // TODO may move to main.c
   SysTick_Config(SystemCoreClock / BOARD_TICKS_HZ); // 1 msec tick timer
   SysTick_Config(SystemCoreClock / BOARD_TICKS_HZ); // 1 msec tick timer
 #endif
 #endif
 
 

+ 1 - 1
hw/bsp/ngx/board_ngx4330.c

@@ -70,7 +70,7 @@ void board_init(void)
 {
 {
   CGU_Init();
   CGU_Init();
 
 
-#if TUSB_CFG_OS == TUSB_OS_NONE // TODO may move to main.c
+#if CFG_TUSB_OS == TUSB_OS_NONE // TODO may move to main.c
   SysTick_Config( CGU_GetPCLKFrequency(CGU_PERIPHERAL_M4CORE)/BOARD_TICKS_HZ );	/* 1 ms Timer */
   SysTick_Config( CGU_GetPCLKFrequency(CGU_PERIPHERAL_M4CORE)/BOARD_TICKS_HZ );	/* 1 ms Timer */
 #endif
 #endif
 
 

+ 1 - 1
hw/mcu/nxp/lpc11uxx/hal_mcu/hal_lpc11uxx.c

@@ -39,7 +39,7 @@
 #include "common/tusb_common.h"
 #include "common/tusb_common.h"
 #include "hal.h"
 #include "hal.h"
 
 
-#if TUSB_CFG_MCU == MCU_LPC11UXX
+#if CFG_TUSB_MCU == MCU_LPC11UXX
 
 
 void tusb_hal_int_enable(uint8_t rhport)
 void tusb_hal_int_enable(uint8_t rhport)
 {
 {

+ 1 - 1
hw/mcu/nxp/lpc13uxx/hal_mcu/hal_lpc13uxx.c

@@ -39,7 +39,7 @@
 #include "common/tusb_common.h"
 #include "common/tusb_common.h"
 #include "hal.h"
 #include "hal.h"
 
 
-#if TUSB_CFG_MCU == MCU_LPC13UXX
+#if CFG_TUSB_MCU == MCU_LPC13UXX
 
 
 void tusb_hal_int_enable(uint8_t rhport)
 void tusb_hal_int_enable(uint8_t rhport)
 {
 {

+ 1 - 1
readme.markdown

@@ -45,7 +45,7 @@ In addition to running without an RTOS, tinyusb is an OS-awared stack that can r
 
 
 ### RTOS ###
 ### RTOS ###
 
 
-Currently the following OS are supported with tinyusb out of the box with a simple change of TUSB_CFG_OS macro.
+Currently the following OS are supported with tinyusb out of the box with a simple change of CFG_TUSB_OS macro.
 
 
 - **None OS**
 - **None OS**
 - **FreeRTOS**
 - **FreeRTOS**

+ 1 - 1
tests/.cproject

@@ -33,7 +33,7 @@
 							<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.base.694786126" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.base"/>
 							<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.base.694786126" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.base"/>
 							<tool errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.c.compiler.mingw.base.1588045403" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.base">
 							<tool errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.c.compiler.mingw.base.1588045403" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.base">
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.1484610767" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
 								<option id="gnu.c.compiler.option.preprocessor.def.symbols.1484610767" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
-									<listOptionValue builtIn="false" value="TUSB_CFG_MCU=MCU_LPC43XX"/>
+									<listOptionValue builtIn="false" value="CFG_TUSB_MCU=MCU_LPC43XX"/>
 								</option>
 								</option>
 								<option id="gnu.c.compiler.option.preprocessor.undef.symbol.1508960620" name="Undefined symbols (-U)" superClass="gnu.c.compiler.option.preprocessor.undef.symbol"/>
 								<option id="gnu.c.compiler.option.preprocessor.undef.symbol.1508960620" name="Undefined symbols (-U)" superClass="gnu.c.compiler.option.preprocessor.undef.symbol"/>
 								<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.451457393" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
 								<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.451457393" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>

+ 1 - 1
tests/lpc175x_6x/project.yml

@@ -42,7 +42,7 @@
   #  1) remove the trailing [] from the :common: section
   #  1) remove the trailing [] from the :common: section
   #  2) add entries to the :common: section (e.g. :test: has TEST defined)
   #  2) add entries to the :common: section (e.g. :test: has TEST defined)
   :commmon: &common_defines 
   :commmon: &common_defines 
-    - TUSB_CFG_MCU=MCU_LPC175X_6X -std=gnu99 
+    - CFG_TUSB_MCU=MCU_LPC175X_6X -std=gnu99 
 #    - -mx32
 #    - -mx32
     - CORE_M4
     - CORE_M4
     - __CODE_RED
     - __CODE_RED

+ 6 - 6
tests/lpc175x_6x/test/test_usbd.c

@@ -128,26 +128,26 @@ void test_usbd_string_descriptor(void)
 
 
 
 
   //------------- manufacturer string descriptor -------------//
   //------------- manufacturer string descriptor -------------//
-  uint32_t const manufacturer_len = sizeof(TUSB_CFG_DEVICE_STRING_MANUFACTURER) - 1;
+  uint32_t const manufacturer_len = sizeof(CFG_TUSB_DEVICE_STRING_MANUFACTURER) - 1;
   TEST_ASSERT_EQUAL(manufacturer_len*2 + 2, app_tusb_desc_strings.manufacturer.bLength);
   TEST_ASSERT_EQUAL(manufacturer_len*2 + 2, app_tusb_desc_strings.manufacturer.bLength);
   for(uint32_t i=0; i<manufacturer_len; i++)
   for(uint32_t i=0; i<manufacturer_len; i++)
   {
   {
-    TEST_ASSERT_EQUAL(TUSB_CFG_DEVICE_STRING_MANUFACTURER[i], app_tusb_desc_strings.manufacturer.unicode_string[i]);
+    TEST_ASSERT_EQUAL(CFG_TUSB_DEVICE_STRING_MANUFACTURER[i], app_tusb_desc_strings.manufacturer.unicode_string[i]);
   }
   }
 
 
   //------------- product string descriptor -------------//
   //------------- product string descriptor -------------//
-  uint32_t const product_len = sizeof(TUSB_CFG_DEVICE_STRING_PRODUCT) - 1;
+  uint32_t const product_len = sizeof(CFG_TUSB_DEVICE_STRING_PRODUCT) - 1;
   TEST_ASSERT_EQUAL(product_len*2 + 2, app_tusb_desc_strings.product.bLength);
   TEST_ASSERT_EQUAL(product_len*2 + 2, app_tusb_desc_strings.product.bLength);
   for(uint32_t i=0; i < product_len; i++)
   for(uint32_t i=0; i < product_len; i++)
   {
   {
-    TEST_ASSERT_EQUAL(TUSB_CFG_DEVICE_STRING_PRODUCT[i], app_tusb_desc_strings.product.unicode_string[i]);
+    TEST_ASSERT_EQUAL(CFG_TUSB_DEVICE_STRING_PRODUCT[i], app_tusb_desc_strings.product.unicode_string[i]);
   }
   }
 
 
   //------------- serial string descriptor -------------//
   //------------- serial string descriptor -------------//
-  uint32_t const serial_len = sizeof(TUSB_CFG_DEVICE_STRING_SERIAL) - 1;
+  uint32_t const serial_len = sizeof(CFG_TUSB_DEVICE_STRING_SERIAL) - 1;
   TEST_ASSERT_EQUAL(serial_len*2 + 2, app_tusb_desc_strings.serial.bLength);
   TEST_ASSERT_EQUAL(serial_len*2 + 2, app_tusb_desc_strings.serial.bLength);
   for(uint32_t i=0; i<serial_len; i++)
   for(uint32_t i=0; i<serial_len; i++)
   {
   {
-    TEST_ASSERT_EQUAL(TUSB_CFG_DEVICE_STRING_SERIAL[i], app_tusb_desc_strings.serial.unicode_string[i]);
+    TEST_ASSERT_EQUAL(CFG_TUSB_DEVICE_STRING_SERIAL[i], app_tusb_desc_strings.serial.unicode_string[i]);
   }
   }
 }
 }

+ 1 - 1
tests/lpc18xx_43xx/project.yml

@@ -43,7 +43,7 @@
   #  1) remove the trailing [] from the :common: section
   #  1) remove the trailing [] from the :common: section
   #  2) add entries to the :common: section (e.g. :test: has TEST defined)
   #  2) add entries to the :common: section (e.g. :test: has TEST defined)
   :commmon: &common_defines 
   :commmon: &common_defines 
-    - TUSB_CFG_MCU=MCU_LPC43XX -std=gnu99 
+    - CFG_TUSB_MCU=MCU_LPC43XX -std=gnu99 
 #    - -mx32
 #    - -mx32
     - CORE_M4
     - CORE_M4
     - __CODE_RED
     - __CODE_RED

+ 2 - 2
tests/lpc18xx_43xx/test/host/cdc/descriptor_cdc.c

@@ -42,7 +42,7 @@
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // CDC Serials
 // CDC Serials
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
-TUSB_CFG_ATTR_USBRAM
+CFG_TUSB_ATTR_USBRAM
 const cdc_configuration_desc_t cdc_config_descriptor =
 const cdc_configuration_desc_t cdc_config_descriptor =
 {
 {
     .configuration =
     .configuration =
@@ -168,7 +168,7 @@ const cdc_configuration_desc_t cdc_config_descriptor =
 // CDC RNSID
 // CDC RNSID
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 
 
-TUSB_CFG_ATTR_USBRAM
+CFG_TUSB_ATTR_USBRAM
 const cdc_configuration_desc_t rndis_config_descriptor =
 const cdc_configuration_desc_t rndis_config_descriptor =
 {
 {
     .configuration =
     .configuration =

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

@@ -51,7 +51,7 @@
 #include "descriptor_cdc.h"
 #include "descriptor_cdc.h"
 #include "cdc_host.h"
 #include "cdc_host.h"
 
 
-#if TUSB_CFG_HOST_CDC_RNDIS // TODO enable
+#if CFG_TUSB_HOST_CDC_RNDIS // TODO enable
 #include "cdc_rndis_host.h"
 #include "cdc_rndis_host.h"
 #endif
 #endif
 
 
@@ -63,7 +63,7 @@ static tusb_desc_endpoint_t const * p_endpoint_notification = &cdc_config_descri
 static tusb_desc_endpoint_t const * p_endpoint_out = &cdc_config_descriptor.cdc_endpoint_out;
 static tusb_desc_endpoint_t const * p_endpoint_out = &cdc_config_descriptor.cdc_endpoint_out;
 static tusb_desc_endpoint_t const * p_endpoint_in = &cdc_config_descriptor.cdc_endpoint_in;
 static tusb_desc_endpoint_t const * p_endpoint_in = &cdc_config_descriptor.cdc_endpoint_in;
 
 
-extern cdch_data_t cdch_data[TUSB_CFG_HOST_DEVICE_MAX];
+extern cdch_data_t cdch_data[CFG_TUSB_HOST_DEVICE_MAX];
 static cdch_data_t * p_cdc = &cdch_data[0];
 static cdch_data_t * p_cdc = &cdch_data[0];
 
 
 void setUp(void)
 void setUp(void)
@@ -71,7 +71,7 @@ void setUp(void)
   length = 0;
   length = 0;
   dev_addr = 1;
   dev_addr = 1;
 
 
-  memclr_(cdch_data, sizeof(cdch_data_t)*TUSB_CFG_HOST_DEVICE_MAX);
+  memclr_(cdch_data, sizeof(cdch_data_t)*CFG_TUSB_HOST_DEVICE_MAX);
 }
 }
 
 
 void tearDown(void)
 void tearDown(void)

+ 3 - 3
tests/lpc18xx_43xx/test/host/cdc/test_cdc_rndis_host.c

@@ -72,8 +72,8 @@ static pipe_handle_t pipe_notification = { .dev_addr = 1, .xfer_type = TUSB_XFER
 static pipe_handle_t pipe_out          = { .dev_addr  = 1, .xfer_type = TUSB_XFER_BULK, .index = 0 };
 static pipe_handle_t pipe_out          = { .dev_addr  = 1, .xfer_type = TUSB_XFER_BULK, .index = 0 };
 static pipe_handle_t pipe_in          = { .dev_addr  = 1, .xfer_type = TUSB_XFER_BULK, .index = 1 };
 static pipe_handle_t pipe_in          = { .dev_addr  = 1, .xfer_type = TUSB_XFER_BULK, .index = 1 };
 
 
-extern cdch_data_t cdch_data[TUSB_CFG_HOST_DEVICE_MAX];
-extern rndish_data_t rndish_data[TUSB_CFG_HOST_DEVICE_MAX];
+extern cdch_data_t cdch_data[CFG_TUSB_HOST_DEVICE_MAX];
+extern rndish_data_t rndish_data[CFG_TUSB_HOST_DEVICE_MAX];
 
 
 static cdch_data_t * p_cdc = &cdch_data[0];
 static cdch_data_t * p_cdc = &cdch_data[0];
 static rndish_data_t * p_rndis = &rndish_data[0];
 static rndish_data_t * p_rndis = &rndish_data[0];
@@ -93,7 +93,7 @@ void setUp(void)
   length = 0;
   length = 0;
   dev_addr = 1;
   dev_addr = 1;
 
 
-  for (uint8_t i=0; i<TUSB_CFG_HOST_DEVICE_MAX; i++)
+  for (uint8_t i=0; i<CFG_TUSB_HOST_DEVICE_MAX; i++)
   {
   {
     osal_semaphore_create_ExpectAndReturn( &rndish_data[i].semaphore_notification, &rndish_data[i].semaphore_notification);
     osal_semaphore_create_ExpectAndReturn( &rndish_data[i].semaphore_notification, &rndish_data[i].semaphore_notification);
   }
   }

+ 1 - 1
tests/lpc18xx_43xx/test/host/ehci/test_ehci_init.c

@@ -51,7 +51,7 @@
 #include "mock_osal.h"
 #include "mock_osal.h"
 #include "mock_usbh_hcd.h"
 #include "mock_usbh_hcd.h"
 
 
-usbh_device_info_t usbh_devices[TUSB_CFG_HOST_DEVICE_MAX+1];
+usbh_device_info_t usbh_devices[CFG_TUSB_HOST_DEVICE_MAX+1];
 
 
 static uint8_t hostid;
 static uint8_t hostid;
 
 

+ 1 - 1
tests/lpc18xx_43xx/test/host/ehci/test_ehci_isr.c

@@ -50,7 +50,7 @@
 #include "mock_osal.h"
 #include "mock_osal.h"
 #include "mock_usbh_hcd.h"
 #include "mock_usbh_hcd.h"
 
 
-usbh_device_info_t usbh_devices[TUSB_CFG_HOST_DEVICE_MAX+1];
+usbh_device_info_t usbh_devices[CFG_TUSB_HOST_DEVICE_MAX+1];
 
 
 static uint8_t hostid;
 static uint8_t hostid;
 static ehci_registers_t * regs;
 static ehci_registers_t * regs;

+ 1 - 1
tests/lpc18xx_43xx/test/host/ehci/test_ehci_structure.c

@@ -51,7 +51,7 @@
 #include "mock_osal.h"
 #include "mock_osal.h"
 #include "mock_usbh_hcd.h"
 #include "mock_usbh_hcd.h"
 
 
-usbh_device_info_t usbh_devices[TUSB_CFG_HOST_DEVICE_MAX+1];
+usbh_device_info_t usbh_devices[CFG_TUSB_HOST_DEVICE_MAX+1];
 
 
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // Setup/Teardown + helper declare
 // Setup/Teardown + helper declare

+ 2 - 2
tests/lpc18xx_43xx/test/host/ehci/test_pipe_bulk_open.c

@@ -51,7 +51,7 @@
 #include "ehci_controller_fake.h"
 #include "ehci_controller_fake.h"
 #include "host_helper.h"
 #include "host_helper.h"
 
 
-usbh_device_info_t usbh_devices[TUSB_CFG_HOST_DEVICE_MAX+1];
+usbh_device_info_t usbh_devices[CFG_TUSB_HOST_DEVICE_MAX+1];
 
 
 static uint8_t const hub_addr = 2;
 static uint8_t const hub_addr = 2;
 static uint8_t const hub_port = 2;
 static uint8_t const hub_port = 2;
@@ -70,7 +70,7 @@ void setUp(void)
   dev_addr = 1;
   dev_addr = 1;
   hostid = RANDOM(CONTROLLER_HOST_NUMBER) + TEST_CONTROLLER_HOST_START_INDEX;
   hostid = RANDOM(CONTROLLER_HOST_NUMBER) + TEST_CONTROLLER_HOST_START_INDEX;
 
 
-  memclr_(usbh_devices, sizeof(usbh_device_info_t)*(TUSB_CFG_HOST_DEVICE_MAX+1));
+  memclr_(usbh_devices, sizeof(usbh_device_info_t)*(CFG_TUSB_HOST_DEVICE_MAX+1));
   helper_usbh_device_emulate(dev_addr, hub_addr, hub_port, hostid, TUSB_SPEED_HIGH);
   helper_usbh_device_emulate(dev_addr, hub_addr, hub_port, hostid, TUSB_SPEED_HIGH);
 
 
   async_head =  get_async_head( hostid );
   async_head =  get_async_head( hostid );

+ 2 - 2
tests/lpc18xx_43xx/test/host/ehci/test_pipe_bulk_xfer.c

@@ -51,7 +51,7 @@
 #include "ehci_controller_fake.h"
 #include "ehci_controller_fake.h"
 #include "host_helper.h"
 #include "host_helper.h"
 
 
-usbh_device_info_t usbh_devices[TUSB_CFG_HOST_DEVICE_MAX+1];
+usbh_device_info_t usbh_devices[CFG_TUSB_HOST_DEVICE_MAX+1];
 
 
 static uint8_t hub_addr = 2;
 static uint8_t hub_addr = 2;
 static uint8_t hub_port = 2;
 static uint8_t hub_port = 2;
@@ -91,7 +91,7 @@ void setUp(void)
 {
 {
   ehci_controller_init();
   ehci_controller_init();
   memclr_(xfer_data, sizeof(xfer_data));
   memclr_(xfer_data, sizeof(xfer_data));
-  memclr_(usbh_devices, sizeof(usbh_device_info_t)*(TUSB_CFG_HOST_DEVICE_MAX+1));
+  memclr_(usbh_devices, sizeof(usbh_device_info_t)*(CFG_TUSB_HOST_DEVICE_MAX+1));
 
 
   TEST_ASSERT_STATUS( hcd_init() );
   TEST_ASSERT_STATUS( hcd_init() );
 
 

+ 2 - 2
tests/lpc18xx_43xx/test/host/ehci/test_pipe_control_open.c

@@ -51,7 +51,7 @@
 #include "ehci_controller_fake.h"
 #include "ehci_controller_fake.h"
 #include "host_helper.h"
 #include "host_helper.h"
 
 
-usbh_device_info_t usbh_devices[TUSB_CFG_HOST_DEVICE_MAX+1];
+usbh_device_info_t usbh_devices[CFG_TUSB_HOST_DEVICE_MAX+1];
 
 
 static uint8_t const control_max_packet_size = 64;
 static uint8_t const control_max_packet_size = 64;
 static uint8_t const hub_addr = 2;
 static uint8_t const hub_addr = 2;
@@ -67,7 +67,7 @@ static ehci_qhd_t *p_control_qhd;
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 void setUp(void)
 void setUp(void)
 {
 {
-  memclr_(usbh_devices, sizeof(usbh_device_info_t)*(TUSB_CFG_HOST_DEVICE_MAX+1));
+  memclr_(usbh_devices, sizeof(usbh_device_info_t)*(CFG_TUSB_HOST_DEVICE_MAX+1));
 
 
   TEST_ASSERT_STATUS( hcd_init() );
   TEST_ASSERT_STATUS( hcd_init() );
 
 

+ 2 - 2
tests/lpc18xx_43xx/test/host/ehci/test_pipe_control_xfer.c

@@ -51,7 +51,7 @@
 #include "ehci_controller_fake.h"
 #include "ehci_controller_fake.h"
 #include "host_helper.h"
 #include "host_helper.h"
 
 
-usbh_device_info_t usbh_devices[TUSB_CFG_HOST_DEVICE_MAX+1];
+usbh_device_info_t usbh_devices[CFG_TUSB_HOST_DEVICE_MAX+1];
 
 
 static uint8_t const control_max_packet_size = 64;
 static uint8_t const control_max_packet_size = 64;
 static uint8_t const hub_addr = 2;
 static uint8_t const hub_addr = 2;
@@ -74,7 +74,7 @@ void setUp(void)
 {
 {
   ehci_controller_init();
   ehci_controller_init();
 
 
-  memclr_(usbh_devices, sizeof(usbh_device_info_t)*(TUSB_CFG_HOST_DEVICE_MAX+1));
+  memclr_(usbh_devices, sizeof(usbh_device_info_t)*(CFG_TUSB_HOST_DEVICE_MAX+1));
   memclr_(xfer_data, sizeof(xfer_data));
   memclr_(xfer_data, sizeof(xfer_data));
 
 
   TEST_ASSERT_STATUS( hcd_init() );
   TEST_ASSERT_STATUS( hcd_init() );

+ 2 - 2
tests/lpc18xx_43xx/test/host/ehci/test_pipe_interrupt_open.c

@@ -50,7 +50,7 @@
 #include "ehci_controller_fake.h"
 #include "ehci_controller_fake.h"
 #include "host_helper.h"
 #include "host_helper.h"
 
 
-usbh_device_info_t usbh_devices[TUSB_CFG_HOST_DEVICE_MAX+1];
+usbh_device_info_t usbh_devices[CFG_TUSB_HOST_DEVICE_MAX+1];
 
 
 static uint8_t const hub_addr = 2;
 static uint8_t const hub_addr = 2;
 static uint8_t const hub_port = 2;
 static uint8_t const hub_port = 2;
@@ -67,7 +67,7 @@ static pipe_handle_t pipe_hdl;
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 void setUp(void)
 void setUp(void)
 {
 {
-  memclr_(usbh_devices, sizeof(usbh_device_info_t)*(TUSB_CFG_HOST_DEVICE_MAX+1));
+  memclr_(usbh_devices, sizeof(usbh_device_info_t)*(CFG_TUSB_HOST_DEVICE_MAX+1));
 
 
   hcd_init();
   hcd_init();
 
 

+ 2 - 2
tests/lpc18xx_43xx/test/host/ehci/test_pipe_interrupt_xfer.c

@@ -51,7 +51,7 @@
 #include "ehci_controller_fake.h"
 #include "ehci_controller_fake.h"
 #include "host_helper.h"
 #include "host_helper.h"
 
 
-usbh_device_info_t usbh_devices[TUSB_CFG_HOST_DEVICE_MAX+1];
+usbh_device_info_t usbh_devices[CFG_TUSB_HOST_DEVICE_MAX+1];
 
 
 static uint8_t const hub_addr = 2;
 static uint8_t const hub_addr = 2;
 static uint8_t const hub_port = 2;
 static uint8_t const hub_port = 2;
@@ -91,7 +91,7 @@ void setUp(void)
 {
 {
   ehci_controller_init();
   ehci_controller_init();
 
 
-  memclr_(usbh_devices, sizeof(usbh_device_info_t)*(TUSB_CFG_HOST_DEVICE_MAX+1));
+  memclr_(usbh_devices, sizeof(usbh_device_info_t)*(CFG_TUSB_HOST_DEVICE_MAX+1));
   memclr_(xfer_data, sizeof(xfer_data));
   memclr_(xfer_data, sizeof(xfer_data));
 
 
   TEST_ASSERT_STATUS( hcd_init() );
   TEST_ASSERT_STATUS( hcd_init() );

+ 2 - 2
tests/lpc18xx_43xx/test/host/ehci/test_pipe_isochronous_open.c

@@ -50,7 +50,7 @@
 #include "ehci_controller_fake.h"
 #include "ehci_controller_fake.h"
 #include "host_helper.h"
 #include "host_helper.h"
 
 
-usbh_device_info_t usbh_devices[TUSB_CFG_HOST_DEVICE_MAX+1];
+usbh_device_info_t usbh_devices[CFG_TUSB_HOST_DEVICE_MAX+1];
 
 
 static uint8_t const hub_addr = 2;
 static uint8_t const hub_addr = 2;
 static uint8_t const hub_port = 2;
 static uint8_t const hub_port = 2;
@@ -63,7 +63,7 @@ static ehci_qhd_t *period_head_arr;
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 void setUp(void)
 void setUp(void)
 {
 {
-  memclr_(usbh_devices, sizeof(usbh_device_info_t)*(TUSB_CFG_HOST_DEVICE_MAX+1));
+  memclr_(usbh_devices, sizeof(usbh_device_info_t)*(CFG_TUSB_HOST_DEVICE_MAX+1));
 
 
   hcd_init();
   hcd_init();
 
 

+ 2 - 2
tests/lpc18xx_43xx/test/host/hid/test_hid_host.c

@@ -54,7 +54,7 @@
 uint8_t dev_addr;
 uint8_t dev_addr;
 pipe_handle_t pipe_hdl;
 pipe_handle_t pipe_hdl;
 
 
-extern hidh_interface_info_t keyboardh_data[TUSB_CFG_HOST_DEVICE_MAX];
+extern hidh_interface_info_t keyboardh_data[CFG_TUSB_HOST_DEVICE_MAX];
 
 
 tusb_desc_interface_t const *p_kbd_interface_desc = &desc_configuration.keyboard_interface;
 tusb_desc_interface_t const *p_kbd_interface_desc = &desc_configuration.keyboard_interface;
 tusb_hid_descriptor_hid_t   const *p_kbh_hid_desc       = &desc_configuration.keyboard_hid;
 tusb_hid_descriptor_hid_t   const *p_kbh_hid_desc       = &desc_configuration.keyboard_hid;
@@ -62,7 +62,7 @@ tusb_desc_endpoint_t  const *p_kdb_endpoint_desc  = &desc_configuration.keyboard
 
 
 void setUp(void)
 void setUp(void)
 {
 {
-  dev_addr = RANDOM(TUSB_CFG_HOST_DEVICE_MAX)+1;
+  dev_addr = RANDOM(CFG_TUSB_HOST_DEVICE_MAX)+1;
   pipe_hdl = (pipe_handle_t) {.dev_addr = dev_addr, .xfer_type = TUSB_XFER_INTERRUPT, .index = 2};
   pipe_hdl = (pipe_handle_t) {.dev_addr = dev_addr, .xfer_type = TUSB_XFER_INTERRUPT, .index = 2};
 }
 }
 
 

+ 3 - 3
tests/lpc18xx_43xx/test/host/hid/test_hidh_generic.c

@@ -54,7 +54,7 @@
 #include "host_helper.h"
 #include "host_helper.h"
 
 
 
 
-extern hidh_interface_info_t mouseh_data[TUSB_CFG_HOST_DEVICE_MAX];
+extern hidh_interface_info_t mouseh_data[CFG_TUSB_HOST_DEVICE_MAX];
 hidh_interface_info_t *p_hidh_mouse;
 hidh_interface_info_t *p_hidh_mouse;
 hid_mouse_report_t report;
 hid_mouse_report_t report;
 
 
@@ -68,7 +68,7 @@ void setUp(void)
   helper_usbh_init_expect();
   helper_usbh_init_expect();
   usbh_init();
   usbh_init();
 
 
-  dev_addr = RANDOM(TUSB_CFG_HOST_DEVICE_MAX)+1;
+  dev_addr = RANDOM(CFG_TUSB_HOST_DEVICE_MAX)+1;
 
 
 //  uint16_t length;
 //  uint16_t length;
 //  TEST_ASSERT_STATUS( hidh_open_subtask(dev_addr, p_mouse_interface_desc, &length) );
 //  TEST_ASSERT_STATUS( hidh_open_subtask(dev_addr, p_mouse_interface_desc, &length) );
@@ -92,5 +92,5 @@ void tearDown(void)
 //{
 //{
 //  hidh_init();
 //  hidh_init();
 //
 //
-//  TEST_ASSERT_MEM_ZERO(mouse_data, sizeof(hidh_interface_info_t)*TUSB_CFG_HOST_DEVICE_MAX);
+//  TEST_ASSERT_MEM_ZERO(mouse_data, sizeof(hidh_interface_info_t)*CFG_TUSB_HOST_DEVICE_MAX);
 //}
 //}

+ 3 - 3
tests/lpc18xx_43xx/test/host/hid/test_hidh_keyboard.c

@@ -48,7 +48,7 @@
 #include "mock_hidh_callback.h"
 #include "mock_hidh_callback.h"
 #include "descriptor_test.h"
 #include "descriptor_test.h"
 
 
-extern hidh_interface_info_t keyboardh_data[TUSB_CFG_HOST_DEVICE_MAX];
+extern hidh_interface_info_t keyboardh_data[CFG_TUSB_HOST_DEVICE_MAX];
 
 
 hid_keyboard_report_t sample_key[2] =
 hid_keyboard_report_t sample_key[2] =
 {
 {
@@ -74,7 +74,7 @@ void setUp(void)
 {
 {
   hidh_init();
   hidh_init();
   memclr_(&report, sizeof(hid_keyboard_report_t));
   memclr_(&report, sizeof(hid_keyboard_report_t));
-  dev_addr = RANDOM(TUSB_CFG_HOST_DEVICE_MAX)+1;
+  dev_addr = RANDOM(CFG_TUSB_HOST_DEVICE_MAX)+1;
 
 
   p_hidh_kbd = &keyboardh_data[dev_addr-1];
   p_hidh_kbd = &keyboardh_data[dev_addr-1];
 
 
@@ -95,7 +95,7 @@ void test_keyboard_init(void)
 {
 {
   hidh_init();
   hidh_init();
 
 
-  TEST_ASSERT_MEM_ZERO(keyboardh_data, sizeof(hidh_interface_info_t)*TUSB_CFG_HOST_DEVICE_MAX);
+  TEST_ASSERT_MEM_ZERO(keyboardh_data, sizeof(hidh_interface_info_t)*CFG_TUSB_HOST_DEVICE_MAX);
 }
 }
 
 
 //------------- is supported -------------//
 //------------- is supported -------------//

+ 3 - 3
tests/lpc18xx_43xx/test/host/hid/test_hidh_mouse.c

@@ -49,7 +49,7 @@
 #include "mock_hidh_callback.h"
 #include "mock_hidh_callback.h"
 #include "descriptor_test.h"
 #include "descriptor_test.h"
 
 
-extern hidh_interface_info_t mouseh_data[TUSB_CFG_HOST_DEVICE_MAX];
+extern hidh_interface_info_t mouseh_data[CFG_TUSB_HOST_DEVICE_MAX];
 hidh_interface_info_t *p_hidh_mouse;
 hidh_interface_info_t *p_hidh_mouse;
 hid_mouse_report_t report;
 hid_mouse_report_t report;
 
 
@@ -63,7 +63,7 @@ void setUp(void)
   hidh_init();
   hidh_init();
 
 
   memclr_(&report, sizeof(hid_mouse_report_t));
   memclr_(&report, sizeof(hid_mouse_report_t));
-  dev_addr = RANDOM(TUSB_CFG_HOST_DEVICE_MAX)+1;
+  dev_addr = RANDOM(CFG_TUSB_HOST_DEVICE_MAX)+1;
 
 
   p_hidh_mouse = &mouseh_data[dev_addr-1];
   p_hidh_mouse = &mouseh_data[dev_addr-1];
 
 
@@ -84,7 +84,7 @@ void test_mouse_init(void)
 {
 {
   hidh_init();
   hidh_init();
 
 
-  TEST_ASSERT_MEM_ZERO(mouseh_data, sizeof(hidh_interface_info_t)*TUSB_CFG_HOST_DEVICE_MAX);
+  TEST_ASSERT_MEM_ZERO(mouseh_data, sizeof(hidh_interface_info_t)*CFG_TUSB_HOST_DEVICE_MAX);
 }
 }
 
 
 //------------- is supported -------------//
 //------------- is supported -------------//

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

@@ -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 TUSB_CFG_HOST_CDC
+#if CFG_TUSB_HOST_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 TUSB_CFG_HOST_MSC
+#if CFG_TUSB_HOST_MSC
   msch_init_Expect();
   msch_init_Expect();
 #endif
 #endif
 
 

+ 1 - 1
tests/lpc18xx_43xx/test/host/integration/test_hidh_keyboard_integrate.c

@@ -56,7 +56,7 @@
 //
 //
 void setUp(void)
 void setUp(void)
 {
 {
-//  dev_addr = RANDOM(TUSB_CFG_HOST_DEVICE_MAX)+1;
+//  dev_addr = RANDOM(CFG_TUSB_HOST_DEVICE_MAX)+1;
 //  hostid = RANDOM(CONTROLLER_HOST_NUMBER) + TEST_CONTROLLER_HOST_START_INDEX;
 //  hostid = RANDOM(CONTROLLER_HOST_NUMBER) + TEST_CONTROLLER_HOST_START_INDEX;
 //
 //
 ////  ehci_controller_init();
 ////  ehci_controller_init();

+ 3 - 3
tests/lpc18xx_43xx/test/host/msc/test_msc_host.c

@@ -51,7 +51,7 @@
 #include "mock_msch_callback.h"
 #include "mock_msch_callback.h"
 #include "msc_host.h"
 #include "msc_host.h"
 
 
-extern msch_interface_t msch_data[TUSB_CFG_HOST_DEVICE_MAX];
+extern msch_interface_t msch_data[CFG_TUSB_HOST_DEVICE_MAX];
 
 
 static tusb_desc_interface_t const *p_msc_interface_desc = &desc_configuration.msc_interface;
 static tusb_desc_interface_t const *p_msc_interface_desc = &desc_configuration.msc_interface;
 static tusb_desc_endpoint_t const *p_edp_in  = &desc_configuration.msc_endpoint_in;
 static tusb_desc_endpoint_t const *p_edp_in  = &desc_configuration.msc_endpoint_in;
@@ -66,11 +66,11 @@ static uint16_t length;
 
 
 void setUp(void)
 void setUp(void)
 {
 {
-  dev_addr = RANDOM(TUSB_CFG_HOST_DEVICE_MAX)+1;
+  dev_addr = RANDOM(CFG_TUSB_HOST_DEVICE_MAX)+1;
 
 
   osal_semaphore_create_IgnoreAndReturn( (osal_semaphore_handle_t) 0x1234);
   osal_semaphore_create_IgnoreAndReturn( (osal_semaphore_handle_t) 0x1234);
   msch_init();
   msch_init();
-  TEST_ASSERT_MEM_ZERO(msch_data, sizeof(msch_interface_t)*TUSB_CFG_HOST_DEVICE_MAX);
+  TEST_ASSERT_MEM_ZERO(msch_data, sizeof(msch_interface_t)*CFG_TUSB_HOST_DEVICE_MAX);
 
 
   p_msc = &msch_data[dev_addr-1];
   p_msc = &msch_data[dev_addr-1];
   pipe_in  = (pipe_handle_t) {.dev_addr = dev_addr, .xfer_type = TUSB_XFER_BULK, .index = 1};
   pipe_in  = (pipe_handle_t) {.dev_addr = dev_addr, .xfer_type = TUSB_XFER_BULK, .index = 1};

+ 4 - 4
tests/lpc18xx_43xx/test/host/usbh/test_enum_task.c

@@ -51,8 +51,8 @@
 #include "mock_cdc_host.h"
 #include "mock_cdc_host.h"
 #include "mock_msc_host.h"
 #include "mock_msc_host.h"
 
 
-extern usbh_device_info_t usbh_devices[TUSB_CFG_HOST_DEVICE_MAX+1];
-extern uint8_t enum_data_buffer[TUSB_CFG_HOST_ENUM_BUFFER_SIZE];
+extern usbh_device_info_t usbh_devices[CFG_TUSB_HOST_DEVICE_MAX+1];
+extern uint8_t enum_data_buffer[CFG_TUSB_HOST_ENUM_BUFFER_SIZE];
 
 
 usbh_enumerate_t const enum_connect = {
 usbh_enumerate_t const enum_connect = {
     .core_id  = 0,
     .core_id  = 0,
@@ -73,7 +73,7 @@ enum {
 
 
 void setUp(void)
 void setUp(void)
 {
 {
-  memclr_(usbh_devices, sizeof(usbh_device_info_t)*(TUSB_CFG_HOST_DEVICE_MAX+1));
+  memclr_(usbh_devices, sizeof(usbh_device_info_t)*(CFG_TUSB_HOST_DEVICE_MAX+1));
 
 
   osal_queue_receive_StubWithCallback(queue_recv_stub);
   osal_queue_receive_StubWithCallback(queue_recv_stub);
   osal_semaphore_wait_StubWithCallback(semaphore_wait_success_stub);
   osal_semaphore_wait_StubWithCallback(semaphore_wait_success_stub);
@@ -164,7 +164,7 @@ tusb_error_t control_xfer_stub(uint8_t dev_addr, const tusb_control_request_t *
     case 4: // get full-length configuration descriptor
     case 4: // get full-length configuration descriptor
       TEST_ASSERT_EQUAL(TUSB_REQ_GET_DESCRIPTOR, p_request->bRequest);
       TEST_ASSERT_EQUAL(TUSB_REQ_GET_DESCRIPTOR, p_request->bRequest);
       TEST_ASSERT_EQUAL(TUSB_DESC_TYPE_CONFIGURATION, p_request->wValue >> 8);
       TEST_ASSERT_EQUAL(TUSB_DESC_TYPE_CONFIGURATION, p_request->wValue >> 8);
-      TEST_ASSERT_EQUAL(TUSB_CFG_HOST_ENUM_BUFFER_SIZE, p_request->wLength);
+      TEST_ASSERT_EQUAL(CFG_TUSB_HOST_ENUM_BUFFER_SIZE, p_request->wLength);
       memcpy(data, &desc_configuration, p_request->wLength);
       memcpy(data, &desc_configuration, p_request->wLength);
     break;
     break;
 
 

+ 3 - 3
tests/lpc18xx_43xx/test/host/usbh/test_usbh.c

@@ -56,7 +56,7 @@
 uint8_t dev_addr;
 uint8_t dev_addr;
 void setUp(void)
 void setUp(void)
 {
 {
-  dev_addr = RANDOM(TUSB_CFG_HOST_DEVICE_MAX)+1;
+  dev_addr = RANDOM(CFG_TUSB_HOST_DEVICE_MAX)+1;
 }
 }
 
 
 void tearDown(void)
 void tearDown(void)
@@ -70,7 +70,7 @@ void test_usbh_status_get_fail(void)
 {
 {
   usbh_devices[dev_addr].state = 0;
   usbh_devices[dev_addr].state = 0;
 
 
-  TEST_ASSERT_EQUAL( TUSB_DEVICE_STATE_INVALID_PARAMETER, tusbh_device_get_state(TUSB_CFG_HOST_DEVICE_MAX+1) );
+  TEST_ASSERT_EQUAL( TUSB_DEVICE_STATE_INVALID_PARAMETER, tusbh_device_get_state(CFG_TUSB_HOST_DEVICE_MAX+1) );
   TEST_ASSERT_EQUAL( TUSB_DEVICE_STATE_UNPLUG, tusbh_device_get_state(dev_addr) );
   TEST_ASSERT_EQUAL( TUSB_DEVICE_STATE_UNPLUG, tusbh_device_get_state(dev_addr) );
 }
 }
 
 
@@ -134,7 +134,7 @@ void test_usbh_init_ok(void)
   //------------- code under test -------------//
   //------------- code under test -------------//
   TEST_ASSERT_EQUAL(TUSB_ERROR_NONE, usbh_init());
   TEST_ASSERT_EQUAL(TUSB_ERROR_NONE, usbh_init());
 
 
-  for (uint8_t i=0; i<TUSB_CFG_HOST_DEVICE_MAX+1; i++)
+  for (uint8_t i=0; i<CFG_TUSB_HOST_DEVICE_MAX+1; i++)
   {
   {
     TEST_ASSERT_NOT_NULL(usbh_devices[i].control.sem_hdl);
     TEST_ASSERT_NOT_NULL(usbh_devices[i].control.sem_hdl);
   }
   }

+ 9 - 9
tests/lpc18xx_43xx/test/test_osal_none.c

@@ -36,8 +36,8 @@
 */
 */
 /**************************************************************************/
 /**************************************************************************/
 
 
-#ifdef TUSB_CFG_OS
-#undef TUSB_CFG_OS
+#ifdef CFG_TUSB_OS
+#undef CFG_TUSB_OS
 #endif
 #endif
 
 
 void setUp(void)
 void setUp(void)
@@ -180,7 +180,7 @@ void test_task_with_semaphore(void)
   TEST_ASSERT_EQUAL(1, statements[3]);
   TEST_ASSERT_EQUAL(1, statements[3]);
 
 
   // timeout
   // timeout
-  for(uint32_t i=0; i<(OSAL_TIMEOUT_NORMAL*TUSB_CFG_OS_TICKS_PER_SECOND)/1000 - 1  ; i++) // not enough time
+  for(uint32_t i=0; i<(OSAL_TIMEOUT_NORMAL*CFG_TUSB_OS_TICKS_PER_SECOND)/1000 - 1  ; i++) // not enough time
     osal_tick_tock();
     osal_tick_tock();
   sample_task_semaphore();
   sample_task_semaphore();
   TEST_ASSERT_EQUAL(0, statements[4]);
   TEST_ASSERT_EQUAL(0, statements[4]);
@@ -251,7 +251,7 @@ void test_task_with_mutex(void)
   TEST_ASSERT_EQUAL(0, statements[5]);
   TEST_ASSERT_EQUAL(0, statements[5]);
 
 
   // timeout
   // timeout
-  for(uint32_t i=0; i<(OSAL_TIMEOUT_NORMAL*TUSB_CFG_OS_TICKS_PER_SECOND)/1000 - 1 ; i++){ // one tick less
+  for(uint32_t i=0; i<(OSAL_TIMEOUT_NORMAL*CFG_TUSB_OS_TICKS_PER_SECOND)/1000 - 1 ; i++){ // one tick less
     osal_tick_tock();
     osal_tick_tock();
   }
   }
   mutex_sample_task2();
   mutex_sample_task2();
@@ -321,7 +321,7 @@ void test_task_with_queue(void)
   TEST_ASSERT_EQUAL(1, statements[3]);
   TEST_ASSERT_EQUAL(1, statements[3]);
 
 
   // timeout
   // timeout
-  for(uint32_t i=0; i<(OSAL_TIMEOUT_NORMAL*TUSB_CFG_OS_TICKS_PER_SECOND)/1000 - 1 ; i++) // not enough time
+  for(uint32_t i=0; i<(OSAL_TIMEOUT_NORMAL*CFG_TUSB_OS_TICKS_PER_SECOND)/1000 - 1 ; i++) // not enough time
     osal_tick_tock();
     osal_tick_tock();
   sample_task_with_queue();
   sample_task_with_queue();
   TEST_ASSERT_EQUAL(0, statements[4]);
   TEST_ASSERT_EQUAL(0, statements[4]);
@@ -354,7 +354,7 @@ void test_task_with_delay(void)
   sample_task_with_delay();
   sample_task_with_delay();
   TEST_ASSERT_EQUAL(0, statements[0]);
   TEST_ASSERT_EQUAL(0, statements[0]);
 
 
-  for(uint32_t i=0; i<TUSB_CFG_OS_TICKS_PER_SECOND*1000; i++) // not enough time
+  for(uint32_t i=0; i<CFG_TUSB_OS_TICKS_PER_SECOND*1000; i++) // not enough time
     osal_tick_tock();
     osal_tick_tock();
 
 
   sample_task_with_delay();
   sample_task_with_delay();
@@ -413,7 +413,7 @@ tusb_error_t sample_task_flow_control(void)
 void test_task_flow_control_assert(void)
 void test_task_flow_control_assert(void)
 {
 {
   sample_task_flow_control();
   sample_task_flow_control();
-  for(uint32_t i=0; i<(OSAL_TIMEOUT_NORMAL*TUSB_CFG_OS_TICKS_PER_SECOND)/1000 + 1; i++) osal_tick_tock();
+  for(uint32_t i=0; i<(OSAL_TIMEOUT_NORMAL*CFG_TUSB_OS_TICKS_PER_SECOND)/1000 + 1; i++) osal_tick_tock();
   sample_task_flow_control();
   sample_task_flow_control();
   TEST_ASSERT_EQUAL(0, statements[1]);
   TEST_ASSERT_EQUAL(0, statements[1]);
 }
 }
@@ -424,7 +424,7 @@ void test_task_flow_control_assert_status(void)
 
 
   sample_task_flow_control();
   sample_task_flow_control();
 
 
-  for(uint32_t i=0; i<(OSAL_TIMEOUT_NORMAL*TUSB_CFG_OS_TICKS_PER_SECOND)/1000 + 1; i++) osal_tick_tock();
+  for(uint32_t i=0; i<(OSAL_TIMEOUT_NORMAL*CFG_TUSB_OS_TICKS_PER_SECOND)/1000 + 1; i++) osal_tick_tock();
   sample_task_flow_control();
   sample_task_flow_control();
 
 
   TEST_ASSERT_EQUAL(0, statements[2]);
   TEST_ASSERT_EQUAL(0, statements[2]);
@@ -436,7 +436,7 @@ void test_task_flow_control_assert_status_hanlder(void)
 
 
   sample_task_flow_control();
   sample_task_flow_control();
 
 
-  for(uint32_t i=0; i<(OSAL_TIMEOUT_NORMAL*TUSB_CFG_OS_TICKS_PER_SECOND)/1000 + 1; i++) osal_tick_tock();
+  for(uint32_t i=0; i<(OSAL_TIMEOUT_NORMAL*CFG_TUSB_OS_TICKS_PER_SECOND)/1000 + 1; i++) osal_tick_tock();
   sample_task_flow_control();
   sample_task_flow_control();
 
 
   TEST_ASSERT_EQUAL(0, statements[3]);
   TEST_ASSERT_EQUAL(0, statements[3]);

+ 4 - 4
tests/support/descriptor_test.c

@@ -39,7 +39,7 @@
 #include "tusb_option.h"
 #include "tusb_option.h"
 #include "descriptor_test.h"
 #include "descriptor_test.h"
 
 
-TUSB_CFG_ATTR_USBRAM ATTR_ALIGNED(4)
+CFG_TUSB_ATTR_USBRAM ATTR_ALIGNED(4)
 const uint8_t keyboard_report_descriptor[] = {
 const uint8_t keyboard_report_descriptor[] = {
   HID_USAGE_PAGE ( HID_USAGE_PAGE_DESKTOP     ),
   HID_USAGE_PAGE ( HID_USAGE_PAGE_DESKTOP     ),
   HID_USAGE      ( HID_USAGE_DESKTOP_KEYBOARD ),
   HID_USAGE      ( HID_USAGE_DESKTOP_KEYBOARD ),
@@ -81,7 +81,7 @@ const uint8_t keyboard_report_descriptor[] = {
   HID_COLLECTION_END
   HID_COLLECTION_END
 };
 };
 
 
-TUSB_CFG_ATTR_USBRAM ATTR_ALIGNED(4)
+CFG_TUSB_ATTR_USBRAM ATTR_ALIGNED(4)
 const uint8_t mouse_report_descriptor[] = {
 const uint8_t mouse_report_descriptor[] = {
   HID_USAGE_PAGE ( HID_USAGE_PAGE_DESKTOP     ),
   HID_USAGE_PAGE ( HID_USAGE_PAGE_DESKTOP     ),
   HID_USAGE      ( HID_USAGE_DESKTOP_MOUSE    ),
   HID_USAGE      ( HID_USAGE_DESKTOP_MOUSE    ),
@@ -118,7 +118,7 @@ const uint8_t mouse_report_descriptor[] = {
 };
 };
 
 
 
 
-TUSB_CFG_ATTR_USBRAM ATTR_ALIGNED(4)
+CFG_TUSB_ATTR_USBRAM ATTR_ALIGNED(4)
 tusb_desc_device_t const desc_device =
 tusb_desc_device_t const desc_device =
 {
 {
     .bLength            = sizeof(tusb_desc_device_t),
     .bLength            = sizeof(tusb_desc_device_t),
@@ -142,7 +142,7 @@ tusb_desc_device_t const desc_device =
 } ;
 } ;
 
 
 
 
-TUSB_CFG_ATTR_USBRAM ATTR_ALIGNED(4)
+CFG_TUSB_ATTR_USBRAM ATTR_ALIGNED(4)
 const app_configuration_desc_t desc_configuration =
 const app_configuration_desc_t desc_configuration =
 {
 {
     .configuration =
     .configuration =

+ 1 - 1
tests/support/descriptor_test.h

@@ -69,7 +69,7 @@ typedef struct
   tusb_desc_interface_assoc_t     CDC_IAD;
   tusb_desc_interface_assoc_t     CDC_IAD;
 #endif
 #endif
 
 
-#if 0 //&& TUSB_CFG_DEVICE_CDC
+#if 0 //&& CFG_TUSB_DEVICE_CDC
   //CDC - Serial
   //CDC - Serial
   //CDC Control Interface
   //CDC Control Interface
   tusb_desc_interface_t                 CDC_CCI_Interface;
   tusb_desc_interface_t                 CDC_CCI_Interface;

+ 1 - 1
tests/support/ehci_controller_fake.c

@@ -54,7 +54,7 @@
 LPC_USB0_Type lpc_usb0;
 LPC_USB0_Type lpc_usb0;
 LPC_USB1_Type lpc_usb1;
 LPC_USB1_Type lpc_usb1;
 
 
-extern usbh_device_info_t usbh_devices[TUSB_CFG_HOST_DEVICE_MAX+1];
+extern usbh_device_info_t usbh_devices[CFG_TUSB_HOST_DEVICE_MAX+1];
 
 
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // IMPLEMENTATION
 // IMPLEMENTATION

+ 21 - 21
tests/support/tusb_config.h

@@ -46,49 +46,49 @@
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // CONTROLLER CONFIGURATION
 // CONTROLLER CONFIGURATION
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
-#define TUSB_CFG_CONTROLLER_0_MODE  (TUSB_MODE_HOST | TUSB_MODE_DEVICE)
-#define TUSB_CFG_CONTROLLER_1_MODE  (TUSB_MODE_NONE)
+#define CFG_TUSB_CONTROLLER_0_MODE  (TUSB_MODE_HOST | TUSB_MODE_DEVICE)
+#define CFG_TUSB_CONTROLLER_1_MODE  (TUSB_MODE_NONE)
 
 
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // HOST CONFIGURATION
 // HOST CONFIGURATION
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
-#define TUSB_CFG_HOST_DEVICE_MAX                5 // TODO be a part of HUB config
+#define CFG_TUSB_HOST_DEVICE_MAX                5 // TODO be a part of HUB config
 
 
 //------------- CLASS -------------//
 //------------- CLASS -------------//
-#define TUSB_CFG_HOST_HUB                        0
-#define TUSB_CFG_HOST_HID_KEYBOARD               1
-#define TUSB_CFG_HOST_HID_MOUSE                  1
-#define TUSB_CFG_HOST_HID_GENERIC                0
-#define TUSB_CFG_HOST_MSC                        1
-#define TUSB_CFG_HOST_CDC                        1
-#define TUSB_CFG_HOST_CDC_RNDIS                  0
+#define CFG_TUSB_HOST_HUB                        0
+#define CFG_TUSB_HOST_HID_KEYBOARD               1
+#define CFG_TUSB_HOST_HID_MOUSE                  1
+#define CFG_TUSB_HOST_HID_GENERIC                0
+#define CFG_TUSB_HOST_MSC                        1
+#define CFG_TUSB_HOST_CDC                        1
+#define CFG_TUSB_HOST_CDC_RNDIS                  0
 
 
 // Test support
 // Test support
 #define TEST_CONTROLLER_HOST_START_INDEX \
 #define TEST_CONTROLLER_HOST_START_INDEX \
- ( ((CONTROLLER_HOST_NUMBER == 1) && (TUSB_CFG_CONTROLLER_1_MODE & TUSB_MODE_HOST)) ? 1 : 0)
+ ( ((CONTROLLER_HOST_NUMBER == 1) && (CFG_TUSB_CONTROLLER_1_MODE & TUSB_MODE_HOST)) ? 1 : 0)
 
 
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // DEVICE CONFIGURATION
 // DEVICE CONFIGURATION
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
-#define TUSB_CFG_DEVICE_CONTROL_ENDOINT_SIZE   64
+#define CFG_TUSB_DEVICE_CONTROL_ENDOINT_SIZE   64
 
 
 //------------- CLASS -------------//
 //------------- CLASS -------------//
-#define TUSB_CFG_DEVICE_HID_KEYBOARD  1
-#define TUSB_CFG_DEVICE_HID_MOUSE     1
-#define TUSB_CFG_DEVICE_HID_GENERIC   0
-#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
+#define CFG_TUSB_DEVICE_MSC           1
+#define CFG_TUSB_DEVICE_CDC           1
 
 
 
 
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // COMMON CONFIGURATION
 // COMMON CONFIGURATION
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 
 
-#define TUSB_CFG_DEBUG 3
+#define CFG_TUSB_DEBUG 3
 
 
-#define TUSB_CFG_OS TUSB_OS_NONE
-#define TUSB_CFG_TICKS_HZ 1000 // 1 ms tick
-#define TUSB_CFG_ATTR_USBRAM
+#define CFG_TUSB_OS TUSB_OS_NONE
+#define CFG_TUSB_TICKS_HZ 1000 // 1 ms tick
+#define CFG_TUSB_ATTR_USBRAM
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
  }
  }

+ 5 - 5
tinyusb.Doxyfile

@@ -2010,13 +2010,13 @@ INCLUDE_FILE_PATTERNS  =
 # recursively expanded use the := operator instead of the = operator.
 # recursively expanded use the := operator instead of the = operator.
 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
 
 
-PREDEFINED             = TUSB_CFG_CONTROLLER_0_MODE=TUSB_MODE_HOST \
-                         TUSB_CFG_CONTROLLER_1_MODE=TUSB_MODE_NONE \
-                         TUSB_CFG_HOST_HID_KEYBOARD=1 \
+PREDEFINED             = CFG_TUSB_CONTROLLER_0_MODE=TUSB_MODE_HOST \
+                         CFG_TUSB_CONTROLLER_1_MODE=TUSB_MODE_NONE \
+                         CFG_TUSB_HOST_HID_KEYBOARD=1 \
                          ATTR_PACKED_STRUCT(x)=x \
                          ATTR_PACKED_STRUCT(x)=x \
-                         TUSB_CFG_HOST_CDC_RNDIS=1 \
+                         CFG_TUSB_HOST_CDC_RNDIS=1 \
                          ATTR_ALIGNED(x)= \
                          ATTR_ALIGNED(x)= \
-                         TUSB_CFG_OS=TUSB_OS_NONE
+                         CFG_TUSB_OS=TUSB_OS_NONE
 
 
 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
 # tag can be used to specify a list of macro names that should be expanded. The
 # tag can be used to specify a list of macro names that should be expanded. The

+ 4 - 4
tinyusb/class/cdc/cdc_device.c

@@ -38,7 +38,7 @@
 
 
 #include "tusb_option.h"
 #include "tusb_option.h"
 
 
-#if (MODE_DEVICE_SUPPORTED && TUSB_CFG_DEVICE_CDC)
+#if (MODE_DEVICE_SUPPORTED && CFG_TUSB_DEVICE_CDC)
 
 
 #define _TINY_USB_SOURCE_FILE_
 #define _TINY_USB_SOURCE_FILE_
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
@@ -51,7 +51,7 @@
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // MACRO CONSTANT TYPEDEF
 // MACRO CONSTANT TYPEDEF
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
-TUSB_CFG_ATTR_USBRAM STATIC_VAR cdc_line_coding_t cdcd_line_coding[CONTROLLER_DEVICE_NUMBER];
+CFG_TUSB_ATTR_USBRAM STATIC_VAR cdc_line_coding_t cdcd_line_coding[CONTROLLER_DEVICE_NUMBER];
 
 
 typedef struct {
 typedef struct {
   uint8_t interface_number;
   uint8_t interface_number;
@@ -66,8 +66,8 @@ typedef struct {
 }cdcd_data_t;
 }cdcd_data_t;
 
 
 // TODO multiple rhport
 // TODO multiple rhport
-TUSB_CFG_ATTR_USBRAM ATTR_ALIGNED(4) uint8_t _tmp_rx_buf[64];
-TUSB_CFG_ATTR_USBRAM ATTR_ALIGNED(4) uint8_t _tmp_tx_buf[64];
+CFG_TUSB_ATTR_USBRAM ATTR_ALIGNED(4) uint8_t _tmp_rx_buf[64];
+CFG_TUSB_ATTR_USBRAM ATTR_ALIGNED(4) uint8_t _tmp_tx_buf[64];
 
 
 #define CFG_TUD_CDC_BUFSIZE   128
 #define CFG_TUD_CDC_BUFSIZE   128
 
 

+ 3 - 3
tinyusb/class/cdc/cdc_host.c

@@ -38,7 +38,7 @@
 
 
 #include "tusb_option.h"
 #include "tusb_option.h"
 
 
-#if (MODE_HOST_SUPPORTED && TUSB_CFG_HOST_CDC)
+#if (MODE_HOST_SUPPORTED && CFG_TUSB_HOST_CDC)
 
 
 #define _TINY_USB_SOURCE_FILE_
 #define _TINY_USB_SOURCE_FILE_
 
 
@@ -55,7 +55,7 @@
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // INTERNAL OBJECT & FUNCTION DECLARATION
 // INTERNAL OBJECT & FUNCTION DECLARATION
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
-STATIC_VAR cdch_data_t cdch_data[TUSB_CFG_HOST_DEVICE_MAX]; // TODO to be static
+STATIC_VAR cdch_data_t cdch_data[CFG_TUSB_HOST_DEVICE_MAX]; // TODO to be static
 
 
 static inline cdc_pipeid_t get_app_pipeid(pipe_handle_t pipe_hdl)
 static inline cdc_pipeid_t get_app_pipeid(pipe_handle_t pipe_hdl)
 {
 {
@@ -139,7 +139,7 @@ tusb_error_t tuh_cdc_receive(uint8_t dev_addr, void * p_buffer, uint32_t length,
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 void cdch_init(void)
 void cdch_init(void)
 {
 {
-  memclr_(cdch_data, sizeof(cdch_data_t)*TUSB_CFG_HOST_DEVICE_MAX);
+  memclr_(cdch_data, sizeof(cdch_data_t)*CFG_TUSB_HOST_DEVICE_MAX);
 }
 }
 
 
 tusb_error_t cdch_open_subtask(uint8_t dev_addr, tusb_desc_interface_t const *p_interface_desc, uint16_t *p_length)
 tusb_error_t cdch_open_subtask(uint8_t dev_addr, tusb_desc_interface_t const *p_interface_desc, uint16_t *p_length)

+ 5 - 5
tinyusb/class/cdc/cdc_host.h

@@ -77,27 +77,27 @@ bool tuh_cdc_is_busy(uint8_t dev_addr, cdc_pipeid_t pipeid)  ATTR_PURE ATTR_WARN
 
 
 /** \brief 			Perform USB OUT transfer to device
 /** \brief 			Perform USB OUT transfer to device
  * \param[in]		dev_addr	device address
  * \param[in]		dev_addr	device address
- * \param[in]	  p_data    Buffer containing data. Must be accessible by USB controller (see \ref TUSB_CFG_ATTR_USBRAM)
+ * \param[in]	  p_data    Buffer containing data. Must be accessible by USB controller (see \ref CFG_TUSB_ATTR_USBRAM)
  * \param[in]		length    Number of bytes to be transferred via USB bus
  * \param[in]		length    Number of bytes to be transferred via USB bus
  * \retval      TUSB_ERROR_NONE on success
  * \retval      TUSB_ERROR_NONE on success
  * \retval      TUSB_ERROR_INTERFACE_IS_BUSY if the interface is already transferring data with device
  * \retval      TUSB_ERROR_INTERFACE_IS_BUSY if the interface is already transferring data with device
  * \retval      TUSB_ERROR_DEVICE_NOT_READY if device is not yet configured (by SET CONFIGURED request)
  * \retval      TUSB_ERROR_DEVICE_NOT_READY if device is not yet configured (by SET CONFIGURED request)
  * \retval      TUSB_ERROR_INVALID_PARA if input parameters are not correct
  * \retval      TUSB_ERROR_INVALID_PARA if input parameters are not correct
  * \note        This function is non-blocking and returns immediately. The result of USB transfer will be reported by the
  * \note        This function is non-blocking and returns immediately. The result of USB transfer will be reported by the
- *              interface's callback function. \a p_data must be declared with \ref TUSB_CFG_ATTR_USBRAM.
+ *              interface's callback function. \a p_data must be declared with \ref CFG_TUSB_ATTR_USBRAM.
  */
  */
 tusb_error_t tuh_cdc_send(uint8_t dev_addr, void const * p_data, uint32_t length, bool is_notify);
 tusb_error_t tuh_cdc_send(uint8_t dev_addr, void const * p_data, uint32_t length, bool is_notify);
 
 
 /** \brief 			Perform USB IN transfer to get data from device
 /** \brief 			Perform USB IN transfer to get data from device
  * \param[in]		dev_addr	device address
  * \param[in]		dev_addr	device address
- * \param[in]	  p_buffer  Buffer containing received data. Must be accessible by USB controller (see \ref TUSB_CFG_ATTR_USBRAM)
+ * \param[in]	  p_buffer  Buffer containing received data. Must be accessible by USB controller (see \ref CFG_TUSB_ATTR_USBRAM)
  * \param[in]		length    Number of bytes to be transferred via USB bus
  * \param[in]		length    Number of bytes to be transferred via USB bus
  * \retval      TUSB_ERROR_NONE on success
  * \retval      TUSB_ERROR_NONE on success
  * \retval      TUSB_ERROR_INTERFACE_IS_BUSY if the interface is already transferring data with device
  * \retval      TUSB_ERROR_INTERFACE_IS_BUSY if the interface is already transferring data with device
  * \retval      TUSB_ERROR_DEVICE_NOT_READY if device is not yet configured (by SET CONFIGURED request)
  * \retval      TUSB_ERROR_DEVICE_NOT_READY if device is not yet configured (by SET CONFIGURED request)
  * \retval      TUSB_ERROR_INVALID_PARA if input parameters are not correct
  * \retval      TUSB_ERROR_INVALID_PARA if input parameters are not correct
  * \note        This function is non-blocking and returns immediately. The result of USB transfer will be reported by the
  * \note        This function is non-blocking and returns immediately. The result of USB transfer will be reported by the
- *              interface's callback function. \a p_data must be declared with \ref TUSB_CFG_ATTR_USBRAM.
+ *              interface's callback function. \a p_data must be declared with \ref CFG_TUSB_ATTR_USBRAM.
  */
  */
 tusb_error_t tuh_cdc_receive(uint8_t dev_addr, void * p_buffer, uint32_t length, bool is_notify);
 tusb_error_t tuh_cdc_receive(uint8_t dev_addr, void * p_buffer, uint32_t length, bool is_notify);
 
 
@@ -147,7 +147,7 @@ typedef struct {
 
 
 } cdch_data_t;
 } cdch_data_t;
 
 
-extern cdch_data_t cdch_data[TUSB_CFG_HOST_DEVICE_MAX]; // TODO consider to move to cdch internal header file
+extern cdch_data_t cdch_data[CFG_TUSB_HOST_DEVICE_MAX]; // TODO consider to move to cdch internal header file
 
 
 void         cdch_init(void);
 void         cdch_init(void);
 tusb_error_t cdch_open_subtask(uint8_t dev_addr, tusb_desc_interface_t const *p_interface_desc, uint16_t *p_length) ATTR_WARN_UNUSED_RESULT;
 tusb_error_t cdch_open_subtask(uint8_t dev_addr, tusb_desc_interface_t const *p_interface_desc, uint16_t *p_length) ATTR_WARN_UNUSED_RESULT;

+ 7 - 7
tinyusb/class/cdc/cdc_rndis_host.c

@@ -38,7 +38,7 @@
 
 
 #include "tusb_option.h"
 #include "tusb_option.h"
 
 
-#if (MODE_HOST_SUPPORTED && TUSB_CFG_HOST_CDC && TUSB_CFG_HOST_CDC_RNDIS)
+#if (MODE_HOST_SUPPORTED && CFG_TUSB_HOST_CDC && CFG_TUSB_HOST_CDC_RNDIS)
 
 
 #define _TINY_USB_SOURCE_FILE_
 #define _TINY_USB_SOURCE_FILE_
 
 
@@ -54,10 +54,10 @@
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 #define RNDIS_MSG_PAYLOAD_MAX   (1024*4)
 #define RNDIS_MSG_PAYLOAD_MAX   (1024*4)
 
 
-TUSB_CFG_ATTR_USBRAM static uint8_t msg_notification[TUSB_CFG_HOST_DEVICE_MAX][8];
-TUSB_CFG_ATTR_USBRAM ATTR_ALIGNED(4) static uint8_t msg_payload[RNDIS_MSG_PAYLOAD_MAX];
+CFG_TUSB_ATTR_USBRAM static uint8_t msg_notification[CFG_TUSB_HOST_DEVICE_MAX][8];
+CFG_TUSB_ATTR_USBRAM ATTR_ALIGNED(4) static uint8_t msg_payload[RNDIS_MSG_PAYLOAD_MAX];
 
 
-STATIC_VAR rndish_data_t rndish_data[TUSB_CFG_HOST_DEVICE_MAX];
+STATIC_VAR rndish_data_t rndish_data[CFG_TUSB_HOST_DEVICE_MAX];
 
 
 // TODO Microsoft requires message length for any get command must be at least 4096 bytes
 // TODO Microsoft requires message length for any get command must be at least 4096 bytes
 
 
@@ -102,7 +102,7 @@ static tusb_error_t rndis_body_subtask(void)
 
 
   OSAL_SUBTASK_BEGIN
   OSAL_SUBTASK_BEGIN
 
 
-  for (relative_addr = 0; relative_addr < TUSB_CFG_HOST_DEVICE_MAX; relative_addr++)
+  for (relative_addr = 0; relative_addr < CFG_TUSB_HOST_DEVICE_MAX; relative_addr++)
   {
   {
 
 
   }
   }
@@ -117,12 +117,12 @@ static tusb_error_t rndis_body_subtask(void)
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 void rndish_init(void)
 void rndish_init(void)
 {
 {
-  memclr_(rndish_data, sizeof(rndish_data_t)*TUSB_CFG_HOST_DEVICE_MAX);
+  memclr_(rndish_data, sizeof(rndish_data_t)*CFG_TUSB_HOST_DEVICE_MAX);
 
 
   //------------- Task creation -------------//
   //------------- Task creation -------------//
 
 
   //------------- semaphore creation for notificaiton pipe -------------//
   //------------- semaphore creation for notificaiton pipe -------------//
-  for(uint8_t i=0; i<TUSB_CFG_HOST_DEVICE_MAX; i++)
+  for(uint8_t i=0; i<CFG_TUSB_HOST_DEVICE_MAX; i++)
   {
   {
     rndish_data[i].sem_notification_hdl = osal_semaphore_create( OSAL_SEM_REF(rndish_data[i].semaphore_notification) );
     rndish_data[i].sem_notification_hdl = osal_semaphore_create( OSAL_SEM_REF(rndish_data[i].semaphore_notification) );
   }
   }

+ 3 - 3
tinyusb/class/custom_class_host.c

@@ -38,7 +38,7 @@
 
 
 #include "tusb_option.h"
 #include "tusb_option.h"
 
 
-#if (MODE_HOST_SUPPORTED && TUSB_CFG_HOST_CUSTOM_CLASS)
+#if (MODE_HOST_SUPPORTED && CFG_TUSB_HOST_CUSTOM_CLASS)
 
 
 #define _TINY_USB_SOURCE_FILE_
 #define _TINY_USB_SOURCE_FILE_
 
 
@@ -55,7 +55,7 @@
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // INTERNAL OBJECT & FUNCTION DECLARATION
 // INTERNAL OBJECT & FUNCTION DECLARATION
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
-custom_interface_info_t custom_interface[TUSB_CFG_HOST_DEVICE_MAX];
+custom_interface_info_t custom_interface[CFG_TUSB_HOST_DEVICE_MAX];
 
 
 static tusb_error_t cush_validate_paras(uint8_t dev_addr, uint16_t vendor_id, uint16_t product_id, void * p_buffer, uint16_t length)
 static tusb_error_t cush_validate_paras(uint8_t dev_addr, uint16_t vendor_id, uint16_t product_id, void * p_buffer, uint16_t length)
 {
 {
@@ -104,7 +104,7 @@ tusb_error_t tusbh_custom_write(uint8_t dev_addr, uint16_t vendor_id, uint16_t p
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 void cush_init(void)
 void cush_init(void)
 {
 {
-  memclr_(&custom_interface, sizeof(custom_interface_info_t) * TUSB_CFG_HOST_DEVICE_MAX);
+  memclr_(&custom_interface, sizeof(custom_interface_info_t) * CFG_TUSB_HOST_DEVICE_MAX);
 }
 }
 
 
 tusb_error_t cush_open_subtask(uint8_t dev_addr, tusb_desc_interface_t const *p_interface_desc, uint16_t *p_length)
 tusb_error_t cush_open_subtask(uint8_t dev_addr, tusb_desc_interface_t const *p_interface_desc, uint16_t *p_length)

+ 5 - 5
tinyusb/class/hid/hid_device.c

@@ -78,7 +78,7 @@ static hidd_class_driver_t const hidd_class_driver[HIDD_NUMBER_OF_SUBCLASS] =
 {
 {
 //    [HID_PROTOCOL_NONE]  = for HID Generic
 //    [HID_PROTOCOL_NONE]  = for HID Generic
 
 
-#if TUSB_CFG_DEVICE_HID_KEYBOARD
+#if CFG_TUSB_DEVICE_HID_KEYBOARD
     [HID_PROTOCOL_KEYBOARD] =
     [HID_PROTOCOL_KEYBOARD] =
     {
     {
         .p_interface   = &keyboardd_data,
         .p_interface   = &keyboardd_data,
@@ -88,7 +88,7 @@ static hidd_class_driver_t const hidd_class_driver[HIDD_NUMBER_OF_SUBCLASS] =
     },
     },
 #endif
 #endif
 
 
-#if TUSB_CFG_DEVICE_HID_MOUSE
+#if CFG_TUSB_DEVICE_HID_MOUSE
     [HID_PROTOCOL_MOUSE] =
     [HID_PROTOCOL_MOUSE] =
     {
     {
         .p_interface   = &moused_data,
         .p_interface   = &moused_data,
@@ -100,12 +100,12 @@ static hidd_class_driver_t const hidd_class_driver[HIDD_NUMBER_OF_SUBCLASS] =
 };
 };
 
 
 // internal buffer for transferring data
 // internal buffer for transferring data
-TUSB_CFG_ATTR_USBRAM STATIC_VAR uint8_t m_hid_buffer[ HIDD_BUFFER_SIZE ];
+CFG_TUSB_ATTR_USBRAM STATIC_VAR uint8_t m_hid_buffer[ HIDD_BUFFER_SIZE ];
 
 
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // KEYBOARD APPLICATION API
 // KEYBOARD APPLICATION API
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
-#if TUSB_CFG_DEVICE_HID_KEYBOARD
+#if CFG_TUSB_DEVICE_HID_KEYBOARD
 STATIC_VAR hidd_interface_t keyboardd_data;
 STATIC_VAR hidd_interface_t keyboardd_data;
 
 
 bool tud_hid_keyboard_busy(uint8_t rhport)
 bool tud_hid_keyboard_busy(uint8_t rhport)
@@ -128,7 +128,7 @@ tusb_error_t tud_hid_keyboard_send(uint8_t rhport, hid_keyboard_report_t const *
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // MOUSE APPLICATION API
 // MOUSE APPLICATION API
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
-#if TUSB_CFG_DEVICE_HID_MOUSE
+#if CFG_TUSB_DEVICE_HID_MOUSE
 STATIC_VAR hidd_interface_t moused_data;
 STATIC_VAR hidd_interface_t moused_data;
 
 
 bool tud_hid_mouse_is_busy(uint8_t rhport)
 bool tud_hid_mouse_is_busy(uint8_t rhport)

+ 4 - 4
tinyusb/class/hid/hid_device.h

@@ -66,7 +66,7 @@ bool tud_hid_keyboard_busy(uint8_t rhport);
 
 
 /** \brief        Submit USB transfer
 /** \brief        Submit USB transfer
  * \param[in]		  rhport USB Controller ID
  * \param[in]		  rhport USB Controller ID
- * \param[in,out] p_report address that is used to store data from device. Must be accessible by usb controller (see \ref TUSB_CFG_ATTR_USBRAM)
+ * \param[in,out] p_report address that is used to store data from device. Must be accessible by usb controller (see \ref CFG_TUSB_ATTR_USBRAM)
  * \returns       \ref tusb_error_t type to indicate success or error condition.
  * \returns       \ref tusb_error_t type to indicate success or error condition.
  * \retval        TUSB_ERROR_NONE on success
  * \retval        TUSB_ERROR_NONE on success
  * \retval        TUSB_ERROR_INTERFACE_IS_BUSY if the interface is already transferring data with device
  * \retval        TUSB_ERROR_INTERFACE_IS_BUSY if the interface is already transferring data with device
@@ -96,7 +96,7 @@ void tud_hid_keyboard_cb(uint8_t rhport, tusb_event_t event, uint32_t xferred_by
  *              via control endpoint.
  *              via control endpoint.
  * \param[in]		rhport	USB Controller ID
  * \param[in]		rhport	USB Controller ID
  * \param[in]   report_type specify which report (INPUT, OUTPUT, FEATURE) that host requests
  * \param[in]   report_type specify which report (INPUT, OUTPUT, FEATURE) that host requests
- * \param[out]  pp_report pointer to buffer that application need to update, value must be accessible by USB controller (see \ref TUSB_CFG_ATTR_USBRAM)
+ * \param[out]  pp_report pointer to buffer that application need to update, value must be accessible by USB controller (see \ref CFG_TUSB_ATTR_USBRAM)
  * \param[in]   requested_length  number of bytes that host requested
  * \param[in]   requested_length  number of bytes that host requested
  * \retval      non-zero Actual number of bytes in the response's buffer.
  * \retval      non-zero Actual number of bytes in the response's buffer.
  * \retval      zero  indicates the current request is not supported. Tinyusb device stack will reject the request by
  * \retval      zero  indicates the current request is not supported. Tinyusb device stack will reject the request by
@@ -139,7 +139,7 @@ bool tud_hid_mouse_is_busy(uint8_t rhport);
 
 
 /** \brief        Perform transfer queuing
 /** \brief        Perform transfer queuing
  * \param[in]		  rhport USB Controller ID
  * \param[in]		  rhport USB Controller ID
- * \param[in,out] p_report address that is used to store data from device. Must be accessible by usb controller (see \ref TUSB_CFG_ATTR_USBRAM)
+ * \param[in,out] p_report address that is used to store data from device. Must be accessible by usb controller (see \ref CFG_TUSB_ATTR_USBRAM)
  * \returns       \ref tusb_error_t type to indicate success or error condition.
  * \returns       \ref tusb_error_t type to indicate success or error condition.
  * \retval        TUSB_ERROR_NONE on success
  * \retval        TUSB_ERROR_NONE on success
  * \retval        TUSB_ERROR_INTERFACE_IS_BUSY if the interface is already transferring data with device
  * \retval        TUSB_ERROR_INTERFACE_IS_BUSY if the interface is already transferring data with device
@@ -169,7 +169,7 @@ void tud_hid_mouse_cb(uint8_t rhport, tusb_event_t event, uint32_t xferred_bytes
  *              via control endpoint.
  *              via control endpoint.
  * \param[in]		rhport	USB Controller ID
  * \param[in]		rhport	USB Controller ID
  * \param[in]   report_type specify which report (INPUT, OUTPUT, FEATURE) that host requests
  * \param[in]   report_type specify which report (INPUT, OUTPUT, FEATURE) that host requests
- * \param[out]  pp_report pointer to buffer that application need to update, value must be accessible by USB controller (see \ref TUSB_CFG_ATTR_USBRAM)
+ * \param[out]  pp_report pointer to buffer that application need to update, value must be accessible by USB controller (see \ref CFG_TUSB_ATTR_USBRAM)
  * \param[in]   requested_length  number of bytes that host requested
  * \param[in]   requested_length  number of bytes that host requested
  * \retval      non-zero Actual number of bytes in the response's buffer.
  * \retval      non-zero Actual number of bytes in the response's buffer.
  * \retval      zero  indicates the current request is not supported. Tinyusb device stack will reject the request by
  * \retval      zero  indicates the current request is not supported. Tinyusb device stack will reject the request by

Некоторые файлы не были показаны из-за большого количества измененных файлов