43#if defined(USE_FULL_DDL_DRIVER)
51#define ASSERT_PARAM(_PARAM_) ((void)0U)
71#define IS_DDL_GPIO_PORT(__VALUE__) ((__VALUE__) < (4U))
73#define IS_DDL_GPIO_PIN(__VALUE__) (((0x00000000U) < (__VALUE__)) && ((__VALUE__) <= (DDL_GPIO_PIN_ALL)))
75#define DDL_GPIO_PIN_0_5 (DDL_GPIO_PIN_0 | DDL_GPIO_PIN_1 | DDL_GPIO_PIN_2 | \
76 DDL_GPIO_PIN_3 | DDL_GPIO_PIN_4 | DDL_GPIO_PIN_5)
78#define IS_DDL_GPIO_PIN_FOR_PORT(__GPIO__, __PIN__) \
79 (((__GPIO__) == GPIOA) ? (((__PIN__) & ~DDL_GPIO_PIN_0_5) == 0U) : \
80 (((__PIN__) & ~DDL_GPIO_PIN_ALL) == 0U))
82#define IS_DDL_GPIO_MODE(__VALUE__) (((__VALUE__) == DDL_GPIO_MODE_INPUT) ||\
83 ((__VALUE__) == DDL_GPIO_MODE_OUTPUT) ||\
84 ((__VALUE__) == DDL_GPIO_MODE_ALTERNATE) ||\
85 ((__VALUE__) == DDL_GPIO_MODE_ANALOG))
87#define IS_DDL_GPIO_OUTPUT_TYPE(__VALUE__) (((__VALUE__) == DDL_GPIO_OUTPUT_PUSHPULL) ||\
88 ((__VALUE__) == DDL_GPIO_OUTPUT_OPENDRAIN))
90#define IS_DDL_GPIO_SPEED(__VALUE__) (((__VALUE__) == DDL_GPIO_SPEED_FREQ_LOW) ||\
91 ((__VALUE__) == DDL_GPIO_SPEED_FREQ_MEDIUM) ||\
92 ((__VALUE__) == DDL_GPIO_SPEED_FREQ_HIGH))
94#define IS_DDL_GPIO_PULL(__VALUE__) (((__VALUE__) == DDL_GPIO_PULL_NO) ||\
95 ((__VALUE__) == DDL_GPIO_PULL_UP) ||\
96 ((__VALUE__) == DDL_GPIO_PULL_DOWN))
98#define IS_DDL_GPIO_ALTERNATE(__VALUE__) (((__VALUE__) == DDL_GPIO_AF_0) ||\
99 ((__VALUE__) == DDL_GPIO_AF_1) ||\
100 ((__VALUE__) == DDL_GPIO_AF_2) ||\
101 ((__VALUE__) == DDL_GPIO_AF_3))
103#define IS_DDL_GPIO_SPECIAL_PIN_TYPE(__VALUE__) (((__VALUE__) == DDL_GPIO_SPECIAL_PIN_TYPE_DIGITAL_5V_INPUT) ||\
104 ((__VALUE__) == DDL_GPIO_SPECIAL_PIN_TYPE_ANALOG_3V3_INPUT_OUTPUT))
106#define IS_DDL_GPIO_SPECIAL_PIN(__GPIO__, __PIN__) ((((__GPIO__) == GPIOB) && (((__PIN__) == DDL_GPIO_PIN_4) || ((__PIN__) == DDL_GPIO_PIN_6))) ||\
107 (((__GPIO__) == GPIOC) && ((__PIN__) == DDL_GPIO_PIN_12)) ||\
108 (((__GPIO__) == GPIOD) && (((__PIN__) == DDL_GPIO_PIN_5) || ((__PIN__) == DDL_GPIO_PIN_12) || ((__PIN__) == DDL_GPIO_PIN_15))))
110#define DDL_GPIO_ADC3_SWR_PIN_B (DDL_GPIO_PIN_2 | DDL_GPIO_PIN_3 | DDL_GPIO_PIN_5)
111#define DDL_GPIO_ADC3_SWR_PIN_C (DDL_GPIO_PIN_3 | DDL_GPIO_PIN_4 | DDL_GPIO_PIN_5 | \
112 DDL_GPIO_PIN_6 | DDL_GPIO_PIN_9 | DDL_GPIO_PIN_10 | DDL_GPIO_PIN_11)
113#define DDL_GPIO_ADC3_SWR_PIN_D (DDL_GPIO_PIN_0 | DDL_GPIO_PIN_1 | DDL_GPIO_PIN_2)
115#define IS_DDL_GPIO_ADC3_ANALOG_SWITCH_PIN(__GPIO__, __PIN__) \
116 ( ((__PIN__) != 0U) && \
117 ( (((__GPIO__) == GPIOB) && (((__PIN__) & ~DDL_GPIO_ADC3_SWR_PIN_B) == 0U)) || \
118 (((__GPIO__) == GPIOC) && (((__PIN__) & ~DDL_GPIO_ADC3_SWR_PIN_C) == 0U)) || \
119 (((__GPIO__) == GPIOD) && (((__PIN__) & ~DDL_GPIO_ADC3_SWR_PIN_D) == 0U)) ) )
168 uint32_t pinpos = 0x00000000U;
169 uint32_t currentpin = 0x00000000U;
184 pinpos = POSITION_VAL(GPIO_InitStruct->
Pin);
187 while (((GPIO_InitStruct->
Pin) >> pinpos) != 0x00000000U)
190 currentpin = (GPIO_InitStruct->
Pin) & (0x00000001U << pinpos);
226 CLEAR_BIT16((swr), currentpin);
264 volatile uint16_t *reg;
269 SET_BIT16((reg), PinMask);
280 volatile uint16_t *reg;
285 CLEAR_BIT16((reg), PinMask);
297 volatile uint16_t *reg;
303 MODIFY_REG16((reg), PinMask, (PinMask * PinType));
314 volatile uint16_t *reg;
319 return (uint32_t)(READ_BIT16((reg), PinMask) >> POSITION_VAL(PinMask));
G32 assert template file. This file should be copied to the application folder and renamed to g32_ass...
#define ASSERT_PARAM(_PARAM_)
Header file of GPIO DDL module.
Header file of RCM DDL module.
#define DDL_GPIO_MODE_ALTERNATE
#define DDL_GPIO_MODE_OUTPUT
#define DDL_GPIO_MODE_ANALOG
#define DDL_GPIO_OUTPUT_PUSHPULL
#define DDL_GPIO_SPEED_FREQ_LOW
uint32_t DDL_GPIO_GetSpecialPinType(GPIO_Type GPIOx, uint32_t PinMask)
Return special pin type configuration for the dedicated special GPIO pin.
ErrorStatus DDL_GPIO_DeInit(GPIO_Type GPIOx)
De-initialize GPIO registers (Registers restored to their default values).
void DDL_GPIO_EnableAdc3AnalogSwitchPin(GPIO_Type GPIOx, uint32_t PinMask)
Enable ADC3 analog switch bits in SWR.
void DDL_GPIO_SetSpecialPinType(GPIO_Type GPIOx, uint32_t PinMask, uint32_t PinType)
Configure special pin type for the dedicated special GPIO pin.
void DDL_GPIO_DisableAdc3AnalogSwitchPin(GPIO_Type GPIOx, uint32_t PinMask)
Disable ADC3 analog switch bits in SWR.
void DDL_GPIO_StructInit(DDL_GPIO_InitTypeDef *GPIO_InitStruct)
Set each DDL_GPIO_InitTypeDef field to default value.
ErrorStatus DDL_GPIO_Init(GPIO_Type GPIOx, DDL_GPIO_InitTypeDef *GPIO_InitStruct)
Initialize GPIO registers according to the specified parameters in GPIO_InitStruct.
__STATIC_INLINE void DDL_GPIO_SetPinOutputType(GPIO_Type GPIOx, uint32_t PinMask, uint32_t OutputType)
Configure gpio output type for several pins on dedicated port.
__STATIC_INLINE void DDL_GPIO_SetPinPull(GPIO_Type GPIOx, uint32_t Pin, uint32_t Pull)
Configure gpio pull-up or pull-down for a dedicated pin on a dedicated port.
__STATIC_INLINE void DDL_GPIO_SetAFPin(GPIO_Type GPIOx, uint32_t Pin, uint32_t Alternate)
Configure gpio alternate function of a dedicated pin for a dedicated port.
__STATIC_INLINE void DDL_GPIO_SetPinMode(GPIO_Type GPIOx, uint32_t Pin, uint32_t Mode)
Configure gpio mode for a dedicated pin on a dedicated port.
__STATIC_INLINE void DDL_GPIO_SetPinSpeed(GPIO_Type GPIOx, uint32_t Pin, uint32_t Speed)
Configure gpio speed for a dedicated pin on a dedicated port.
#define DDL_GPIO_Locate16BitReg(__BASEADDR__, __GPIO__)
#define IS_DDL_GPIO_MODE(__VALUE__)
#define IS_DDL_GPIO_OUTPUT_TYPE(__VALUE__)
#define IS_DDL_GPIO_PULL(__VALUE__)
#define IS_DDL_GPIO_SPECIAL_PIN(__GPIO__, __PIN__)
#define IS_DDL_GPIO_PIN(__VALUE__)
#define IS_DDL_GPIO_SPECIAL_PIN_TYPE(__VALUE__)
#define IS_DDL_GPIO_PORT(__VALUE__)
#define IS_DDL_GPIO_ALTERNATE(__VALUE__)
#define IS_DDL_GPIO_ADC3_ANALOG_SWITCH_PIN(__GPIO__, __PIN__)
#define IS_DDL_GPIO_PIN_FOR_PORT(__GPIO__, __PIN__)
#define IS_DDL_GPIO_SPEED(__VALUE__)
GPIO_Type
G32R4XX GPIO port Definition, according to the selected device configuration in the CMSIS device head...
LL GPIO Init Structure definition.