Classes | Macros | Typedefs | Functions
gr55xx_ll_gpio.h File Reference

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

`#include "gr55xx.h"`
Include dependency graph for gr55xx_ll_gpio.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes
struct | _ll_gpio_init
| LL GPIO init configuration definition. More...

## Macros
#define | LL_GPIO_PIN_0 ((uint32_t)0x0001U)
#define | LL_GPIO_PIN_1 ((uint32_t)0x0002U)
#define | LL_GPIO_PIN_2 ((uint32_t)0x0004U)
#define | LL_GPIO_PIN_3 ((uint32_t)0x0008U)
#define | LL_GPIO_PIN_4 ((uint32_t)0x0010U)
#define | LL_GPIO_PIN_5 ((uint32_t)0x0020U)
#define | LL_GPIO_PIN_6 ((uint32_t)0x0040U)
#define | LL_GPIO_PIN_7 ((uint32_t)0x0080U)
#define | LL_GPIO_PIN_8 ((uint32_t)0x0100U)
#define | LL_GPIO_PIN_9 ((uint32_t)0x0200U)
#define | LL_GPIO_PIN_10 ((uint32_t)0x0400U)
#define | LL_GPIO_PIN_11 ((uint32_t)0x0800U)
#define | LL_GPIO_PIN_12 ((uint32_t)0x1000U)
#define | LL_GPIO_PIN_13 ((uint32_t)0x2000U)
#define | LL_GPIO_PIN_14 ((uint32_t)0x4000U)
#define | LL_GPIO_PIN_15 ((uint32_t)0x8000U)
#define | LL_GPIO_PIN_ALL ((uint32_t)0xFFFFU)
#define | LL_GPIO_MODE_INPUT ((uint32_t)0x0U)
#define | LL_GPIO_MODE_OUTPUT ((uint32_t)0x1U)
#define | LL_GPIO_MODE_MUX ((uint32_t)0x2U)
#define | LL_GPIO_PULL_NO LL_GPIO_RE_N
#define | LL_GPIO_PULL_UP LL_GPIO_RTYP
#define | LL_GPIO_PULL_DOWN ((uint32_t)0x0U)
#define | LL_GPIO_MUX_0 ((uint32_t)0x0U)
#define | LL_GPIO_MUX_1 ((uint32_t)0x1U)
#define | LL_GPIO_MUX_2 ((uint32_t)0x2U)
#define | LL_GPIO_MUX_3 ((uint32_t)0x3U)
#define | LL_GPIO_MUX_4 ((uint32_t)0x4U)
#define | LL_GPIO_MUX_5 ((uint32_t)0x5U)
#define | LL_GPIO_MUX_6 ((uint32_t)0x6U)
#define | LL_GPIO_MUX_7 ((uint32_t)0x7U)
#define | LL_GPIO_MUX_8 ((uint32_t)0x8U)
#define | LL_GPIO_TRIGGER_NONE ((uint32_t)0x00U)
#define | LL_GPIO_TRIGGER_RISING ((uint32_t)0x01U)
#define | LL_GPIO_TRIGGER_FALLING ((uint32_t)0x02U)
#define | LL_GPIO_TRIGGER_HIGH ((uint32_t)0x03U)
#define | LL_GPIO_TRIGGER_LOW ((uint32_t)0x04U)
#define | LL_GPIO_DEFAULT_CONFIG
| LL GPIO InitStrcut default configuartion. More...
#define | LL_GPIO_WriteReg(__instance__, __REG__, __VALUE__) WRITE_REG(__instance__->__REG__, (__VALUE__))
| Write a value in GPIO register. More...
#define | LL_GPIO_ReadReg(__instance__, __REG__) READ_REG(__instance__->__REG__)
| Read a value in GPIO register. More...
#define | LL_GPIO_GET_RESISTOR_POS(__GPIOx__) (((__GPIOx__) == GPIO0) ? 0 : 16)
| Get the starting position of the specified GPIO instance in related pull-up/pull-down register. More...
#define | LL_GPIO_GET_REG_MUX_CTRL_0_7(__GPIOx__) (((__GPIOx__) == GPIO0) ? &(MCU_SUB->DPAD_MUX_CTL0_7) : &(MCU_SUB->DPAD_MUX_CTL16_23))
| Get mux control register address of specified GPIO instance. More...
#define | LL_GPIO_GET_REG_MUX_CTRL_8_15(__GPIOx__) (((__GPIOx__) == GPIO0) ? &(MCU_SUB->DPAD_MUX_CTL8_15) : &(MCU_SUB->DPAD_MUX_CTL24_31))
| Get mux control register address of specified GPIO instance. More...
#define | LL_GPIO_RE_N_Pos 0
| Resistor Enable bits position. More...
#define | LL_GPIO_RE_N_Msk (0x1U << LL_GPIO_RE_N_Pos)
| Resistor Enable bits mask More...
#define | LL_GPIO_RE_N LL_GPIO_RE_N_Msk
| Resistor Enable bits More...
#define | LL_GPIO_RTYP_Pos 1
| Resistor Type bits position. More...
#define | LL_GPIO_RTYP_Msk (0x1U << LL_GPIO_RTYP_Pos)
| Resistor Type bits mask More...
#define | LL_GPIO_RTYP LL_GPIO_RTYP_Msk
| Resistor Type bits More...

## Typedefs
typedef struct _ll_gpio_init | ll_gpio_init_t
| LL GPIO init configuration definition. More...

## Functions
__STATIC_INLINE void | ll_gpio_set_pin_mode (gpio_regs_t *GPIOx, uint32_t pin_mask, uint32_t mode)
| Set several pins to input/output mode on dedicated port. More...
__STATIC_INLINE uint32_t | ll_gpio_get_pin_mode (gpio_regs_t *GPIOx, uint32_t pin)
| Return gpio mode for a dedicated pin on dedicated port. More...
__STATIC_INLINE void | ll_gpio_set_pin_pull (gpio_regs_t *GPIOx, uint32_t pin_mask, uint32_t pull)
| Configure gpio pull-up or pull-down for a dedicated pin on a dedicated port. More...
__STATIC_INLINE uint32_t | ll_gpio_get_pin_pull (gpio_regs_t *GPIOx, uint32_t pin)
| Return gpio pull-up or pull-down for a dedicated pin on a dedicated port. More...
__STATIC_INLINE void | ll_gpio_set_mux_pin_0_7 (gpio_regs_t *GPIOx, uint32_t pin, uint32_t mux)
| Configure gpio pinmux number of a dedicated pin from 0 to 7 for a dedicated port. More...
__STATIC_INLINE uint32_t | ll_gpio_get_mux_pin_0_7 (gpio_regs_t *GPIOx, uint32_t pin)
| Return gpio alternate function of a dedicated pin from 0 to 7 for a dedicated port. More...
__STATIC_INLINE void | ll_gpio_set_mux_pin_8_15 (gpio_regs_t *GPIOx, uint32_t pin, uint32_t mux)
| Configure gpio alternate function of a dedicated pin from 8 to 15 for a dedicated port. More...
__STATIC_INLINE uint32_t | ll_gpio_get_mux_pin_8_15 (gpio_regs_t *GPIOx, uint32_t pin)
| Return gpio alternate function of a dedicated pin from 8 to 15 for a dedicated port. More...
__STATIC_INLINE uint32_t | ll_gpio_read_input_port (gpio_regs_t *GPIOx)
| Return full input data register value for a dedicated port. More...
__STATIC_INLINE uint32_t | ll_gpio_is_input_pin_set (gpio_regs_t *GPIOx, uint32_t pin_mask)
| Return if input data level for several pins of dedicated port is high or low. More...
__STATIC_INLINE void | ll_gpio_write_output_port (gpio_regs_t *GPIOx, uint32_t port_value)
| Write output data register for the port. More...
__STATIC_INLINE uint32_t | ll_gpio_read_output_port (gpio_regs_t *GPIOx)
| Return full output data register value for a dedicated port. More...
__STATIC_INLINE uint32_t | ll_gpio_is_output_pin_set (gpio_regs_t *GPIOx, uint32_t pin_mask)
| Return if input data level for several pins of dedicated port is high or low. More...
__STATIC_INLINE void | ll_gpio_set_output_pin (gpio_regs_t *GPIOx, uint32_t pin_mask)
| Set several pins to high level on dedicated gpio port. More...
__STATIC_INLINE void | ll_gpio_reset_output_pin (gpio_regs_t *GPIOx, uint32_t pin_mask)
| Set several pins to low level on dedicated gpio port. More...
__STATIC_INLINE void | ll_gpio_toggle_pin (gpio_regs_t *GPIOx, uint32_t pin_mask)
| Toggle data value for several pin of dedicated port. More...
__STATIC_INLINE void | ll_gpio_enable_falling_trigger (gpio_regs_t *GPIOx, uint32_t pin_mask)
| Enable GPIO Falling Edge Trigger for pins in the range of 0 to 15. More...
__STATIC_INLINE uint32_t | ll_gpio_is_enabled_falling_trigger (gpio_regs_t *GPIOx, uint32_t pin_mask)
| Check if falling edge trigger is enabled for pins in the range of 0 to 15. More...
__STATIC_INLINE void | ll_gpio_enable_rising_trigger (gpio_regs_t *GPIOx, uint32_t pin_mask)
| Enable GPIO Rising Edge Trigger for pins in the range of 0 to 15. More...
__STATIC_INLINE uint32_t | ll_gpio_is_enabled_rising_trigger (gpio_regs_t *GPIOx, uint32_t pin_mask)
| Check if rising edge trigger is enabled for pins in the range of 0 to 15. More...
__STATIC_INLINE void | ll_gpio_enable_high_trigger (gpio_regs_t *GPIOx, uint32_t pin_mask)
| Enable GPIO High Level Trigger for pins in the range of 0 to 15. More...
__STATIC_INLINE uint32_t | ll_gpio_is_enabled_high_trigger (gpio_regs_t *GPIOx, uint32_t pin_mask)
| Check if high level trigger is enabled for pins in the range of 0 to 15. More...
__STATIC_INLINE void | ll_gpio_enable_low_trigger (gpio_regs_t *GPIOx, uint32_t pin_mask)
| Enable GPIO Low Level Trigger for pins in the range of 0 to 15. More...
__STATIC_INLINE uint32_t | ll_gpio_is_enabled_low_trigger (gpio_regs_t *GPIOx, uint32_t pin_mask)
| Check if low level trigger is enabled for pins in the range of 0 to 15. More...
__STATIC_INLINE void | ll_gpio_enable_it (gpio_regs_t *GPIOx, uint32_t pin_mask)
| Enable GPIO interrupts for pins in the range of 0 to 15. More...
__STATIC_INLINE void | ll_gpio_disable_it (gpio_regs_t *GPIOx, uint32_t pin_mask)
| Disable GPIO interrupts for pins in the range of 0 to 15. More...
__STATIC_INLINE uint32_t | ll_gpio_is_enabled_it (gpio_regs_t *GPIOx, uint32_t pin_mask)
| Check if the Interrupt of specified GPIO pins is enabled or disabled. More...
__STATIC_INLINE uint32_t | ll_gpio_read_flag_it (gpio_regs_t *GPIOx, uint32_t pin_mask)
| Read GPIO Interrupt Combination Flag for pins in the range of 0 to 15. More...
__STATIC_INLINE uint32_t | ll_gpio_is_active_flag_it (gpio_regs_t *GPIOx, uint32_t pin_mask)
| Indicates if the GPIO Interrupt Flag is set or not for pins in the range of 0 to 15. More...
__STATIC_INLINE void | ll_gpio_clear_flag_it (gpio_regs_t *GPIOx, uint32_t pin_mask)
| Clear Interrupt Status flag for pins in the range of 0 to 15. More...
error_status_t | ll_gpio_deinit (gpio_regs_t *GPIOx)
| De-initialize GPIO registers (Registers restored to their default values). More...
error_status_t | ll_gpio_init (gpio_regs_t *GPIOx, ll_gpio_init_t *p_gpio_init)
| Initialize GPIO registers according to the specified parameters in p_gpio_init. More...
void | ll_gpio_struct_init (ll_gpio_init_t *p_gpio_init)
| Set each field of a ll_gpio_init_t type structure to default value. More...

## Detailed Description

Header file containing functions prototypes of GPIO LL 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_ll_gpio.h.