Go to the documentation of this file.
69 #define APP_IO_PIN_0 ((uint32_t)0x00000001U)
70 #define APP_IO_PIN_1 ((uint32_t)0x00000002U)
71 #define APP_IO_PIN_2 ((uint32_t)0x00000004U)
72 #define APP_IO_PIN_3 ((uint32_t)0x00000008U)
73 #define APP_IO_PIN_4 ((uint32_t)0x00000010U)
74 #define APP_IO_PIN_5 ((uint32_t)0x00000020U)
75 #define APP_IO_PIN_6 ((uint32_t)0x00000040U)
76 #define APP_IO_PIN_7 ((uint32_t)0x00000080U)
77 #define APP_IO_PIN_8 ((uint32_t)0x00000100U)
78 #define APP_IO_PIN_9 ((uint32_t)0x00000200U)
79 #define APP_IO_PIN_10 ((uint32_t)0x00000400U)
80 #define APP_IO_PIN_11 ((uint32_t)0x00000800U)
81 #define APP_IO_PIN_12 ((uint32_t)0x00001000U)
82 #define APP_IO_PIN_13 ((uint32_t)0x00002000U)
83 #define APP_IO_PIN_14 ((uint32_t)0x00004000U)
84 #define APP_IO_PIN_15 ((uint32_t)0x00008000U)
85 #if (APP_DRIVER_CHIP_TYPE == APP_DRIVER_GR551X)
86 #define APP_IO_PIN_16 ((uint32_t)0x00010000U)
87 #define APP_IO_PIN_17 ((uint32_t)0x00020000U)
88 #define APP_IO_PIN_18 ((uint32_t)0x00040000U)
89 #define APP_IO_PIN_19 ((uint32_t)0x00080000U)
90 #define APP_IO_PIN_20 ((uint32_t)0x00100000U)
91 #define APP_IO_PIN_21 ((uint32_t)0x00200000U)
92 #define APP_IO_PIN_22 ((uint32_t)0x00400000U)
93 #define APP_IO_PIN_23 ((uint32_t)0x00800000U)
94 #define APP_IO_PIN_24 ((uint32_t)0x01000000U)
95 #define APP_IO_PIN_25 ((uint32_t)0x02000000U)
96 #define APP_IO_PIN_26 ((uint32_t)0x04000000U)
97 #define APP_IO_PIN_27 ((uint32_t)0x08000000U)
98 #define APP_IO_PIN_28 ((uint32_t)0x10000000U)
99 #define APP_IO_PIN_29 ((uint32_t)0x20000000U)
100 #define APP_IO_PIN_30 ((uint32_t)0x40000000U)
101 #define APP_IO_PIN_31 ((uint32_t)0x80000000U)
104 #define APP_IO_PINS_0_7 ((uint32_t)0x000000FFU)
105 #define APP_IO_PINS_0_15 ((uint32_t)0x0000FFFFU)
106 #define APP_IO_PINS_16_31 ((uint32_t)0xFFFF0000U)
107 #define APP_AON_IO_PIN_ALL ((uint32_t)0x000000FFU)
108 #if (APP_DRIVER_CHIP_TYPE == APP_DRIVER_GR5332X)
109 #define APP_IO_PIN_ALL ((uint32_t)0x00003FFFU)
110 #define APP_MSIO_IO_PIN_ALL ((uint32_t)0x000003FFU)
112 #define APP_IO_PIN_ALL ((uint32_t)0x0000FFFFU)
113 #define APP_MSIO_IO_PIN_ALL ((uint32_t)0x000000FFU)
115 #define APP_IO_PIN_MASK ((uint32_t)0xFFFFFFFFU)
120 #define APP_IO_DEFAULT_CONFIG \
122 .pin = APP_IO_PIN_ALL, \
123 .mode = APP_IO_MODE_INPUT, \
124 .pull = APP_IO_PULLDOWN, \
170 #if (APP_DRIVER_CHIP_TYPE != APP_DRIVER_GR551X)
171 APP_IO_MODE_IT_BOTH_EDGE,
193 #if (APP_DRIVER_CHIP_TYPE == APP_DRIVER_GR5332X)
276 #if (APP_DRIVER_CHIP_TYPE == APP_DRIVER_GR5332X)
277 #define APP_IO_MUX APP_IO_MUX_0
278 #elif (APP_DRIVER_CHIP_TYPE == APP_DRIVER_GR5525X)
279 #define APP_IO_MUX APP_IO_MUX_8
281 #define APP_IO_MUX APP_IO_MUX_7
app_io_speed_t
GPIO Speed Structure definition.
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.
GPIO Interrupt event Structure definition.
app_io_input_type_t
GPIO Input type Structure definition.
uint16_t app_io_event_unregister(app_io_type_t type, uint32_t pin)
Deinitialize GPIO to normal mode and unregister interrupt.
void(* app_io_callback_t)(app_io_evt_t *p_evt)
GPIO callback type.
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.
uint16_t app_io_deinit(app_io_type_t type, uint32_t pin)
De-initialize the GPIOx peripheral.
app_io_pull_t
GPIO pull Enumerations definition.
app_io_type_t
GPIO type Enumerations definition.
app_io_mode_t
GPIO mode Enumerations definition.
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.
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.
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.
app_io_pin_state_t app_io_read_pin(app_io_type_t type, uint32_t pin)
Read the specified input port pin..
app_io_pin_state_t
GPIO state Enumerations definition.
@ APP_IO_INPUT_TYPE_SCHMITT
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_...
uint16_t app_io_toggle_pin(app_io_type_t type, uint32_t pin)
Toggle the specified GPIO pin.
app_io_strength_t
GPIO Strength Structure definition.
app_io_mux_t
GPIO mux Enumerations definition.
Header file of app driver error code.
Header file of app driver config code.
GPIO parameter structure definition.