I am using SDK 15.3 and wanted to ask that if there is a while loop where I can check flags and increment tickers. The program at the moment gets stuck inside
for (;;) { idle_state_handle(); }
Suggestions would be greatly appreciated.
I am using SDK 15.3 and wanted to ask that if there is a while loop where I can check flags and increment tickers. The program at the moment gets stuck inside
for (;;) { idle_state_handle(); }
Suggestions would be greatly appreciated.
Hi,
I'm not sure I understand your question, could you elaborate? Which example are you using? Idle_state_handle() is a function that puts the nRF to sleep until the next event.
regards
Jared
Ok so if I want to check an if statement inside the for loop, would it be checked? like e.g.
for (;;) { idle_state_handle(); if (flag == 1) { perform_blink(); flag == 0; } }
will the perform_blink() function be performed each time the flag is raised?
Hi,
Yes, perform_blink() function should be called after the CPU has returned after waking up from IDLE.
regards
Jared
Great will give it a go.
Great will give it a go.