Function ac_win_enable()

Enables an Analog Comparator window channel that was previously configured.

enum status_code ac_win_enable(
		struct ac_module *const module_inst,
		const enum ac_win_channel win_channel)

Enables and starts an Analog Comparator window channel.

Note: The comparator channels used by the window channel must be configured and enabled before calling this function. The two comparator channels forming each window comparator pair must have identical configurations other than the negative pin multiplexer setting.
Table 1. Parameters
Data direction Parameter name Description

[in]

module_inst

Software instance for the Analog Comparator peripheral

[in]

win_channel

Comparator window channel to enable

Returns

Status of the window enable procedure.

Table 2. Return Values
Return value Description

STATUS_OK

The window comparator was enabled

STATUS_ERR_IO

One or both comparators in the window comparator pair is disabled

STATUS_ERR_BAD_FORMAT

The comparator channels in the window pair were not configured correctly