Struct ArchAVR_TimerConfig
Defined in File arch_avr_timer.h
Nested Relationships
Nested Types
Struct Documentation
-
struct ArchAVR_TimerConfig
Configuration structure for ArchAVR_Timer.
Public Types
-
enum COM
Definition of actions to perform on a Compare Output when a CompareMatch event occurs.
Values:
-
enumerator COM_NoChange
No change to the output.
-
enumerator COM_Toggle
Toggle the output.
-
enumerator COM_Clear
Clear the output (set to zero)
-
enumerator COM_Set
Set the output (set to one)
-
enumerator COM_ToggleA
Toggle the output for channel A, no change for other channels.
-
enumerator COM_NoChange
-
enum Top
Definition of the value for the TOP event
Values:
-
enumerator Top_OnMax
Maximum permitted value (0xFF for 8-bits counter, 0xFFFF for 16-bits counters)
-
enumerator Top_OnFixed
Fixed value.
-
enumerator Top_OnCompA
TOP == OCRA.
-
enumerator Top_OnIC
TOP == ICR.
-
enumerator Top_OnMax
-
enum OCR
Definition of OCR update behaviour
Values:
-
enumerator OCR_Unbuffered
Immediate update.
-
enumerator OCR_UpdateOnTop
Update on TOP event.
-
enumerator OCR_UpdateOnBottom
Update on BOTTOM event.
-
enumerator OCR_Unbuffered
-
enum OVF
Definition of Overflow value
Values:
-
enumerator OVF_SetOnMax
OVF == MAX.
-
enumerator OVF_SetOnTop
OVF == TOP.
-
enumerator OVF_SetOnBottom
OVF == BOTTOM.
-
enumerator OVF_SetOnMax
-
typedef std::vector<COM_config_t> COM_variant_t
Array of COM variants.
See also
Public Members
-
bool is_16bits
Boolean indicating if the timer is 8-bits (false) or 16-bits (true)
-
std::vector<clock_config_t> clocks
List of clock source configurations.
-
std::vector<mode_config_t> modes
List of the timer mode configurations.
-
std::vector<COM_variant_t> 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)
-
std::vector<OC_config_t> oc_channels
List of Output Compare channel configurations.
-
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.
-
struct clock_config_t : public base_reg_config_t
Configuration structure for clock source/prescaler options.
-
struct COM_config_t : public base_reg_config_t
Configuration structure for one COM setting.
-
struct mode_config_t : public base_reg_config_t
Configuration structure for timer modes.
Public Members
-
unsigned int fixed_top_exp
Controls the fixed top value when top is set to Top_OnFixed. The fixed value is (2^n - 1), where n = (fixed_top_exp + 8)
-
bool double_slope
Controls the slope mode , false=single, true=double.
-
bool disable_foc
If true, a Forced Output Compare strobe has no effect.
-
unsigned int com_variant
Controls which COM config variant is used.
-
unsigned int fixed_top_exp
-
struct OC_config_t : public base_reg_config_t
Configuration structure for one compare channel.
-
struct vector_config_t
Configuration structure for one interrupt vector.
-
enum COM