Skip to content

Commit 5fd39b1

Browse files
committed
loop() call yield() instead of vTaskDelay(1)
1 parent 400edfa commit 5fd39b1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cores/nRF5/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static void loop_task(void* arg)
5252
#endif
5353

5454
// To compatible with most code where loop is not rtos-aware
55-
vTaskDelay(1); //taskYIELD();
55+
taskYIELD(); // vTaskDelay(1);
5656
}
5757
}
5858

cores/nRF5/rtos.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@
5353

5454
enum
5555
{
56-
TASK_PRIO_LOWEST = 0,
56+
TASK_PRIO_LOWEST = 0, // Idle task, should not be used
5757
TASK_PRIO_LOW = 1,
58-
TASK_PRIO_NORMAL = 2,
59-
TASK_PRIO_HIGH = 3,
58+
TASK_PRIO_NORMAL = 2, // Loop, Timer Task
59+
TASK_PRIO_HIGH = 3, // Bluefruit Task
6060
TASK_PRIO_HIGHEST = 4,
6161
};
6262

0 commit comments

Comments
 (0)