first commit
This commit is contained in:
16
Perf_Sketch_C/Perf_Sketch_C.ino
Executable file
16
Perf_Sketch_C/Perf_Sketch_C.ino
Executable file
@@ -0,0 +1,16 @@
|
||||
#include <avr/sleep.h>
|
||||
|
||||
void setup ()
|
||||
{
|
||||
set_sleep_mode (SLEEP_MODE_PWR_DOWN);
|
||||
noInterrupts (); // timed sequence follows
|
||||
sleep_enable();
|
||||
|
||||
// turn off brown-out enable in software
|
||||
MCUCR = bit (BODS) | bit (BODSE); // turn on brown-out enable select
|
||||
MCUCR = bit (BODS); // this must be done within 4 clock cycles of above
|
||||
interrupts (); // guarantees next instruction executed
|
||||
sleep_cpu (); // sleep within 3 clock cycles of above
|
||||
} // end of setup
|
||||
|
||||
void loop () { }
|
||||
Reference in New Issue
Block a user