From 5fd39b1e28fabe7ed65482b29784187af804e254 Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 15 Mar 2017 12:57:06 +0700 Subject: [PATCH] loop() call yield() instead of vTaskDelay(1) --- cores/nRF5/main.cpp | 2 +- cores/nRF5/rtos.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cores/nRF5/main.cpp b/cores/nRF5/main.cpp index 29f95b07..e2457800 100644 --- a/cores/nRF5/main.cpp +++ b/cores/nRF5/main.cpp @@ -52,7 +52,7 @@ static void loop_task(void* arg) #endif // To compatible with most code where loop is not rtos-aware - vTaskDelay(1); //taskYIELD(); + taskYIELD(); // vTaskDelay(1); } } diff --git a/cores/nRF5/rtos.h b/cores/nRF5/rtos.h index df10c792..9c3f541e 100644 --- a/cores/nRF5/rtos.h +++ b/cores/nRF5/rtos.h @@ -53,10 +53,10 @@ enum { - TASK_PRIO_LOWEST = 0, + TASK_PRIO_LOWEST = 0, // Idle task, should not be used TASK_PRIO_LOW = 1, - TASK_PRIO_NORMAL = 2, - TASK_PRIO_HIGH = 3, + TASK_PRIO_NORMAL = 2, // Loop, Timer Task + TASK_PRIO_HIGH = 3, // Bluefruit Task TASK_PRIO_HIGHEST = 4, };