1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-07-03 02:33:16 +03:00

atusb/fw/atusb.c (main): sleep (idle mode) while waiting for interrupts

This saves about 2 mA, leaving about 8 mA when idle. The transceiver
should consume 0.5 mA in TRX_OFF, CLKM up to 4 mA, and the idle MCU
core 1 mA. USB current is unknown.
This commit is contained in:
Werner Almesberger 2011-06-11 14:31:13 -03:00
parent b42577bb72
commit ce16a16f73

View File

@ -14,6 +14,7 @@
#include <stdint.h>
#include <avr/io.h>
#include <avr/sleep.h>
#include <avr/interrupt.h>
#include "usb.h"
@ -43,5 +44,6 @@ int main(void)
sei();
while (1);
while (1)
sleep_mode();
}