24.6.4.9.2 Function tc_set_compare_value()

Sets a TC module compare value.

enum status_code tc_set_compare_value( const struct tc_module *const module_inst, const enum tc_compare_capture_channel channel_index, const uint32_t compare_value)

Writes a compare value to the given TC module compare/capture channel.

Table 24-31. Parameters
Data directionParameter nameDescription

[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

Returns

Status of the compare update procedure.

Table 24-32. Return Values
Return valueDescription

STATUS_OK

The compare value was updated successfully

STATUS_ERR_INVALID_ARG

An invalid channel index was supplied