From 9535c64051494fdfa4ea3259b01298db491c780e Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 6 Jan 2017 21:20:58 +0700 Subject: [PATCH] clean up --- cores/nRF5/Arduino.h | 1 - cores/nRF5/main.cpp | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cores/nRF5/Arduino.h b/cores/nRF5/Arduino.h index 6d7ba3fe..c2fef7d2 100644 --- a/cores/nRF5/Arduino.h +++ b/cores/nRF5/Arduino.h @@ -34,7 +34,6 @@ void yield( void ) ; /* sketch */ void setup( void ) ; void loop( void ) ; - void setLoopStacksize(uint32_t size); #include "WVariant.h" diff --git a/cores/nRF5/main.cpp b/cores/nRF5/main.cpp index 1282608b..62bbcd43 100644 --- a/cores/nRF5/main.cpp +++ b/cores/nRF5/main.cpp @@ -21,7 +21,6 @@ void initVariant() __attribute__((weak)); void initVariant() { } -TaskHandle_t _loopHandle; uint32_t _loopStacksize = 1024*2; void setLoopStacksize(uint32_t size) @@ -38,7 +37,7 @@ static void loop_task(void* arg) loop(); // To compatible with most code where loop is not rtos-aware - taskYIELD(); + vTaskDelay(1); //taskYIELD(); } } @@ -56,6 +55,7 @@ int main( void ) setup(); // Create a task for loop() + TaskHandle_t _loopHandle; xTaskCreate( loop_task, "loop", _loopStacksize, NULL, TASK_PRIO_NORMAL, &_loopHandle); // Start FreeRTOS scheduler.