ADCIFA driver example.
Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.
#include <asf.h>
#include "conf_example.h"
Macros | |
#define | ADC_INTERRUPT_PRIORITY 0 |
#define | AVR32_ADCIFA_IRQ_GROUP 36 |
Functions | |
ISR (ADCIFA_interrupt_handler, AVR32_ADCIFA_IRQ_GROUP, ADC_INTERRUPT_PRIORITY) | |
This ISR is executed if the window 1 or window 2 or both of the window conditions are reached. More... | |
int | main (void) |
Main function to initialize the system and loop to display ADC values. More... | |
Variables | |
unsigned char volatile | window1 |
unsigned char volatile | window2 |
#define ADC_INTERRUPT_PRIORITY 0 |
Referenced by main().
#define AVR32_ADCIFA_IRQ_GROUP 36 |
ISR | ( | ADCIFA_interrupt_handler | , |
AVR32_ADCIFA_IRQ_GROUP | , | ||
ADC_INTERRUPT_PRIORITY | |||
) |
This ISR is executed if the window 1 or window 2 or both of the window conditions are reached.
References ADCIFA_clear_window_0, ADCIFA_clear_window_1, adcifa_disable_interrupt(), ADCIFA_is_window_0_set, ADCIFA_is_window_1_set, window1, and window2.
int main | ( | void | ) |
Main function to initialize the system and loop to display ADC values.
References adc_config_t, ADC_INTERRUPT_PRIORITY, ADCIFA_ADCREF0, adcifa_calibrate_offset(), ADCIFA_clear_eos_sequencer_0, adcifa_configure(), adcifa_configure_sequencer(), adcifa_configure_window_monitor(), adcifa_enable_interrupt(), adcifa_get_calibration_data(), adcifa_get_values_from_sequencer(), ADCIFA_HWLA_NOADJ, ADCIFA_SA_NO_EOS_SOFTACK, adcifa_sequence_opt, ADCIFA_SH_MODE_OVERSAMP, ADCIFA_SHG_1, ADCIFA_SHG_8, ADCIFA_SOCB_ALLSEQ, ADCIFA_SRES_12B, adcifa_start_sequencer(), ADCIFA_STATUS_COMPLETED, ADCIFA_TRGSEL_SOFT, ADCIFA_WINDOW_MODE_ABOVE, adcifa_sequencer_conversion_opt_t::channel_n, adcifa_sequencer_conversion_opt_t::channel_p, adcifa_sequencer_opt_t::convnb, delay_ms, Enable_global_interrupt, adcifa_opt_t::free_running_mode_enable, adcifa_opt_t::frequency, adcifa_sequencer_conversion_opt_t::gain, gpio_enable_module(), adcifa_sequencer_opt_t::half_word_adjustment, adcifa_window_monitor_opt_t::high_threshold, init_dbg_rs232(), irq_initialize_vectors, irq_register_handler, adcifa_window_monitor_opt_t::low_threshold, adcifa_window_monitor_opt_t::mode, adcifa_opt_t::mux_settle_more_time, print_dbg(), print_dbg_hex(), adcifa_opt_t::reference_source, adcifa_sequencer_opt_t::resolution, adcifa_opt_t::sample_and_hold_disable, adcifa_sequencer_opt_t::sh_mode, adcifa_opt_t::single_sequencer_mode, adcifa_opt_t::sleep_mode_enable, adcifa_sequencer_opt_t::software_acknowledge, adcifa_window_monitor_opt_t::source_index, adcifa_sequencer_opt_t::start_of_conversion, sysclk_get_cpu_hz(), sysclk_init(), adcifa_sequencer_opt_t::trigger_selection, window1, and window2.