25.6.4.13.11 Function tcc_set_double_buffer_compare_values()
Sets a TCC module compare value and buffer value.
enum status_code tcc_set_double_buffer_compare_values( struct tcc_module *const module_inst, enum tcc_match_capture_channel channel_index, const uint32_t compare, const uint32_t compare_buffer)
Writes compare value and buffer to the given TCC module compare/capture channel. Usually as preparation for double buffer or circulared double buffer (circular buffer).
| Data direction | Parameter name | Description |
|---|---|---|
|
[in] |
module_inst |
Pointer to the software module instance struct |
|
[in] |
channel_index |
Index of the compare channel to write to |
|
[in] |
compare |
New compare value to set |
|
[in] |
compare_buffer |
New compare buffer value to set |
Returns
Status of the compare update procedure.
| Return value | Description |
|---|---|
|
STATUS_OK |
The compare value was updated successfully |
|
STATUS_ERR_INVALID_ARG |
An invalid channel index was supplied or compare value exceed resolution |
