APM:Libraries
halconf.h
Go to the documentation of this file.
1 /*
2  ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
3 
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7 
8  http://www.apache.org/licenses/LICENSE-2.0
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 */
16 /*
17  * This file is free software: you can redistribute it and/or modify it
18  * under the terms of the GNU General Public License as published by the
19  * Free Software Foundation, either version 3 of the License, or
20  * (at your option) any later version.
21  *
22  * This file is distributed in the hope that it will be useful, but
23  * WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
25  * See the GNU General Public License for more details.
26  *
27  * You should have received a copy of the GNU General Public License along
28  * with this program. If not, see <http://www.gnu.org/licenses/>.
29  *
30  * Modified for use in AP_HAL by Andrew Tridgell and Siddharth Bharat Purohit
31  */
32 
44 #pragma once
45 #include "mcuconf.h"
46 
50 #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
51 #define HAL_USE_PAL TRUE
52 #endif
53 
57 #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
58 #define HAL_USE_ADC TRUE
59 #endif
60 
64 #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
65 #define HAL_USE_CAN FALSE
66 #endif
67 
71 #if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
72 #define HAL_USE_DAC FALSE
73 #endif
74 
78 #if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
79 #define HAL_USE_EXT TRUE
80 #endif
81 
86 #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
87 #define HAL_USE_GPT FALSE
88 #endif
89 
93 #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
94 #define HAL_USE_I2C TRUE
95 #endif
96 
100 #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
101 #define HAL_USE_I2S FALSE
102 #endif
103 
107 #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
108 #define HAL_USE_ICU FALSE
109 #endif
110 
114 #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
115 #define HAL_USE_MAC FALSE
116 #endif
117 
121 #if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
122 #define HAL_USE_MMC_SPI FALSE
123 #endif
124 
128 #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
129 #define HAL_USE_PWM TRUE
130 #endif
131 
135 #if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__)
136 #define HAL_USE_QSPI FALSE
137 #endif
138 
142 #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
143 #define HAL_USE_RTC FALSE
144 #endif
145 
149 #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
150 #define HAL_USE_SDC TRUE
151 #endif
152 
156 #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
157 #define HAL_USE_SERIAL TRUE
158 #endif
159 
163 #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
164 #define HAL_USE_SERIAL_USB FALSE
165 #endif
166 
170 #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
171 #define HAL_USE_SPI TRUE
172 #endif
173 
177 #if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
178 #define HAL_USE_UART FALSE
179 #endif
180 
184 #if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
185 #define HAL_USE_USB FALSE
186 #endif
187 
191 #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
192 #define HAL_USE_WDG FALSE
193 #endif
194 
195 /*===========================================================================*/
196 /* ADC driver related settings. */
197 /*===========================================================================*/
198 
203 #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
204 #define ADC_USE_WAIT TRUE
205 #endif
206 
211 #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
212 #define ADC_USE_MUTUAL_EXCLUSION TRUE
213 #endif
214 
215 /*===========================================================================*/
216 /* CAN driver related settings. */
217 /*===========================================================================*/
218 
222 #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
223 #define CAN_USE_SLEEP_MODE TRUE
224 #endif
225 
226 /*===========================================================================*/
227 /* I2C driver related settings. */
228 /*===========================================================================*/
229 
233 #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
234 #define I2C_USE_MUTUAL_EXCLUSION TRUE
235 #endif
236 
237 /*===========================================================================*/
238 /* MAC driver related settings. */
239 /*===========================================================================*/
240 
244 #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
245 #define MAC_USE_ZERO_COPY FALSE
246 #endif
247 
251 #if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
252 #define MAC_USE_EVENTS TRUE
253 #endif
254 
255 /*===========================================================================*/
256 /* MMC_SPI driver related settings. */
257 /*===========================================================================*/
258 
267 #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
268 #define MMC_NICE_WAITING TRUE
269 #endif
270 
271 /*===========================================================================*/
272 /* SDC driver related settings. */
273 /*===========================================================================*/
274 
279 #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
280 #define SDC_INIT_RETRY 100
281 #endif
282 
288 #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
289 #define SDC_MMC_SUPPORT FALSE
290 #endif
291 
298 #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
299 #define SDC_NICE_WAITING TRUE
300 #endif
301 
302 /*===========================================================================*/
303 /* SERIAL driver related settings. */
304 /*===========================================================================*/
305 
311 #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
312 #define SERIAL_DEFAULT_BITRATE 38400
313 #endif
314 
322 #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
323 #define SERIAL_BUFFERS_SIZE 1024
324 #endif
325 
326 /*===========================================================================*/
327 /* SERIAL_USB driver related setting. */
328 /*===========================================================================*/
329 
337 #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
338 #define SERIAL_USB_BUFFERS_SIZE 256
339 #endif
340 
345 #if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
346 #define SERIAL_USB_BUFFERS_NUMBER 2
347 #endif
348 
349 /*===========================================================================*/
350 /* SPI driver related settings. */
351 /*===========================================================================*/
352 
357 #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
358 #define SPI_USE_WAIT TRUE
359 #endif
360 
365 #if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
366 #define SPI_USE_MUTUAL_EXCLUSION TRUE
367 #endif
368 
369 /*===========================================================================*/
370 /* UART driver related settings. */
371 /*===========================================================================*/
372 
377 #if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
378 #define UART_USE_WAIT FALSE
379 #endif
380 
385 #if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
386 #define UART_USE_MUTUAL_EXCLUSION FALSE
387 #endif
388 
389 /*===========================================================================*/
390 /* USB driver related settings. */
391 /*===========================================================================*/
392 
397 #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
398 #define USB_USE_WAIT FALSE
399 #endif
400 
401