ArchAVR_TimerConfig Struct Reference

yasimavr: ArchAVR_TimerConfig Struct Reference
yasimavr
Loading...
Searching...
No Matches

Configuration structure for ArchAVR_Timer. More...

#include <arch_avr_timer.h>

Classes

struct  clock_config_t
 Configuration structure for clock source/prescaler options. More...
 
struct  COM_config_t
 Configuration structure for one COM setting. More...
 
struct  mode_config_t
 Configuration structure for timer modes. More...
 
struct  OC_config_t
 Configuration structure for one compare channel. More...
 
struct  vector_config_t
 Configuration structure for one interrupt vector. More...
 

Public Types

enum  COM {
  COM_NoChange = 0 , COM_Toggle , COM_Clear , COM_Set ,
  COM_ToggleA
}
 
enum  Top { Top_OnMax = 0 , Top_OnFixed , Top_OnCompA , Top_OnIC }
 
enum  OCR { OCR_Unbuffered = 0 , OCR_UpdateOnTop , OCR_UpdateOnBottom }
 
enum  OVF { OVF_SetOnMax = 0 , OVF_SetOnTop , OVF_SetOnBottom }
 
typedef std::vector< COM_config_tCOM_variant_t
 Array of COM variants.
 

Public Attributes

bool is_16bits
 Boolean indicating if the timer is 8-bits (false) or 16-bits (true)
 
std::vector< clock_config_tclocks
 List of clock source configurations.
 
std::vector< mode_config_tmodes
 List of the timer mode configurations.
 
std::vector< COM_variant_tcom_modes
 
std::vector< OC_config_toc_channels
 List of Output Compare channel configurations.
 
regbit_t rb_clock
 Regbit for the clock/prescaler configuration register.
 
regbit_compound_t rbc_mode
 Regbit for the timer mode control register.
 
reg_addr_t reg_cnt
 Counter register address.
 
reg_addr_t reg_icr
 Input compare register address.
 
reg_addr_t reg_int_enable
 Interrupt enable register address.
 
reg_addr_t reg_int_flag
 Interrupt flag register address.
 
vector_config_t vect_ovf
 Overflow Interrupt configuration.
 
vector_config_t vect_icr
 Input Capture Interrupt configuration.
 

Detailed Description

Configuration structure for ArchAVR_Timer.

Member Typedef Documentation

◆ COM_variant_t

Array of COM variants.

See also
com_modes

Member Enumeration Documentation

◆ COM

Definition of actions to perform on a Compare Output when a CompareMatch event occurs.

Enumerator
COM_NoChange 

No change to the output.

COM_Toggle 

Toggle the output.

COM_Clear 

Clear the output (set to zero)

COM_Set 

Set the output (set to one)

COM_ToggleA 

Toggle the output for channel A, no change for other channels.

◆ OCR

Definition of OCR update behaviour

Enumerator
OCR_Unbuffered 

Immediate update.

OCR_UpdateOnTop 

Update on TOP event.

OCR_UpdateOnBottom 

Update on BOTTOM event.

◆ OVF

Definition of Overflow value

Enumerator
OVF_SetOnMax 

OVF == MAX.

OVF_SetOnTop 

OVF == TOP.

OVF_SetOnBottom 

OVF == BOTTOM.

◆ Top

Definition of the value for the TOP event

Enumerator
Top_OnMax 

Maximum permitted value (0xFF for 8-bits counter, 0xFFFF for 16-bits counters)

Top_OnFixed 

Fixed value.

Top_OnCompA 

TOP == OCRA.

Top_OnIC 

TOP == ICR.

Member Data Documentation

◆ clocks

std::vector<clock_config_t> ArchAVR_TimerConfig::clocks

List of clock source configurations.

◆ com_modes

std::vector<COM_variant_t> ArchAVR_TimerConfig::com_modes

List of COM enum values The COM values are presented in a 2D vector, indexed by:

  • a variant index, selected by the timer mode (in mode_config_t)
  • a OC mode selected by the OC channel mode field (in OC_config_t)

◆ is_16bits

bool ArchAVR_TimerConfig::is_16bits

Boolean indicating if the timer is 8-bits (false) or 16-bits (true)

◆ modes

std::vector<mode_config_t> ArchAVR_TimerConfig::modes

List of the timer mode configurations.

◆ oc_channels

std::vector<OC_config_t> ArchAVR_TimerConfig::oc_channels

List of Output Compare channel configurations.

◆ rb_clock

regbit_t ArchAVR_TimerConfig::rb_clock

Regbit for the clock/prescaler configuration register.

◆ rbc_mode

regbit_compound_t ArchAVR_TimerConfig::rbc_mode

Regbit for the timer mode control register.

◆ reg_cnt

reg_addr_t ArchAVR_TimerConfig::reg_cnt

Counter register address.

◆ reg_icr

reg_addr_t ArchAVR_TimerConfig::reg_icr

Input compare register address.

◆ reg_int_enable

reg_addr_t ArchAVR_TimerConfig::reg_int_enable

Interrupt enable register address.

◆ reg_int_flag

reg_addr_t ArchAVR_TimerConfig::reg_int_flag

Interrupt flag register address.

◆ vect_icr

vector_config_t ArchAVR_TimerConfig::vect_icr

Input Capture Interrupt configuration.

◆ vect_ovf

vector_config_t ArchAVR_TimerConfig::vect_ovf

Overflow Interrupt configuration.


The documentation for this struct was generated from the following file: