ATmega328p
Hardware definitions
Loading...
Searching...
No Matches
atmega328p::power Namespace Reference

Power management definitions. More...

Enumerations

enum class  SleepMode : uint8_t {
  Idle = 0 , ADCNoiseReduction = 1 , PowerDown = 2 , PowerSave = 3 ,
  Standby = 6 , ExtendedStandby = 7
}
 Supported sleep modes. More...
enum  PowerReduction : uint8_t {
  adc = 0x01 , usart0 = 0x02 , spi = 0x04 , timer1 = 0x08 ,
  timer0 = 0x20 , timer2 = 0x40 , twi = 0x80
}
 Peripheral clock-disable masks. More...
enum  : uint8_t { sleep_mode_count = 6U , power_reduction_module_count = 7U , bod_can_be_disabled_during_sleep = 1 }

Detailed Description

Power management definitions.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum : uint8_t
Enumerator
sleep_mode_count 

Number of sleep mode.

power_reduction_module_count 

Number of power reduction module.

bod_can_be_disabled_during_sleep 

BOD can be disabled during sleep.

◆ PowerReduction

Peripheral clock-disable masks.

Enumerator
adc 

0x01 - Disable adc peripheral clock.

usart0 

0x02 - Disable usart0 peripheral clock.

spi 

0x04 - Disable spi peripheral clock.

timer1 

0x08 - Disable timer1 peripheral clock.

timer0 

0x20 - Disable timer0 peripheral clock.

timer2 

0x40 - Disable timer2 peripheral clock.

twi 

0x80 - Disable twi peripheral clock.

◆ SleepMode

enum class atmega328p::power::SleepMode : uint8_t
strong

Supported sleep modes.

Enumerator
Idle 

0 - CPU stopped; peripheral clocks active.

ADCNoiseReduction 

1 - Reduced noise during ADC conversion.

PowerDown 

2 - Oscillator stopped; asynchronous wake-up.

PowerSave 

3 - Power-down with asynchronous Timer2 available.

Standby 

6 - Crystal oscillator remains running.

ExtendedStandby 

7 - Standby with asynchronous Timer2 available.