summaryrefslogtreecommitdiff
path: root/examples/dual
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-05-28 18:23:46 +0700
committerhathach <[email protected]>2026-05-28 18:23:46 +0700
commitc5676382c7d5cad7b6cfe5dc185d9891b89241f2 (patch)
treef9f155fd18f84b7aaf3ff76ff5339a38bbacd56a /examples/dual
parentc954c8c4c70df616e429d8e7ae1c382d3043acea (diff)
abstract OS logic with `CFG_TUSB_OS_HAS_SCHEDULER` to simplify conditional checks
Diffstat (limited to 'examples/dual')
-rw-r--r--examples/dual/host_info_to_device_cdc/src/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/dual/host_info_to_device_cdc/src/main.c b/examples/dual/host_info_to_device_cdc/src/main.c
index cf3430464..5186f91dc 100644
--- a/examples/dual/host_info_to_device_cdc/src/main.c
+++ b/examples/dual/host_info_to_device_cdc/src/main.c
@@ -130,7 +130,7 @@ static void main_task(void* param) {
led_blinking_task();
// preempted RTOS run device/host stack in its own task
-#if CFG_TUSB_OS == OPT_OS_NONE || CFG_TUSB_OS == OPT_OS_PICO
+#if CFG_TUSB_OS_HAS_SCHEDULER == 0
tud_task(); // tinyusb device task
tuh_task(); // tinyusb host task
#endif
@@ -140,7 +140,7 @@ static void main_task(void* param) {
int main(void) {
board_init();
-#if CFG_TUSB_OS == OPT_OS_NONE || CFG_TUSB_OS == OPT_OS_PICO
+#if CFG_TUSB_OS_HAS_SCHEDULER == 0
printf("TinyUSB Host Information -> Device CDC Example\r\n");
usb_device_init();
@@ -156,7 +156,7 @@ int main(void) {
return 0;
}
-#if CFG_TUSB_OS != OPT_OS_NONE && CFG_TUSB_OS != OPT_OS_PICO
+#if CFG_TUSB_OS_HAS_SCHEDULER
// USB Device Driver task for RTOS
static void usb_device_task(void *param) {
(void) param;