ATmega328p
Hardware definitions
Loading...
Searching...
No Matches
Power.h
Go to the documentation of this file.
1
5
6#ifndef ATMEGA328P_DEFINITIONS_POWER_H
7#define ATMEGA328P_DEFINITIONS_POWER_H
8
9#include <stdint.h>
10#include "Config.h"
11
13namespace atmega328p
14{
16 namespace power
17 {
19 enum class SleepMode : uint8_t
20 {
21 Idle = 0,
25 Standby = 6,
27 };
28
30 enum PowerReduction : uint8_t
31 {
32 adc = 0x01,
33 usart0 = 0x02,
34 spi = 0x04,
35 timer1 = 0x08,
36 timer0 = 0x20,
37 timer2 = 0x40,
38 twi = 0x80,
39 };
40
41 enum : uint8_t
42 {
46 };
47 }
48}
49
50#endif
Selects the ATmega328P package and operating grade.
Power management definitions.
Definition Power.h:17
@ power_reduction_module_count
Number of power reduction module.
Definition Power.h:44
@ bod_can_be_disabled_during_sleep
BOD can be disabled during sleep.
Definition Power.h:45
@ sleep_mode_count
Number of sleep mode.
Definition Power.h:43
PowerReduction
Peripheral clock-disable masks.
Definition Power.h:31
@ timer0
0x20 - Disable timer0 peripheral clock.
Definition Power.h:36
@ spi
0x04 - Disable spi peripheral clock.
Definition Power.h:34
@ usart0
0x02 - Disable usart0 peripheral clock.
Definition Power.h:33
@ twi
0x80 - Disable twi peripheral clock.
Definition Power.h:38
@ timer1
0x08 - Disable timer1 peripheral clock.
Definition Power.h:35
@ timer2
0x40 - Disable timer2 peripheral clock.
Definition Power.h:37
@ adc
0x01 - Disable adc peripheral clock.
Definition Power.h:32
SleepMode
Supported sleep modes.
Definition Power.h:20
@ ADCNoiseReduction
1 - Reduced noise during ADC conversion.
Definition Power.h:22
@ Standby
6 - Crystal oscillator remains running.
Definition Power.h:25
@ PowerDown
2 - Oscillator stopped; asynchronous wake-up.
Definition Power.h:23
@ ExtendedStandby
7 - Standby with asynchronous Timer2 available.
Definition Power.h:26
@ PowerSave
3 - Power-down with asynchronous Timer2 available.
Definition Power.h:24
@ Idle
0 - CPU stopped; peripheral clocks active.
Definition Power.h:21
Device-specific definitions for the ATmega328P.
Definition ADC.h:14