Analog Comparator Comparator channel configuration structure.
Configuration structure for a comparator channel, to configure the input and output settings of the comparator.
#include <ac.h>
Data Fields | |
bool | enable_hysteresis |
When true , hysteresis mode is enabled on the comparator inputs. More... | |
enum ac_chan_filter | filter |
Filtering mode for the comparator output, when the comparator is used in a supported mode. More... | |
enum ac_hysteresis_level | hysteresis_level |
Hysteresis level of the comparator channel. More... | |
enum ac_chan_interrupt_selection | interrupt_selection |
Interrupt criteria for the comparator channel, to select the condition that will trigger a callback. More... | |
enum ac_chan_neg_mux | negative_input |
Input multiplexer selection for the comparator's negative input pin. More... | |
enum ac_chan_output | output_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. More... | |
enum ac_chan_pos_mux | positive_input |
Input multiplexer selection for the comparator's positive input pin. More... | |
bool | run_in_standby |
If true , the comparator will continue to sample during sleep mode when triggered. More... | |
enum ac_chan_sample_mode | sample_mode |
Sampling mode of the comparator channel. More... | |
uint8_t | vcc_scale_factor |
Scaled VCC voltage division factor for the channel, when a comparator pin is connected to the VCC voltage scalar input. More... | |
bool ac_chan_config::enable_hysteresis |
When true
, hysteresis mode is enabled on the comparator inputs.
Referenced by ac_chan_get_config_defaults().
enum ac_chan_filter ac_chan_config::filter |
Filtering mode for the comparator output, when the comparator is used in a supported mode.
Referenced by ac_chan_get_config_defaults(), and configure_ac().
enum ac_hysteresis_level ac_chan_config::hysteresis_level |
Hysteresis level of the comparator channel.
Referenced by ac_chan_get_config_defaults().
enum ac_chan_interrupt_selection ac_chan_config::interrupt_selection |
Interrupt criteria for the comparator channel, to select the condition that will trigger a callback.
Referenced by ac_chan_get_config_defaults(), and configure_ac_channel().
enum ac_chan_neg_mux ac_chan_config::negative_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.
Referenced by ac_chan_get_config_defaults(), configure_ac(), configure_ac_channel(), run_ac_init_test(), setup_ac_callback_mode_test(), and setup_ac_window_mode_test().
enum ac_chan_output ac_chan_config::output_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.
Referenced by ac_chan_get_config_defaults(), and configure_ac().
enum ac_chan_pos_mux ac_chan_config::positive_input |
Input multiplexer selection for the comparator's positive input pin.
Referenced by ac_chan_get_config_defaults(), configure_ac(), configure_ac_channel(), run_ac_init_test(), setup_ac_callback_mode_test(), and setup_ac_window_mode_test().
bool ac_chan_config::run_in_standby |
If true
, the comparator will continue to sample during sleep mode when triggered.
Referenced by ac_chan_get_config_defaults().
enum ac_chan_sample_mode ac_chan_config::sample_mode |
Sampling mode of the comparator channel.
Referenced by ac_chan_get_config_defaults(), configure_ac(), configure_ac_channel(), run_ac_init_test(), setup_ac_callback_mode_test(), and setup_ac_window_mode_test().
uint8_t ac_chan_config::vcc_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.
Referenced by ac_chan_get_config_defaults(), configure_ac(), configure_ac_channel(), run_ac_init_test(), setup_ac_callback_mode_test(), and setup_ac_window_mode_test().