app_drv_config.h
Go to the documentation of this file.
1 /**
2 ****************************************************************************************
3 *
4 * @file app_drv_config.h
5 * @author BLE Driver Team
6 * @brief Header file of app driver config code.
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 APP_DRIVER APP DRIVER
43 * @{
44 */
45
46 /** @defgroup APP_DRIVER_CONFIG DRIVER CONFIG
47 * @brief APP DRIVER CONFIG
48 * @{
49 */
50
51
52 #ifndef _APP_DRV_CONFIG_H_
53 #define _APP_DRV_CONFIG_H_
54
55 #include "custom_config.h"
56
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60
61 #define APP_DRIVER_GR551X 0x0 /**< APP_DRIVER for GR551X */
62 #define APP_DRIVER_GR5525X 0x1 /**< APP_DRIVER for GR5525X */
63 #define APP_DRIVER_GR5526X 0x2 /**< APP_DRIVER for GR5526X */
64 #define APP_DRIVER_GR5332X 0x3 /**< APP_DRIVER for GR5332X */
65
66 #ifdef SOC_GR5515
67 #define APP_DRIVER_CHIP_TYPE APP_DRIVER_GR551X /**< GR5515 chip type*/
68 #define SOC_GPIO_PINS_MAX (32) /**< GR5515 max gpio pins */
69 #define SOC_AON_PINS_MAX (8) /**< GR5515 max aon pins */
70 #elif defined(SOC_GR5525)
71 #define APP_DRIVER_CHIP_TYPE APP_DRIVER_GR5525X /**< GR5525 chip type*/
72 #define SOC_GPIO_PINS_MAX (32) /**< GR5525 max gpio pins */
73 #define SOC_AON_PINS_MAX (8) /**< GR5525 max aon pins */
74 #elif defined(SOC_GR5526)
75 #define APP_DRIVER_CHIP_TYPE APP_DRIVER_GR5526X /**< GR5526 chip type*/
76 #define SOC_GPIO_PINS_MAX (34) /**< GR5526 max gpio pins */
77 #define SOC_AON_PINS_MAX (8) /**< GR5526 max aon pins */
78 #elif defined(SOC_GR5332)
79 #define APP_DRIVER_CHIP_TYPE APP_DRIVER_GR5332X /**< GR5332 chip type*/
80 #define SOC_GPIO_PINS_MAX (14) /**< GR5332 max gpio pins */
81 #define SOC_AON_PINS_MAX (8) /**< GR5332 max aon pins */
82 #endif
83
84 /**
85 * @defgroup APP_DRV_PERIPHERAL_PRIORITY_DEFINE Defines
86 * @{
87 */
88 /**@brief APP driver peripheral priority define. */
89 #ifndef APP_DRIVER_ADC_WAPEUP_PRIORITY
90 #define APP_DRIVER_ADC_WAPEUP_PRIORITY WAPEUP_PRIORITY_HIGH /**< ADC Wakeup priority High */
91 #endif
92
93 #ifndef APP_DRIVER_AES_WAPEUP_PRIORITY
94 #define APP_DRIVER_AES_WAPEUP_PRIORITY WAPEUP_PRIORITY_MID /**< AES Wakeup priority Mid */
95 #endif
96
97 #ifndef APP_DRIVER_COMP_WAPEUP_PRIORITY
98 #define APP_DRIVER_COMP_WAPEUP_PRIORITY WAPEUP_PRIORITY_LOW /**< COMP Wakeup priority Low */
99 #endif
100
101 #ifndef APP_DRIVER_DUAL_TIM_WAPEUP_PRIORITY
102 #define APP_DRIVER_DUAL_TIM_WAPEUP_PRIORITY WAPEUP_PRIORITY_MID /**< DUAL TIM Wakeup priority Mid */
103 #endif
104
105 #ifndef APP_DRIVER_DMA_WAPEUP_PRIORITY
106 #define APP_DRIVER_DMA_WAPEUP_PRIORITY WAPEUP_PRIORITY_HIGH /**< DMA Wakeup priority High */
107 #endif
108
109 #ifndef APP_DRIVER_GPIOTE_WAPEUP_PRIORITY
110 #define APP_DRIVER_GPIOTE_WAPEUP_PRIORITY WAPEUP_PRIORITY_LOW /**< GPIOTE Wakeup priority Low */
111 #endif
112
113 #ifndef APP_DRIVER_SYSTICK_WAPEUP_PRIORITY
114 #define APP_DRIVER_SYSTICK_WAPEUP_PRIORITY WAPEUP_PRIORITY_HIGH /**< SysTick Wakeup priority High */
115 #endif
116
117 #ifndef APP_DRIVER_UART_WAPEUP_PRIORITY
118 #define APP_DRIVER_UART_WAPEUP_PRIORITY WAPEUP_PRIORITY_HIGH /**< Uart Wakeup priority High */
119 #endif
120
121 #ifndef APP_DRIVER_HMAC_WAPEUP_PRIORITY
122 #define APP_DRIVER_HMAC_WAPEUP_PRIORITY WAPEUP_PRIORITY_MID /**< Hmac Wakeup priority Mid */
123 #endif
124
125 #ifndef APP_DRIVER_I2C_WAPEUP_PRIORITY
126 #define APP_DRIVER_I2C_WAPEUP_PRIORITY WAPEUP_PRIORITY_HIGH /**< I2C Wakeup priority High */
127 #endif
128
129 #ifndef APP_DRIVER_I2S_WAPEUP_PRIORITY
130 #define APP_DRIVER_I2S_WAPEUP_PRIORITY WAPEUP_PRIORITY_HIGH /**< I2S Wakeup priority High */
131 #endif
132
133 #ifndef APP_DRIVER_QSPI_WAPEUP_PRIORITY
134 #define APP_DRIVER_QSPI_WAPEUP_PRIORITY WAPEUP_PRIORITY_HIGH /**< QSPI Wakeup priority High */
135 #endif
136
137 #ifndef APP_DRIVER_RNG_WAPEUP_PRIORITY
138 #define APP_DRIVER_RNG_WAPEUP_PRIORITY WAPEUP_PRIORITY_MID /**< RNG Wakeup priority Mid */
139 #endif
140
141 #ifndef APP_DRIVER_SPI_WAPEUP_PRIORITY
142 #define APP_DRIVER_SPI_WAPEUP_PRIORITY WAPEUP_PRIORITY_HIGH /**< SPI Wakeup priority High */
143 #endif
144
145 #ifndef APP_DRIVER_TIM_WAPEUP_PRIORITY
146 #define APP_DRIVER_TIM_WAPEUP_PRIORITY WAPEUP_PRIORITY_MID /**< TIM Wakeup priority Mid */
147 #endif
148
149 #ifndef APP_DRIVER_PWM_WAPEUP_PRIORITY
150 #define APP_DRIVER_PWM_WAPEUP_PRIORITY WAPEUP_PRIORITY_MID /**< PWM Wakeup priority Mid */
151 #endif
152
153 #ifndef APP_DRIVER_ISO7816_WAPEUP_PRIORITY
154 #define APP_DRIVER_ISO7816_WAPEUP_PRIORITY WAPEUP_PRIORITY_HIGH /**< ISO7816 Wakeup priority High */
155 #endif
156
157 #ifndef APP_DRIVER_PKC_WAPEUP_PRIORITY
158 #define APP_DRIVER_PKC_WAPEUP_PRIORITY WAPEUP_PRIORITY_HIGH /**< PKC Wakeup priority High */
159 #endif
160
161 #if (APP_DRIVER_CHIP_TYPE == APP_DRIVER_GR5526X || APP_DRIVER_CHIP_TYPE == APP_DRIVER_GR5525X)
162 #ifndef APP_DRIVER_DSPI_WAPEUP_PRIORITY
163 #define APP_DRIVER_DSPI_WAPEUP_PRIORITY WAPEUP_PRIORITY_HIGH /**< DSPI Wakeup priority High */
164 #endif
165
166 #ifndef APP_DRIVER_PDM_WAPEUP_PRIORITY
167 #define APP_DRIVER_PDM_WAPEUP_PRIORITY WAPEUP_PRIORITY_HIGH /**< PDM Wakeup priority High */
168 #endif
169 #endif
170
171 /**@} */
172
173
174 /**@addtogroup APP_DRV_WAPEUP_PRIORITY_ENUM Enumerations
175 * @{
176 */
177 /**@brief APP driver peripheral wakeup priority define. */
178 typedef enum
179 {
180 WAPEUP_PRIORITY_LOW = 1, /**< Wakeup priority low */
181 WAPEUP_PRIORITY_MID, /**< Wakeup priority mid */
182 WAPEUP_PRIORITY_HIGH /**< Wakeup priority high */
183 } wakeup_priority_t;
184 /** @} */
185
186 #ifndef APP_DRIVER_WAKEUP_CALL_FUN
187 //#define APP_DRIVER_WAKEUP_CALL_FUN
188 #endif
189
190 #ifdef __cplusplus
191 }
192 #endif
193
194 #endif
195
196 /** @} */
197 /** @} */
198 /** @} */
199
WAPEUP_PRIORITY_LOW
@ WAPEUP_PRIORITY_LOW
Definition: app_drv_config.h:180
wakeup_priority_t
wakeup_priority_t
APP driver peripheral wakeup priority define.
Definition: app_drv_config.h:179
WAPEUP_PRIORITY_MID
@ WAPEUP_PRIORITY_MID
Definition: app_drv_config.h:181
WAPEUP_PRIORITY_HIGH
@ WAPEUP_PRIORITY_HIGH
Definition: app_drv_config.h:182