aboutsummaryrefslogtreecommitdiff
path: root/kernel/sched/idle.c
blob: d55d694d7ff3582dd3e4a38dc1a644d6e0f13274 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <avr/interrupt.h>
#include <avr/sleep.h>
#include <avr/power.h>
#include "sched/idle.h"
#include "tshield/tshield.h"

void idle_entry(char args) {
  while(1) {
    set_sleep_mode(SLEEP_MODE_IDLE);
    cli();
    sleep_enable();
    sei();
    sleep_cpu();
    sleep_disable();
  };
}