for (;;) { idle_state_handle(); }

Hi,

I wonder if the 

"for (;;)
{
idle_state_handle();

}" can add additional code. Because I don't see that happening in the examples.

Parents
  • Hi,

    In principle you can add any code in the main loop, and you can see that done in various exsamples. the idle_state_handle is just a static function in the main.c file, so adding more there is equivalent to adding code to the main loop.

    When you have code in the main loop, it runs once every time the device wakes up based on an event or interrupt. Most applications will do normal/low pririty work there, and high priority work in interrupt/event handlers.

Reply
  • Hi,

    In principle you can add any code in the main loop, and you can see that done in various exsamples. the idle_state_handle is just a static function in the main.c file, so adding more there is equivalent to adding code to the main loop.

    When you have code in the main loop, it runs once every time the device wakes up based on an event or interrupt. Most applications will do normal/low pririty work there, and high priority work in interrupt/event handlers.

Children
No Data
Related