Classes | Macros | Typedefs | Enumerations | Functions
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"`

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)
#define | GPIO_PIN_1 ((uint16_t)0x0002U)
#define | GPIO_PIN_2 ((uint16_t)0x0004U)
#define | GPIO_PIN_3 ((uint16_t)0x0008U)
#define | GPIO_PIN_4 ((uint16_t)0x0010U)
#define | GPIO_PIN_5 ((uint16_t)0x0020U)
#define | GPIO_PIN_6 ((uint16_t)0x0040U)
#define | GPIO_PIN_7 ((uint16_t)0x0080U)
#define | GPIO_PIN_8 ((uint16_t)0x0100U)
#define | GPIO_PIN_9 ((uint16_t)0x0200U)
#define | GPIO_PIN_10 ((uint16_t)0x0400U)
#define | GPIO_PIN_11 ((uint16_t)0x0800U)
#define | GPIO_PIN_12 ((uint16_t)0x1000U)
#define | GPIO_PIN_13 ((uint16_t)0x2000U)
#define | GPIO_PIN_14 ((uint16_t)0x4000U)
#define | GPIO_PIN_15 ((uint16_t)0x8000U)
#define | GPIO_PIN_ALL ((uint16_t)0xFFFFU)
#define | GPIO_PIN_MASK (0x0000FFFFU)
#define | GPIO_MODE_INPUT (LL_GPIO_MODE_INPUT << 0)
#define | GPIO_MODE_OUTPUT (LL_GPIO_MODE_OUTPUT << 0)
#define | GPIO_MODE_MUX (LL_GPIO_MODE_MUX << 0)
#define | GPIO_MODE_IT_RISING (LL_GPIO_TRIGGER_RISING << 4)
#define | GPIO_MODE_IT_FALLING (LL_GPIO_TRIGGER_FALLING << 4)
#define | GPIO_MODE_IT_HIGH (LL_GPIO_TRIGGER_HIGH << 4)
#define | GPIO_MODE_IT_LOW (LL_GPIO_TRIGGER_LOW << 4)
#define | GPIO_NOPULL LL_GPIO_PULL_NO
#define | GPIO_PULLUP LL_GPIO_PULL_UP
#define | GPIO_PULLDOWN LL_GPIO_PULL_DOWN
#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.