gr55xx_hal_aon_gpio_ex.h
Go to the documentation of this file.
1 /**
2 ****************************************************************************************
3 *
4 * @file gr55xx_hal_aon_gpio_ex.h
5 * @author BLE Driver Team
6 * @brief Header file containing extended macro of AON GPIO HAL library.
7 *
8 ****************************************************************************************
9 * @attention
10 #####Copyright (c) 2019 GOODIX
11 All rights reserved.
12
13 Redistribution and use in source and binary forms, with or without
14 modification, are permitted provided that the following conditions are met:
15 * Redistributions of source code must retain the above copyright
16 notice, this list of conditions and the following disclaimer.
17 * Redistributions in binary form must reproduce the above copyright
18 notice, this list of conditions and the following disclaimer in the
19 documentation and/or other materials provided with the distribution.
20 * Neither the name of GOODIX nor the names of its contributors may be used
21 to endorse or promote products derived from this software without
22 specific prior written permission.
23
24 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
28 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 POSSIBILITY OF SUCH DAMAGE.
35 ****************************************************************************************
36 */
37
38 /** @addtogroup PERIPHERAL Peripheral Driver
39 * @{
40 */
41
42 /** @addtogroup HAL_DRIVER HAL Driver
43 * @{
44 */
45
46 /** @defgroup HAL_AON_GPIOEx AON_GPIOEx
47 * @brief AON_GPIOEx HAL module driver.
48 * @{
49 */
50
51 /* Define to prevent recursive inclusion -------------------------------------*/
52 #ifndef __GR55xx_HAL_AON_GPIO_EX_H__
53 #define __GR55xx_HAL_AON_GPIO_EX_H__
54
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58
59 /* Includes ------------------------------------------------------------------*/
60 #include "gr55xx_hal_def.h"
61 #include "gr55xx_ll_gpio.h"
62
63 /* Exported types ------------------------------------------------------------*/
64
65 /**
66 * @defgroup HAL_AON_GPIOEX_MACRO Defines
67 * @{
68 */
69
70 /* Exported constants --------------------------------------------------------*/
71 /** @defgroup AON_GPIOEx_Exported_Constants AON_GPIOEx Exported Constants
72 * @{
73 */
74
75 /** @defgroup AON_GPIOEx_Mux_Mode AON_GPIOEx Mux Mode definition
76 * @{
77 */
78 #define AON_GPIO_MUX_0 LL_AON_GPIO_MUX_0 /**< AON GPIO Mux mode 0 */
79 #define AON_GPIO_MUX_1 LL_AON_GPIO_MUX_1 /**< AON GPIO Mux mode 1 */
80 #define AON_GPIO_MUX_2 LL_AON_GPIO_MUX_2 /**< AON GPIO Mux mode 2 */
81 #define AON_GPIO_MUX_3 LL_AON_GPIO_MUX_3 /**< AON GPIO Mux mode 3 */
82 #define AON_GPIO_MUX_4 LL_AON_GPIO_MUX_4 /**< AON GPIO Mux mode 4 */
83 #define AON_GPIO_MUX_5 LL_AON_GPIO_MUX_5 /**< AON GPIO Mux mode 5 */
84 #define AON_GPIO_MUX_6 LL_AON_GPIO_MUX_6 /**< AON GPIO Mux mode 6 */
85 #define AON_GPIO_MUX_7 LL_AON_GPIO_MUX_7 /**< AON GPIO Mux mode 7 */
86 /** @} */
87
88 /** @defgroup AON_GPIOEx_Mux_Function_Selection AON_GPIOEx Mux function selection
89 * @{
90 */
91
92 #if defined (GR551xx)
93 /*---------------------------------- GR551xx ------------------------------*/
94
95 /** @defgroup AON_GPIOEx_Common_Selection AON_GPIO PIN common MUX selection(Available for all AON GPIO pins)
96 * @{
97 */
98
99 #define AON_GPIO_PIN_MUX_GPIO AON_GPIO_MUX_7 /**< AON GPIO PIN x Mux Select GPIO */
100
101 /** @} */
102
103 /** @defgroup AON_GPIOEx_PIN0_Mux_Selection AON_GPIO_PIN1 MUX selection
104 * @{
105 */
106 #define AON_GPIO_PIN1_MUX_QSPIM0_CS_N AON_GPIO_MUX_5 /**< AON_GPIO_PIN1 Mux Select QSPIM0_CS_N */
107 #define AON_GPIO_PIN1_MUX_COEX_BLE_TX AON_GPIO_MUX_6 /**< AON_GPIO_PIN1 Mux Select COEX_BLE_TX */
108 /** @} */
109
110 /** @defgroup AON_GPIOEx_PIN2_Mux_Selection AON_GPIO_PIN2 MUX selection
111 * @{
112 */
113 #define AON_GPIO_PIN2_MUX_SIM_PRESENCE AON_GPIO_MUX_0 /**< AON_GPIO_PIN2 Mux Select SIM_PRESENCE */
114 #define AON_GPIO_PIN2_MUX_QSPIM1_CS_N AON_GPIO_MUX_1 /**< AON_GPIO_PIN2 Mux Select QSPIM1_CS_N */
115 #define AON_GPIO_PIN2_MUX_I2S_WS AON_GPIO_MUX_2 /**< AON_GPIO_PIN2 Mux Select I2S_WS */
116 #define AON_GPIO_PIN2_MUX_I2S_S_WS AON_GPIO_MUX_3 /**< AON_GPIO_PIN2 Mux Select I2S_S_WS */
117 #define AON_GPIO_PIN2_MUX_PWM0_C AON_GPIO_MUX_5 /**< AON_GPIO_PIN2 Mux Select PWM0_C */
118 #define AON_GPIO_PIN2_MUX_COEX_BLE_PROC AON_GPIO_MUX_6 /**< AON_GPIO_PIN2 Mux Select COEX_BLE_PROC */
119 /** @} */
120
121 /** @defgroup AON_GPIOEx_PIN3_Mux_Selection AON_GPIO_PIN3 MUX selection
122 * @{
123 */
124 #define AON_GPIO_PIN3_MUX_SIM_RST_N AON_GPIO_MUX_0 /**< AON_GPIO_PIN3 Mux Select SIM_RST_N */
125 #define AON_GPIO_PIN3_MUX_QSPIM1_IO_0 AON_GPIO_MUX_1 /**< AON_GPIO_PIN3 Mux Select QSPIM1_IO_0 */
126 #define AON_GPIO_PIN3_MUX_I2S_TX_SDO AON_GPIO_MUX_2 /**< AON_GPIO_PIN3 Mux Select I2S_TX_SDO */
127 #define AON_GPIO_PIN3_MUX_I2S_S_TX_SDO AON_GPIO_MUX_3 /**< AON_GPIO_PIN3 Mux Select I2S_S_TX_SDO */
128 #define AON_GPIO_PIN3_MUX_PWM1_A AON_GPIO_MUX_5 /**< AON_GPIO_PIN3 Mux Select PWM1_A */
129 #define AON_GPIO_PIN3_MUX_COEX_WLAN_RX AON_GPIO_MUX_6 /**< AON_GPIO_PIN3 Mux Select COEX_WLAN_RX */
130 /** @} */
131
132 /** @defgroup AON_GPIOEx_PIN4_Mux_Selection AON_GPIO_PIN4 MUX selection
133 * @{
134 */
135 #define AON_GPIO_PIN4_MUX_SIM_IO AON_GPIO_MUX_0 /**< AON_GPIO_PIN4 Mux Select SIM_IO */
136 #define AON_GPIO_PIN4_MUX_QSPIM1_IO_1 AON_GPIO_MUX_1 /**< AON_GPIO_PIN4 Mux Select QSPIM1_IO_1 */
137 #define AON_GPIO_PIN4_MUX_I2S_RX_SDI AON_GPIO_MUX_2 /**< AON_GPIO_PIN4 Mux Select I2S_RX_SDI */
138 #define AON_GPIO_PIN4_MUX_I2S_S_RX_SDI AON_GPIO_MUX_3 /**< AON_GPIO_PIN4 Mux Select I2S_S_RX_SDI */
139 #define AON_GPIO_PIN4_MUX_PWM1_B AON_GPIO_MUX_5 /**< AON_GPIO_PIN4 Mux Select PWM1_B */
140 #define AON_GPIO_PIN4_MUX_COEX_BLE_RX AON_GPIO_MUX_6 /**< AON_GPIO_PIN4 Mux Select COEX_BLE_RX */
141 /** @} */
142
143 /** @defgroup AON_GPIOEx_PIN5_Mux_Selection AON_GPIO_PIN5 MUX selection
144 * @{
145 */
146 #define AON_GPIO_PIN5_MUX_SIM_CLK AON_GPIO_MUX_0 /**< AON_GPIO_PIN5 Mux Select SIM_CLK */
147 #define AON_GPIO_PIN5_MUX_QSPIM1_CLK AON_GPIO_MUX_1 /**< AON_GPIO_PIN5 Mux Select QSPIM1_CLK */
148 #define AON_GPIO_PIN5_MUX_I2S_SCLK AON_GPIO_MUX_2 /**< AON_GPIO_PIN5 Mux Select I2S_SCLK */
149 #define AON_GPIO_PIN5_MUX_I2S_S_SCLK AON_GPIO_MUX_3 /**< AON_GPIO_PIN5 Mux Select I2S_S_SCLK */
150 #define AON_GPIO_PIN5_MUX_PWM1_C AON_GPIO_MUX_5 /**< AON_GPIO_PIN5 Mux Select PWM1_C */
151 #define AON_GPIO_PIN5_MUX_COEX_WLAN_TX AON_GPIO_MUX_6 /**< AON_GPIO_PIN5 Mux Select COEX_WLAN_TX */
152 /** @} */
153
154 /**
155 * @brief Check if AON GPIO Mux mode is valid.
156 * @param __MUX__ AON GPIO Mux mode.
157 * @retval SET (__ACTION__ is valid) or RESET (__ACTION__ is invalid)
158 */
159 #define IS_AON_GPIO_MUX(__MUX__) (((__MUX__) <= AON_GPIO_MUX_7))
160
161 /*------------------------------------------------------------------------------------------*/
162 #endif /* GR551xx */
163
164 /** @} */
165
166 /** @} */
167
168 /** @} */
169
170 #ifdef __cplusplus
171 }
172 #endif
173
174 #endif /* __GR55xx_HAL_AON_GPIO_EX_H__ */
175
176 /** @} */
177
178 /** @} */
179
180 /** @} */
181
gr55xx_ll_gpio.h
Header file containing functions prototypes of GPIO LL library.
gr55xx_hal_def.h
This file contains HAL common definitions, enumeration, macros and structures definitions.