![]() |
G32R430 Device Driver Layer v1.0.4
G32R4xx Device Driver Layer API Reference
|
Header file of ADC DDL module. More...
#include "g32r4xx.h"Go to the source code of this file.
Data Structures | |
| struct | DDL_ADC12_InitTypeDef |
| Structure definition of some features of ADC instance. More... | |
| struct | DDL_ADC12_REG_InitTypeDef |
| Structure definition of some features of ADC group regular. More... | |
| struct | DDL_ADC12_INJ_InitTypeDef |
| Structure definition of some features of ADC group injected. More... | |
Functions | |
| __STATIC_INLINE uint32_t | DDL_ADC12_DMA_GetRegAddr (ADC12_TypeDef *ADCx, uint32_t Register) |
| Function to help to configure DMA transfer from ADC: retrieve the ADC register address from ADC instance and a list of ADC registers intended to be used (most commonly) with DMA transfer. | |
| __STATIC_INLINE void | DDL_ADC12_INJ_SetOffset (ADC12_TypeDef *ADCx, uint32_t Offsety, uint32_t OffsetLevel) |
| Set ADC selected offset number 1, 2, 3 or 4. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_INJ_GetOffset (ADC12_TypeDef *ADCx, uint32_t Offsety) |
| Get for the ADC selected offset number 1, 2, 3 or 4: Offset level (offset to be subtracted from the raw converted data). | |
| __STATIC_INLINE void | DDL_ADC12_REG_SetTriggerSource (ADC12_TypeDef *ADCx, uint32_t TriggerSource) |
| Set ADC group regular conversion trigger source: internal (SW start) or from external peripheral (timer event, external interrupt line). | |
| __STATIC_INLINE uint32_t | DDL_ADC12_REG_GetTriggerSource (ADC12_TypeDef *ADCx) |
| Get ADC group regular conversion trigger source: internal (SW start) or from external peripheral (timer event, external interrupt line). | |
| __STATIC_INLINE uint32_t | DDL_ADC12_REG_IsTriggerSourceSWStart (ADC12_TypeDef *ADCx) |
| Get ADC group regular conversion trigger source internal (SW start) or external. | |
| __STATIC_INLINE void | DDL_ADC12_REG_SetTriggerEdge (ADC12_TypeDef *ADCx, uint32_t ExternalTriggerEdge) |
| Set ADC group regular conversion trigger polarity. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_REG_GetTriggerEdge (ADC12_TypeDef *ADCx) |
| Get ADC group regular conversion trigger polarity. | |
| __STATIC_INLINE void | DDL_ADC12_REG_SetSequencerLength (ADC12_TypeDef *ADCx, uint32_t SequencerNbRanks) |
| Set ADC group regular sequencer length and scan direction. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_REG_GetSequencerLength (ADC12_TypeDef *ADCx) |
| Get ADC group regular sequencer length and scan direction. | |
| __STATIC_INLINE void | DDL_ADC12_REG_SetSequencerDiscont (ADC12_TypeDef *ADCx, uint32_t SeqDiscont) |
| Set ADC group regular sequencer discontinuous mode: sequence subdivided and scan conversions interrupted every selected number of ranks. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_REG_GetSequencerDiscont (ADC12_TypeDef *ADCx) |
| Get ADC group regular sequencer discontinuous mode: sequence subdivided and scan conversions interrupted every selected number of ranks. | |
| __STATIC_INLINE void | DDL_ADC12_REG_SetSequencerRanks (ADC12_TypeDef *ADCx, uint32_t Rank, uint32_t Channel) |
| Set ADC group regular sequence: channel on the selected scan sequence rank. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_REG_GetSequencerRanks (ADC12_TypeDef *ADCx, uint32_t Rank) |
| Get ADC group regular sequence: channel on the selected scan sequence rank. Refer to description of function DDL_ADC12_REG_SetSequencerLength(). | |
| __STATIC_INLINE void | DDL_ADC12_REG_SetContinuousMode (ADC12_TypeDef *ADCx, uint32_t Continuous) |
| Set ADC continuous conversion mode on ADC group regular. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_REG_GetContinuousMode (ADC12_TypeDef *ADCx) |
| Get ADC continuous conversion mode on ADC group regular. | |
| __STATIC_INLINE void | DDL_ADC12_REG_SetDMATransfer (ADC12_TypeDef *ADCx, uint32_t DMATransfer) |
| Set ADC group regular conversion data transfer: no transfer or transfer by DMA, and DMA requests mode. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_REG_GetDMATransfer (ADC12_TypeDef *ADCx) |
| Get ADC group regular conversion data transfer: no transfer or transfer by DMA, and DMA requests mode. | |
| __STATIC_INLINE void | DDL_ADC12_INJ_SetTriggerSource (ADC12_TypeDef *ADCx, uint32_t TriggerSource) |
| Set ADC group injected conversion trigger source: internal (SW start) or from external peripheral (timer event, external interrupt line). | |
| __STATIC_INLINE uint32_t | DDL_ADC12_INJ_GetTriggerSource (ADC12_TypeDef *ADCx) |
| Get ADC group injected conversion trigger source: internal (SW start) or from external peripheral (timer event, external interrupt line). | |
| __STATIC_INLINE uint32_t | DDL_ADC12_INJ_IsTriggerSourceSWStart (ADC12_TypeDef *ADCx) |
| Get ADC group injected conversion trigger source internal (SW start) or external. | |
| __STATIC_INLINE void | DDL_ADC12_INJ_SetTriggerEdge (ADC12_TypeDef *ADCx, uint32_t ExternalTriggerEdge) |
| Set ADC group injected conversion trigger polarity. Applicable only for trigger source set to external trigger. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_INJ_GetTriggerEdge (ADC12_TypeDef *ADCx) |
| Get ADC group injected conversion trigger polarity. Applicable only for trigger source set to external trigger. | |
| __STATIC_INLINE void | DDL_ADC12_INJ_SetSequencerLength (ADC12_TypeDef *ADCx, uint32_t SequencerNbRanks) |
| Set ADC group injected sequencer length and scan direction. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_INJ_GetSequencerLength (ADC12_TypeDef *ADCx) |
| Get ADC group injected sequencer length and scan direction. | |
| __STATIC_INLINE void | DDL_ADC12_INJ_SetSequencerDiscont (ADC12_TypeDef *ADCx, uint32_t SeqDiscont) |
| Set ADC group injected sequencer discontinuous mode: sequence subdivided and scan conversions interrupted every selected number of ranks. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_INJ_GetSequencerDiscont (ADC12_TypeDef *ADCx) |
| Get ADC group injected sequencer discontinuous mode: sequence subdivided and scan conversions interrupted every selected number of ranks. | |
| __STATIC_INLINE void | DDL_ADC12_INJ_SetSequencerRanks (ADC12_TypeDef *ADCx, uint32_t Rank, uint32_t Channel) |
| Set ADC group injected sequence: channel on the selected sequence rank. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_INJ_GetSequencerRanks (ADC12_TypeDef *ADCx, uint32_t Rank) |
| Get ADC group injected sequence: channel on the selected sequence rank. | |
| __STATIC_INLINE void | DDL_ADC12_INJ_SetTrigAuto (ADC12_TypeDef *ADCx, uint32_t TrigAuto) |
| Set ADC group injected conversion trigger: independent or from ADC group regular. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_INJ_GetTrigAuto (ADC12_TypeDef *ADCx) |
| Get ADC group injected conversion trigger: independent or from ADC group regular. | |
| __STATIC_INLINE void | DDL_ADC12_INJ_ConfigQueueContext (ADC12_TypeDef *ADCx, uint32_t TriggerSource, uint32_t ExternalTriggerEdge, uint32_t SequencerNbRanks, uint32_t Rank1_Channel, uint32_t Rank2_Channel, uint32_t Rank3_Channel, uint32_t Rank4_Channel) |
| Set one context on ADC group injected that will be checked in contexts queue. | |
| __STATIC_INLINE void | DDL_ADC12_SetChannelSamplingTime (ADC12_TypeDef *ADCx, uint32_t Channel, uint32_t SamplingTime) |
| Set sampling time of the selected ADC channel Unit: ADC clock cycles. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_GetChannelSamplingTime (ADC12_TypeDef *ADCx, uint32_t Channel) |
| Get sampling time of the selected ADC channel Unit: ADC clock cycles. | |
| __STATIC_INLINE void | DDL_ADC12_SetAnalogWDMonitChannels (ADC12_TypeDef *ADCx, uint32_t AWDy, uint32_t AWDChannelGroup) |
| Set ADC analog watchdog monitored channels: a single channel, multiple channels or all channels, on ADC groups regular and-or injected. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_GetAnalogWDMonitChannels (ADC12_TypeDef *ADCx, uint32_t AWDy) |
| Get ADC analog watchdog monitored channel. | |
| __STATIC_INLINE void | DDL_ADC12_ConfigAnalogWDThresholds (ADC12_TypeDef *ADCx, uint32_t AWDy, uint32_t AWDThresholdHighValue, uint32_t AWDThresholdLowValue) |
| Set ADC analog watchdog thresholds value of both thresholds high and low. | |
| __STATIC_INLINE void | DDL_ADC12_SetAnalogWDThresholds (ADC12_TypeDef *ADCx, uint32_t AWDy, uint32_t AWDThresholdsHighLow, uint32_t AWDThresholdValue) |
| Set ADC analog watchdog threshold value of threshold high or low. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_GetAnalogWDThresholds (ADC12_TypeDef *ADCx, uint32_t AWDy, uint32_t AWDThresholdsHighLow) |
| Get ADC analog watchdog threshold value of threshold high, threshold low or raw data with ADC thresholds high and low concatenated. | |
| __STATIC_INLINE void | DDL_ADC12_Enable (ADC12_TypeDef *ADCx) |
| Enable the selected ADC instance. | |
| __STATIC_INLINE void | DDL_ADC12_Disable (ADC12_TypeDef *ADCx) |
| Disable the selected ADC instance. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_IsEnabled (ADC12_TypeDef *ADCx) |
| Get the selected ADC instance enable state. | |
| __STATIC_INLINE void | DDL_ADC12_SetDataAlignment (ADC12_TypeDef *ADCx, uint32_t Alignment) |
| Set ADC data alignment. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_GetDataAlignment (ADC12_TypeDef *ADCx) |
| Get ADC data alignment. | |
| __STATIC_INLINE void | DDL_ADC12_REG_StartConversion (ADC12_TypeDef *ADCx) |
| Start ADC group regular conversion. | |
| __STATIC_INLINE void | DDL_ADC12_REG_StopConversion (ADC12_TypeDef *ADCx) |
| Stop ADC group regular conversion. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_REG_IsConversionOngoing (ADC12_TypeDef *ADCx) |
| Get ADC group regular conversion state. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_REG_IsStopConversionOngoing (ADC12_TypeDef *ADCx) |
| Get ADC group regular command of conversion stop state. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_REG_ReadConversionData32 (ADC12_TypeDef *ADCx) |
| Get ADC group regular conversion data, range fit for all ADC configurations: all ADC resolutions and all oversampling increased data width (for devices with feature oversampling). | |
| __STATIC_INLINE void | DDL_ADC12_INJ_StartConversion (ADC12_TypeDef *ADCx) |
| Start ADC group injected conversion. | |
| __STATIC_INLINE void | DDL_ADC12_INJ_StopConversion (ADC12_TypeDef *ADCx) |
| Stop ADC group injected conversion. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_INJ_IsConversionOngoing (ADC12_TypeDef *ADCx) |
| Get ADC group injected conversion state. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_INJ_IsStopConversionOngoing (ADC12_TypeDef *ADCx) |
| Get ADC group injected command of conversion stop state. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_INJ_ReadConversionData32 (ADC12_TypeDef *ADCx, uint32_t Rank) |
| Get ADC group injected conversion data, range fit for all ADC configurations: all ADC resolutions and all oversampling increased data width (for devices with feature oversampling). | |
| __STATIC_INLINE uint32_t | DDL_ADC12_IsActiveFlag_EOC (ADC12_TypeDef *ADCx) |
| Get flag ADC group regular end of unitary conversion. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_IsActiveFlag_EOS (ADC12_TypeDef *ADCx) |
| Get flag ADC group regular end of sequence conversions. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_IsActiveFlag_JEOC (ADC12_TypeDef *ADCx) |
| Get flag ADC group injected end of unitary conversion. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_IsActiveFlag_JEOS (ADC12_TypeDef *ADCx) |
| Get flag ADC group injected end of sequence conversions. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_IsActiveFlag_AWD1 (ADC12_TypeDef *ADCx) |
| Get flag ADC analog watchdog 1 flag. | |
| __STATIC_INLINE void | DDL_ADC12_ClearFlag_EOC (ADC12_TypeDef *ADCx) |
| Clear flag ADC group regular end of unitary conversion. | |
| __STATIC_INLINE void | DDL_ADC12_ClearFlag_EOS (ADC12_TypeDef *ADCx) |
| Clear flag ADC group regular end of sequence conversions. | |
| __STATIC_INLINE void | DDL_ADC12_ClearFlag_JEOC (ADC12_TypeDef *ADCx) |
| Clear flag ADC group injected end of unitary conversion. | |
| __STATIC_INLINE void | DDL_ADC12_ClearFlag_JEOS (ADC12_TypeDef *ADCx) |
| Clear flag ADC group injected end of sequence conversions. | |
| __STATIC_INLINE void | DDL_ADC12_ClearFlag_AWD1 (ADC12_TypeDef *ADCx) |
| Clear flag ADC analog watchdog 1. | |
| __STATIC_INLINE void | DDL_ADC12_EnableIT_EOC (ADC12_TypeDef *ADCx) |
| Enable interruption ADC group regular end of unitary conversion. | |
| __STATIC_INLINE void | DDL_ADC12_EnableIT_EOS (ADC12_TypeDef *ADCx) |
| Enable interruption ADC group regular end of sequence conversions. | |
| __STATIC_INLINE void | DDL_ADC12_EnableIT_JEOC (ADC12_TypeDef *ADCx) |
| Enable interruption ADC group injected end of unitary conversion. | |
| __STATIC_INLINE void | DDL_ADC12_EnableIT_JEOS (ADC12_TypeDef *ADCx) |
| Enable interruption ADC group injected end of sequence conversions. | |
| __STATIC_INLINE void | DDL_ADC12_EnableIT_AWD1 (ADC12_TypeDef *ADCx) |
| Enable interruption ADC analog watchdog 1. | |
| __STATIC_INLINE void | DDL_ADC12_DisableIT_EOC (ADC12_TypeDef *ADCx) |
| Disable interruption ADC group regular end of unitary conversion. | |
| __STATIC_INLINE void | DDL_ADC12_DisableIT_EOS (ADC12_TypeDef *ADCx) |
| Disable interruption ADC group regular end of sequence conversions. | |
| __STATIC_INLINE void | DDL_ADC12_DisableIT_JEOC (ADC12_TypeDef *ADCx) |
| Disable interruption ADC group regular end of unitary conversion. | |
| __STATIC_INLINE void | DDL_ADC12_DisableIT_JEOS (ADC12_TypeDef *ADCx) |
| Disable interruption ADC group injected end of sequence conversions. | |
| __STATIC_INLINE void | DDL_ADC12_DisableIT_AWD1 (ADC12_TypeDef *ADCx) |
| Disable interruption ADC analog watchdog 1. | |
| __STATIC_INLINE uint32_t | DDL_ADC12_IsEnabledIT_EOC (ADC12_TypeDef *ADCx) |
| Get state of interruption ADC group regular end of unitary conversion (0: interrupt disabled, 1: interrupt enabled). | |
| __STATIC_INLINE uint32_t | DDL_ADC12_IsEnabledIT_EOS (ADC12_TypeDef *ADCx) |
| Get state of interruption ADC group regular end of sequence conversions (0: interrupt disabled, 1: interrupt enabled). | |
| __STATIC_INLINE uint32_t | DDL_ADC12_IsEnabledIT_JEOC (ADC12_TypeDef *ADCx) |
| Get state of interruption ADC group injected end of unitary conversion (0: interrupt disabled, 1: interrupt enabled). | |
| __STATIC_INLINE uint32_t | DDL_ADC12_IsEnabledIT_JEOS (ADC12_TypeDef *ADCx) |
| Get state of interruption ADC group injected end of sequence conversions (0: interrupt disabled, 1: interrupt enabled). | |
| __STATIC_INLINE uint32_t | DDL_ADC12_IsEnabledIT_AWD1 (ADC12_TypeDef *ADCx) |
| Get state of interruption ADC analog watchdog 1 (0: interrupt disabled, 1: interrupt enabled). | |
| ErrorStatus | DDL_ADC12_DeInit (ADC12_TypeDef *ADCx) |
| De-initialize registers of the selected ADC instance to their default reset values. | |
| ErrorStatus | DDL_ADC12_Init (ADC12_TypeDef *ADCx, DDL_ADC12_InitTypeDef *ADC_InitStruct) |
| Initialize some features of ADC instance. | |
| void | DDL_ADC12_StructInit (DDL_ADC12_InitTypeDef *ADC_InitStruct) |
| Set each DDL_ADC12_InitTypeDef field to default value. | |
| ErrorStatus | DDL_ADC12_REG_Init (ADC12_TypeDef *ADCx, DDL_ADC12_REG_InitTypeDef *ADC_REG_InitStruct) |
| Initialize some features of ADC group regular. | |
| void | DDL_ADC12_REG_StructInit (DDL_ADC12_REG_InitTypeDef *ADC_REG_InitStruct) |
| Set each DDL_ADC12_REG_InitTypeDef field to default value. | |
| ErrorStatus | DDL_ADC12_INJ_Init (ADC12_TypeDef *ADCx, DDL_ADC12_INJ_InitTypeDef *ADC_INJ_InitStruct) |
| Initialize some features of ADC group injected. | |
| void | DDL_ADC12_INJ_StructInit (DDL_ADC12_INJ_InitTypeDef *ADC_INJ_InitStruct) |
| Set each DDL_ADC12_INJ_InitTypeDef field to default value. | |
Header file of ADC DDL module.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The original code has been modified by Geehy Semiconductor.
Copyright (c) 2017 STMicroelectronics. Copyright (C) 2025 Geehy Semiconductor. All rights reserved.
This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.
Definition in file g32r4xx_ddl_adc12.h.