Skip to content

Commit 3a3cfe4

Browse files
committed
Move freertos hook between setup() and loop()
This gives the chance for users to create new threads/queues in setup() without race conditions
1 parent 95113d2 commit 3a3cfe4

File tree

2 files changed

+1
-2
lines changed
  • cores/arduino
  • libraries/Arduino_FreeRTOS/src/portable/FSP

2 files changed

+1
-2
lines changed

Diff for: cores/arduino/main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ void arduino_main(void)
112112
Serial.begin(115200);
113113
#endif
114114
startAgt();
115-
start_freertos_on_header_inclusion();
116115
setup();
116+
start_freertos_on_header_inclusion();
117117
while (1)
118118
{
119119
loop();

Diff for: libraries/Arduino_FreeRTOS/src/portable/FSP/port.c

-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ static void prvTaskExitError(void);
226226
#endif
227227

228228
void loop_thread_func(void* arg) {
229-
setup();
230229
while (1)
231230
{
232231
loop();

0 commit comments

Comments
 (0)