gr55xx_ll_advs.h
Go to the documentation of this file.
1 /**
2 ****************************************************************************************
3 *
4 * @file gr55xx_ll_advs.h
5 * @author BLE RD
6 * @brief Header file containing functions prototypes of advs LL 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 LL_DRIVER LL Driver
43 * @{
44 */
45
46 /** @defgroup LL_ADVS ADVS
47 * @brief ADVS LL module driver.
48 * @{
49 */
50
51 /* Define to prevent recursive inclusion -------------------------------------*/
52 #ifndef __GR55XX_LL_ADVS_H_
53 #define __GR55XX_LL_ADVS_H_
54
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58
59 /* Includes ------------------------------------------------------------------*/
60 #include "gr55xx_hal.h"
61
62 /**
63 * @defgroup LL_ADVS_MACRO Defines
64 * @{
65 */
66 /** @defgroup LL_ADVS_ENABLE Analog Voltage Scaling enable state defines
67 * @{
68 */
69 #define LL_ADVS_DIS (0U) /**< Analog Voltage Scaling Disable */
70 #define LL_ADVS_EN (1U) /**< Analog Voltage Scaling Enable */
71 /** @} */
72
73 /** @defgroup LL_ADVS_TYPE Analog Voltage Scaling slope control type defines
74 * @{
75 */
76 #define LL_ADVS_LOWER_TYPE (0U) /**< Analog Voltage Scaling Lower Type(default) */
77 #define LL_ADVS_HIGHER_TYPE (1U) /**< Analog Voltage Scaling Higher Type */
78 /** @} */
79
80 /** @defgroup LL_ADVS_LIMIT_ENABLE Analog Voltage Scaling limiter enable defines
81 * @{
82 */
83 #define LL_ADVS_LIMIT_DIS (0U) /**< Analog Voltage Scaling Limit Disable(default) */
84 #define LL_ADVS_LIMIT_EN (1U) /**< Analog Voltage Scaling Limit Enable */
85 /** @} */
86
87 /** @} */
88
89 /** @defgroup LL_ADVS_DRIVER_FUNCTIONS Functions
90 * @{
91 */
92 /**
93 * @brief The ADVS_DCDC block enable set
94 *
95 * Register|BitsName
96 * --------|--------
97 * ADVS_DCDC | EN_VTBIAS
98 */
99 __STATIC_INLINE void ll_advs_dcdc_enable_set(uint8_t enable)
100 {
101 MODIFY_REG(AON_PMU->ADVS_DCDC, AON_PMU_ADVS_DCDC_EN_VTBIAS, (enable << AON_PMU_ADVS_DCDC_EN_VTBIAS_Pos));
102 }
103
104 /**
105 * @brief The ADVS_DCDC block enable get
106 *
107 * Register|BitsName
108 * --------|--------
109 * ADVS_DCDC | EN_VTBIAS
110 */
111 __STATIC_INLINE uint8_t ll_advs_dcdc_enable_get(void)
112 {
113 return ((READ_BITS(AON_PMU->ADVS_DCDC, AON_PMU_ADVS_DCDC_EN_VTBIAS)) >> AON_PMU_ADVS_DCDC_EN_VTBIAS_Pos);
114 }
115
116 /**
117 * @brief The ADVS_DCDC's Slop Control type set
118 *
119 * Register|BitsName
120 * --------|--------
121 * ADVS_DCDC | VTBIAS_SLOPE_CTRL
122 */
123 __STATIC_INLINE void ll_advs_dcdc_vtbias_slop_ctrl_set(uint8_t type)
124 {
125 MODIFY_REG(AON_PMU->ADVS_DCDC, AON_PMU_ADVS_DCDC_VTBIAS_SLOPE_CTRL, (type << AON_PMU_ADVS_DCDC_VTBIAS_SLOPE_CTRL_Pos));
126 }
127
128 /**
129 * @brief The ADVS_DCDC's Slop Control type get
130 *
131 * Register|BitsName
132 * --------|--------
133 * ADVS_DCDC | VTBIAS_SLOPE_CTRL
134 */
135 __STATIC_INLINE uint8_t ll_advs_dcdc_vtbias_slop_ctrl_get(void)
136 {
137 return ((READ_BITS(AON_PMU->ADVS_DCDC, AON_PMU_ADVS_DCDC_VTBIAS_SLOPE_CTRL)) >> AON_PMU_ADVS_DCDC_VTBIAS_SLOPE_CTRL_Pos);
138 }
139
140 /**
141 * @brief The ADVS_DCDC's Lower Limit Control enable set
142 *
143 * Register|BitsName
144 * --------|--------
145 * ADVS_DCDC | EN_LIMITER
146 */
147 __STATIC_INLINE void ll_advs_dcdc_limiter_enable_set(uint8_t enable)
148 {
149 MODIFY_REG(AON_PMU->ADVS_DCDC, AON_PMU_ADVS_DCDC_EN_LIMITER, (enable << AON_PMU_ADVS_DCDC_EN_LIMITER_Pos));
150 }
151
152 /**
153 * @brief The ADVS_DCDC's Lower Limit Control enable get
154 *
155 * Register|BitsName
156 * --------|--------
157 * ADVS_DCDC | EN_LIMITER
158 */
159 __STATIC_INLINE uint8_t ll_advs_dcdc_limiter_enable_get(void)
160 {
161 return ((READ_BITS(AON_PMU->ADVS_DCDC, AON_PMU_ADVS_DCDC_EN_LIMITER)) >> AON_PMU_ADVS_DCDC_EN_LIMITER_Pos);
162 }
163
164 /**
165 * @brief The ADVS_DCDC's default level value of the VT bias set
166 *
167 * Register|BitsName
168 * --------|--------
169 * ADVS_DCDC | VTBIAS_CTRL_VT_2_0
170 */
171 __STATIC_INLINE void ll_advs_dcdc_vtbias_ctrl_vt_set(uint8_t vt)
172 {
173 MODIFY_REG(AON_PMU->ADVS_DCDC, AON_PMU_ADVS_DCDC_VTBIAS_CTRL_VT_2_0, (vt << AON_PMU_ADVS_DCDC_VTBIAS_CTRL_VT_2_0_Pos));
174 }
175
176 /**
177 * @brief The ADVS_DCDC's default level value of the VT bias get
178 *
179 * Register|BitsName
180 * --------|--------
181 * ADVS_DCDC | VTBIAS_CTRL_VT_2_0
182 */
183 __STATIC_INLINE uint8_t ll_advs_dcdc_vtbias_ctrl_vt_get(void)
184 {
185 return ((READ_BITS(AON_PMU->ADVS_DCDC, AON_PMU_ADVS_DCDC_VTBIAS_CTRL_VT_2_0)) >> AON_PMU_ADVS_DCDC_VTBIAS_CTRL_VT_2_0_Pos);
186 }
187
188 /**
189 * @brief The ADVS_DCDC's lower limit for the output voltage set
190 *
191 * Register|BitsName
192 * --------|--------
193 * ADVS_DCDC | VTBIAS_CTRL_VT_2_0
194 */
195 __STATIC_INLINE void ll_advs_dcdc_vtbias_ctrl_lower_limit_set(uint8_t limit)
196 {
197 MODIFY_REG(AON_PMU->ADVS_DCDC, AON_PMU_ADVS_DCDC_VTBIAS_CTRL_LIMIT_2_0, (limit << AON_PMU_ADVS_DCDC_VTBIAS_CTRL_LIMIT_2_0_Pos));
198 }
199
200 /**
201 * @brief The ADVS_DCDC's lower limit for the output voltage get
202 *
203 * Register|BitsName
204 * --------|--------
205 * ADVS_DCDC | VTBIAS_CTRL_VT_2_0
206 */
207 __STATIC_INLINE uint8_t ll_advs_dcdc_vtbias_ctrl_lower_limit_get(void)
208 {
209 return ((READ_BITS(AON_PMU->ADVS_DCDC, AON_PMU_ADVS_DCDC_VTBIAS_CTRL_LIMIT_2_0)) >> AON_PMU_ADVS_DCDC_VTBIAS_CTRL_LIMIT_2_0_Pos);
210 }
211
212 /**
213 * @brief The ADVS_DIGCORE block enable set
214 *
215 * Register|BitsName
216 * --------|--------
217 * ADVS_DIGCORE | EN_VTBIAS
218 */
219 __STATIC_INLINE void ll_advs_digcore_enable_set(uint8_t enable)
220 {
221 MODIFY_REG(AON_PMU->ADVS_DIGCORE, AON_PMU_ADVS_DIGCORE_EN_VTBIAS, (enable << AON_PMU_ADVS_DIGCORE_EN_VTBIAS_Pos));
222 }
223
224 /**
225 * @brief The ADVS_DIGCORE block enable get
226 *
227 * Register|BitsName
228 * --------|--------
229 * ADVS_DIGCORE | EN_VTBIAS
230 */
231 __STATIC_INLINE uint8_t ll_advs_digcore_enable_get(void)
232 {
233 return ((READ_BITS(AON_PMU->ADVS_DIGCORE, AON_PMU_ADVS_DIGCORE_EN_VTBIAS)) >> AON_PMU_ADVS_DIGCORE_EN_VTBIAS_Pos);
234 }
235
236 /**
237 * @brief The ADVS_DIGCORE's Slop Control type set
238 *
239 * Register|BitsName
240 * --------|--------
241 * ADVS_DIGCORE | VTBIAS_SLOPE_CTRL
242 */
243 __STATIC_INLINE void ll_advs_digcore_vtbias_slop_ctrl_set(uint8_t type)
244 {
245 MODIFY_REG(AON_PMU->ADVS_DIGCORE, AON_PMU_ADVS_DIGCORE_VTBIAS_SLOPE_CTRL, (type << AON_PMU_ADVS_DIGCORE_VTBIAS_SLOPE_CTRL_Pos));
246 }
247
248 /**
249 * @brief The ADVS_DIGCORE's Slop Control type get
250 *
251 * Register|BitsName
252 * --------|--------
253 * ADVS_DIGCORE | VTBIAS_SLOPE_CTRL
254 */
255 __STATIC_INLINE uint8_t ll_advs_digcore_vtbias_slop_ctrl_get(void)
256 {
257 return ((READ_BITS(AON_PMU->ADVS_DIGCORE, AON_PMU_ADVS_DIGCORE_VTBIAS_SLOPE_CTRL)) >> AON_PMU_ADVS_DIGCORE_VTBIAS_SLOPE_CTRL_Pos);
258 }
259
260 /**
261 * @brief The ADVS_DIGCORE's Lower Limit Control enable set
262 *
263 * Register|BitsName
264 * --------|--------
265 * ADVS_DIGCORE | EN_LIMITER
266 */
267 __STATIC_INLINE void ll_advs_digcore_limiter_enable_set(uint8_t enable)
268 {
269 MODIFY_REG(AON_PMU->ADVS_DIGCORE, AON_PMU_ADVS_DIGCORE_EN_LIMITER, (enable << AON_PMU_ADVS_DIGCORE_EN_LIMITER_Pos));
270 }
271
272 /**
273 * @brief The ADVS_DIGCORE's Lower Limit Control enable get
274 *
275 * Register|BitsName
276 * --------|--------
277 * ADVS_DIGCORE | EN_LIMITER
278 */
279 __STATIC_INLINE uint8_t ll_advs_digcore_limiter_enable_get(void)
280 {
281 return ((READ_BITS(AON_PMU->ADVS_DIGCORE, AON_PMU_ADVS_DIGCORE_EN_LIMITER)) >> AON_PMU_ADVS_DIGCORE_EN_LIMITER_Pos);
282 }
283
284 /**
285 * @brief The ADVS_DIGCORE's default level value of the VT bias set
286 *
287 * Register|BitsName
288 * --------|--------
289 * ADVS_DIGCORE | VTBIAS_CTRL_VT_2_0
290 */
291 __STATIC_INLINE void ll_advs_digcore_vtbias_ctrl_vt_set(uint8_t vt)
292 {
293 MODIFY_REG(AON_PMU->ADVS_DIGCORE, AON_PMU_ADVS_DIGCORE_VTBIAS_CTRL_VT_2_0, (vt << AON_PMU_ADVS_DIGCORE_VTBIAS_CTRL_VT_2_0_Pos));
294 }
295
296 /**
297 * @brief The ADVS_DIGCORE's default level value of the VT bias get
298 *
299 * Register|BitsName
300 * --------|--------
301 * ADVS_DIGCORE | VTBIAS_CTRL_VT_2_0
302 */
303 __STATIC_INLINE uint8_t ll_advs_digcore_vtbias_ctrl_vt_get(void)
304 {
305 return ((READ_BITS(AON_PMU->ADVS_DIGCORE, AON_PMU_ADVS_DIGCORE_VTBIAS_CTRL_VT_2_0)) >> AON_PMU_ADVS_DIGCORE_VTBIAS_CTRL_VT_2_0_Pos);
306 }
307
308 /**
309 * @brief The ADVS_DIGCORE's lower limit for the output voltage set
310 *
311 * Register|BitsName
312 * --------|--------
313 * ADVS_DIGCORE | VTBIAS_CTRL_VT_2_0
314 */
315 __STATIC_INLINE void ll_advs_digcore_vtbias_ctrl_lower_limit_set(uint8_t limit)
316 {
317 MODIFY_REG(AON_PMU->ADVS_DIGCORE, AON_PMU_ADVS_DIGCORE_VTBIAS_CTRL_LIMIT_2_0, (limit << AON_PMU_ADVS_DIGCORE_VTBIAS_CTRL_LIMIT_2_0_Pos));
318 }
319
320 /**
321 * @brief The ADVS_DIGCORE's lower limit for the output voltage get
322 *
323 * Register|BitsName
324 * --------|--------
325 * ADVS_DIGCORE | VTBIAS_CTRL_VT_2_0
326 */
327 __STATIC_INLINE uint8_t ll_advs_digcore_vtbias_ctrl_lower_limit_get(void)
328 {
329 return ((READ_BITS(AON_PMU->ADVS_DIGCORE, AON_PMU_ADVS_DIGCORE_VTBIAS_CTRL_LIMIT_2_0)) >> AON_PMU_ADVS_DIGCORE_VTBIAS_CTRL_LIMIT_2_0_Pos);
330 }
331
332 /** @} */
333
334 #endif
335 /** @} */
336
337 /** @} */
338
339 /** @} */
ll_advs_dcdc_enable_get
__STATIC_INLINE uint8_t ll_advs_dcdc_enable_get(void)
The ADVS_DCDC block enable get.
Definition: gr55xx_ll_advs.h:111
ll_advs_dcdc_vtbias_ctrl_vt_set
__STATIC_INLINE void ll_advs_dcdc_vtbias_ctrl_vt_set(uint8_t vt)
The ADVS_DCDC's default level value of the VT bias set.
Definition: gr55xx_ll_advs.h:171
ll_advs_dcdc_enable_set
__STATIC_INLINE void ll_advs_dcdc_enable_set(uint8_t enable)
The ADVS_DCDC block enable set.
Definition: gr55xx_ll_advs.h:99
ll_advs_dcdc_limiter_enable_set
__STATIC_INLINE void ll_advs_dcdc_limiter_enable_set(uint8_t enable)
The ADVS_DCDC's Lower Limit Control enable set.
Definition: gr55xx_ll_advs.h:147
ll_advs_digcore_vtbias_ctrl_lower_limit_get
__STATIC_INLINE uint8_t ll_advs_digcore_vtbias_ctrl_lower_limit_get(void)
The ADVS_DIGCORE's lower limit for the output voltage get.
Definition: gr55xx_ll_advs.h:327
ll_advs_digcore_vtbias_slop_ctrl_get
__STATIC_INLINE uint8_t ll_advs_digcore_vtbias_slop_ctrl_get(void)
The ADVS_DIGCORE's Slop Control type get.
Definition: gr55xx_ll_advs.h:255
ll_advs_digcore_limiter_enable_set
__STATIC_INLINE void ll_advs_digcore_limiter_enable_set(uint8_t enable)
The ADVS_DIGCORE's Lower Limit Control enable set.
Definition: gr55xx_ll_advs.h:267
ll_advs_dcdc_vtbias_ctrl_lower_limit_set
__STATIC_INLINE void ll_advs_dcdc_vtbias_ctrl_lower_limit_set(uint8_t limit)
The ADVS_DCDC's lower limit for the output voltage set.
Definition: gr55xx_ll_advs.h:195
ll_advs_dcdc_vtbias_slop_ctrl_set
__STATIC_INLINE void ll_advs_dcdc_vtbias_slop_ctrl_set(uint8_t type)
The ADVS_DCDC's Slop Control type set.
Definition: gr55xx_ll_advs.h:123
ll_advs_digcore_vtbias_slop_ctrl_set
__STATIC_INLINE void ll_advs_digcore_vtbias_slop_ctrl_set(uint8_t type)
The ADVS_DIGCORE's Slop Control type set.
Definition: gr55xx_ll_advs.h:243
ll_advs_dcdc_limiter_enable_get
__STATIC_INLINE uint8_t ll_advs_dcdc_limiter_enable_get(void)
The ADVS_DCDC's Lower Limit Control enable get.
Definition: gr55xx_ll_advs.h:159
ll_advs_dcdc_vtbias_ctrl_lower_limit_get
__STATIC_INLINE uint8_t ll_advs_dcdc_vtbias_ctrl_lower_limit_get(void)
The ADVS_DCDC's lower limit for the output voltage get.
Definition: gr55xx_ll_advs.h:207
ll_advs_dcdc_vtbias_slop_ctrl_get
__STATIC_INLINE uint8_t ll_advs_dcdc_vtbias_slop_ctrl_get(void)
The ADVS_DCDC's Slop Control type get.
Definition: gr55xx_ll_advs.h:135
ll_advs_digcore_vtbias_ctrl_vt_set
__STATIC_INLINE void ll_advs_digcore_vtbias_ctrl_vt_set(uint8_t vt)
The ADVS_DIGCORE's default level value of the VT bias set.
Definition: gr55xx_ll_advs.h:291
ll_advs_digcore_limiter_enable_get
__STATIC_INLINE uint8_t ll_advs_digcore_limiter_enable_get(void)
The ADVS_DIGCORE's Lower Limit Control enable get.
Definition: gr55xx_ll_advs.h:279
gr55xx_hal.h
This file contains all the functions prototypes for the HAL module driver.
ll_advs_digcore_vtbias_ctrl_lower_limit_set
__STATIC_INLINE void ll_advs_digcore_vtbias_ctrl_lower_limit_set(uint8_t limit)
The ADVS_DIGCORE's lower limit for the output voltage set.
Definition: gr55xx_ll_advs.h:315
ll_advs_digcore_enable_get
__STATIC_INLINE uint8_t ll_advs_digcore_enable_get(void)
The ADVS_DIGCORE block enable get.
Definition: gr55xx_ll_advs.h:231
ll_advs_dcdc_vtbias_ctrl_vt_get
__STATIC_INLINE uint8_t ll_advs_dcdc_vtbias_ctrl_vt_get(void)
The ADVS_DCDC's default level value of the VT bias get.
Definition: gr55xx_ll_advs.h:183
ll_advs_digcore_enable_set
__STATIC_INLINE void ll_advs_digcore_enable_set(uint8_t enable)
The ADVS_DIGCORE block enable set.
Definition: gr55xx_ll_advs.h:219
ll_advs_digcore_vtbias_ctrl_vt_get
__STATIC_INLINE uint8_t ll_advs_digcore_vtbias_ctrl_vt_get(void)
The ADVS_DIGCORE's default level value of the VT bias get.
Definition: gr55xx_ll_advs.h:303