gr55xx_hal_gpio.h File Reference

Header file containing functions prototypes of GPIO HAL library. More...

#include "gr55xx_ll_gpio.h"
#include "gr55xx_hal_def.h"
#include "gr55xx_hal_gpio_ex.h"
+ Include dependency graph for gr55xx_hal_gpio.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _hal_gpio_callback
 HAL_GPIO Callback function definition. More...
 
struct  _gpio_init
 GPIO init structure definition. More...
 

Macros

#define GPIO_PIN_0   ((uint16_t)0x0001U)
 Pin 0 selected
More...
 
#define GPIO_PIN_1   ((uint16_t)0x0002U)
 Pin 1 selected
More...
 
#define GPIO_PIN_2   ((uint16_t)0x0004U)
 Pin 2 selected
More...
 
#define GPIO_PIN_3   ((uint16_t)0x0008U)
 Pin 3 selected
More...
 
#define GPIO_PIN_4   ((uint16_t)0x0010U)
 Pin 4 selected
More...
 
#define GPIO_PIN_5   ((uint16_t)0x0020U)
 Pin 5 selected
More...
 
#define GPIO_PIN_6   ((uint16_t)0x0040U)
 Pin 6 selected
More...
 
#define GPIO_PIN_7   ((uint16_t)0x0080U)
 Pin 7 selected
More...
 
#define GPIO_PIN_8   ((uint16_t)0x0100U)
 Pin 8 selected
More...
 
#define GPIO_PIN_9   ((uint16_t)0x0200U)
 Pin 9 selected
More...
 
#define GPIO_PIN_10   ((uint16_t)0x0400U)
 Pin 10 selected
More...
 
#define GPIO_PIN_11   ((uint16_t)0x0800U)
 Pin 11 selected
More...
 
#define GPIO_PIN_12   ((uint16_t)0x1000U)
 Pin 12 selected
More...
 
#define GPIO_PIN_13   ((uint16_t)0x2000U)
 Pin 13 selected
More...
 
#define GPIO_PIN_14   ((uint16_t)0x4000U)
 Pin 14 selected
More...
 
#define GPIO_PIN_15   ((uint16_t)0x8000U)
 Pin 15 selected
More...
 
#define GPIO_PIN_ALL   ((uint16_t)0xFFFFU)
 All pins selected. More...
 
#define GPIO_PIN_MASK   (0x0000FFFFU)
 PIN mask for assert test. More...
 
#define GPIO_MODE_INPUT   (LL_GPIO_MODE_INPUT << 0)
 Input Mode
More...
 
#define GPIO_MODE_OUTPUT   (LL_GPIO_MODE_OUTPUT << 0)
 Output Mode
More...
 
#define GPIO_MODE_MUX   (LL_GPIO_MODE_MUX << 0)
 Mux Mode
More...
 
#define GPIO_MODE_IT_RISING   (LL_GPIO_TRIGGER_RISING << 4)
 Interrupt Mode with Rising edge trigger detection
More...
 
#define GPIO_MODE_IT_FALLING   (LL_GPIO_TRIGGER_FALLING << 4)
 Interrupt Mode with Falling edge trigger detection. More...
 
#define GPIO_MODE_IT_HIGH   (LL_GPIO_TRIGGER_HIGH << 4)
 Interrupt Mode with High-level trigger detection
More...
 
#define GPIO_MODE_IT_LOW   (LL_GPIO_TRIGGER_LOW << 4)
 Interrupt Mode with Low-level trigger detection
More...
 
#define GPIO_NOPULL   LL_GPIO_PULL_NO
 No Pull-up or Pull-down activation
More...
 
#define GPIO_PULLUP   LL_GPIO_PULL_UP
 Pull-up activation
More...
 
#define GPIO_PULLDOWN   LL_GPIO_PULL_DOWN
 Pull-down activation
More...
 
#define GPIO_DEFAULT_CONFIG
 GPIO_default_config InitStruct default configuartion. More...
 
#define __HAL_GPIO_IT_GET_IT(__GPIOX__, __GPIO_PIN__)   ll_gpio_read_flag_it(__GPIOX__, __GPIO_PIN__)
 Check whether the specified GPIO pin is asserted or not. More...
 
#define __HAL_GPIO_IT_CLEAR_IT(__GPIOX__, __GPIO_PIN__)   ll_gpio_clear_flag_it(__GPIOX__, __GPIO_PIN__)
 Clear the GPIO pin pending bits. More...
 
#define IS_GPIO_PIN_ACTION(__ACTION__)   (((__ACTION__) == GPIO_PIN_RESET) || ((__ACTION__) == GPIO_PIN_SET))
 Check if GPIO pin action is valid. More...
 
#define IS_GPIO_PIN(__PIN__)
 Check if GPIO pins are valid. More...
 
#define IS_GPIO_MODE(__MODE__)
 Check if GPIO mode is valid. More...
 
#define IS_GPIO_PULL(__PULL__)
 Check if GPIO pull type is valid. More...
 

Typedefs

typedef struct _hal_gpio_callback hal_gpio_callback_t
 HAL_GPIO Callback function definition. More...
 
typedef struct _gpio_init gpio_init_t
 GPIO init structure definition. More...
 

Enumerations

enum  gpio_pin_state_t { GPIO_PIN_RESET = 0U, GPIO_PIN_SET }
 GPIO Bit SET and Bit RESET Enumerations. More...
 

Functions

void hal_gpio_init (gpio_regs_t *GPIOx, gpio_init_t *p_gpio_init)
 Initialize the GPIOx peripheral according to the specified parameters in the p_gpio_init. More...
 
void hal_gpio_deinit (gpio_regs_t *GPIOx, uint32_t gpio_pin)
 De-initialize the GPIOx peripheral registers to their default reset values. More...
 
gpio_pin_state_t hal_gpio_read_pin (gpio_regs_t *GPIOx, uint16_t gpio_pin)
 Read the specified input port pin. More...
 
void hal_gpio_write_pin (gpio_regs_t *GPIOx, uint16_t gpio_pin, gpio_pin_state_t pin_state)
 Set or clear the selected data port bit. More...
 
void hal_gpio_toggle_pin (gpio_regs_t *GPIOx, uint16_t gpio_pin)
 Toggle the specified GPIO pin. More...
 
void hal_gpio_exti_irq_handler (gpio_regs_t *GPIOx)
 Handle GPIO interrupt request. More...
 
void hal_gpio_exti_callback (gpio_regs_t *GPIOx, uint16_t gpio_pin)
 GPIO pin detection callback. More...
 

Detailed Description

Header file containing functions prototypes of GPIO HAL library.

Author
BLE Driver Team
Attention
Copyright (c) 2019 GOODIX

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 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. Neither the name of GOODIX 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 COPYRIGHT HOLDERS AND 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.

Definition in file gr55xx_hal_gpio.h.