25.6.4.10.1 Function tcc_set_pattern()

Sets the TCC module waveform output pattern.

enum status_code tcc_set_pattern( const struct tcc_module *const module_inst, const uint32_t line_index, const enum tcc_output_pattern pattern)

Force waveform output line to generate specific pattern (0, 1, or as is).

If double buffering is enabled it always write to the buffer register. The value will then be updated immediately by calling tcc_force_double_buffer_update(), or be updated when the lock update bit is cleared and the UPDATE condition happen.

Table 25-47. Parameters
Data directionParameter nameDescription

[in]

module_inst

Pointer to the software module instance struct

[in]

line_index

Output line index

[in]

pattern

Output pattern to use (tcc_output_pattern)

Returns

Status of the pattern set procedure.

Table 25-48. Return Values
Return valueDescription

STATUS_OK

The PATT register is updated successfully

STATUS_ERR_INVALID_ARG

An invalid line index was supplied