Skip to content

Commit 6c66cd1

Browse files
authored
Merge pull request #558 from kevinfrei/resume-task
Add resumeLoop functionality
2 parents 3951aaa + 147c824 commit 6c66cd1

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

cores/nRF5/Arduino.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ void setup( void ) ;
3636
void loop( void ) ;
3737

3838
void suspendLoop(void);
39+
void resumeLoop(void);
3940

4041
#include "WVariant.h"
4142

cores/nRF5/main.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,18 @@ void suspendLoop(void)
100100
vTaskSuspend(_loopHandle);
101101
}
102102

103+
void resumeLoop(void)
104+
{
105+
if ( isInISR() )
106+
{
107+
xTaskResumeFromISR(_loopHandle);
108+
}
109+
else
110+
{
111+
vTaskResume(_loopHandle);
112+
}
113+
}
114+
103115
extern "C"
104116
{
105117

0 commit comments

Comments
 (0)