![]() |
PDL for FM4
Version1.2
Peripheral Driverl Library for FM4
|
#include "pdl.h"

Go to the source code of this file.
Data Structures | |
| struct | stc_ad_channel_list |
| ADC Channel list with same sort order as the ER32 registers. More... | |
| union | stc_ad_channel_list::unAdcChannels |
| struct | stc_ad_channel_list::unAdcChannels::stcChannelBits |
| struct | stc_adc_config |
| ADC configuration. More... | |
| struct | stc_adc_intern_data |
| ADC instance internal data, storing internal information for each enabled ADC instance. More... | |
| struct | stc_adc_instance_data |
| ADC instance data type. More... | |
Macros | |
| #define | stc_adcn_t FM4_ADC_TypeDef |
| #define | ADC0 (*((volatile stc_adcn_t *) FM4_ADC0_BASE)) |
| #define | ADC1 (*((volatile stc_adcn_t *) FM4_ADC1_BASE)) |
| #define | ADC2 (*((volatile stc_adcn_t *) FM4_ADC2_BASE)) |
| #define | PDL_ADC_READY_WAIT_COUNT 1000000u |
| Time-out counter value for ADC ready bit polling. More... | |
| #define | ADC_INSTANCE_COUNT |
Typedefs | |
| typedef void(* | func_ptr_adc_parg32_t )(uint32_t *pu32Argument) |
| typedef enum en_adc_scan_mode | en_adc_scan_mode_t |
| Scan Conversion Mode. More... | |
| typedef enum en_adc_sample_time_n | en_adc_sample_time_n_t |
| Priority Conversion Stage Count. More... | |
| typedef enum en_adc_fifo_status | en_adc_fifo_status_t |
| FIFO Status (Scan, Priority Conversion) More... | |
| typedef enum en_adc_fifo_data_valid | en_adc_fifo_data_valid_t |
| FIFO valid data result (Scan, Priority Conversion) More... | |
| typedef enum en_adc_fifo_start_cause | en_adc_fifo_start_cause_t |
| FIFO data start cause. More... | |
| typedef enum en_adc_range_result | en_adc_range_result_t |
| Range Comparison Factor. More... | |
| typedef enum en_adc_timer_select | en_adc_timer_select_t |
| ADC scan/priority conversion timer trigger selection. More... | |
| typedef struct stc_ad_channel_list | stc_ad_channel_list_t |
| ADC Channel list with same sort order as the ER32 registers. More... | |
| typedef struct stc_adc_config | stc_adc_config_t |
| ADC configuration. More... | |
| typedef enum en_adc_instance_index | en_adc_instance_index_t |
| Enumeration to define an index for each enabled ADC instance. More... | |
| typedef struct stc_adc_intern_data | stc_adc_intern_data_t |
| ADC instance internal data, storing internal information for each enabled ADC instance. More... | |
| typedef struct stc_adc_instance_data | stc_adc_instance_data_t |
| ADC instance data type. More... | |
Functions | |
| void | AdcIrqHandler (volatile FM4_ADC_TypeDef *pstcAdc, stc_adc_intern_data_t *pstcAdcInternData) |
| ADC instance interrupt service routine. More... | |
| en_result_t | Adc_Init (volatile FM4_ADC_TypeDef *pstcAdc, stc_adc_config_t *pstcConfig) |
| Initialize ADC. More... | |
| en_result_t | Adc_DeInit (volatile FM4_ADC_TypeDef *pstcAdc) |
| De-Initialize ADC. More... | |
| en_result_t | Adc_EnableWaitReady (volatile FM4_ADC_TypeDef *pstcAdc) |
| Enable ADC and wait for Readiness. More... | |
| en_result_t | Adc_Enable (volatile FM4_ADC_TypeDef *pstcAdc) |
| Enable ADC. More... | |
| en_result_t | Adc_Ready (volatile FM4_ADC_TypeDef *pstcAdc) |
| Check ADC Readiness. More... | |
| en_result_t | Adc_ScanSwTrigger (volatile FM4_ADC_TypeDef *pstcAdc) |
| ADC Scan Software Start Trigger. More... | |
| en_result_t | Adc_PrioSwTrigger (volatile FM4_ADC_TypeDef *pstcAdc) |
| ADC Priority Software Start Trigger. More... | |
| en_result_t | Adc_ForceStop (volatile FM4_ADC_TypeDef *pstcAdc) |
| ADC Software Stop. More... | |
| en_result_t | Adc_ScanStatus (volatile FM4_ADC_TypeDef *pstcAdc) |
| Read Scan Conversion Status of ADC. More... | |
| en_result_t | Adc_PrioStatus (volatile FM4_ADC_TypeDef *pstcAdc) |
| Read Priority Conversion Status of ADC. More... | |
| en_result_t | Adc_Prio2Status (volatile FM4_ADC_TypeDef *pstcAdc) |
| Read Priority Level 2 Conversion Status of ADC. More... | |
| en_adc_fifo_status_t | Adc_ScanFifoStatus (volatile FM4_ADC_TypeDef *pstcAdc) |
| Read Scan Conversion FIFO state. More... | |
| en_result_t | Adc_ScanFifoClear (volatile FM4_ADC_TypeDef *pstcAdc) |
| Clears the Scan Conversion FIFO. More... | |
| en_adc_fifo_status_t | Adc_PrioFifoStatus (volatile FM4_ADC_TypeDef *pstcAdc) |
| Read Priority Conversion FIFO state. More... | |
| en_result_t | Adc_PrioFifoClear (volatile FM4_ADC_TypeDef *pstcAdc) |
| Clears the Priority Conversion FIFO. More... | |
| uint32_t | Adc_ReadScanFifo (volatile FM4_ADC_TypeDef *pstcAdc) |
| Reads out Scan Conversion FIFO. More... | |
| uint8_t | Adc_GetScanChannel (uint32_t u32FifoData) |
| Get Channel Number from FIFO data. More... | |
| en_adc_fifo_data_valid_t | Adc_GetScanDataValid (uint32_t u32FifoData) |
| Get Valid Data Flag from FIFO data. More... | |
| en_adc_fifo_start_cause_t | Adc_GetScanDataCause (uint32_t u32FifoData) |
| Get Scan Conversion Start Cause from FIFO data. More... | |
| uint32_t | Adc_ReadPrioFifo (volatile FM4_ADC_TypeDef *pstcAdc) |
| Reads out Priority Conversion FIFO. More... | |
| uint8_t | Adc_GetPrioChannel (uint32_t u32FifoData) |
| Get Channel Number from Priority FIFO data. More... | |
| en_adc_fifo_data_valid_t | Adc_GetPrioDataValid (uint32_t u32FifoData) |
| Get Valid Data Flag from Priority FIFO data. More... | |
| en_adc_fifo_start_cause_t | Adc_GetPrioDataCause (uint32_t u32FifoData) |
| Get Priority Conversion Start Cause from FIFO data. More... | |
| en_adc_range_result_t | Adc_GetRangeResultValid (volatile FM4_ADC_TypeDef *pstcAdc) |
| Read Raneg Comparison Result. More... | |
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. More... | |
Headerfile for ADC functions
History:
Definition in file adc.h.