G32R430 Device Driver Layer v1.0.4
G32R4xx Device Driver Layer API Reference
ADC Private Macros

Topics

 ADC registers compliant with specific purpose
 ADC instance - Low power mode
 ADC instance - Offset number
 ADC instance - Offset state
 ADC instance - Offset sign
 ADC instance - Channel number
 ADC group regular - Continuous mode
 ADC group regular - DMA transfer of ADC conversion data
 ADC group regular - Overrun behavior on conversion data
 ADC group injected - Trigger source
 ADC group injected - Trigger edge
 ADC group injected - Sequencer ranks
 ADC group injected - Automatic trigger mode
 ADC group injected - Context queue mode
 Channel - Sampling time
 Analog watchdog - Analog watchdog number
 Analog watchdog - Monitored channels
 Analog watchdog - Thresholds
 Oversampling - Oversampling scope
 Oversampling - Discontinuous mode
 Oversampling - Ratio
 Oversampling - Data shift
 ADC flags
 Flags defines which can be used with DDL_ADC16_ReadReg function.
 ADC interruptions for configuration (interruption enable or disable)
 IT defines which can be used with DDL_ADC16_ReadReg and DDL_ADC16_WriteReg functions.
 Channel - Single or differential ending
 Analog watchdog - filtering config
 ADC Calibration
 ADC_LL_Private_Constants

Macros

#define __ADC_PTR_REG_OFFSET(__REG__, __REG_OFFFSET__)
 Driver macro reserved for internal use: set a pointer to a register from a register basis from which an offset is applied.
#define __DDL_ADC16_CHANNEL_TO_DECIMAL_NB(__CHANNEL__)
 Helper macro to get ADC channel number in decimal format from literals DDL_ADC16_CHANNEL_x.

Detailed Description

Macro Definition Documentation

◆ __ADC_PTR_REG_OFFSET

#define __ADC_PTR_REG_OFFSET ( __REG__,
__REG_OFFFSET__ )
Value:
((__IO uint32_t *)((uint32_t) ((uint32_t)(&(__REG__)) + ((__REG_OFFFSET__) << 2UL))))

Driver macro reserved for internal use: set a pointer to a register from a register basis from which an offset is applied.

Parameters
__REG__Register basis from which the offset is applied.
__REG_OFFFSET__Offset to be applied (unit: number of registers).
Return values
Pointerto register address

Definition at line 909 of file g32r4xx_ddl_adc16.h.

◆ __DDL_ADC16_CHANNEL_TO_DECIMAL_NB

#define __DDL_ADC16_CHANNEL_TO_DECIMAL_NB ( __CHANNEL__)
Value:
((((__CHANNEL__) & ADC_CHANNEL_ID_BITFIELD_MASK) == 0UL) ? \
( \
) \
: \
( \
(uint32_t)POSITION_VAL((__CHANNEL__)) \
) \
)
#define ADC_CHANNEL_ID_BITFIELD_MASK
#define ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS
#define ADC_CHANNEL_ID_NUMBER_MASK

Helper macro to get ADC channel number in decimal format from literals DDL_ADC16_CHANNEL_x.

Note
Example: __DDL_ADC16_CHANNEL_TO_DECIMAL_NB(DDL_ADC16_CHANNEL_4) will return decimal number "4".
The input can be a value from functions where a channel number is returned, either defined with number or with bitfield (only one bit must be set).
Parameters
__CHANNEL__This parameter can be one of the following values:
Return values
Valuebetween Min_Data=0 and Max_Data=5

Definition at line 930 of file g32r4xx_ddl_adc16.h.