summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-04-12 12:55:53 +0700
committerhathach <[email protected]>2018-04-12 12:55:53 +0700
commit18f97fef7e35937c017f2b2ad2300a920256f66b (patch)
treeaf34770b4d075588f91b0e335f949b82283ad11c
parentdf367bac54ac8926c51f2d8f11e4ca9a0abf50a8 (diff)
rename TUSB_OS_NONE, TUSB_OS_FREERTOS to OPT_OS_NONE, OPT_OS_FREERTOS
-rw-r--r--doxygen/configuration.txt2
-rw-r--r--examples/device/device_virtual_com/src/main.c4
-rw-r--r--examples/device/device_virtual_com/src/tusb_config.h2
-rw-r--r--examples/device/nrf52840/src/main.c4
-rw-r--r--examples/device/nrf52840/src/tusb_config.h2
-rw-r--r--examples/obsolete/device/src/app_os_prio.h4
-rw-r--r--examples/obsolete/device/src/main.c10
-rw-r--r--examples/obsolete/device/src/tusb_config.h2
-rw-r--r--examples/obsolete/host/src/app_os_prio.h4
-rw-r--r--examples/obsolete/host/src/main.c10
-rw-r--r--examples/obsolete/host/src/tusb_config.h2
-rw-r--r--hw/bsp/ea4357/board_ea4357.c4
-rw-r--r--hw/bsp/keil/board_mcb4300.c2
-rw-r--r--hw/bsp/lpcxpresso/board_lpclink2.c2
-rw-r--r--hw/bsp/lpcxpresso/board_lpcxpresso11u14.c2
-rw-r--r--hw/bsp/lpcxpresso11u68/board_lpcxpresso11u68.c2
-rw-r--r--hw/bsp/lpcxpresso1347/board_lpcxpresso1347.c2
-rw-r--r--hw/bsp/lpcxpresso1769/board_lpcxpresso1769.c2
-rw-r--r--hw/bsp/ngx/board_ngx4330.c2
-rw-r--r--tests/support/tusb_config.h2
-rw-r--r--tinyusb/common/tusb_fifo.h2
-rw-r--r--tinyusb/osal/osal.c2
-rw-r--r--tinyusb/osal/osal.h11
-rw-r--r--tinyusb/tusb.c2
-rw-r--r--tinyusb/tusb.h4
-rw-r--r--tinyusb/tusb_option.h18
-rw-r--r--vendor/fatfs/diskio.c2
27 files changed, 54 insertions, 53 deletions
diff --git a/doxygen/configuration.txt b/doxygen/configuration.txt
index 6114f7a9c..9c6b4a3c6 100644
--- a/doxygen/configuration.txt
+++ b/doxygen/configuration.txt
@@ -20,7 +20,7 @@
#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_OS_TASK_PRIO ///< If \ref CFG_TUSB_OS is configured to use a real RTOS (other than OPT_OS_NONE). This determines the priority of the usb stack task.
//--------------------------------------------------------------------+
// HOST CONFIGURATION
diff --git a/examples/device/device_virtual_com/src/main.c b/examples/device/device_virtual_com/src/main.c
index 8d4065194..68837e134 100644
--- a/examples/device/device_virtual_com/src/main.c
+++ b/examples/device/device_virtual_com/src/main.c
@@ -133,8 +133,8 @@ void print_greeting(void)
{
char const * const rtos_name[] =
{
- [TUSB_OS_NONE] = "None",
- [TUSB_OS_FREERTOS] = "FreeRTOS",
+ [OPT_OS_NONE] = "None",
+ [OPT_OS_FREERTOS] = "FreeRTOS",
};
printf("\n\
diff --git a/examples/device/device_virtual_com/src/tusb_config.h b/examples/device/device_virtual_com/src/tusb_config.h
index 3a730f474..b7f7b348e 100644
--- a/examples/device/device_virtual_com/src/tusb_config.h
+++ b/examples/device/device_virtual_com/src/tusb_config.h
@@ -68,7 +68,7 @@
//--------------------------------------------------------------------+
#define CFG_TUSB_DEBUG 2
-//#define CFG_TUSB_OS TUSB_OS_NONE // be passed from IDE/command line for easy project switching
+//#define CFG_TUSB_OS OPT_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
//--------------------------------------------------------------------+
diff --git a/examples/device/nrf52840/src/main.c b/examples/device/nrf52840/src/main.c
index bb26f3a4e..42dfaaaa5 100644
--- a/examples/device/nrf52840/src/main.c
+++ b/examples/device/nrf52840/src/main.c
@@ -133,8 +133,8 @@ void print_greeting(void)
{
char const * const rtos_name[] =
{
- [TUSB_OS_NONE] = "None",
- [TUSB_OS_FREERTOS] = "FreeRTOS",
+ [OPT_OS_NONE] = "None",
+ [OPT_OS_FREERTOS] = "FreeRTOS",
};
printf("\n--------------------------------------------------------------------\n");
diff --git a/examples/device/nrf52840/src/tusb_config.h b/examples/device/nrf52840/src/tusb_config.h
index 11d0bbdf9..6182ed9e1 100644
--- a/examples/device/nrf52840/src/tusb_config.h
+++ b/examples/device/nrf52840/src/tusb_config.h
@@ -67,7 +67,7 @@
//--------------------------------------------------------------------+
#define CFG_TUSB_DEBUG 2
-#define CFG_TUSB_OS TUSB_OS_NONE // be passed from IDE/command line for easy project switching
+#define CFG_TUSB_OS OPT_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
//--------------------------------------------------------------------+
diff --git a/examples/obsolete/device/src/app_os_prio.h b/examples/obsolete/device/src/app_os_prio.h
index e75b942ce..024e62346 100644
--- a/examples/obsolete/device/src/app_os_prio.h
+++ b/examples/obsolete/device/src/app_os_prio.h
@@ -46,9 +46,9 @@
#include "tusb.h"
-#if CFG_TUSB_OS == TUSB_OS_NONE
+#if CFG_TUSB_OS == OPT_OS_NONE
#define LOWER_PRIO(x) 0 // does not matter
-#elif CFG_TUSB_OS == TUSB_OS_FREERTOS
+#elif CFG_TUSB_OS == OPT_OS_FREERTOS
#define LOWER_PRIO(x) ((x)-1) // freeRTOS lower number --> lower priority
#else
#error Priority is not configured for this RTOS
diff --git a/examples/obsolete/device/src/main.c b/examples/obsolete/device/src/main.c
index 802883ce4..5d1a4bb5f 100644
--- a/examples/obsolete/device/src/main.c
+++ b/examples/obsolete/device/src/main.c
@@ -64,7 +64,7 @@ void led_blinking_init(void);
void led_blinking_task(void* param);
-#if CFG_TUSB_OS == TUSB_OS_NONE
+#if CFG_TUSB_OS == OPT_OS_NONE
// like a real RTOS, this function is a main loop invoking each task in application and never return
void os_none_start_scheduler(void)
{
@@ -97,9 +97,9 @@ int main(void)
cdc_serial_app_init();
//------------- start OS scheduler (never return) -------------//
-#if CFG_TUSB_OS == TUSB_OS_FREERTOS
+#if CFG_TUSB_OS == OPT_OS_FREERTOS
vTaskStartScheduler();
-#elif CFG_TUSB_OS == TUSB_OS_NONE
+#elif CFG_TUSB_OS == OPT_OS_NONE
os_none_start_scheduler();
#else
#error need to start RTOS schduler
@@ -180,8 +180,8 @@ void print_greeting(void)
{
char const * const rtos_name[] =
{
- [TUSB_OS_NONE] = "None",
- [TUSB_OS_FREERTOS] = "FreeRTOS",
+ [OPT_OS_NONE] = "None",
+ [OPT_OS_FREERTOS] = "FreeRTOS",
};
printf("\n\
diff --git a/examples/obsolete/device/src/tusb_config.h b/examples/obsolete/device/src/tusb_config.h
index 7544fa8b4..c9e81656f 100644
--- a/examples/obsolete/device/src/tusb_config.h
+++ b/examples/obsolete/device/src/tusb_config.h
@@ -68,7 +68,7 @@
//--------------------------------------------------------------------+
#define CFG_TUSB_DEBUG 2
-//#define CFG_TUSB_OS TUSB_OS_NONE // be passed from IDE/command line for easy project switching
+//#define CFG_TUSB_OS OPT_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
//--------------------------------------------------------------------+
diff --git a/examples/obsolete/host/src/app_os_prio.h b/examples/obsolete/host/src/app_os_prio.h
index 5eacd4c1e..51d72ddfa 100644
--- a/examples/obsolete/host/src/app_os_prio.h
+++ b/examples/obsolete/host/src/app_os_prio.h
@@ -53,9 +53,9 @@
#include "tusb.h"
-#if CFG_TUSB_OS == TUSB_OS_NONE
+#if CFG_TUSB_OS == OPT_OS_NONE
#define LOWER_PRIO(x) 0 // does not matter
-#elif CFG_TUSB_OS == TUSB_OS_FREERTOS
+#elif CFG_TUSB_OS == OPT_OS_FREERTOS
#define LOWER_PRIO(x) ((x)-1) // freeRTOS lower number --> lower priority
#elif CFG_TUSB_OS == TUSB_OS_CMSIS_RTX
#define LOWER_PRIO(x) ((x)-1) // CMSIS-RTOS lower number --> lower priority
diff --git a/examples/obsolete/host/src/main.c b/examples/obsolete/host/src/main.c
index 6f108c441..90c64f849 100644
--- a/examples/obsolete/host/src/main.c
+++ b/examples/obsolete/host/src/main.c
@@ -64,7 +64,7 @@ void print_greeting(void);
// IMPLEMENTATION
//--------------------------------------------------------------------+
-#if CFG_TUSB_OS == TUSB_OS_NONE
+#if CFG_TUSB_OS == OPT_OS_NONE
// like a real RTOS, this function is a main loop invoking each task in application and never return
void os_none_start_scheduler(void)
{
@@ -101,9 +101,9 @@ int main(void)
cdc_serial_host_app_init();
//------------- start OS scheduler (never return) -------------//
-#if CFG_TUSB_OS == TUSB_OS_FREERTOS
+#if CFG_TUSB_OS == OPT_OS_FREERTOS
vTaskStartScheduler();
-#elif CFG_TUSB_OS == TUSB_OS_NONE
+#elif CFG_TUSB_OS == OPT_OS_NONE
os_none_start_scheduler();
#elif CFG_TUSB_OS == TUSB_OS_CMSIS_RTX
osKernelStart();
@@ -121,8 +121,8 @@ void print_greeting(void)
{
char const * const rtos_name[] =
{
- [TUSB_OS_NONE] = "None",
- [TUSB_OS_FREERTOS] = "FreeRTOS",
+ [OPT_OS_NONE] = "None",
+ [OPT_OS_FREERTOS] = "FreeRTOS",
};
puts("\n\
diff --git a/examples/obsolete/host/src/tusb_config.h b/examples/obsolete/host/src/tusb_config.h
index 8a103a0aa..9a13aa25a 100644
--- a/examples/obsolete/host/src/tusb_config.h
+++ b/examples/obsolete/host/src/tusb_config.h
@@ -68,7 +68,7 @@
//--------------------------------------------------------------------+
#define CFG_TUSB_DEBUG 2
-//#define CFG_TUSB_OS TUSB_OS_NONE // defined using eclipse build
+//#define CFG_TUSB_OS OPT_OS_NONE // defined using eclipse build
//#define CFG_TUSB_OS_TASK_PRIO 0 // defined using eclipse build
//--------------------------------------------------------------------+
diff --git a/hw/bsp/ea4357/board_ea4357.c b/hw/bsp/ea4357/board_ea4357.c
index fdb8adb8b..b02dde623 100644
--- a/hw/bsp/ea4357/board_ea4357.c
+++ b/hw/bsp/ea4357/board_ea4357.c
@@ -68,7 +68,7 @@ enum {
/*------------------------------------------------------------------*/
/* TUSB HAL MILLISECOND
*------------------------------------------------------------------*/
-#if CFG_TUSB_OS == TUSB_OS_NONE
+#if CFG_TUSB_OS == OPT_OS_NONE
volatile uint32_t system_ticks = 0;
@@ -91,7 +91,7 @@ void board_init(void)
{
CGU_Init();
-#if CFG_TUSB_OS == TUSB_OS_NONE // TODO may move to main.c
+#if CFG_TUSB_OS == OPT_OS_NONE // TODO may move to main.c
SysTick_Config(CGU_GetPCLKFrequency(CGU_PERIPHERAL_M4CORE) / BOARD_TICKS_HZ); // 1 msec tick timer
#endif
diff --git a/hw/bsp/keil/board_mcb4300.c b/hw/bsp/keil/board_mcb4300.c
index 55d0dc6ba..118cef201 100644
--- a/hw/bsp/keil/board_mcb4300.c
+++ b/hw/bsp/keil/board_mcb4300.c
@@ -74,7 +74,7 @@ void board_init(void)
{
CGU_Init();
-#if CFG_TUSB_OS == TUSB_OS_NONE // TODO may move to main.c
+#if CFG_TUSB_OS == OPT_OS_NONE // TODO may move to main.c
SysTick_Config(CGU_GetPCLKFrequency(CGU_PERIPHERAL_M4CORE) / BOARD_TICKS_HZ); // 1 msec tick timer
#endif
diff --git a/hw/bsp/lpcxpresso/board_lpclink2.c b/hw/bsp/lpcxpresso/board_lpclink2.c
index f5dc00e00..ea2610f55 100644
--- a/hw/bsp/lpcxpresso/board_lpclink2.c
+++ b/hw/bsp/lpcxpresso/board_lpclink2.c
@@ -56,7 +56,7 @@ void board_init(void)
{
CGU_Init();
-#if CFG_TUSB_OS == TUSB_OS_NONE // TODO may move to main.c
+#if CFG_TUSB_OS == OPT_OS_NONE // TODO may move to main.c
SysTick_Config(CGU_GetPCLKFrequency(CGU_PERIPHERAL_M4CORE) / BOARD_TICKS_HZ); // 1 msec tick timer
#endif
diff --git a/hw/bsp/lpcxpresso/board_lpcxpresso11u14.c b/hw/bsp/lpcxpresso/board_lpcxpresso11u14.c
index a93ee21e0..20b3c73c6 100644
--- a/hw/bsp/lpcxpresso/board_lpcxpresso11u14.c
+++ b/hw/bsp/lpcxpresso/board_lpcxpresso11u14.c
@@ -67,7 +67,7 @@ void board_init(void)
{
SystemInit();
-#if CFG_TUSB_OS == TUSB_OS_NONE // TODO may move to main.c
+#if CFG_TUSB_OS == OPT_OS_NONE // TODO may move to main.c
SysTick_Config(SystemCoreClock / BOARD_TICKS_HZ); // 1 msec tick timer
#endif
diff --git a/hw/bsp/lpcxpresso11u68/board_lpcxpresso11u68.c b/hw/bsp/lpcxpresso11u68/board_lpcxpresso11u68.c
index ba21a287e..ebf30d480 100644
--- a/hw/bsp/lpcxpresso11u68/board_lpcxpresso11u68.c
+++ b/hw/bsp/lpcxpresso11u68/board_lpcxpresso11u68.c
@@ -58,7 +58,7 @@ void board_init(void)
{
SystemInit();
-#if CFG_TUSB_OS == TUSB_OS_NONE // TODO may move to main.c
+#if CFG_TUSB_OS == OPT_OS_NONE // TODO may move to main.c
SysTick_Config(SystemCoreClock / BOARD_TICKS_HZ); // 1 msec tick timer
#endif
diff --git a/hw/bsp/lpcxpresso1347/board_lpcxpresso1347.c b/hw/bsp/lpcxpresso1347/board_lpcxpresso1347.c
index 2730e1768..3649b3a7d 100644
--- a/hw/bsp/lpcxpresso1347/board_lpcxpresso1347.c
+++ b/hw/bsp/lpcxpresso1347/board_lpcxpresso1347.c
@@ -68,7 +68,7 @@ void board_init(void)
{
SystemInit();
-#if CFG_TUSB_OS == TUSB_OS_NONE // TODO may move to main.c
+#if CFG_TUSB_OS == OPT_OS_NONE // TODO may move to main.c
SysTick_Config(SystemCoreClock / BOARD_TICKS_HZ); // 1 msec tick timer
#endif
diff --git a/hw/bsp/lpcxpresso1769/board_lpcxpresso1769.c b/hw/bsp/lpcxpresso1769/board_lpcxpresso1769.c
index ba465e224..9fd6483a6 100644
--- a/hw/bsp/lpcxpresso1769/board_lpcxpresso1769.c
+++ b/hw/bsp/lpcxpresso1769/board_lpcxpresso1769.c
@@ -67,7 +67,7 @@ void board_init(void)
{
SystemInit();
-#if CFG_TUSB_OS == TUSB_OS_NONE // TODO may move to main.c
+#if CFG_TUSB_OS == OPT_OS_NONE // TODO may move to main.c
SysTick_Config(SystemCoreClock / BOARD_TICKS_HZ); // 1 msec tick timer
#endif
diff --git a/hw/bsp/ngx/board_ngx4330.c b/hw/bsp/ngx/board_ngx4330.c
index 41c0beddc..01f5f6145 100644
--- a/hw/bsp/ngx/board_ngx4330.c
+++ b/hw/bsp/ngx/board_ngx4330.c
@@ -70,7 +70,7 @@ void board_init(void)
{
CGU_Init();
-#if CFG_TUSB_OS == TUSB_OS_NONE // TODO may move to main.c
+#if CFG_TUSB_OS == OPT_OS_NONE // TODO may move to main.c
SysTick_Config( CGU_GetPCLKFrequency(CGU_PERIPHERAL_M4CORE)/BOARD_TICKS_HZ ); /* 1 ms Timer */
#endif
diff --git a/tests/support/tusb_config.h b/tests/support/tusb_config.h
index 85718cfe3..39d62d784 100644
--- a/tests/support/tusb_config.h
+++ b/tests/support/tusb_config.h
@@ -86,7 +86,7 @@
#define CFG_TUSB_DEBUG 3
-#define CFG_TUSB_OS TUSB_OS_NONE
+#define CFG_TUSB_OS OPT_OS_NONE
#define CFG_TUSB_ATTR_USBRAM
#ifdef __cplusplus
diff --git a/tinyusb/common/tusb_fifo.h b/tinyusb/common/tusb_fifo.h
index 217781c9c..452b1f35f 100644
--- a/tinyusb/common/tusb_fifo.h
+++ b/tinyusb/common/tusb_fifo.h
@@ -57,7 +57,7 @@
#include "osal/osal.h"
-#if CFG_TUSB_OS == TUSB_OS_NONE
+#if CFG_TUSB_OS == OPT_OS_NONE
// Since all fifo read/write is done in thread mode, there should be
// no conflict except for osal queue which will be address seperatedly.
// Therefore there may be no need for mutex with internal use of fifo
diff --git a/tinyusb/osal/osal.c b/tinyusb/osal/osal.c
index 6bf799d59..f2078b09c 100644
--- a/tinyusb/osal/osal.c
+++ b/tinyusb/osal/osal.c
@@ -43,7 +43,7 @@
//--------------------------------------------------------------------+
// TICK API
//--------------------------------------------------------------------+
-#if CFG_TUSB_OS == TUSB_OS_FREERTOS
+#if CFG_TUSB_OS == OPT_OS_FREERTOS
uint32_t tusb_hal_millis(void)
{
diff --git a/tinyusb/osal/osal.h b/tinyusb/osal/osal.h
index f87423d18..93d50699d 100644
--- a/tinyusb/osal/osal.h
+++ b/tinyusb/osal/osal.h
@@ -46,13 +46,6 @@
/** \addtogroup group_osal
* @{ */
-/** \defgroup group_supported_os Supported RTOS
- * \brief \ref CFG_TUSB_OS must be defined to one of these
- * @{ */
-#define TUSB_OS_NONE 1 ///< No RTOS is used
-#define TUSB_OS_FREERTOS 2 ///< FreeRTOS is used
-/** @} */
-
#include "tusb_option.h"
#include "common/tusb_common.h"
@@ -64,11 +57,11 @@ enum
};
-#if CFG_TUSB_OS == TUSB_OS_NONE
+#if CFG_TUSB_OS == OPT_OS_NONE
#include "osal_none.h"
#else
- #if CFG_TUSB_OS == TUSB_OS_FREERTOS
+ #if CFG_TUSB_OS == OPT_OS_FREERTOS
#include "osal_freeRTOS.h"
#else
#error CFG_TUSB_OS is not defined or OS is not supported yet
diff --git a/tinyusb/tusb.c b/tinyusb/tusb.c
index c9d71b1c1..b739ebe2e 100644
--- a/tinyusb/tusb.c
+++ b/tinyusb/tusb.c
@@ -56,7 +56,7 @@ tusb_error_t tusb_init(void)
return TUSB_ERROR_NONE;
}
-#if CFG_TUSB_OS == TUSB_OS_NONE
+#if CFG_TUSB_OS == OPT_OS_NONE
void tusb_task(void)
{
#if MODE_HOST_SUPPORTED
diff --git a/tinyusb/tusb.h b/tinyusb/tusb.h
index 9a1fd0c4c..f469ca33e 100644
--- a/tinyusb/tusb.h
+++ b/tinyusb/tusb.h
@@ -102,9 +102,9 @@
*/
tusb_error_t tusb_init(void);
-#if CFG_TUSB_OS == TUSB_OS_NONE
+#if CFG_TUSB_OS == OPT_OS_NONE
/** \brief Run all tinyusb's internal tasks (e.g host task, device task).
- * \note This function is only required when using no RTOS (\ref CFG_TUSB_OS == TUSB_OS_NONE). All the stack functions
+ * \note This function is only required when using no RTOS (\ref CFG_TUSB_OS == OPT_OS_NONE). All the stack functions
* & callback are invoked within this function, so it should be called periodically within the mainloop
*
@code
diff --git a/tinyusb/tusb_option.h b/tinyusb/tusb_option.h
index 1c83abc50..b89b72782 100644
--- a/tinyusb/tusb_option.h
+++ b/tinyusb/tusb_option.h
@@ -36,8 +36,8 @@
*/
/**************************************************************************/
-#ifndef _TUSB_TUSB_OPTION_H_
-#define _TUSB_TUSB_OPTION_H_
+#ifndef _TUSB_OPTION_H_
+#define _TUSB_OPTION_H_
#define TUSB_VERSION_YEAR 00
#define TUSB_VERSION_MONTH 00
@@ -58,6 +58,14 @@
#define MCU_LPC43XX 7 ///< NXP LPC43xx family
/** @} */
+/** \defgroup group_supported_os Supported RTOS
+ * \brief \ref CFG_TUSB_OS must be defined to one of these
+ * @{ */
+#define OPT_OS_NONE 1 ///< No RTOS is used
+#define OPT_OS_FREERTOS 2 ///< FreeRTOS is used
+/** @} */
+
+
// Allow to use command line to change the config name/location
#ifndef CFG_TUSB_CONFIG_FILE
#define CFG_TUSB_CONFIG_FILE "tusb_config.h"
@@ -122,10 +130,10 @@
#endif
#ifndef CFG_TUSB_OS
-#define CFG_TUSB_OS TUSB_OS_NONE
+#define CFG_TUSB_OS OPT_OS_NONE
#endif
-#if (CFG_TUSB_OS != TUSB_OS_NONE) && !defined (CFG_TUSB_OS_TASK_PRIO)
+#if (CFG_TUSB_OS != OPT_OS_NONE) && !defined (CFG_TUSB_OS_TASK_PRIO)
#error CFG_TUSB_OS_TASK_PRIO need to be defined (hint: use the highest if possible)
#endif
@@ -192,6 +200,6 @@
//------------- CLASS -------------//
#endif // MODE_HOST_SUPPORTED
-#endif /* _TUSB_TUSB_OPTION_H_ */
+#endif /* _TUSB_OPTION_H_ */
/** @} */
diff --git a/vendor/fatfs/diskio.c b/vendor/fatfs/diskio.c
index ecaccec3e..54a228019 100644
--- a/vendor/fatfs/diskio.c
+++ b/vendor/fatfs/diskio.c
@@ -63,7 +63,7 @@ static DRESULT wait_for_io_complete(uint8_t usb_addr)
while ( tuh_msc_is_busy(usb_addr) )
{
// TODO should have timeout here
- #if CFG_TUSB_OS != TUSB_OS_NONE
+ #if CFG_TUSB_OS != OPT_OS_NONE
osal_task_delay(10);
#endif
}