G32R430 Device Driver Layer v1.0.4
G32R4xx Device Driver Layer API Reference
g32r4xx_ddl_gpio.h File Reference

Header file of GPIO DDL module. More...

#include "g32r4xx.h"

Go to the source code of this file.

Data Structures

struct  DDL_GPIO_InitTypeDef
 LL GPIO Init Structure definition. More...

Macros

#define DDL_GPIO_PIN_0   GPIO_PIN0
#define DDL_GPIO_PIN_1   GPIO_PIN1
#define DDL_GPIO_PIN_2   GPIO_PIN2
#define DDL_GPIO_PIN_3   GPIO_PIN3
#define DDL_GPIO_PIN_4   GPIO_PIN4
#define DDL_GPIO_PIN_5   GPIO_PIN5
#define DDL_GPIO_PIN_6   GPIO_PIN6
#define DDL_GPIO_PIN_7   GPIO_PIN7
#define DDL_GPIO_PIN_8   GPIO_PIN8
#define DDL_GPIO_PIN_9   GPIO_PIN9
#define DDL_GPIO_PIN_10   GPIO_PIN10
#define DDL_GPIO_PIN_11   GPIO_PIN11
#define DDL_GPIO_PIN_12   GPIO_PIN12
#define DDL_GPIO_PIN_13   GPIO_PIN13
#define DDL_GPIO_PIN_14   GPIO_PIN14
#define DDL_GPIO_PIN_15   GPIO_PIN15
#define DDL_GPIO_PIN_ALL
#define DDL_GPIO_MODE_ANALOG   (0x00000000U)
#define DDL_GPIO_MODE_INPUT   GPIO_MODE_MODE0_0
#define DDL_GPIO_MODE_OUTPUT   GPIO_MODE_MODE0_1
#define DDL_GPIO_MODE_ALTERNATE   GPIO_MODE_MODE0
#define DDL_GPIO_OUTPUT_PUSHPULL   (0x00000000U)
#define DDL_GPIO_OUTPUT_OPENDRAIN   GPIO_OMODE_OT_0
#define DDL_GPIO_SPEED_FREQ_LOW   GPIO_OSPEEDER_OSPEEDR0_0
#define DDL_GPIO_SPEED_FREQ_MEDIUM   GPIO_OSPEEDER_OSPEEDR0_1
#define DDL_GPIO_SPEED_FREQ_HIGH   GPIO_OSPEEDER_OSPEEDR0
#define DDL_GPIO_PULL_NO   (0x00000000U)
#define DDL_GPIO_PULL_UP   GPIO_PUPD_PUPDR0_0
#define DDL_GPIO_PULL_DOWN   GPIO_PUPD_PUPDR0
#define DDL_GPIO_AF_0   (0x0000000U)
#define DDL_GPIO_AF_1   (0x0000001U)
#define DDL_GPIO_AF_2   (0x0000002U)
#define DDL_GPIO_AF_3   (0x0000003U)
#define DDL_GPIO_SPECIAL_PIN_TYPE_DIGITAL_5V_INPUT   (0x00000000U)
#define DDL_GPIO_SPECIAL_PIN_TYPE_ANALOG_3V3_INPUT_OUTPUT   (0x00000001U)
#define DDL_GPIO_Locate32BitReg(__BASEADDR__, __GPIO__)
#define DDL_GPIO_Locate16BitReg(__BASEADDR__, __GPIO__)
#define DDL_GPIO_WriteReg(__INSTANCE__, __REG__, __VALUE__)
 Write a value in GPIO register.
#define DDL_GPIO_ReadReg(__INSTANCE__, __REG__)
 Read a value in GPIO register.

Enumerations

enum  GPIO_Type { GPIOA = 0 , GPIOB = 1 , GPIOC = 2 , GPIOD = 3 }
 G32R4XX GPIO port Definition, according to the selected device configuration in the CMSIS device header. More...

Functions

__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 uint32_t DDL_GPIO_GetPinMode (GPIO_Type GPIOx, uint32_t Pin)
 Return gpio mode for a dedicated pin on a dedicated port.
__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 uint32_t DDL_GPIO_GetPinOutputType (GPIO_Type GPIOx, uint32_t Pin)
 Return gpio output type for several pins on 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.
__STATIC_INLINE uint32_t DDL_GPIO_GetPinSpeed (GPIO_Type GPIOx, uint32_t Pin)
 Return gpio speed for a dedicated pin 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 uint32_t DDL_GPIO_GetPinPull (GPIO_Type GPIOx, uint32_t Pin)
 Return 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 uint32_t DDL_GPIO_GetAFPin (GPIO_Type GPIOx, uint32_t Pin)
 Return gpio alternate function of a dedicated pin for a dedicated port.
__STATIC_INLINE void DDL_GPIO_EnablePinFilter (GPIO_Type GPIOx, uint32_t Pin)
 Enable the wave filter for a certain pin of the specified GPIO port.
__STATIC_INLINE void DDL_GPIO_DisablePinFilter (GPIO_Type GPIOx, uint32_t Pin)
 Disable the wave filter for a certain pin of the specified GPIO port.
__STATIC_INLINE uint32_t DDL_GPIO_IsEnabledPinFilter (GPIO_Type GPIOx, uint32_t Pin)
 Check whether the wave filter for a certain pin is enabled or disabled.
__STATIC_INLINE uint32_t DDL_GPIO_ReadInputPort (GPIO_Type GPIOx)
 Return full input data register value for a dedicated port.
__STATIC_INLINE uint32_t DDL_GPIO_IsInputPinSet (GPIO_Type GPIOx, uint32_t PinMask)
 Return if input data level for several pins of a dedicated port is high or low.
__STATIC_INLINE void DDL_GPIO_WriteOutputPort (GPIO_Type GPIOx, uint32_t PortValue)
 Write output data register for the port.
__STATIC_INLINE uint32_t DDL_GPIO_ReadOutputPort (GPIO_Type GPIOx)
 Return full output data register value for a dedicated port.
__STATIC_INLINE uint32_t DDL_GPIO_IsOutputPinSet (GPIO_Type GPIOx, uint32_t PinMask)
 Return if input data level for several pins of dedicated port is high or low.
__STATIC_INLINE void DDL_GPIO_SetOutputPin (GPIO_Type GPIOx, uint32_t PinMask)
 Set several pins to high level on dedicated gpio port.
__STATIC_INLINE void DDL_GPIO_ResetOutputPin (GPIO_Type GPIOx, uint32_t PinMask)
 Set several pins to low level on dedicated gpio port.
__STATIC_INLINE void DDL_GPIO_TogglePin (GPIO_Type GPIOx, uint32_t PinMask)
 Toggle data value for several pin of dedicated port.
void DDL_GPIO_EnableAdc3AnalogSwitchPin (GPIO_Type GPIOx, uint32_t PinMask)
 Enable ADC3 analog switch bits in SWR for the given GPIO port.
void DDL_GPIO_DisableAdc3AnalogSwitchPin (GPIO_Type GPIOx, uint32_t PinMask)
 Disable ADC3 analog switch bits in SWR for the given GPIO port.
void DDL_GPIO_SetSpecialPinType (GPIO_Type GPIOx, uint32_t PinMask, uint32_t PinType)
 Configure special pin type for the dedicated special GPIO pin.
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).
ErrorStatus DDL_GPIO_Init (GPIO_Type GPIOx, DDL_GPIO_InitTypeDef *GPIO_InitStruct)
 Initialize GPIO registers according to the specified parameters in GPIO_InitStruct.
void DDL_GPIO_StructInit (DDL_GPIO_InitTypeDef *GPIO_InitStruct)
 Set each DDL_GPIO_InitTypeDef field to default value.

Detailed Description

Header file of GPIO DDL module.

Attention

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

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_gpio.h.