Contains all macro definitions and function prototypes support for adc firmware library on A31L12x. More...
Go to the source code of this file.
Data Structures | |
struct | ADC_CFG_Type |
Enumerations | |
enum | ADC_INT_STATUS_Type { ADC_INT_STATUS_EOS = 0, ADC_INT_STATUS_EOC = 1, ADC_INT_STATUS_OVRUN = 2, ADC_INT_STATUS_STB = 3, ADC_INT_STATUS_ALL = 4 } |
enum | ADC_INT_Type { ADC_INTCFG_EOS = 0, ADC_INTCFG_EOC, ADC_INTCFG_OVRUN, ADC_INTCFG_STB } |
enum | ADC_OV_SAMPLING_RATIO { ADC_2_OV_SAMPLING = 0, ADC_4_OV_SAMPLING, ADC_8_OV_SAMPLING, ADC_16_OV_SAMPLING, ADC_32_OV_SAMPLING, ADC_64_OV_SAMPLING, ADC_128_OV_SAMPLING, ADC_256_OV_SAMPLING } |
Functions | |
HAL_Status_Type | HAL_ADC_Init (ADC_Type *ADCx, ADC_CFG_Type *ADC_Config) |
Initialize the ADC peripheral with the specified parameters. More... | |
HAL_Status_Type | HAL_ADC_DeInit (ADC_Type *ADCx) |
Close ADC. More... | |
HAL_Status_Type | HAL_ADC_ConfigInterrupt (ADC_Type *ADCx, ADC_INT_Type ADCIntCfg, FunctionalState NewState) |
ADC interrupt configuration. More... | |
HAL_Status_Type | HAL_ADC_OvSamplingConfig (ADC_Type *ADCx, ADC_OV_SAMPLING_RATIO OvSampRatio, ADC_OVSCR_OVSHT_Enum DataShiftRight) |
ADC oversampling configuration. More... | |
HAL_Status_Type | HAL_ADC_ChannelSel (ADC_Type *ADCx, uint32_t Channels) |
Select ADC Channels to conversion (Ex: ADC_AN0 | ADC_AN5 | ADC_AN14 | ADC_AVDD) More... | |
HAL_Status_Type | HAL_ADC_Start (ADC_Type *ADCx) |
Start A/D conversion. More... | |
HAL_Status_Type | HAL_ADC_RdyCmd (ADC_Type *ADCx) |
Ready procedure for ADC conversion. More... | |
HAL_Status_Type | HAL_ADC_ClearStatus (ADC_Type *ADCx, ADC_INT_STATUS_Type ADCInt_status) |
Clear ADC interrupt status. More... | |
uint8_t | HAL_ADC_GetStatus (ADC_Type *ADCx) |
Get ADC interrupt status. More... | |
uint16_t | HAL_ADC_GetData (ADC_Type *ADCx) |
Get Result conversion from A/D data register. More... | |
Contains all macro definitions and function prototypes support for adc firmware library on A31L12x.
Copyright(C) 2019, ABOV Semiconductor All rights reserved.
ABOV Disclaimer
IMPORTANT NOTICE ? PLEASE READ CAREFULLY ABOV Semiconductor ("ABOV") reserves the right to make changes, corrections, enhancements, modifications, and improvements to ABOV products and/or to this document at any time without notice. ABOV does not give warranties as to the accuracy or completeness of the information included herein. Purchasers should obtain the latest relevant information of ABOV products before placing orders. Purchasers are entirely responsible for the choice, selection, and use of ABOV products and ABOV assumes no liability for application assistance or the design of purchasers' products. No license, express or implied, to any intellectual property rights is granted by ABOV herein. ABOV disclaims all express and implied warranties and shall not be responsible or liable for any injuries or damages related to use of ABOV products in such unauthorized applications. ABOV and the ABOV logo are trademarks of ABOV. All other product or service names are the property of their respective owners. Information in this document supersedes and replaces the information previously supplied in any former versions of this document. 2020 ABOV Semiconductor All rights reserved
Definition in file A31L12x_hal_adc.h.
enum ADC_INT_STATUS_Type |
Enumerator | |
---|---|
ADC_INT_STATUS_EOS | |
ADC_INT_STATUS_EOC | |
ADC_INT_STATUS_OVRUN | |
ADC_INT_STATUS_STB | |
ADC_INT_STATUS_ALL |
Definition at line 81 of file A31L12x_hal_adc.h.
enum ADC_INT_Type |
Enumerator | |
---|---|
ADC_INTCFG_EOS | |
ADC_INTCFG_EOC | |
ADC_INTCFG_OVRUN | |
ADC_INTCFG_STB |
Definition at line 90 of file A31L12x_hal_adc.h.
Enumerator | |
---|---|
ADC_2_OV_SAMPLING | |
ADC_4_OV_SAMPLING | |
ADC_8_OV_SAMPLING | |
ADC_16_OV_SAMPLING | |
ADC_32_OV_SAMPLING | |
ADC_64_OV_SAMPLING | |
ADC_128_OV_SAMPLING | |
ADC_256_OV_SAMPLING |
Definition at line 98 of file A31L12x_hal_adc.h.
HAL_Status_Type HAL_ADC_ChannelSel | ( | ADC_Type * | ADCx, |
uint32_t | Channels | ||
) |
Select ADC Channels to conversion (Ex: ADC_AN0 | ADC_AN5 | ADC_AN14 | ADC_AVDD)
[in] | ADCx | Pointer to the target ADC
|
[in] | Channels | Channel Numbers
|
Definition at line 207 of file A31L12x_hal_adc.c.
HAL_Status_Type HAL_ADC_ClearStatus | ( | ADC_Type * | ADCx, |
ADC_INT_STATUS_Type | ADCInt_status | ||
) |
Clear ADC interrupt status.
[in] | ADCx | Pointer to the target ADC
|
[in] | ADCInt_status | Bit position to be cleared |
Definition at line 272 of file A31L12x_hal_adc.c.
References ADC_INT_STATUS_ALL, ADC_INT_STATUS_EOC, ADC_INT_STATUS_EOS, ADC_INT_STATUS_OVRUN, ADC_INT_STATUS_STB, HAL_ERROR, and HAL_OK.
HAL_Status_Type HAL_ADC_ConfigInterrupt | ( | ADC_Type * | ADCx, |
ADC_INT_Type | ADCIntCfg, | ||
FunctionalState | NewState | ||
) |
ADC interrupt configuration.
[in] | ADCx | Pointer to the target ADC
|
[in] | ADCIntCfg | ADC_INT_Type value |
[in] | NewState | Next State of Interrupt Operation
|
Definition at line 118 of file A31L12x_hal_adc.c.
References ADC_INTCFG_EOC, ADC_INTCFG_EOS, ADC_INTCFG_OVRUN, ADC_INTCFG_STB, ENABLE, HAL_ERROR, and HAL_OK.
HAL_Status_Type HAL_ADC_DeInit | ( | ADC_Type * | ADCx | ) |
Close ADC.
[in] | ADCx | Pointer to the target ADC
|
Definition at line 91 of file A31L12x_hal_adc.c.
References HAL_ERROR, HAL_OK, and HAL_SCU_Peripheral_EnableClock2().
uint16_t HAL_ADC_GetData | ( | ADC_Type * | ADCx | ) |
Get Result conversion from A/D data register.
[in] | ADCx | Pointer to the target ADC
|
Definition at line 327 of file A31L12x_hal_adc.c.
uint8_t HAL_ADC_GetStatus | ( | ADC_Type * | ADCx | ) |
Get ADC interrupt status.
[in] | ADCx | Pointer to the target ADC
|
Definition at line 315 of file A31L12x_hal_adc.c.
HAL_Status_Type HAL_ADC_Init | ( | ADC_Type * | ADCx, |
ADC_CFG_Type * | ADC_Config | ||
) |
Initialize the ADC peripheral with the specified parameters.
[in] | ADCx | Pointer to the target ADC
|
[in] | ADC_Config | Pointer to a ADC_CFG_Type structure that contains the configuration information for the specified peripheral. |
Definition at line 58 of file A31L12x_hal_adc.c.
References ADC_CFG_Type::ConvModSel, ADC_CFG_Type::ExtTrgPolSel, HAL_ERROR, HAL_OK, HAL_SCU_Peripheral_EnableClock2(), ADC_CFG_Type::InClkDiv, ADC_CFG_Type::SamplingClk, and ADC_CFG_Type::TrgSel.
HAL_Status_Type HAL_ADC_OvSamplingConfig | ( | ADC_Type * | ADCx, |
ADC_OV_SAMPLING_RATIO | OvSampRatio, | ||
ADC_OVSCR_OVSHT_Enum | DataShiftRight | ||
) |
ADC oversampling configuration.
[in] | ADCx | Pointer to the target ADC
|
[in] | OvSampRatio | OverSampling Ratio
|
[in] | DataShiftRight | OverSampling Data Shift bits
|
Definition at line 173 of file A31L12x_hal_adc.c.
HAL_Status_Type HAL_ADC_RdyCmd | ( | ADC_Type * | ADCx | ) |
Ready procedure for ADC conversion.
[in] | ADCx | Pointer to the target ADC
|
Definition at line 247 of file A31L12x_hal_adc.c.
HAL_Status_Type HAL_ADC_Start | ( | ADC_Type * | ADCx | ) |
Start A/D conversion.
[in] | ADCx | Pointer to the target ADC
|
Definition at line 227 of file A31L12x_hal_adc.c.