SAM D21 Analog Comparator Examples.
Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.
#include <asf.h>
Macros | |
#define | AC_FALSE_SPIKE_PREVENTER 2 |
#define | AC_LEVEL_CROSS_DETECTOR 0 |
#define | AC_MODE AC_LEVEL_CROSS_DETECTOR |
#define | AC_SLEEP_WALKING 3 |
#define | AC_WINDOW_DETECTOR 1 |
#define | CONF_EVENT_GENERATOR EVSYS_ID_GEN_RTC_OVF |
#define | CONF_EVENT_USER EVSYS_ID_USER_AC_SOC_0 |
Functions | |
void | ac_detect_callback (struct ac_module *const module_inst) |
void | configure_ac (void) |
void | configure_event (void) |
void | configure_rtc (void) |
int | main (void) |
Variables | |
struct ac_module | ac_instance |
struct events_resource | resource |
struct rtc_module | rtc_instance |
#define AC_FALSE_SPIKE_PREVENTER 2 |
#define AC_LEVEL_CROSS_DETECTOR 0 |
#define AC_MODE AC_LEVEL_CROSS_DETECTOR |
#define AC_SLEEP_WALKING 3 |
#define AC_WINDOW_DETECTOR 1 |
#define CONF_EVENT_GENERATOR EVSYS_ID_GEN_RTC_OVF |
#define CONF_EVENT_USER EVSYS_ID_USER_AC_SOC_0 |
void ac_detect_callback | ( | struct ac_module *const | module_inst | ) |
void configure_ac | ( | void | ) |
References AC_CHAN_CHANNEL_0, ac_chan_enable(), AC_CHAN_FILTER_MAJORITY_5, AC_CHAN_FILTER_NONE, AC_CHAN_INTERRUPT_SELECTION_TOGGLE, AC_CHAN_MODE_CONTINUOUS, AC_CHAN_NEG_MUX_SCALED_VCC, AC_CHAN_OUTPUT_SYNCHRONOUS, AC_CHAN_POS_MUX_PIN0, ac_chan_set_config(), ac_enable(), ac_get_config_defaults(), ac_init(), ac_instance, system_pinmux_config::direction, ac_chan_config::enable_hysteresis, ac_chan_config::filter, system_pinmux_config::input_pull, ac_chan_config::interrupt_selection, system_pinmux_config::mux_position, ac_chan_config::negative_input, ac_chan_config::output_mode, ac_chan_config::positive_input, system_pinmux_config::powersave, ac_chan_config::sample_mode, SYSTEM_PINMUX_PIN_DIR_OUTPUT, SYSTEM_PINMUX_PIN_PULL_NONE, system_pinmux_pin_set_config(), and ac_chan_config::vcc_scale_factor.
Referenced by main().
void configure_event | ( | void | ) |
Referenced by main().
void configure_rtc | ( | void | ) |
Referenced by main().
int main | ( | void | ) |
struct ac_module ac_instance |
Referenced by configure_ac(), and main().
struct events_resource resource |
Referenced by events_add_hook().
struct rtc_module rtc_instance |