gr55xx_ll_aon_gpio.h File Reference

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

#include "gr55xx.h"

Go to the source code of this file.

Classes

struct  _ll_aon_gpio_init
 LL AON_GPIO init Structure definition. More...
 

Macros

#define LL_AON_GPIO_PIN_0   ((uint32_t)0x01U)
 
#define LL_AON_GPIO_PIN_1   ((uint32_t)0x02U)
 
#define LL_AON_GPIO_PIN_2   ((uint32_t)0x04U)
 
#define LL_AON_GPIO_PIN_3   ((uint32_t)0x08U)
 
#define LL_AON_GPIO_PIN_4   ((uint32_t)0x10U)
 
#define LL_AON_GPIO_PIN_5   ((uint32_t)0x20U)
 
#define LL_AON_GPIO_PIN_6   ((uint32_t)0x40U)
 
#define LL_AON_GPIO_PIN_7   ((uint32_t)0x80U)
 
#define LL_AON_GPIO_PIN_ALL   ((uint32_t)0xFFU)
 
#define LL_AON_GPIO_MODE_INPUT   ((uint32_t)0x0U)
 
#define LL_AON_GPIO_MODE_OUTPUT   ((uint32_t)0x1U)
 
#define LL_AON_GPIO_MODE_MUX   ((uint32_t)0x2U)
 
#define LL_AON_GPIO_PULL_NO   LL_AON_GPIO_RE_N
 
#define LL_AON_GPIO_PULL_UP   LL_AON_GPIO_RTYP
 
#define LL_AON_GPIO_PULL_DOWN   ((uint32_t)0x0U)
 
#define LL_AON_GPIO_MUX_0   ((uint32_t)0x0U)
 
#define LL_AON_GPIO_MUX_1   ((uint32_t)0x1U)
 
#define LL_AON_GPIO_MUX_2   ((uint32_t)0x2U)
 
#define LL_AON_GPIO_MUX_3   ((uint32_t)0x3U)
 
#define LL_AON_GPIO_MUX_4   ((uint32_t)0x4U)
 
#define LL_AON_GPIO_MUX_5   ((uint32_t)0x5U)
 
#define LL_AON_GPIO_MUX_6   ((uint32_t)0x6U)
 
#define LL_AON_GPIO_MUX_7   ((uint32_t)0x7U)
 
#define LL_AON_GPIO_MUX_8   ((uint32_t)0x8U)
 
#define LL_AON_GPIO_TRIGGER_NONE   ((uint32_t)0x00U)
 
#define LL_AON_GPIO_TRIGGER_RISING   ((uint32_t)0x01U)
 
#define LL_AON_GPIO_TRIGGER_FALLING   ((uint32_t)0x02U)
 
#define LL_AON_GPIO_TRIGGER_HIGH   ((uint32_t)0x03U)
 
#define LL_AON_GPIO_TRIGGER_LOW   ((uint32_t)0x04U)
 
#define LL_AON_GPIO_WriteReg(__instance__, __REG__, __VALUE__)   WRITE_REG(__instance__->__REG__, (__VALUE__))
 Write a value in AON_GPIO register. More...
 
#define LL_AON_GPIO_ReadReg(__instance__, __REG__)   READ_REG(__instance__->__REG__)
 Read a value in AON_GPIO register. More...
 
#define LL_AON_GPIO_RE_N_Pos   AON_PAD_CTL0_GPO_RE_N_Pos
 
#define LL_AON_GPIO_RE_N_Msk   (0x1U << LL_AON_GPIO_RE_N_Pos)
 
#define LL_AON_GPIO_RE_N   LL_AON_GPIO_RE_N_Msk
 
#define LL_AON_GPIO_RTYP_Pos   AON_PAD_CTL0_GPO_RTYPE_Pos
 
#define LL_AON_GPIO_RTYP_Msk   (0x1U << LL_AON_GPIO_RTYP_Pos)
 
#define LL_AON_GPIO_RTYP   LL_AON_GPIO_RTYP_Msk
 
#define LL_AON_GPIO_DEFAULT_CONFIG
 LL AON_GPIO InitStrcut default configuartion. More...
 

Typedefs

typedef struct _ll_aon_gpio_init ll_aon_gpio_init_t
 LL AON_GPIO init Structure definition. More...
 

Functions

__STATIC_INLINE void ll_aon_gpio_set_pin_mode (uint32_t pin_mask, uint32_t mode)
 Set several AON_GPIO pins to input/output mode. More...
 
__STATIC_INLINE uint32_t ll_aon_gpio_get_pin_mode (uint32_t pin)
 Return gpio mode for a AON_GPIO pin. More...
 
__STATIC_INLINE void ll_aon_gpio_set_pin_pull (uint32_t pin_mask, uint32_t pull)
 Configure gpio pull-up or pull-down for a dedicated AON_GPIO pin. More...
 
__STATIC_INLINE uint32_t ll_aon_gpio_get_pin_pull (uint32_t pin)
 Return gpio pull-up or pull-down for a dedicated AON_GPIO pin. More...
 
__STATIC_INLINE void ll_aon_gpio_set_mux_pin_0_7 (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_aon_gpio_get_mux_pin_0_7 (uint32_t pin)
 Return gpio alternate function of a dedicated pin from 0 to 7 for a dedicated port. More...
 
__STATIC_INLINE void ll_aon_gpio_enable_xo_2mhz_output (void)
 Enable Xo_2MHz output on AON_GPIO_PIN5. More...
 
__STATIC_INLINE void ll_aon_gpio_disable_xo_2mhz_output (void)
 Disable Xo_2MHz output on AON_GPIO_PIN5. More...
 
SECTION_RAM_CODE __STATIC_INLINE uint32_t ll_aon_gpio_is_enabled_xo_2mhz_output (void)
 Check if Xo_2MHz output on AON_GPIO_PIN5 is enabled or disabled. More...
 
__STATIC_INLINE uint32_t ll_aon_gpio_read_input_port (void)
 Return full input data register value of AON_GPIO. More...
 
__STATIC_INLINE uint32_t ll_aon_gpio_is_input_pin_set (uint32_t pin_mask)
 Return if input data level of several AON_GPIO pins is high or low. More...
 
__STATIC_INLINE void ll_aon_gpio_write_output_port (uint32_t port_value)
 Write output data register of AON_GPIO. More...
 
__STATIC_INLINE uint32_t ll_aon_gpio_read_output_port (void)
 Return full output data register value of AON_GPIO. More...
 
__STATIC_INLINE uint32_t ll_aon_gpio_is_output_pin_set (uint32_t pin_mask)
 Return if input data level of several AON_GPIO pins is high or low. More...
 
__STATIC_INLINE void ll_aon_gpio_set_output_pin (uint32_t pin_mask)
 Set specified AON_GPIO pins to high level. More...
 
__STATIC_INLINE void ll_aon_gpio_reset_output_pin (uint32_t pin_mask)
 Set specified AON_GPIO pins to low level. More...
 
__STATIC_INLINE void ll_aon_gpio_toggle_pin (uint32_t pin_mask)
 Toggle data value of specified AON_GPIO pins. More...
 
__STATIC_INLINE void ll_aon_gpio_enable_falling_trigger (uint32_t pin_mask)
 Enable AON_GPIO Falling Edge Trigger of specified AON_GPIO pins. More...
 
__STATIC_INLINE uint32_t ll_aon_gpio_is_enabled_falling_trigger (uint32_t pin_mask)
 Check if falling edge trigger is enabled of specified AON_GPIO pins. More...
 
__STATIC_INLINE void ll_aon_gpio_enable_rising_trigger (uint32_t pin_mask)
 Enable AON_GPIO Rising Edge Trigger of specified AON_GPIO pins. More...
 
__STATIC_INLINE uint32_t ll_aon_gpio_is_enabled_rising_trigger (uint32_t pin_mask)
 Check if rising edge trigger is enabled of specified AON_GPIO pins. More...
 
__STATIC_INLINE void ll_aon_gpio_enable_high_trigger (uint32_t pin_mask)
 Enable AON_GPIO High Level Trigger of specified AON_GPIO pins. More...
 
__STATIC_INLINE uint32_t ll_aon_gpio_is_enabled_high_trigger (uint32_t pin_mask)
 Check if high level trigger is enabled of specified AON_GPIO pins. More...
 
__STATIC_INLINE void ll_aon_gpio_enable_low_trigger (uint32_t pin_mask)
 Enable AON_GPIO Low Level Trigger of specified AON_GPIO pins. More...
 
__STATIC_INLINE uint32_t ll_aon_gpio_is_enabled_low_trigger (uint32_t pin_mask)
 Check if low level trigger is enabled of specified AON_GPIO pins. More...
 
__STATIC_INLINE void ll_aon_gpio_enable_it (uint32_t pin_mask)
 Enable AON_GPIO interrupts of specified AON_GPIO pins. More...
 
__STATIC_INLINE void ll_aon_gpio_disable_it (uint32_t pin_mask)
 Disable AON_GPIO interrupts of specified AON_GPIO pins. More...
 
__STATIC_INLINE uint32_t ll_aon_gpio_is_enabled_it (uint32_t pin_mask)
 Check if the Interrupt of specified GPIO pins is enabled or disabled. More...
 
__STATIC_INLINE uint32_t ll_aon_gpio_read_flag_it (uint32_t pin_mask)
 Read AON_GPIO Interrupt Combination Flag of specified AON_GPIO pins. More...
 
__STATIC_INLINE uint32_t ll_aon_gpio_is_active_flag_it (uint32_t pin_mask)
 Indicate if the AON_GPIO Interrupt Flag is set or not of specified AON_GPIO pins. More...
 
__STATIC_INLINE void ll_aon_gpio_clear_flag_it (uint32_t pin_mask)
 Clear Interrupt Status flag of specified AON_GPIO pins. More...
 
error_status_t ll_aon_gpio_deinit (void)
 De-initialize AON_GPIO registers (Registers restored to their default values). More...
 
error_status_t ll_aon_gpio_init (ll_aon_gpio_init_t *p_aon_gpio_init)
 Initialize AON_GPIO registers according to the specified. parameters in p_aon_gpio_init. More...
 
void ll_aon_gpio_struct_init (ll_aon_gpio_init_t *p_aon_gpio_init)
 Set each field of a ll_aon_gpio_init_t type structure to default value. More...
 

Detailed Description

Header file containing functions prototypes of AON 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_aon_gpio.h.