ATmega328p
Hardware definitions
Loading...
Searching...
No Matches
PWM.h File Reference

PWM channels, timers, and resolutions. More...

#include <stdint.h>
#include "Config.h"
#include "Pin.h"
#include "Timer.h"
Include dependency graph for PWM.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  atmega328p
 Device-specific definitions for the ATmega328P.
namespace  atmega328p::pwm
 PWM channel definitions.

Enumerations

enum class  atmega328p::pwm::Channel : uint8_t {
  atmega328p::pwm::OC0A = 0 , atmega328p::pwm::OC0B = 1 , atmega328p::pwm::OC1A = 2 , atmega328p::pwm::OC1B = 3 ,
  atmega328p::pwm::OC2A = 4 , atmega328p::pwm::OC2B = 5
}
 Peripheral channel identifiers. More...
enum class  atmega328p::pwm::Mode : uint8_t { atmega328p::pwm::Fast , atmega328p::pwm::PhaseCorrect , atmega328p::pwm::PhaseAndFrequencyCorrect }
 Peripheral operating modes. More...
enum class  atmega328p::pwm::OutputPin : uint8_t {
  atmega328p::pwm::OC0A = 0x26 , atmega328p::pwm::OC0B = 0x25 , atmega328p::pwm::OC1A = 0x01 , atmega328p::pwm::OC1B = 0x02 ,
  atmega328p::pwm::OC2A = 0x03 , atmega328p::pwm::OC2B = 0x23
}
 Logical pins carrying the output-compare channels. More...
enum  : uint8_t {
  atmega328p::pwm::channel_count = 6U , atmega328p::pwm::timer0_resolution_bits = 8U , atmega328p::pwm::timer1_min_resolution_bits = 2U , atmega328p::pwm::timer1_max_resolution_bits = 16U ,
  atmega328p::pwm::timer2_resolution_bits = 8U , atmega328p::pwm::timer0_supports_fast = 1 , atmega328p::pwm::timer0_supports_phase_correct = 1 , atmega328p::pwm::timer0_supports_phase_frequency_correct = 0 ,
  atmega328p::pwm::timer1_supports_fast = 1 , atmega328p::pwm::timer1_supports_phase_correct = 1 , atmega328p::pwm::timer1_supports_phase_frequency_correct = 1 , atmega328p::pwm::timer2_supports_fast = 1 ,
  atmega328p::pwm::timer2_supports_phase_correct = 1 , atmega328p::pwm::timer2_supports_phase_frequency_correct = 0
}

Detailed Description

PWM channels, timers, and resolutions.