1.6.2.1 Struct ac_chan_config

Configuration structure for a comparator channel, to configure the input and output settings of the comparator.

Table 1-1. Members
TypeNameDescription
boolenable_hysteresis

When true, hysteresis mode is enabled on the comparator inputs

enum ac_chan_filterfilter

Filtering mode for the comparator output, when the comparator is used in a supported mode

enum ac_hysteresis_levelhysteresis_level

Hysteresis level of the comparator channel

enum ac_chan_interrupt_selectioninterrupt_selection

Interrupt criteria for the comparator channel, to select the condition that will trigger a callback

enum ac_chan_neg_muxnegative_input

Input multiplexer selection for the comparator's negative input pin. Any internal reference source, such as a bandgap reference voltage or the DAC, must be configured and enabled prior to its use as a comparator input.

enum ac_chan_outputoutput_mode

Output mode of the comparator, whether it should be available for internal use, or asynchronously/synchronously linked to a general-purpose input/output (GPIO) pin

enum ac_chan_pos_muxpositive_input

Input multiplexer selection for the comparator's positive input pin

boolrun_in_standby

If true, the comparator will continue to sample during sleep mode when triggered

enum ac_chan_sample_modesample_mode

Sampling mode of the comparator channel

uint8_tvcc_scale_factor

Scaled VCC voltage division factor for the channel, when a comparator pin is connected to the VCC voltage scalar input. The formular is: Vscale = Vdd * vcc_scale_factor / 64. If the VCC voltage scalar is not selected as a comparator channel pin's input, this value will be ignored.