Microchip® Advanced Software Framework

Configuration struct for the TCC module base counter.

Structure for configuring a TCC as a counter.

#include <tcc.h>

Data Fields

enum tcc_clock_prescaler clock_prescaler
 Specifies the prescaler value for GCLK_TCC. More...
 
enum gclk_generator clock_source
 GCLK generator used to clock the peripheral. More...
 
uint32_t count
 Value to initialize the count register. More...
 
enum tcc_count_direction direction
 Specifies the direction for the TCC to count. More...
 
enum
tcc_count_overflow_dma_trigger_mode 
dma_trigger_mode
 Counter overflow trigger a DMA request mode. More...
 
bool oneshot
 When true, the counter will be stopped on the next hardware or software re-trigger event or overflow/underflow. More...
 
uint32_t period
 Period/top and period/top buffer values for counter. More...
 
enum tcc_reload_action reload_action
 Specifies the reload or reset time of the counter and prescaler resynchronization on a re-trigger event for the TCC. More...
 

enum gclk_generator tcc_counter_config::clock_source

GCLK generator used to clock the peripheral.

Referenced by configure_tcc(), configure_tcc_ramp2a_mode(), configure_tcc_ramp2c_mode(), tcc_get_config_defaults(), and tcc_init().

uint32_t tcc_counter_config::count

Value to initialize the count register.

Referenced by tcc_get_config_defaults(), and tcc_init().

enum tcc_count_direction tcc_counter_config::direction

Specifies the direction for the TCC to count.

Referenced by _tcc_build_ctrlb(), and tcc_get_config_defaults().

enum tcc_count_overflow_dma_trigger_mode tcc_counter_config::dma_trigger_mode

Counter overflow trigger a DMA request mode.

Referenced by tcc_get_config_defaults().

bool tcc_counter_config::oneshot

When true, the counter will be stopped on the next hardware or software re-trigger event or overflow/underflow.

Referenced by _tcc_build_ctrlb(), and tcc_get_config_defaults().

enum tcc_reload_action tcc_counter_config::reload_action

Specifies the reload or reset time of the counter and prescaler resynchronization on a re-trigger event for the TCC.

Referenced by _tcc_build_ctrla(), tcc_get_config_defaults(), and timer0_init().