From d67df9a6dc76ba52f32fa4c0b141825b97a2fbc8 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 20 May 2011 01:35:49 -0700 Subject: src-avr: Add 'sleep_cpu' to reduce power usage while idle Signed-off-by: Keith Packard --- src-avr/ao_timer.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src-avr/ao_timer.c') diff --git a/src-avr/ao_timer.c b/src-avr/ao_timer.c index cc48dd2a..f0918a7d 100644 --- a/src-avr/ao_timer.c +++ b/src-avr/ao_timer.c @@ -162,6 +162,9 @@ ao_clock_init(void) PLLCSR |= (1 << PLLE); while (!(PLLCSR & (1 << PLOCK))) ; + + set_sleep_mode(SLEEP_MODE_IDLE); + sleep_enable(); #else /* Switch system clock to crystal oscilator */ CLKCON = (CLKCON & ~CLKCON_OSC_MASK) | (CLKCON_OSC_XTAL); -- cgit v1.2.3