Atmel Software Framework

adc2.c File Reference

ADC Controller driver.

Copyright (c) 2013-2015 Atmel Corporation. All rights reserved.

#include "adc2.h"
#include "sleepmgr.h"
#include "status_codes.h"
#include "sysclk.h"

Macros

#define ADC_NUM_OF_INTERRUPT_SOURCE   (24UL)
 
#define ADC_SEQ1_CHANNEL_NUM   (8UL)
 

Functions

void adc_configure_sequence (Adc *const adc, const enum adc_channel_num ch_list[], uint8_t uc_num)
 Configure conversion sequence. More...
 
void adc_disable (void)
 Disable ADC Module. More...
 
void adc_disable_interrupt (Adc *const adc, enum adc_interrupt_source interrupt_source)
 Disable ADC interrupts. More...
 
void adc_enable (void)
 Enable ADC Module. More...
 
void adc_enable_interrupt (Adc *const adc, enum adc_interrupt_source interrupt_source)
 Enable ADC interrupts. More...
 
void adc_get_config_defaults (struct adc_config *const cfg)
 Get the ADC default configurations. More...
 
void ADC_Handler (void)
 Interrupt handler for ADC. More...
 
enum status_code adc_init (Adc *const adc, struct adc_config *config)
 Initialize the ADC Module. More...
 
static void adc_interrupt (enum adc_interrupt_source source)
 Common ADC interrupt handler. More...
 
static void adc_process_callback (Adc *const adc)
 Call the callback function if the corresponding interrupt is asserted. More...
 
void adc_set_callback (Adc *const adc, enum adc_interrupt_source source, adc_callback_t callback, uint8_t irq_level)
 Set callback for ADC. More...
 
void adc_set_comparison_mode (Adc *const adc, const enum adc_cmp_mode mode, const enum adc_channel_num channel, uint8_t cmp_filter)
 Configure comparison mode. More...
 
static void adc_set_config (Adc *const adc, struct adc_config *config)
 Configure the ADC Module. More...
 
void adc_set_power_mode (Adc *const adc, const enum adc_power_mode mode)
 Configure ADC power mode. More...
 
void adc_set_resolution (Adc *const adc, const enum adc_resolution res)
 Configure conversion resolution. More...
 

Variables

adc_callback_t adc_callback_pointer [ADC_NUM_OF_INTERRUPT_SOURCE]
 
const uint32_t adc_interrupt_mask [ADC_NUM_OF_INTERRUPT_SOURCE]