Microchip® Advanced Software Framework

adc.c File Reference

Analog-to-Digital Converter (ADC/ADC12B) driver for SAM.

Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.

#include "adc.h"
#include <status_codes.h>

Functions

void adc_disable_all_channel (Adc *p_adc)
 Disable all ADC channel. More...
 
void adc_disable_channel (Adc *p_adc, const enum adc_channel_num_t adc_ch)
 Disable the specified ADC channel. More...
 
void adc_disable_interrupt (Adc *p_adc, const uint32_t ul_source)
 Disable ADC interrupts. More...
 
void adc_enable_all_channel (Adc *p_adc)
 Enable all ADC channels. More...
 
void adc_enable_channel (Adc *p_adc, const enum adc_channel_num_t adc_ch)
 Enable the specified ADC channel. More...
 
void adc_enable_interrupt (Adc *p_adc, const uint32_t ul_source)
 Enable ADC interrupts. More...
 
uint32_t adc_get_actual_adc_clock (const Adc *p_adc, const uint32_t ul_mck)
 Return the actual ADC clock. More...
 
uint32_t adc_get_channel_status (const Adc *p_adc, const enum adc_channel_num_t adc_ch)
 Read the ADC channel status. More...
 
uint32_t adc_get_channel_value (const Adc *p_adc, const enum adc_channel_num_t adc_ch)
 Read the ADC result data of the specified channel. More...
 
uint32_t adc_get_interrupt_mask (const Adc *p_adc)
 Read ADC interrupt mask. More...
 
uint32_t adc_get_latest_value (const Adc *p_adc)
 Read the last ADC result data. More...
 
Pdc * adc_get_pdc_base (const Adc *p_adc)
 Get PDC registers base address. More...
 
void adc_reset (Adc *p_adc)
 Reset ADC. More...
 
void adc_set_resolution (Adc *p_adc, const enum adc_resolution_t resolution)
 Configure the conversion resolution. More...
 
void adc_start (Adc *p_adc)
 Start analog-to-digital conversion. More...