hal.h
Go to the documentation of this file.
1
/**
2
****************************************************************************************
3
*
4
* @file hal.h
5
* @author BLE Driver Team
6
* @brief This file contains all the functions prototypes for the HAL
7
* module driver.
8
*
9
****************************************************************************************
10
* @attention
11
#####Copyright (c) 2019 GOODIX
12
All rights reserved.
13
14
Redistribution and use in source and binary forms, with or without
15
modification, are permitted provided that the following conditions are met:
16
* Redistributions of source code must retain the above copyright
17
notice, this list of conditions and the following disclaimer.
18
* Redistributions in binary form must reproduce the above copyright
19
notice, this list of conditions and the following disclaimer in the
20
documentation and/or other materials provided with the distribution.
21
* Neither the name of GOODIX nor the names of its contributors may be used
22
to endorse or promote products derived from this software without
23
specific prior written permission.
24
25
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28
ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
29
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35
POSSIBILITY OF SUCH DAMAGE.
36
****************************************************************************************
37
*/
38
39
/** @addtogroup PERIPHERAL Peripheral Driver
40
* @{
41
*/
42
43
/** @addtogroup HAL_DRIVER HAL Driver
44
* @{
45
*/
46
47
/** @defgroup HAL_HAL HAL
48
* @brief HAL module driver.
49
* @{
50
*/
51
52
/* Define to prevent recursive inclusion -------------------------------------*/
53
#ifndef ___HAL_H__
54
#define ___HAL_H__
55
56
#include <stdint.h>
57
#include "gr5x.h"
58
/**
59
****************************************************************************************
60
* @brief This function returns the HAL revision
61
*
62
* @return version: 0xXYZR (8 bits for each decimal, R for RC)
63
****************************************************************************************
64
*/
65
uint32_t
hal_get_hal_version
(
void
);
66
67
#ifdef HAL_ADC_MODULE_ENABLED
68
#include "hal_adc.h"
69
#endif
/* HAL_ADC_MODULE_ENABLED */
70
71
#ifdef HAL_AON_GPIO_MODULE_ENABLED
72
#include "hal_aon_gpio.h"
73
#endif
/* HAL_AON_GPIO_MODULE_ENABLED */
74
75
#ifdef HAL_AON_WDT_MODULE_ENABLED
76
#include "hal_aon_wdt.h"
77
#endif
/* HAL_AON_WDT_MODULE_ENABLED */
78
79
#ifdef HAL_CALENDAR_MODULE_ENABLED
80
#include "hal_calendar.h"
81
#endif
/* HAL_CALENDAR_MODULE_ENABLED */
82
83
#ifdef HAL_DMA_MODULE_ENABLED
84
#include "hal_dma.h"
85
#endif
/* HAL_DMA_MODULE_ENABLED */
86
87
#ifdef HAL_DUAL_TIMER_MODULE_ENABLED
88
#include "hal_dual_tim.h"
89
#endif
/* HAL_DUAL_TIMER_MODULE_ENABLED */
90
91
#ifdef HAL_GPIO_MODULE_ENABLED
92
#include "hal_gpio.h"
93
#endif
/* HAL_GPIO_MODULE_ENABLED */
94
95
#ifdef HAL_I2C_MODULE_ENABLED
96
#include "hal_i2c.h"
97
#endif
/* HAL_I2C_MODULE_ENABLED */
98
99
#ifdef HAL_MSIO_MODULE_ENABLED
100
#include "hal_msio.h"
101
#endif
/* HAL_MSIO_MODULE_ENABLED */
102
103
#ifdef HAL_PWM_MODULE_ENABLED
104
#include "hal_pwm.h"
105
#endif
/* HAL_PWM_MODULE_ENABLED */
106
107
#ifdef HAL_PWR_MODULE_ENABLED
108
#include "hal_pwr.h"
109
#endif
/* HAL_PWR_MODULE_ENABLED */
110
111
#ifdef HAL_SPIM_MODULE_ENABLED
112
#include "hal_spim.h"
113
#endif
/* HAL_SPIM_MODULE_ENABLED */
114
115
#ifdef HAL_TIMER_MODULE_ENABLED
116
#include "hal_tim.h"
117
#endif
/* HAL_TIMER_MODULE_ENABLED */
118
119
#ifdef HAL_UART_MODULE_ENABLED
120
#include "hal_uart.h"
121
#endif
/* HAL_UART_MODULE_ENABLED */
122
123
#ifdef HAL_WDT_MODULE_ENABLED
124
#include "hal_wdt.h"
125
#endif
/* HAL_WDT_MODULE_ENABLED */
126
127
#ifdef HAL_XQSPI_MODULE_ENABLED
128
#include "hal_xqspi.h"
129
#endif
/* HAL_XQSPI_MODULE_ENABLED */
130
131
#ifdef HAL_EXFLASH_MODULE_ENABLED
132
#include "hal_exflash.h"
133
#endif
/* HAL_EXFLASH_MODULE_ENABLED */
134
135
#ifdef HAL_EFUSE_MODULE_ENABLED
136
#include "hal_efuse.h"
137
#endif
/* HAL_EFUSE_MODULE_ENABLED */
138
139
#ifdef HAL_CGC_MODULE_ENABLED
140
#include "hal_cgc.h"
141
#endif
/* HAL_CGC_MODULE_ENABLED */
142
143
#ifdef HAL_AES_MODULE_ENABLED
144
#include "hal_aes.h"
145
#endif
/* HAL_AES_MODULE_ENABLED */
146
147
#ifdef HAL_HMAC_MODULE_ENABLED
148
#include "hal_hmac.h"
149
#endif
/* HAL_HMAC_MODULE_ENABLED */
150
151
#ifdef HAL_PKC_MODULE_ENABLED
152
#include "hal_pkc.h"
153
#endif
/* HAL_PKC_MODULE_ENABLED */
154
155
#ifdef HAL_RNG_MODULE_ENABLED
156
#include "hal_rng.h"
157
#endif
/* HAL_RNG_MODULE_ENABLED */
158
159
#ifdef HAL_COMP_MODULE_ENABLED
160
#include "hal_comp.h"
161
#endif
/* HAL_COMP_MODULE_ENABLED */
162
163
#ifdef HAL_SLEEP_TIMER_MODULE_ENABLED
164
#include "hal_sleep_timer.h"
165
#endif
/* HAL_SLEEP_TIMER_MODULE_ENABLED */
166
167
#ifdef HAL_RTC_MODULE_ENABLED
168
#include "hal_rtc.h"
169
#endif
/* HAL_RTC_MODULE_ENABLED */
170
171
#ifdef HAL_PWR_MGMT_ENABLED
172
#include "hal_pwr_mgmt.h"
173
#endif
174
175
#ifdef HAL_CLOCK_MODULE_ENABLED
176
#include "hal_clock.h"
177
#endif
/* HAL_CLOCK_MODULE_ENABLED */
178
179
#ifdef HAL_PMU_MODULE_ENABLED
180
#include "ll_aon_pmu.h"
181
#include "ll_aon_rf.h"
182
#include "ll_clk_cal.h"
183
#include "ll_ddvs.h"
184
#endif
/* HAL_PMU_MODULE_ENABLED */
185
186
#ifdef HAL_BR_MODULE_ENABLED
187
#include "hal_br.h"
188
#endif
/* HAL_BR_MODULE_ENABLED */
189
190
#ifdef HAL_BOD_MODULE_ENABLED
191
#include "hal_bod.h"
192
#endif
193
#endif
/* HAL_BOD_MODULE_ENABLED */
194
195
/* ___HAL_H__ */
196
197
/** @} */
198
199
/** @} */
200
201
/** @} */
hal_get_hal_version
uint32_t hal_get_hal_version(void)
This function returns the HAL revision.