Classes | Macros | Typedefs | Enumerations | Functions
app_io.h File Reference

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

`#include "app_drv_error.h"`
`#include "app_drv_config.h"`
`#include <stdint.h>`
Include dependency graph for app_io.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes
struct | app_io_init_t
| GPIO parameter structure definition. More...
struct | app_io_evt_t
| GPIO Interrupt event Structure definition. More...

## Macros
#define | APP_IO_PIN_0 ((uint32_t)0x00000001U)
| APP_GPIO_DEFINE IO pins. More...
#define | APP_IO_PIN_1 ((uint32_t)0x00000002U)
| Pin 1 selected More...
#define | APP_IO_PIN_2 ((uint32_t)0x00000004U)
| Pin 2 selected More...
#define | APP_IO_PIN_3 ((uint32_t)0x00000008U)
| Pin 3 selected More...
#define | APP_IO_PIN_4 ((uint32_t)0x00000010U)
| Pin 4 selected More...
#define | APP_IO_PIN_5 ((uint32_t)0x00000020U)
| Pin 5 selected More...
#define | APP_IO_PIN_6 ((uint32_t)0x00000040U)
| Pin 6 selected More...
#define | APP_IO_PIN_7 ((uint32_t)0x00000080U)
| Pin 7 selected More...
#define | APP_IO_PIN_8 ((uint32_t)0x00000100U)
| Pin 8 selected More...
#define | APP_IO_PIN_9 ((uint32_t)0x00000200U)
| Pin 9 selected More...
#define | APP_IO_PIN_10 ((uint32_t)0x00000400U)
| Pin 10 selected More...
#define | APP_IO_PIN_11 ((uint32_t)0x00000800U)
| Pin 11 selected More...
#define | APP_IO_PIN_12 ((uint32_t)0x00001000U)
| Pin 12 selected More...
#define | APP_IO_PIN_13 ((uint32_t)0x00002000U)
| Pin 13 selected More...
#define | APP_IO_PIN_14 ((uint32_t)0x00004000U)
| Pin 14 selected More...
#define | APP_IO_PIN_15 ((uint32_t)0x00008000U)
| Pin 15 selected More...
#define | APP_IO_PIN_16 ((uint32_t)0x00010000U)
| Pin 16 selected More...
#define | APP_IO_PIN_17 ((uint32_t)0x00020000U)
| Pin 17 selected More...
#define | APP_IO_PIN_18 ((uint32_t)0x00040000U)
| Pin 18 selected More...
#define | APP_IO_PIN_19 ((uint32_t)0x00080000U)
| Pin 19 selected More...
#define | APP_IO_PIN_20 ((uint32_t)0x00100000U)
| Pin 20 selected More...
#define | APP_IO_PIN_21 ((uint32_t)0x00200000U)
| Pin 21 selected More...
#define | APP_IO_PIN_22 ((uint32_t)0x00400000U)
| Pin 22 selected More...
#define | APP_IO_PIN_23 ((uint32_t)0x00800000U)
| Pin 23 selected More...
#define | APP_IO_PIN_24 ((uint32_t)0x01000000U)
| Pin 24 selected More...
#define | APP_IO_PIN_25 ((uint32_t)0x02000000U)
| Pin 25 selected More...
#define | APP_IO_PIN_26 ((uint32_t)0x04000000U)
| Pin 26 selected More...
#define | APP_IO_PIN_27 ((uint32_t)0x08000000U)
| Pin 27 selected More...
#define | APP_IO_PIN_28 ((uint32_t)0x10000000U)
| Pin 28 selected More...
#define | APP_IO_PIN_29 ((uint32_t)0x20000000U)
| Pin 29 selected More...
#define | APP_IO_PIN_30 ((uint32_t)0x40000000U)
| Pin 30 selected More...
#define | APP_IO_PIN_31 ((uint32_t)0x80000000U)
| Pin 31 selected More...
#define | APP_IO_PINS_0_7 ((uint32_t)0x000000FFU)
| 0~7 pins selected More...
#define | APP_IO_PINS_0_15 ((uint32_t)0x0000FFFFU)
| 0~15 pins selected More...
#define | APP_IO_PINS_16_31 ((uint32_t)0xFFFF0000U)
| 16~31 pins selected More...
#define | APP_IO_PIN_ALL ((uint32_t)0x0000FFFFU)
| All pins selected More...
#define | APP_AON_IO_PIN_ALL ((uint32_t)0x000000FFU)
| All AON pins selected. More...
#define | APP_MSIO_IO_PIN_ALL ((uint32_t)0x000000FFU)
| All MISO pins selected. More...
#define | APP_IO_PIN_MASK ((uint32_t)0xFFFFFFFFU)
| PIN mask for assert test. More...
#define | APP_IO_DEFAULT_CONFIG
| GR5xxx_APP_GPIO_default_config initStruct default configuart APP_GPIOn. More...
#define | APP_IO_MUX APP_IO_MUX_7
| GPIO mux for different APP_DRIVER_CHIP_TYPE. More...

## Typedefs
typedef void(* | app_io_callback_t) (app_io_evt_t *p_evt)
| GPIO callback type. More...

## Enumerations
enum | app_io_pin_state_t { APP_IO_PIN_RESET, APP_IO_PIN_SET }
| GPIO state Enumerations definition. More...
enum | app_io_type_t { APP_IO_TYPE_GPIOA, APP_IO_TYPE_GPIOB, APP_IO_TYPE_GPIOC, APP_IO_TYPE_NORMAL, APP_IO_TYPE_AON, APP_IO_TYPE_MSIO, APP_IO_TYPE_MAX }
| GPIO type Enumerations definition. More...
enum | app_io_mode_t { APP_IO_MODE_NONE, APP_IO_MODE_INPUT, APP_IO_MODE_OUTPUT, APP_IO_MODE_MUX, APP_IO_MODE_IT_RISING, APP_IO_MODE_IT_FALLING, APP_IO_MODE_IT_HIGH, APP_IO_MODE_IT_LOW, APP_IO_MODE_ANALOG, APP_IO_MODE_MAX }
| GPIO mode Enumerations definition. More...
enum | app_io_pull_t { APP_IO_NOPULL, APP_IO_PULLUP, APP_IO_PULLDOWN, APP_IO_PULL_MAX }
| GPIO pull Enumerations definition. More...
enum | app_io_mux_t { APP_IO_MUX_0, APP_IO_MUX_1, APP_IO_MUX_2, APP_IO_MUX_3, APP_IO_MUX_4, APP_IO_MUX_5, APP_IO_MUX_6, APP_IO_MUX_7, APP_IO_MUX_8, APP_IO_MUX_MAX }
| GPIO mux Enumerations definition. More...
enum | app_io_speed_t { APP_IO_SPPED_MEDIUM, APP_IO_SPPED_HIGH, APP_IO_SPPED_MAX }
| GPIO Speed Structure definition. More...
enum | app_io_input_type_t { APP_IO_INPUT_TYPE_CMOS, APP_IO_INPUT_TYPE_SCHMITT, APP_IO_INPUT_TYPE_MAX }
| GPIO Input type Structure definition. More...
enum | app_io_strength_t { APP_IO_STRENGTH_LOW, APP_IO_STRENGTH_MEDIUM, APP_IO_STRENGTH_HIGH, APP_IO_STRENGTH_ULTRA, APP_IO_STRENGTH_MAX }
| GPIO Strength Structure definition. More...

## Functions
uint16_t | app_io_init (app_io_type_t type, app_io_init_t *p_init)
| Initialize the APP GPIO DRIVER according to the specified parameters in the app_io_type_t and app_io_init_t. More...
uint16_t | app_io_deinit (app_io_type_t type, uint32_t pin)
| De-initialize the GPIOx peripheral. More...
app_io_pin_state_t | app_io_read_pin (app_io_type_t type, uint32_t pin)
| Read the specified input port pin. More...
uint16_t | app_io_write_pin (app_io_type_t type, uint32_t pin, app_io_pin_state_t pin_state)
| Set or clear the selected data port bit. More...
uint16_t | app_io_toggle_pin (app_io_type_t type, uint32_t pin)
| Toggle the specified GPIO pin. More...
uint16_t | app_io_set_speed (app_io_type_t type, uint32_t pin, app_io_speed_t speed)
| Set the speed of the GPIO. More...
uint16_t | app_io_set_strength (app_io_type_t type, uint32_t pin, app_io_strength_t strength)
| Set the strength of the GPIO. More...
uint16_t | app_io_set_intput_type (app_io_type_t type, uint32_t pin, app_io_input_type_t input_type)
| Set the input type of the GPIO. More...
uint16_t | app_io_event_register_cb (app_io_type_t type, app_io_init_t *p_init, app_io_callback_t io_evt_cb, void *arg)
| Initialize GPIO to interrupt mode and register interrupt callback function. More...
uint16_t | app_io_event_unregister (app_io_type_t type, uint32_t pin)
| Deinitialize GPIO to normal mode and unregister interrupt. More...

## Detailed Description

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