Hacker News new | past | comments | ask | show | jobs | submit login

Most microcontrollers let you configure a timer that runs while the processor is in sleep, then triggers an interrupt to wake you up.

In this style of coding you end up with

  main()
  {
  configure_interrupts();
  while(1)
  {
     do_irq_bottom_halves();
     sleep(); // "wfi" in ARM
  }
  }



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: