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 1. Parameters
Data direction Parameter name Description

[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 2. Return Values
Return value Description

STATUS_OK

The PATT register is updated successfully

STATUS_ERR_INVALID_ARG

An invalid line index was supplied