Skip to content

Commit 0a65641

Browse files
committed
No need for the separate ISR routine: just check
1 parent e51b6f4 commit 0a65641

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

cores/nRF5/main.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,14 @@ void suspendLoop(void)
102102

103103
void resumeLoop(void)
104104
{
105-
vTaskResume(_loopHandle);
106-
}
107-
108-
void resumeLoopFromISR(void) {
109-
xTaskResumeFromISR(_loopHandle);
105+
if ( isInISR() )
106+
{
107+
xTaskResumeFromISR(_loopHandle);
108+
}
109+
else
110+
{
111+
vTaskResume(_loopHandle);
112+
}
110113
}
111114

112115
extern "C"

0 commit comments

Comments
 (0)