This commit is contained in:
hathach committed 2017-01-06 21:20:58 +07:00
1 parent d7bff70718
commit 9535c64051
2 files changed
+2 -3

No files matched your search

-1
View File
@@ -34,7 +34,6 @@ void yield( void ) ;
/* sketch */
void setup( void ) ;
void loop( void ) ;
void setLoopStacksize(uint32_t size);
#include "WVariant.h"
+2 -2
View File
@@ -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.