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

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

`#include "gr5405.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_MODE_INPUT_POS ((uint32_t)0x0U)
#define | LL_AON_GPIO_MODE_OUTPUT_POS ((uint32_t)0x1U)
#define | LL_AON_GPIO_STRENGTH_DS0_MASK ((uint32_t)0x10U)
#define | LL_AON_GPIO_STRENGTH_DS1_MASK ((uint32_t)0x01U)
#define | LL_AON_GPIO_STRENGTH_DS0_POS ((uint32_t)0x04U)
#define | LL_AON_GPIO_STRENGTH_DS1_POS ((uint32_t)0x00U)
#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_NONE ((uint32_t)0x0U)
#define | LL_AON_GPIO_MODE_INPUT ((uint32_t)0x1U)
#define | LL_AON_GPIO_MODE_OUTPUT ((uint32_t)0x2U)
#define | LL_AON_GPIO_MODE_INOUT ((uint32_t)0x3U)
#define | LL_AON_GPIO_PULL_NO ((uint32_t)0x0U)
#define | LL_AON_GPIO_PULL_UP ((uint32_t)0x1U)
#define | LL_AON_GPIO_PULL_DOWN ((uint32_t)0x2U)
#define | LL_AON_GPIO_SPEED_MEDIUM ((uint32_t)0x1U)
#define | LL_AON_GPIO_SPEED_HIGH ((uint32_t)0x0U)
#define | LL_AON_GPIO_STRENGTH_LOW ((uint32_t)0x00U)
#define | LL_AON_GPIO_STRENGTH_MEDIUM ((uint32_t)0x01U)
#define | LL_AON_GPIO_STRENGTH_HIGH ((uint32_t)0x10U)
#define | LL_AON_GPIO_STRENGTH_ULTRA ((uint32_t)0x11U)
#define | LL_AON_GPIO_INPUT_TYPE_CMOS ((uint32_t)0x00U)
#define | LL_AON_GPIO_INPUT_TYPE_SCHMITT ((uint32_t)0x01U)
#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_TRIGGER_BOTH_EDGE ((uint32_t)0x05U)
#define | LL_CLK_RNG_OSC_32K ((uint32_t)0x00U)
#define | LL_CLK_RNG_OSC_250K ((uint32_t)0x01U)
#define | LL_CLK_RC_OSC_CLK ((uint32_t)0x02U)
#define | LL_CLK_RTC_CLK ((uint32_t)0x03U)
#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_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_input_type (uint32_t pin_mask, uint32_t type)
| Set several AON_GPIO pins to input type. More...
__STATIC_INLINE uint32_t | ll_aon_gpio_get_pin_input_type (uint32_t pin)
| Return input type 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_pin_mux (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_pin_mux (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_set_pin_speed (uint32_t pin_mask, uint32_t speed)
| Configure slew rate for a dedicated AON_GPIO pin. More...
__STATIC_INLINE uint32_t | ll_aon_gpio_get_pin_speed (uint32_t pin)
| Return slew rate for a dedicated AON_GPIO pin. More...
__STATIC_INLINE void | ll_aon_gpio_set_pin_strength (uint32_t pin_mask, uint32_t strength)
| Configure output drive strength for a dedicated AON_GPIO pin. More...
__STATIC_INLINE uint32_t | ll_aon_gpio_get_pin_strength (uint32_t pin_mask)
| Return output strength for a dedicated AON_GPIO pin. More...
__STATIC_INLINE void | ll_aon_gpio4_enable_clk_output (uint32_t clk_sel)
| Enable clock output on AON_GPIO_PIN4. More...
__STATIC_INLINE void | ll_aon_gpio4_disable_clk_output (void)
| Disable clock output on AON_GPIO_PIN4. More...
__STATIC_INLINE uint32_t | ll_aon_gpio4_is_enabled_clk_output (void)
| Check if clock output on AON_GPIO_PIN4 is enabled or disabled. 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...
__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_read_input_pin (uint32_t pin_mask)
| Return if input data level of several AON_GPIO pins is high or low. More...
__STATIC_INLINE uint32_t | ll_aon_gpio_read_output_pin (uint32_t pin_mask)
| Return if output 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_both_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_both_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_get_enabled_pin (void)
| Get aon gpio enable pins. More...
__STATIC_INLINE uint32_t | ll_aon_gpio_is_enable_wakeup_it (void)
| Check if the AON_GPIO master interrupt is enabled or disabled. More...
__STATIC_INLINE uint16_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...
__STATIC_INLINE uint16_t | ll_aon_gpio_read_event_flag_it (void)
| Indicate if the AON GPIO event flag is set or not. More...
__STATIC_INLINE void | ll_aon_gpio_clear_event_flag_it (void)
| Clear AON GPIO event interrupt flag. More...
void | ll_aon_gpio_init (ll_aon_gpio_init_t const p_aon_gpio_init)
| Initialize AON_GPIO registers according to the specified. parameters in p_aon_gpio_init. 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 ll_aon_gpio.h.