Parameters
instance | The TCC peripheral instance as numbered in the data sheet, or 0. |
- period | The period to set. |
+ period | The period to set. |
+ buffered | If true, sets the period in the buffered register, which will be loaded at the next UPDATE condition. If false, sets the period directly. Note that double buffering is not available on the SAM D11 and SAM D21, and a value of true on those platforms will be ignored. |
diff --git a/tcc_8h_source.html b/tcc_8h_source.html
index 9c4427a..f1957ce 100644
--- a/tcc_8h_source.html
+++ b/tcc_8h_source.html
@@ -161,36 +161,39 @@
-
-
- 175void tcc_set_cc(uint8_t instance, uint8_t channel, uint32_t value);
-
-
-
-
-
-
-
-
-
-
-
-
-void tcc_disable(uint8_t instance)
Disables the TCC, but retains all its settings.
Definition tcc.c:125
+ 170void tcc_set_period(uint8_t instance, uint32_t period,
bool buffered);
+
+
+
+ 190void tcc_set_cc(uint8_t instance, uint8_t channel, uint32_t value,
bool buffered);
+
+
+
+
+
+
+
+
+
+
+
+
+void tcc_set_period(uint8_t instance, uint32_t period, bool buffered)
Sets the period of the TCC.
Definition tcc.c:89
+void tcc_disable(uint8_t instance)
Disables the TCC, but retains all its settings.
Definition tcc.c:147
void tcc_set_run_in_standby(uint8_t instance, bool runStandby)
Sets whether the TCC should run in standby mode.
Definition tcc.c:56
-void tcc_set_count(uint8_t instance, uint32_t value)
Sets the value of the counter.
Definition tcc.c:99
-void tcc_set_cc(uint8_t instance, uint8_t channel, uint32_t value)
Sets the value of a compare channel.
Definition tcc.c:94
-uint32_t tcc_get_count(uint8_t instance)
Gets the current value of the counter.
Definition tcc.c:104
+void tcc_set_count(uint8_t instance, uint32_t value)
Sets the value of the counter.
Definition tcc.c:121
+uint32_t tcc_get_period(uint8_t instance)
Gets the period of the TCC.
Definition tcc.c:103
+uint32_t tcc_get_count(uint8_t instance)
Gets the current value of the counter.
Definition tcc.c:126
bool tcc_init(uint8_t instance, generic_clock_generator_t clocksource, tcc_prescaler_value_t prescaler)
Enables the peripheral clock for the TCC and clocks it with the selected clock source....
Definition tcc.c:33
void tcc_set_output_matrix(uint8_t instance, tcc_output_matrix_t mode)
Sets the output matrix for the TCC.
Definition tcc.c:64
bool tcc_is_enabled(uint8_t instance)
Checks whether the TCC is enabled.
Definition tcc.c:85
void tcc_enable(uint8_t instance)
Enables the TCC. Make sure to call tcc_init first to set it up.
Definition tcc.c:80
void tcc_set_wavegen(uint8_t instance, tcc_wavegen_t mode)
Sets the waveform generation mode for the TCC.
Definition tcc.c:60
-void tcc_stop(uint8_t instance)
Issues a STOP command to the TCC.
Definition tcc.c:110
-void tcc_update(uint8_t instance)
Issues an UPDATE command to the TCC.
Definition tcc.c:120
+void tcc_stop(uint8_t instance)
Issues a STOP command to the TCC.
Definition tcc.c:132
+void tcc_update(uint8_t instance)
Issues an UPDATE command to the TCC.
Definition tcc.c:142
void tcc_set_channel_polarity(uint8_t instance, uint8_t channel, tcc_channel_polarity_t polarity)
Sets the polarity of a channel.
Definition tcc.c:68
-void tcc_retrigger(uint8_t instance)
Issues a RETRIGGER command to the TCC.
Definition tcc.c:115
-void tcc_set_period(uint8_t instance, uint32_t period)
Sets the period of the TCC.
Definition tcc.c:89
+void tcc_set_cc(uint8_t instance, uint8_t channel, uint32_t value, bool buffered)
Sets the value of a compare channel.
Definition tcc.c:107
+void tcc_retrigger(uint8_t instance)
Issues a RETRIGGER command to the TCC.
Definition tcc.c:137