13 lines
269 B
C
13 lines
269 B
C
#ifndef POWER_SAVING_H
|
|
#define POWER_SAVING_H
|
|
|
|
#include <avr/io.h>
|
|
#include "bitwise.h"
|
|
|
|
|
|
inline void initializePowerSaving() {
|
|
setBit(ACSR, ACD); // disable ADC to save power
|
|
PRR = BV(PRTIM1) | BV(PRADC); // disable power to timer1 and ADC
|
|
}
|
|
|
|
#endif
|