PDL for FM0+  Version1.0
Peripheral Driverl Library for FM0+
C:/pdl_v10/library/driver/adc/adc.c File Reference
#include "adc.h"
Include dependency graph for adc.c:

Go to the source code of this file.

Functions

static void Adc_InitNvic (volatile FM0P_ADC_TypeDef *pstcAdc)
 Set NVIC Interrupt depending on ADC instance.
static void Adc_DeInitNvic (volatile FM0P_ADC_TypeDef *pstcAdc)
 Clear NVIC Interrupt depending on ADC instance.
static stc_adc_intern_data_tAdcGetInternDataPtr (volatile FM0P_ADC_TypeDef *pstcAdc)
 Return the internal data for a certain ADC instance.
void AdcIrqHandler (volatile FM0P_ADC_TypeDef *pstcAdc, stc_adc_intern_data_t *pstcAdcInternData)
 ADC instance interrupt service routine.
en_result_t Adc_Init (volatile FM0P_ADC_TypeDef *pstcAdc, stc_adc_config_t *pstcConfig)
 Initialize ADC.
en_result_t Adc_DeInit (volatile FM0P_ADC_TypeDef *pstcAdc)
 De-Initialize ADC.
en_result_t Adc_EnableInt (volatile FM0P_ADC_TypeDef *pstcAdc, stc_adc_int_sel_t *pstcIntSel, stc_adc_int_callback_t *pstcIntCallback)
 Enable ADC interrupt.
en_result_t Adc_DisableInt (volatile FM0P_ADC_TypeDef *pstcAdc, stc_adc_int_sel_t *pstcIntSel)
 Disable ADC interrupt.
boolean_t Adc_GetIntFlag (volatile FM0P_ADC_TypeDef *pstcAdc, en_adc_int_t enInt)
 Get ADC interrupt flag.
en_result_t Adc_ClrIntFlag (volatile FM0P_ADC_TypeDef *pstcAdc, en_adc_int_t enInt)
 Clear ADC interrupt flag.
en_result_t Adc_Enable (volatile FM0P_ADC_TypeDef *pstcAdc)
 Enable ADC and wait for ADC operation ready.
en_result_t Adc_Disable (volatile FM0P_ADC_TypeDef *pstcAdc)
 Disable ADC.
en_result_t Adc_SwTriggerScan (volatile FM0P_ADC_TypeDef *pstcAdc)
 ADC Scan Software Start Trigger.
en_result_t Adc_StopScanRepeat (volatile FM0P_ADC_TypeDef *pstcAdc)
 Stop Scan conversion with repeat mode.
en_result_t Adc_SwTriggerPrio (volatile FM0P_ADC_TypeDef *pstcAdc)
 ADC Priority Software Start Trigger.
en_result_t Adc_ForceStop (volatile FM0P_ADC_TypeDef *pstcAdc)
 ADC Software Stop.
boolean_t Adc_GetStatus (volatile FM0P_ADC_TypeDef *pstcAdc, en_adc_status_t enStatus)
 Get ADC conversion status.
uint32_t Adc_GetScanFifo (volatile FM0P_ADC_TypeDef *pstcAdc)
 Reads out Scan Conversion FIFO.
en_result_t Adc_ClrScanFifo (volatile FM0P_ADC_TypeDef *pstcAdc)
 Clear scan FIFO.
en_result_t Adc_ExtractScanFifo (volatile FM0P_ADC_TypeDef *pstcAdc, uint32_t u32FifoData, stc_scan_fifo_info_t *pstcFifo)
 Extract scan conversion data information from FIFO data.
uint32_t Adc_GetPrioFifo (volatile FM0P_ADC_TypeDef *pstcAdc)
 Reads out Priority Conversion FIFO.
en_result_t Adc_ClrPrioFifo (volatile FM0P_ADC_TypeDef *pstcAdc)
 Clear priority FIFO.
en_result_t Adc_ExtractPrioFifo (volatile FM0P_ADC_TypeDef *pstcAdc, uint32_t u32FifoData, stc_prio_fifo_info_t *pstcFifo)
 Extract priority conversion data information from FIFO data.

Variables

stc_adc_instance_data_t m_astcAdcInstanceDataLut [(uint8_t)(PDL_PERIPHERAL_ENABLE_ADC0==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_ADC1==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_ADC2==PDL_ON)]
 Look-up table for all enabled ADC instances and their internal data.

Detailed Description

A detailed description is available at ADC description

History:

  • 2014-01-14 1.2 Edison Zhang First version

Definition in file adc.c.