24.6.2.4 Struct tc_config
Configuration struct for a TC instance. This structure should be initialized by the tc_get_config_defaults function before being modified by the user application.
Type | Name | Description |
---|---|---|
union tc_config.@1 | @1 |
Access the different counter size settings though this configuration member. |
enum tc_clock_prescaler | clock_prescaler |
Specifies the prescaler value for GCLK_TC. |
enum gclk_generator | clock_source |
GCLK generator used to clock the peripheral. |
enum tc_count_direction | count_direction |
Specifies the direction for the TC to count. |
enum tc_counter_size | counter_size |
Specifies either 8-, 16-, or 32-bit counter size. |
bool | double_buffering_enabled |
Set to true to enable double buffering write. When enabled any write through tc_set_top_value(), tc_set_compare_value() and will direct to the buffer register as buffered value, and the buffered value will be committed to effective register on UPDATE condition, if update is not locked. |
bool | enable_capture_on_channel[] |
Specifies which channel(s) to enable channel capture operation on. |
bool | enable_capture_on_IO[] |
Specifies which channel(s) to enable I/O capture operation on. |
bool | oneshot |
When true, one-shot will stop the TC on next hardware or software re-trigger event or overflow/underflow. |
struct tc_pwm_channel | pwm_channel[] |
Specifies the PWM channel for TC. |
enum tc_reload_action | reload_action |
Specifies the reload or reset time of the counter and prescaler resynchronization on a re-trigger event for the TC. |
bool | run_in_standby |
When true the module is enabled during standby. |
enum tc_wave_generation | wave_generation |
Specifies which waveform generation mode to use. |
uint8_t | waveform_invert_output |
Specifies which channel(s) to invert the waveform on. For SAM L21/L22/C20/C21, it's also used to invert IO input pin. |