diff options
Diffstat (limited to 'lib/chibios-contrib/testhal/MSP430X/EXP430FR6989/ADC')
6 files changed, 1817 insertions, 0 deletions
diff --git a/lib/chibios-contrib/testhal/MSP430X/EXP430FR6989/ADC/Makefile b/lib/chibios-contrib/testhal/MSP430X/EXP430FR6989/ADC/Makefile new file mode 100644 index 000000000..1070b2a03 --- /dev/null +++ b/lib/chibios-contrib/testhal/MSP430X/EXP430FR6989/ADC/Makefile | |||
@@ -0,0 +1,199 @@ | |||
1 | ############################################################################## | ||
2 | # Build global options | ||
3 | # NOTE: Can be overridden externally. | ||
4 | # | ||
5 | |||
6 | # Optimization level, can be [0, 1, 2, 3, s]. | ||
7 | # 0 = turn off optimization. s = optimize for size. | ||
8 | # (Note: 3 is not always the best optimization level. See avr-libc FAQ.) | ||
9 | OPTIMIZE = 0 | ||
10 | |||
11 | # Debugging format. | ||
12 | DEBUG = | ||
13 | #DEBUG = stabs | ||
14 | |||
15 | # Memory/data model | ||
16 | MODEL = small | ||
17 | |||
18 | # Object files directory | ||
19 | # To put object files in current directory, use a dot (.), do NOT make | ||
20 | # this an empty or blank macro! | ||
21 | OBJDIR = . | ||
22 | |||
23 | # Compiler flag to set the C Standard level. | ||
24 | # c89 = "ANSI" C | ||
25 | # gnu89 = c89 plus GCC extensions | ||
26 | # c99 = ISO C99 standard (not yet fully implemented) | ||
27 | # gnu99 = c99 plus GCC extensions | ||
28 | CSTANDARD = -std=gnu11 | ||
29 | |||
30 | # Compiler options here. | ||
31 | ifeq ($(USE_OPT),) | ||
32 | USE_OPT = -O$(OPTIMIZE) -g$(DEBUG) | ||
33 | USE_OPT += -funsigned-char -fshort-enums | ||
34 | endif | ||
35 | |||
36 | # C specific options here (added to USE_OPT). | ||
37 | ifeq ($(USE_COPT),) | ||
38 | USE_COPT = | ||
39 | endif | ||
40 | |||
41 | # C++ specific options here (added to USE_OPT). | ||
42 | ifeq ($(USE_CPPOPT),) | ||
43 | USE_CPPOPT = -fno-rtti | ||
44 | endif | ||
45 | |||
46 | # Enable this if you want the linker to remove unused code and data | ||
47 | ifeq ($(USE_LINK_GC),) | ||
48 | USE_LINK_GC = yes | ||
49 | endif | ||
50 | |||
51 | # Linker extra options here. | ||
52 | ifeq ($(USE_LDOPT),) | ||
53 | USE_LDOPT = | ||
54 | endif | ||
55 | |||
56 | # Enable this if you want link time optimizations (LTO) | ||
57 | ifeq ($(USE_LTO),) | ||
58 | USE_LTO = no | ||
59 | endif | ||
60 | |||
61 | # Enable the selected hardware multiplier | ||
62 | ifeq ($(USE_HWMULT),) | ||
63 | USE_HWMULT = f5series | ||
64 | endif | ||
65 | |||
66 | # Enable this if you want to see the full log while compiling. | ||
67 | ifeq ($(USE_VERBOSE_COMPILE),) | ||
68 | USE_VERBOSE_COMPILE = yes | ||
69 | endif | ||
70 | |||
71 | # If enabled, this option makes the build process faster by not compiling | ||
72 | # modules not used in the current configuration. | ||
73 | ifeq ($(USE_SMART_BUILD),) | ||
74 | USE_SMART_BUILD = yes | ||
75 | endif | ||
76 | |||
77 | # | ||
78 | # Build global options | ||
79 | ############################################################################## | ||
80 | |||
81 | ############################################################################## | ||
82 | # Architecture or project specific options | ||
83 | # | ||
84 | |||
85 | # Stack size to be allocated to the idle thread stack. This stack is | ||
86 | # the stack used by the main() thread. | ||
87 | ifeq ($(USE_IDLE_STACKSIZE),) | ||
88 | USE_IDLE_STACKSIZE = 0xC00 | ||
89 | endif | ||
90 | |||
91 | # | ||
92 | # Architecture or project specific options | ||
93 | ############################################################################## | ||
94 | |||
95 | ############################################################################## | ||
96 | # Project, sources and paths | ||
97 | # | ||
98 | |||
99 | # Define project name here | ||
100 | PROJECT = nil | ||
101 | |||
102 | # Imported source files and paths | ||
103 | CHIBIOS = ../../../../../ChibiOS | ||
104 | CHIBIOS_CONTRIB = ../../../.. | ||
105 | # Licensing files. | ||
106 | include $(CHIBIOS)/os/license/license.mk | ||
107 | # Startup files. | ||
108 | include $(CHIBIOS_CONTRIB)/os/common/startup/MSP430X/compilers/GCC/mk/startup_msp430fr5xxx.mk | ||
109 | # HAL-OSAL files (optional). | ||
110 | include $(CHIBIOS)/os/hal/hal.mk | ||
111 | include $(CHIBIOS_CONTRIB)/os/hal/boards/EXP430FR6989/board.mk | ||
112 | include $(CHIBIOS_CONTRIB)/os/hal/ports/MSP430X/platform.mk | ||
113 | include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk | ||
114 | # RTOS files (optional). | ||
115 | include $(CHIBIOS)/os/nil/nil.mk | ||
116 | include $(CHIBIOS_CONTRIB)/os/common/ports/MSP430X/compilers/GCC/mk/port.mk | ||
117 | # Other files (optional). | ||
118 | |||
119 | # Define linker script file here | ||
120 | LDSCRIPT = $(STARTUPLD)/msp430fr6989.ld | ||
121 | |||
122 | # C sources | ||
123 | CSRC = $(ALLCSRC) \ | ||
124 | $(TESTSRC) \ | ||
125 | msp_vectors.c \ | ||
126 | main.c | ||
127 | |||
128 | # C++ sources | ||
129 | CPPSRC = $(ALLCPPSRC) | ||
130 | |||
131 | # List ASM source files here | ||
132 | ASMSRC = $(ALLASMSRC) | ||
133 | |||
134 | INCDIR = $(ALLINC) $(TESTINC) | ||
135 | |||
136 | # | ||
137 | # Project, sources and paths | ||
138 | ############################################################################## | ||
139 | |||
140 | ############################################################################## | ||
141 | # Compiler settings | ||
142 | # | ||
143 | |||
144 | MCU = msp430fr6989 | ||
145 | |||
146 | TRGT = msp430-elf- | ||
147 | CC = $(TRGT)gcc | ||
148 | CPPC = $(TRGT)g++ | ||
149 | # Enable loading with g++ only if you need C++ runtime support. | ||
150 | # NOTE: You can use C++ even without C++ support if you are careful. C++ | ||
151 | # runtime support makes code size explode. | ||
152 | LD = $(TRGT)gcc | ||
153 | #LD = $(TRGT)g++ | ||
154 | CP = $(TRGT)objcopy | ||
155 | AS = $(TRGT)gcc -x assembler-with-cpp | ||
156 | AR = $(TRGT)ar | ||
157 | OD = $(TRGT)objdump | ||
158 | SZ = $(TRGT)size | ||
159 | HEX = $(CP) -O ihex | ||
160 | BIN = $(CP) -O binary | ||
161 | |||
162 | # MSP430-specific options here | ||
163 | MOPT = -m$(MODEL) | ||
164 | |||
165 | # Define C warning options here | ||
166 | CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes | ||
167 | |||
168 | # Define C++ warning options here | ||
169 | CPPWARN = -Wall -Wextra -Wundef | ||
170 | |||
171 | # | ||
172 | # Compiler settings | ||
173 | ############################################################################## | ||
174 | |||
175 | ############################################################################## | ||
176 | # Start of user section | ||
177 | # | ||
178 | |||
179 | # List all user C define here, like -D_DEBUG=1 | ||
180 | UDEFS = | ||
181 | |||
182 | # Define ASM defines here | ||
183 | UADEFS = | ||
184 | |||
185 | # List all user directories here | ||
186 | UINCDIR = | ||
187 | |||
188 | # List the user directory to look for the libraries here | ||
189 | ULIBDIR = | ||
190 | |||
191 | # List all user libraries here | ||
192 | ULIBS = | ||
193 | |||
194 | # | ||
195 | # End of user defines | ||
196 | ############################################################################## | ||
197 | |||
198 | RULESPATH = $(CHIBIOS_CONTRIB)/os/common/startup/MSP430X/compilers/GCC | ||
199 | include $(RULESPATH)/rules.mk | ||
diff --git a/lib/chibios-contrib/testhal/MSP430X/EXP430FR6989/ADC/chconf.h b/lib/chibios-contrib/testhal/MSP430X/EXP430FR6989/ADC/chconf.h new file mode 100644 index 000000000..929cb29fd --- /dev/null +++ b/lib/chibios-contrib/testhal/MSP430X/EXP430FR6989/ADC/chconf.h | |||
@@ -0,0 +1,479 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2006..2018 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 | /** | ||
18 | * @file nil/templates/chconf.h | ||
19 | * @brief Configuration file template. | ||
20 | * @details A copy of this file must be placed in each project directory, it | ||
21 | * contains the application specific kernel settings. | ||
22 | * | ||
23 | * @addtogroup NIL_CONFIG | ||
24 | * @details Kernel related settings and hooks. | ||
25 | * @{ | ||
26 | */ | ||
27 | |||
28 | #ifndef CHCONF_H | ||
29 | #define CHCONF_H | ||
30 | |||
31 | #define _CHIBIOS_NIL_CONF_ | ||
32 | #define _CHIBIOS_NIL_CONF_VER_4_0_ | ||
33 | |||
34 | /*===========================================================================*/ | ||
35 | /** | ||
36 | * @name Kernel parameters and options | ||
37 | * @{ | ||
38 | */ | ||
39 | /*===========================================================================*/ | ||
40 | |||
41 | /** | ||
42 | * @brief Maximum number of user threads in the application. | ||
43 | * @note This number is not inclusive of the idle thread which is | ||
44 | * implicitly handled. | ||
45 | * @note Set this value to be exactly equal to the number of threads you | ||
46 | * will use or you would be wasting RAM and cycles. | ||
47 | * @note This values also defines the number of available priorities | ||
48 | * (0..CH_CFG_MAX_THREADS-1). | ||
49 | */ | ||
50 | #if !defined(CH_CFG_MAX_THREADS) | ||
51 | #define CH_CFG_MAX_THREADS 8 | ||
52 | #endif | ||
53 | |||
54 | /** | ||
55 | * @brief Auto starts threads when @p chSysInit() is invoked. | ||
56 | */ | ||
57 | #if !defined(CH_CFG_AUTOSTART_THREADS) | ||
58 | #define CH_CFG_AUTOSTART_THREADS TRUE | ||
59 | #endif | ||
60 | |||
61 | /** @} */ | ||
62 | |||
63 | /*===========================================================================*/ | ||
64 | /** | ||
65 | * @name System timer settings | ||
66 | * @{ | ||
67 | */ | ||
68 | /*===========================================================================*/ | ||
69 | |||
70 | /** | ||
71 | * @brief System time counter resolution. | ||
72 | * @note Allowed values are 16 or 32 bits. | ||
73 | */ | ||
74 | #if !defined(CH_CFG_ST_RESOLUTION) | ||
75 | #define CH_CFG_ST_RESOLUTION 16 | ||
76 | #endif | ||
77 | |||
78 | /** | ||
79 | * @brief System tick frequency. | ||
80 | * @note This value together with the @p CH_CFG_ST_RESOLUTION | ||
81 | * option defines the maximum amount of time allowed for | ||
82 | * timeouts. | ||
83 | */ | ||
84 | #if !defined(CH_CFG_ST_FREQUENCY) | ||
85 | #define CH_CFG_ST_FREQUENCY 1000 | ||
86 | #endif | ||
87 | |||
88 | /** | ||
89 | * @brief Time delta constant for the tick-less mode. | ||
90 | * @note If this value is zero then the system uses the classic | ||
91 | * periodic tick. This value represents the minimum number | ||
92 | * of ticks that is safe to specify in a timeout directive. | ||
93 | * The value one is not valid, timeouts are rounded up to | ||
94 | * this value. | ||
95 | */ | ||
96 | #if !defined(CH_CFG_ST_TIMEDELTA) | ||
97 | #define CH_CFG_ST_TIMEDELTA 0 | ||
98 | #endif | ||
99 | |||
100 | /** @} */ | ||
101 | |||
102 | /*===========================================================================*/ | ||
103 | /** | ||
104 | * @name Subsystem options | ||
105 | * @{ | ||
106 | */ | ||
107 | /*===========================================================================*/ | ||
108 | |||
109 | /** | ||
110 | * @brief Threads synchronization APIs. | ||
111 | * @details If enabled then the @p chThdWait() function is included in | ||
112 | * the kernel. | ||
113 | * | ||
114 | * @note The default is @p TRUE. | ||
115 | */ | ||
116 | #if !defined(CH_CFG_USE_WAITEXIT) | ||
117 | #define CH_CFG_USE_WAITEXIT TRUE | ||
118 | #endif | ||
119 | |||
120 | /** | ||
121 | * @brief Semaphores APIs. | ||
122 | * @details If enabled then the Semaphores APIs are included in the kernel. | ||
123 | * | ||
124 | * @note The default is @p TRUE. | ||
125 | */ | ||
126 | #if !defined(CH_CFG_USE_SEMAPHORES) | ||
127 | #define CH_CFG_USE_SEMAPHORES TRUE | ||
128 | #endif | ||
129 | |||
130 | /** | ||
131 | * @brief Mutexes APIs. | ||
132 | * @details If enabled then the mutexes APIs are included in the kernel. | ||
133 | * | ||
134 | * @note Feature not currently implemented. | ||
135 | * @note The default is @p FALSE. | ||
136 | */ | ||
137 | #if !defined(CH_CFG_USE_MUTEXES) | ||
138 | #define CH_CFG_USE_MUTEXES FALSE | ||
139 | #endif | ||
140 | |||
141 | /** | ||
142 | * @brief Events Flags APIs. | ||
143 | * @details If enabled then the event flags APIs are included in the kernel. | ||
144 | * | ||
145 | * @note The default is @p TRUE. | ||
146 | */ | ||
147 | #if !defined(CH_CFG_USE_EVENTS) | ||
148 | #define CH_CFG_USE_EVENTS TRUE | ||
149 | #endif | ||
150 | |||
151 | /** | ||
152 | * @brief Synchronous Messages APIs. | ||
153 | * @details If enabled then the synchronous messages APIs are included | ||
154 | * in the kernel. | ||
155 | * | ||
156 | * @note The default is @p TRUE. | ||
157 | */ | ||
158 | #if !defined(CH_CFG_USE_MESSAGES) | ||
159 | #define CH_CFG_USE_MESSAGES TRUE | ||
160 | #endif | ||
161 | |||
162 | /** @} */ | ||
163 | |||
164 | /*===========================================================================*/ | ||
165 | /** | ||
166 | * @name OSLIB options | ||
167 | * @{ | ||
168 | */ | ||
169 | /*===========================================================================*/ | ||
170 | |||
171 | /** | ||
172 | * @brief Mailboxes APIs. | ||
173 | * @details If enabled then the asynchronous messages (mailboxes) APIs are | ||
174 | * included in the kernel. | ||
175 | * | ||
176 | * @note The default is @p TRUE. | ||
177 | * @note Requires @p CH_CFG_USE_SEMAPHORES. | ||
178 | */ | ||
179 | #if !defined(CH_CFG_USE_MAILBOXES) | ||
180 | #define CH_CFG_USE_MAILBOXES TRUE | ||
181 | #endif | ||
182 | |||
183 | /** | ||
184 | * @brief Core Memory Manager APIs. | ||
185 | * @details If enabled then the core memory manager APIs are included | ||
186 | * in the kernel. | ||
187 | * | ||
188 | * @note The default is @p TRUE. | ||
189 | */ | ||
190 | #if !defined(CH_CFG_USE_MEMCORE) | ||
191 | #define CH_CFG_USE_MEMCORE TRUE | ||
192 | #endif | ||
193 | |||
194 | /** | ||
195 | * @brief Managed RAM size. | ||
196 | * @details Size of the RAM area to be managed by the OS. If set to zero | ||
197 | * then the whole available RAM is used. The core memory is made | ||
198 | * available to the heap allocator and/or can be used directly through | ||
199 | * the simplified core memory allocator. | ||
200 | * | ||
201 | * @note In order to let the OS manage the whole RAM the linker script must | ||
202 | * provide the @p __heap_base__ and @p __heap_end__ symbols. | ||
203 | * @note Requires @p CH_CFG_USE_MEMCORE. | ||
204 | */ | ||
205 | #if !defined(CH_CFG_MEMCORE_SIZE) | ||
206 | #define CH_CFG_MEMCORE_SIZE 0 | ||
207 | #endif | ||
208 | |||
209 | /** | ||
210 | * @brief Heap Allocator APIs. | ||
211 | * @details If enabled then the memory heap allocator APIs are included | ||
212 | * in the kernel. | ||
213 | * | ||
214 | * @note The default is @p TRUE. | ||
215 | */ | ||
216 | #if !defined(CH_CFG_USE_HEAP) | ||
217 | #define CH_CFG_USE_HEAP TRUE | ||
218 | #endif | ||
219 | |||
220 | /** | ||
221 | * @brief Memory Pools Allocator APIs. | ||
222 | * @details If enabled then the memory pools allocator APIs are included | ||
223 | * in the kernel. | ||
224 | * | ||
225 | * @note The default is @p TRUE. | ||
226 | */ | ||
227 | #if !defined(CH_CFG_USE_MEMPOOLS) | ||
228 | #define CH_CFG_USE_MEMPOOLS TRUE | ||
229 | #endif | ||
230 | |||
231 | /** | ||
232 | * @brief Objects FIFOs APIs. | ||
233 | * @details If enabled then the objects FIFOs APIs are included | ||
234 | * in the kernel. | ||
235 | * | ||
236 | * @note The default is @p TRUE. | ||
237 | */ | ||
238 | #if !defined(CH_CFG_USE_OBJ_FIFOS) | ||
239 | #define CH_CFG_USE_OBJ_FIFOS TRUE | ||
240 | #endif | ||
241 | |||
242 | /** | ||
243 | * @brief Pipes APIs. | ||
244 | * @details If enabled then the pipes APIs are included | ||
245 | * in the kernel. | ||
246 | * | ||
247 | * @note The default is @p TRUE. | ||
248 | */ | ||
249 | #if !defined(CH_CFG_USE_PIPES) | ||
250 | #define CH_CFG_USE_PIPES TRUE | ||
251 | #endif | ||
252 | |||
253 | /** | ||
254 | * @brief Objects Caches APIs. | ||
255 | * @details If enabled then the objects caches APIs are included | ||
256 | * in the kernel. | ||
257 | * | ||
258 | * @note The default is @p TRUE. | ||
259 | */ | ||
260 | #if !defined(CH_CFG_USE_OBJ_CACHES) | ||
261 | #define CH_CFG_USE_OBJ_CACHES TRUE | ||
262 | #endif | ||
263 | |||
264 | /** | ||
265 | * @brief Delegate threads APIs. | ||
266 | * @details If enabled then the delegate threads APIs are included | ||
267 | * in the kernel. | ||
268 | * | ||
269 | * @note The default is @p TRUE. | ||
270 | */ | ||
271 | #if !defined(CH_CFG_USE_DELEGATES) | ||
272 | #define CH_CFG_USE_DELEGATES TRUE | ||
273 | #endif | ||
274 | |||
275 | /** | ||
276 | * @brief Jobs Queues APIs. | ||
277 | * @details If enabled then the jobs queues APIs are included | ||
278 | * in the kernel. | ||
279 | * | ||
280 | * @note The default is @p TRUE. | ||
281 | */ | ||
282 | #if !defined(CH_CFG_USE_JOBS) | ||
283 | #define CH_CFG_USE_JOBS TRUE | ||
284 | #endif | ||
285 | |||
286 | /** @} */ | ||
287 | |||
288 | /*===========================================================================*/ | ||
289 | /** | ||
290 | * @name Objects factory options | ||
291 | * @{ | ||
292 | */ | ||
293 | /*===========================================================================*/ | ||
294 | |||
295 | /** | ||
296 | * @brief Objects Factory APIs. | ||
297 | * @details If enabled then the objects factory APIs are included in the | ||
298 | * kernel. | ||
299 | * | ||
300 | * @note The default is @p FALSE. | ||
301 | */ | ||
302 | #if !defined(CH_CFG_USE_FACTORY) | ||
303 | #define CH_CFG_USE_FACTORY TRUE | ||
304 | #endif | ||
305 | |||
306 | /** | ||
307 | * @brief Maximum length for object names. | ||
308 | * @details If the specified length is zero then the name is stored by | ||
309 | * pointer but this could have unintended side effects. | ||
310 | */ | ||
311 | #if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) | ||
312 | #define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 | ||
313 | #endif | ||
314 | |||
315 | /** | ||
316 | * @brief Enables the registry of generic objects. | ||
317 | */ | ||
318 | #if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) | ||
319 | #define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE | ||
320 | #endif | ||
321 | |||
322 | /** | ||
323 | * @brief Enables factory for generic buffers. | ||
324 | */ | ||
325 | #if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) | ||
326 | #define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE | ||
327 | #endif | ||
328 | |||
329 | /** | ||
330 | * @brief Enables factory for semaphores. | ||
331 | */ | ||
332 | #if !defined(CH_CFG_FACTORY_SEMAPHORES) | ||
333 | #define CH_CFG_FACTORY_SEMAPHORES TRUE | ||
334 | #endif | ||
335 | |||
336 | /** | ||
337 | * @brief Enables factory for mailboxes. | ||
338 | */ | ||
339 | #if !defined(CH_CFG_FACTORY_MAILBOXES) | ||
340 | #define CH_CFG_FACTORY_MAILBOXES TRUE | ||
341 | #endif | ||
342 | |||
343 | /** | ||
344 | * @brief Enables factory for objects FIFOs. | ||
345 | */ | ||
346 | #if !defined(CH_CFG_FACTORY_OBJ_FIFOS) | ||
347 | #define CH_CFG_FACTORY_OBJ_FIFOS TRUE | ||
348 | #endif | ||
349 | |||
350 | /** | ||
351 | * @brief Enables factory for Pipes. | ||
352 | */ | ||
353 | #if !defined(CH_CFG_FACTORY_PIPES) | ||
354 | #define CH_CFG_FACTORY_PIPES TRUE | ||
355 | #endif | ||
356 | |||
357 | /** @} */ | ||
358 | |||
359 | /*===========================================================================*/ | ||
360 | /** | ||
361 | * @name Debug options | ||
362 | * @{ | ||
363 | */ | ||
364 | /*===========================================================================*/ | ||
365 | |||
366 | /** | ||
367 | * @brief Debug option, kernel statistics. | ||
368 | * | ||
369 | * @note Feature not currently implemented. | ||
370 | * @note The default is @p FALSE. | ||
371 | */ | ||
372 | #if !defined(CH_DBG_STATISTICS) | ||
373 | #define CH_DBG_STATISTICS FALSE | ||
374 | #endif | ||
375 | |||
376 | /** | ||
377 | * @brief Debug option, system state check. | ||
378 | * | ||
379 | * @note The default is @p FALSE. | ||
380 | */ | ||
381 | #if !defined(CH_DBG_SYSTEM_STATE_CHECK) | ||
382 | #define CH_DBG_SYSTEM_STATE_CHECK TRUE | ||
383 | #endif | ||
384 | |||
385 | /** | ||
386 | * @brief Debug option, parameters checks. | ||
387 | * | ||
388 | * @note The default is @p FALSE. | ||
389 | */ | ||
390 | #if !defined(CH_DBG_ENABLE_CHECKS) | ||
391 | #define CH_DBG_ENABLE_CHECKS TRUE | ||
392 | #endif | ||
393 | |||
394 | /** | ||
395 | * @brief System assertions. | ||
396 | * | ||
397 | * @note The default is @p FALSE. | ||
398 | */ | ||
399 | #if !defined(CH_DBG_ENABLE_ASSERTS) | ||
400 | #define CH_DBG_ENABLE_ASSERTS TRUE | ||
401 | #endif | ||
402 | |||
403 | /** | ||
404 | * @brief Stack check. | ||
405 | * | ||
406 | * @note The default is @p FALSE. | ||
407 | */ | ||
408 | #if !defined(CH_DBG_ENABLE_STACK_CHECK) | ||
409 | #define CH_DBG_ENABLE_STACK_CHECK TRUE | ||
410 | #endif | ||
411 | |||
412 | /** @} */ | ||
413 | |||
414 | /*===========================================================================*/ | ||
415 | /** | ||
416 | * @name Kernel hooks | ||
417 | * @{ | ||
418 | */ | ||
419 | /*===========================================================================*/ | ||
420 | |||
421 | /** | ||
422 | * @brief System initialization hook. | ||
423 | */ | ||
424 | #define CH_CFG_SYSTEM_INIT_HOOK() { \ | ||
425 | } | ||
426 | |||
427 | /** | ||
428 | * @brief Threads descriptor structure extension. | ||
429 | * @details User fields added to the end of the @p thread_t structure. | ||
430 | */ | ||
431 | #define CH_CFG_THREAD_EXT_FIELDS \ | ||
432 | /* Add threads custom fields here.*/ | ||
433 | |||
434 | /** | ||
435 | * @brief Threads initialization hook. | ||
436 | */ | ||
437 | #define CH_CFG_THREAD_EXT_INIT_HOOK(tr) { \ | ||
438 | /* Add custom threads initialization code here.*/ \ | ||
439 | } | ||
440 | |||
441 | /** | ||
442 | * @brief Threads finalization hook. | ||
443 | * @details User finalization code added to the @p chThdExit() API. | ||
444 | */ | ||
445 | #define CH_CFG_THREAD_EXIT_HOOK(tp) {} | ||
446 | |||
447 | /** | ||
448 | * @brief Idle thread enter hook. | ||
449 | * @note This hook is invoked within a critical zone, no OS functions | ||
450 | * should be invoked from here. | ||
451 | * @note This macro can be used to activate a power saving mode. | ||
452 | */ | ||
453 | #define CH_CFG_IDLE_ENTER_HOOK() { \ | ||
454 | } | ||
455 | |||
456 | /** | ||
457 | * @brief Idle thread leave hook. | ||
458 | * @note This hook is invoked within a critical zone, no OS functions | ||
459 | * should be invoked from here. | ||
460 | * @note This macro can be used to deactivate a power saving mode. | ||
461 | */ | ||
462 | #define CH_CFG_IDLE_LEAVE_HOOK() { \ | ||
463 | } | ||
464 | |||
465 | /** | ||
466 | * @brief System halt hook. | ||
467 | */ | ||
468 | #define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ | ||
469 | } | ||
470 | |||
471 | /** @} */ | ||
472 | |||
473 | /*===========================================================================*/ | ||
474 | /* Port-specific settings (override port settings defaulted in nilcore.h). */ | ||
475 | /*===========================================================================*/ | ||
476 | |||
477 | #endif /* CHCONF_H */ | ||
478 | |||
479 | /** @} */ | ||
diff --git a/lib/chibios-contrib/testhal/MSP430X/EXP430FR6989/ADC/halconf.h b/lib/chibios-contrib/testhal/MSP430X/EXP430FR6989/ADC/halconf.h new file mode 100644 index 000000000..5f4a53dd4 --- /dev/null +++ b/lib/chibios-contrib/testhal/MSP430X/EXP430FR6989/ADC/halconf.h | |||
@@ -0,0 +1,531 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2006..2018 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 | /** | ||
18 | * @file templates/halconf.h | ||
19 | * @brief HAL configuration header. | ||
20 | * @details HAL configuration file, this file allows to enable or disable the | ||
21 | * various device drivers from your application. You may also use | ||
22 | * this file in order to override the device drivers default settings. | ||
23 | * | ||
24 | * @addtogroup HAL_CONF | ||
25 | * @{ | ||
26 | */ | ||
27 | |||
28 | #ifndef HALCONF_H | ||
29 | #define HALCONF_H | ||
30 | |||
31 | #define _CHIBIOS_HAL_CONF_ | ||
32 | #define _CHIBIOS_HAL_CONF_VER_7_1_ | ||
33 | |||
34 | #include "mcuconf.h" | ||
35 | |||
36 | /** | ||
37 | * @brief Enables the PAL subsystem. | ||
38 | */ | ||
39 | #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) | ||
40 | #define HAL_USE_PAL TRUE | ||
41 | #endif | ||
42 | |||
43 | /** | ||
44 | * @brief Enables the ADC subsystem. | ||
45 | */ | ||
46 | #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) | ||
47 | #define HAL_USE_ADC TRUE | ||
48 | #endif | ||
49 | |||
50 | /** | ||
51 | * @brief Enables the CAN subsystem. | ||
52 | */ | ||
53 | #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) | ||
54 | #define HAL_USE_CAN FALSE | ||
55 | #endif | ||
56 | |||
57 | /** | ||
58 | * @brief Enables the cryptographic subsystem. | ||
59 | */ | ||
60 | #if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) | ||
61 | #define HAL_USE_CRY FALSE | ||
62 | #endif | ||
63 | |||
64 | /** | ||
65 | * @brief Enables the DAC subsystem. | ||
66 | */ | ||
67 | #if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) | ||
68 | #define HAL_USE_DAC FALSE | ||
69 | #endif | ||
70 | |||
71 | /** | ||
72 | * @brief Enables the EFlash subsystem. | ||
73 | */ | ||
74 | #if !defined(HAL_USE_EFL) || defined(__DOXYGEN__) | ||
75 | #define HAL_USE_EFL FALSE | ||
76 | #endif | ||
77 | |||
78 | /** | ||
79 | * @brief Enables the GPT subsystem. | ||
80 | */ | ||
81 | #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) | ||
82 | #define HAL_USE_GPT FALSE | ||
83 | #endif | ||
84 | |||
85 | /** | ||
86 | * @brief Enables the I2C subsystem. | ||
87 | */ | ||
88 | #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) | ||
89 | #define HAL_USE_I2C FALSE | ||
90 | #endif | ||
91 | |||
92 | /** | ||
93 | * @brief Enables the I2S subsystem. | ||
94 | */ | ||
95 | #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) | ||
96 | #define HAL_USE_I2S FALSE | ||
97 | #endif | ||
98 | |||
99 | /** | ||
100 | * @brief Enables the ICU subsystem. | ||
101 | */ | ||
102 | #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) | ||
103 | #define HAL_USE_ICU FALSE | ||
104 | #endif | ||
105 | |||
106 | /** | ||
107 | * @brief Enables the MAC subsystem. | ||
108 | */ | ||
109 | #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) | ||
110 | #define HAL_USE_MAC FALSE | ||
111 | #endif | ||
112 | |||
113 | /** | ||
114 | * @brief Enables the MMC_SPI subsystem. | ||
115 | */ | ||
116 | #if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) | ||
117 | #define HAL_USE_MMC_SPI FALSE | ||
118 | #endif | ||
119 | |||
120 | /** | ||
121 | * @brief Enables the PWM subsystem. | ||
122 | */ | ||
123 | #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) | ||
124 | #define HAL_USE_PWM FALSE | ||
125 | #endif | ||
126 | |||
127 | /** | ||
128 | * @brief Enables the RTC subsystem. | ||
129 | */ | ||
130 | #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) | ||
131 | #define HAL_USE_RTC FALSE | ||
132 | #endif | ||
133 | |||
134 | /** | ||
135 | * @brief Enables the SDC subsystem. | ||
136 | */ | ||
137 | #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) | ||
138 | #define HAL_USE_SDC FALSE | ||
139 | #endif | ||
140 | |||
141 | /** | ||
142 | * @brief Enables the SERIAL subsystem. | ||
143 | */ | ||
144 | #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) | ||
145 | #define HAL_USE_SERIAL TRUE | ||
146 | #endif | ||
147 | |||
148 | /** | ||
149 | * @brief Enables the SERIAL over USB subsystem. | ||
150 | */ | ||
151 | #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) | ||
152 | #define HAL_USE_SERIAL_USB FALSE | ||
153 | #endif | ||
154 | |||
155 | /** | ||
156 | * @brief Enables the SIO subsystem. | ||
157 | */ | ||
158 | #if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) | ||
159 | #define HAL_USE_SIO FALSE | ||
160 | #endif | ||
161 | |||
162 | /** | ||
163 | * @brief Enables the SPI subsystem. | ||
164 | */ | ||
165 | #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) | ||
166 | #define HAL_USE_SPI FALSE | ||
167 | #endif | ||
168 | |||
169 | /** | ||
170 | * @brief Enables the TRNG subsystem. | ||
171 | */ | ||
172 | #if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) | ||
173 | #define HAL_USE_TRNG FALSE | ||
174 | #endif | ||
175 | |||
176 | /** | ||
177 | * @brief Enables the UART subsystem. | ||
178 | */ | ||
179 | #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) | ||
180 | #define HAL_USE_UART FALSE | ||
181 | #endif | ||
182 | |||
183 | /** | ||
184 | * @brief Enables the USB subsystem. | ||
185 | */ | ||
186 | #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) | ||
187 | #define HAL_USE_USB FALSE | ||
188 | #endif | ||
189 | |||
190 | /** | ||
191 | * @brief Enables the WDG subsystem. | ||
192 | */ | ||
193 | #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) | ||
194 | #define HAL_USE_WDG FALSE | ||
195 | #endif | ||
196 | |||
197 | /** | ||
198 | * @brief Enables the WSPI subsystem. | ||
199 | */ | ||
200 | #if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) | ||
201 | #define HAL_USE_WSPI FALSE | ||
202 | #endif | ||
203 | |||
204 | /*===========================================================================*/ | ||
205 | /* PAL driver related settings. */ | ||
206 | /*===========================================================================*/ | ||
207 | |||
208 | /** | ||
209 | * @brief Enables synchronous APIs. | ||
210 | * @note Disabling this option saves both code and data space. | ||
211 | */ | ||
212 | #if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) | ||
213 | #define PAL_USE_CALLBACKS FALSE | ||
214 | #endif | ||
215 | |||
216 | /** | ||
217 | * @brief Enables synchronous APIs. | ||
218 | * @note Disabling this option saves both code and data space. | ||
219 | */ | ||
220 | #if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) | ||
221 | #define PAL_USE_WAIT FALSE | ||
222 | #endif | ||
223 | |||
224 | /*===========================================================================*/ | ||
225 | /* ADC driver related settings. */ | ||
226 | /*===========================================================================*/ | ||
227 | |||
228 | /** | ||
229 | * @brief Enables synchronous APIs. | ||
230 | * @note Disabling this option saves both code and data space. | ||
231 | */ | ||
232 | #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) | ||
233 | #define ADC_USE_WAIT TRUE | ||
234 | #endif | ||
235 | |||
236 | /** | ||
237 | * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. | ||
238 | * @note Disabling this option saves both code and data space. | ||
239 | */ | ||
240 | #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
241 | #define ADC_USE_MUTUAL_EXCLUSION TRUE | ||
242 | #endif | ||
243 | |||
244 | /*===========================================================================*/ | ||
245 | /* CAN driver related settings. */ | ||
246 | /*===========================================================================*/ | ||
247 | |||
248 | /** | ||
249 | * @brief Sleep mode related APIs inclusion switch. | ||
250 | */ | ||
251 | #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) | ||
252 | #define CAN_USE_SLEEP_MODE FALSE | ||
253 | #endif | ||
254 | |||
255 | /** | ||
256 | * @brief Enforces the driver to use direct callbacks rather than OSAL events. | ||
257 | */ | ||
258 | #if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) | ||
259 | #define CAN_ENFORCE_USE_CALLBACKS FALSE | ||
260 | #endif | ||
261 | |||
262 | /*===========================================================================*/ | ||
263 | /* CRY driver related settings. */ | ||
264 | /*===========================================================================*/ | ||
265 | |||
266 | /** | ||
267 | * @brief Enables the SW fall-back of the cryptographic driver. | ||
268 | * @details When enabled, this option, activates a fall-back software | ||
269 | * implementation for algorithms not supported by the underlying | ||
270 | * hardware. | ||
271 | * @note Fall-back implementations may not be present for all algorithms. | ||
272 | */ | ||
273 | #if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) | ||
274 | #define HAL_CRY_USE_FALLBACK FALSE | ||
275 | #endif | ||
276 | |||
277 | /** | ||
278 | * @brief Makes the driver forcibly use the fall-back implementations. | ||
279 | */ | ||
280 | #if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) | ||
281 | #define HAL_CRY_ENFORCE_FALLBACK FALSE | ||
282 | #endif | ||
283 | |||
284 | /*===========================================================================*/ | ||
285 | /* DAC driver related settings. */ | ||
286 | /*===========================================================================*/ | ||
287 | |||
288 | /** | ||
289 | * @brief Enables synchronous APIs. | ||
290 | * @note Disabling this option saves both code and data space. | ||
291 | */ | ||
292 | #if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) | ||
293 | #define DAC_USE_WAIT TRUE | ||
294 | #endif | ||
295 | |||
296 | /** | ||
297 | * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. | ||
298 | * @note Disabling this option saves both code and data space. | ||
299 | */ | ||
300 | #if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
301 | #define DAC_USE_MUTUAL_EXCLUSION TRUE | ||
302 | #endif | ||
303 | |||
304 | /*===========================================================================*/ | ||
305 | /* I2C driver related settings. */ | ||
306 | /*===========================================================================*/ | ||
307 | |||
308 | /** | ||
309 | * @brief Enables the mutual exclusion APIs on the I2C bus. | ||
310 | */ | ||
311 | #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
312 | #define I2C_USE_MUTUAL_EXCLUSION FALSE | ||
313 | #endif | ||
314 | |||
315 | /*===========================================================================*/ | ||
316 | /* MAC driver related settings. */ | ||
317 | /*===========================================================================*/ | ||
318 | |||
319 | /** | ||
320 | * @brief Enables the zero-copy API. | ||
321 | */ | ||
322 | #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) | ||
323 | #define MAC_USE_ZERO_COPY FALSE | ||
324 | #endif | ||
325 | |||
326 | /** | ||
327 | * @brief Enables an event sources for incoming packets. | ||
328 | */ | ||
329 | #if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) | ||
330 | #define MAC_USE_EVENTS FALSE | ||
331 | #endif | ||
332 | |||
333 | /*===========================================================================*/ | ||
334 | /* MMC_SPI driver related settings. */ | ||
335 | /*===========================================================================*/ | ||
336 | |||
337 | /** | ||
338 | * @brief Delays insertions. | ||
339 | * @details If enabled this options inserts delays into the MMC waiting | ||
340 | * routines releasing some extra CPU time for the threads with | ||
341 | * lower priority, this may slow down the driver a bit however. | ||
342 | * This option is recommended also if the SPI driver does not | ||
343 | * use a DMA channel and heavily loads the CPU. | ||
344 | */ | ||
345 | #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) | ||
346 | #define MMC_NICE_WAITING FALSE | ||
347 | #endif | ||
348 | |||
349 | /*===========================================================================*/ | ||
350 | /* SDC driver related settings. */ | ||
351 | /*===========================================================================*/ | ||
352 | |||
353 | /** | ||
354 | * @brief Number of initialization attempts before rejecting the card. | ||
355 | * @note Attempts are performed at 10mS intervals. | ||
356 | */ | ||
357 | #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) | ||
358 | #define SDC_INIT_RETRY 100 | ||
359 | #endif | ||
360 | |||
361 | /** | ||
362 | * @brief Include support for MMC cards. | ||
363 | * @note MMC support is not yet implemented so this option must be kept | ||
364 | * at @p FALSE. | ||
365 | */ | ||
366 | #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) | ||
367 | #define SDC_MMC_SUPPORT FALSE | ||
368 | #endif | ||
369 | |||
370 | /** | ||
371 | * @brief Delays insertions. | ||
372 | * @details If enabled this options inserts delays into the MMC waiting | ||
373 | * routines releasing some extra CPU time for the threads with | ||
374 | * lower priority, this may slow down the driver a bit however. | ||
375 | */ | ||
376 | #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) | ||
377 | #define SDC_NICE_WAITING FALSE | ||
378 | #endif | ||
379 | |||
380 | /** | ||
381 | * @brief OCR initialization constant for V20 cards. | ||
382 | */ | ||
383 | #if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) | ||
384 | #define SDC_INIT_OCR_V20 0x50FF8000U | ||
385 | #endif | ||
386 | |||
387 | /** | ||
388 | * @brief OCR initialization constant for non-V20 cards. | ||
389 | */ | ||
390 | #if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) | ||
391 | #define SDC_INIT_OCR 0x80100000U | ||
392 | #endif | ||
393 | |||
394 | /*===========================================================================*/ | ||
395 | /* SERIAL driver related settings. */ | ||
396 | /*===========================================================================*/ | ||
397 | |||
398 | /** | ||
399 | * @brief Default bit rate. | ||
400 | * @details Configuration parameter, this is the baud rate selected for the | ||
401 | * default configuration. | ||
402 | */ | ||
403 | #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) | ||
404 | #define SERIAL_DEFAULT_BITRATE 38400 | ||
405 | #endif | ||
406 | |||
407 | /** | ||
408 | * @brief Serial buffers size. | ||
409 | * @details Configuration parameter, you can change the depth of the queue | ||
410 | * buffers depending on the requirements of your application. | ||
411 | * @note The default is 16 bytes for both the transmission and receive | ||
412 | * buffers. | ||
413 | */ | ||
414 | #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) | ||
415 | #define SERIAL_BUFFERS_SIZE 16 | ||
416 | #endif | ||
417 | |||
418 | /*===========================================================================*/ | ||
419 | /* SERIAL_USB driver related setting. */ | ||
420 | /*===========================================================================*/ | ||
421 | |||
422 | /** | ||
423 | * @brief Serial over USB buffers size. | ||
424 | * @details Configuration parameter, the buffer size must be a multiple of | ||
425 | * the USB data endpoint maximum packet size. | ||
426 | * @note The default is 256 bytes for both the transmission and receive | ||
427 | * buffers. | ||
428 | */ | ||
429 | #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) | ||
430 | #define SERIAL_USB_BUFFERS_SIZE 256 | ||
431 | #endif | ||
432 | |||
433 | /** | ||
434 | * @brief Serial over USB number of buffers. | ||
435 | * @note The default is 2 buffers. | ||
436 | */ | ||
437 | #if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) | ||
438 | #define SERIAL_USB_BUFFERS_NUMBER 2 | ||
439 | #endif | ||
440 | |||
441 | /*===========================================================================*/ | ||
442 | /* SPI driver related settings. */ | ||
443 | /*===========================================================================*/ | ||
444 | |||
445 | /** | ||
446 | * @brief Enables synchronous APIs. | ||
447 | * @note Disabling this option saves both code and data space. | ||
448 | */ | ||
449 | #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) | ||
450 | #define SPI_USE_WAIT TRUE | ||
451 | #endif | ||
452 | |||
453 | /** | ||
454 | * @brief Enables circular transfers APIs. | ||
455 | * @note Disabling this option saves both code and data space. | ||
456 | */ | ||
457 | #if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) | ||
458 | #define SPI_USE_CIRCULAR FALSE | ||
459 | #endif | ||
460 | |||
461 | /** | ||
462 | * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. | ||
463 | * @note Disabling this option saves both code and data space. | ||
464 | */ | ||
465 | #if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
466 | #define SPI_USE_MUTUAL_EXCLUSION FALSE | ||
467 | #endif | ||
468 | |||
469 | /** | ||
470 | * @brief Handling method for SPI CS line. | ||
471 | * @note Disabling this option saves both code and data space. | ||
472 | */ | ||
473 | #if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) | ||
474 | #define SPI_SELECT_MODE SPI_SELECT_MODE_PAD | ||
475 | #endif | ||
476 | |||
477 | /*===========================================================================*/ | ||
478 | /* UART driver related settings. */ | ||
479 | /*===========================================================================*/ | ||
480 | |||
481 | /** | ||
482 | * @brief Enables synchronous APIs. | ||
483 | * @note Disabling this option saves both code and data space. | ||
484 | */ | ||
485 | #if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) | ||
486 | #define UART_USE_WAIT FALSE | ||
487 | #endif | ||
488 | |||
489 | /** | ||
490 | * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. | ||
491 | * @note Disabling this option saves both code and data space. | ||
492 | */ | ||
493 | #if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
494 | #define UART_USE_MUTUAL_EXCLUSION FALSE | ||
495 | #endif | ||
496 | |||
497 | /*===========================================================================*/ | ||
498 | /* USB driver related settings. */ | ||
499 | /*===========================================================================*/ | ||
500 | |||
501 | /** | ||
502 | * @brief Enables synchronous APIs. | ||
503 | * @note Disabling this option saves both code and data space. | ||
504 | */ | ||
505 | #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) | ||
506 | #define USB_USE_WAIT FALSE | ||
507 | #endif | ||
508 | |||
509 | /*===========================================================================*/ | ||
510 | /* WSPI driver related settings. */ | ||
511 | /*===========================================================================*/ | ||
512 | |||
513 | /** | ||
514 | * @brief Enables synchronous APIs. | ||
515 | * @note Disabling this option saves both code and data space. | ||
516 | */ | ||
517 | #if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) | ||
518 | #define WSPI_USE_WAIT TRUE | ||
519 | #endif | ||
520 | |||
521 | /** | ||
522 | * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. | ||
523 | * @note Disabling this option saves both code and data space. | ||
524 | */ | ||
525 | #if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
526 | #define WSPI_USE_MUTUAL_EXCLUSION TRUE | ||
527 | #endif | ||
528 | |||
529 | #endif /* HALCONF_H */ | ||
530 | |||
531 | /** @} */ | ||
diff --git a/lib/chibios-contrib/testhal/MSP430X/EXP430FR6989/ADC/main.c b/lib/chibios-contrib/testhal/MSP430X/EXP430FR6989/ADC/main.c new file mode 100644 index 000000000..7f6429dad --- /dev/null +++ b/lib/chibios-contrib/testhal/MSP430X/EXP430FR6989/ADC/main.c | |||
@@ -0,0 +1,254 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2006..2015 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 | #include "ch.h" | ||
18 | #include "hal.h" | ||
19 | #include "string.h" | ||
20 | #include "stdio.h" /* eesh */ | ||
21 | |||
22 | /* Disable watchdog because of lousy startup code in newlib */ | ||
23 | static void __attribute__((naked, section(".crt_0042disable_watchdog"), used)) | ||
24 | disable_watchdog(void) { | ||
25 | WDTCTL = WDTPW | WDTHOLD; | ||
26 | } | ||
27 | |||
28 | const char * start_msg = "\r\n\r\nExecuting ADC test suite...\r\n"; | ||
29 | const char * test_1_msg = "\r\nTEST 1: 1 channel, depth 1, no circular\r\n"; | ||
30 | const char * test_2_msg = "\r\nTEST 2: 1 channel, depth 8, no circular\r\n"; | ||
31 | const char * test_3_msg = "\r\nTEST 3: 4 channels, depth 1, no circular\r\n"; | ||
32 | const char * test_4_msg = "\r\nTEST 4: 4 channels, depth 8, no circular\r\n"; | ||
33 | const char * test_5_msg = "\r\nTEST 5: 1 channel, depth 1, circular\r\n"; | ||
34 | const char * test_6_msg = "\r\nTEST 6: 1 channel, depth 8, circular\r\n"; | ||
35 | const char * test_7_msg = "\r\nTEST 7: 4 channel, depth 1, circular\r\n"; | ||
36 | const char * test_8_msg = "\r\nTEST 8: 4 channel, depth 8, circular\r\n"; | ||
37 | const char * test_9_msg = "\r\nTEST 9: 1 channel, depth 1, synchronous\r\n"; | ||
38 | |||
39 | const char * success_string = "\r\nSUCCESS\r\n"; | ||
40 | const char * fail_string = "\r\nFAILURE\r\n"; | ||
41 | |||
42 | char out_string[128]; | ||
43 | const char * raw_fmt_string = "Raw Value: %d\r\n"; | ||
44 | const char * cooked_fmt_string = "Cooked Value: %d\r\n"; | ||
45 | const char * chn_fmt_string = "\r\nCHANNEL %d\r\n"; | ||
46 | |||
47 | uint16_t buffer_margin[72]; | ||
48 | uint16_t * buffer = buffer_margin + 4; | ||
49 | uint8_t depth; | ||
50 | uint8_t cb_arg = 0; | ||
51 | uint16_t cb_expect; | ||
52 | |||
53 | static const int test = 0; | ||
54 | |||
55 | ADCConfig config = { | ||
56 | }; | ||
57 | |||
58 | ADCConversionGroup group = { | ||
59 | false, /* circular */ | ||
60 | 1, /* num_channels */ | ||
61 | NULL, /* end_cb */ | ||
62 | NULL, /* error_cb */ | ||
63 | { | ||
64 | 30, 31, 30, 31, 0, 0, 0, 0, | ||
65 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
66 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
67 | 0, 0, 0, 0, 0, 0, 0, 0 | ||
68 | }, /* channels */ | ||
69 | MSP430X_ADC_RES_12BIT, /* res */ | ||
70 | MSP430X_ADC_SHT_32, /* rate */ | ||
71 | MSP430X_ADC_VSS_VREF_BUF, /* ref */ | ||
72 | MSP430X_REF_2V5 /* vref_src */ | ||
73 | }; | ||
74 | |||
75 | void print(const char * msg) { | ||
76 | |||
77 | if (!test) { | ||
78 | chnWrite(&SD1, (const uint8_t *)msg, strlen(msg)); | ||
79 | } | ||
80 | } | ||
81 | |||
82 | void adc_callback(ADCDriver * adcp, adcsample_t *buffer, size_t n) { | ||
83 | (void)adcp; | ||
84 | (void)buffer; | ||
85 | (void)n; | ||
86 | |||
87 | cb_arg++; | ||
88 | |||
89 | if (adcp->grpp->circular && cb_arg == cb_expect) { | ||
90 | osalSysLockFromISR(); | ||
91 | adcStopConversionI(adcp); | ||
92 | osalSysUnlockFromISR(); | ||
93 | } | ||
94 | } | ||
95 | |||
96 | void run_test(const char * test_msg, uint8_t num_channels, uint8_t depth, | ||
97 | bool circular) { | ||
98 | print(test_msg); | ||
99 | |||
100 | cb_arg = 0; | ||
101 | |||
102 | group.num_channels = num_channels; | ||
103 | group.circular = circular; | ||
104 | group.end_cb = adc_callback; | ||
105 | |||
106 | if (depth > 1) cb_expect = 2; | ||
107 | else cb_expect = 1; | ||
108 | if (circular) cb_expect *= 3; | ||
109 | |||
110 | adcStartConversion(&ADCD1, &group, buffer, depth); | ||
111 | |||
112 | while (ADCD1.state == ADC_ACTIVE) ; | ||
113 | |||
114 | |||
115 | int index = 0; | ||
116 | for (int j = 0; j < depth; j++) { | ||
117 | for (int i = 0; i < group.num_channels; i++) { | ||
118 | index = i + (j * group.num_channels); | ||
119 | sniprintf(out_string, 128, chn_fmt_string, group.channels[i]); | ||
120 | print(out_string); | ||
121 | |||
122 | sniprintf(out_string, 128, raw_fmt_string, buffer[index]); | ||
123 | print(out_string); | ||
124 | |||
125 | if (group.channels[i] == 30) { /* internal temp sensor */ | ||
126 | buffer[index] = adcMSP430XAdjustTemp(&group, buffer[index]); | ||
127 | } | ||
128 | else { | ||
129 | buffer[index] = adcMSP430XAdjustResult(&group, buffer[index]); | ||
130 | } | ||
131 | |||
132 | sniprintf(out_string, 128, cooked_fmt_string, buffer[index]); | ||
133 | print(out_string); | ||
134 | } | ||
135 | } | ||
136 | |||
137 | if (cb_arg == cb_expect) { | ||
138 | print(success_string); | ||
139 | } | ||
140 | else { | ||
141 | print(fail_string); | ||
142 | } | ||
143 | } | ||
144 | |||
145 | /* | ||
146 | * Thread 2. | ||
147 | */ | ||
148 | THD_WORKING_AREA(waThread1, 4096); | ||
149 | THD_FUNCTION(Thread1, arg) { | ||
150 | |||
151 | (void)arg; | ||
152 | |||
153 | /* | ||
154 | * Activate the serial driver 0 using the driver default configuration. | ||
155 | */ | ||
156 | sdStart(&SD1, NULL); | ||
157 | |||
158 | /* Activate the ADC driver 1 using its config */ | ||
159 | adcStart(&ADCD1, &config); | ||
160 | |||
161 | while (chnGetTimeout(&SD1, TIME_INFINITE)) { | ||
162 | print(start_msg); | ||
163 | chThdSleepMilliseconds(2000); | ||
164 | |||
165 | /* Test 1 - 1ch1d, no circular */ | ||
166 | run_test(test_1_msg, 1, 1, false); | ||
167 | |||
168 | /* Test 2 - 1ch8d, no circular */ | ||
169 | run_test(test_2_msg, 1, 8, false); | ||
170 | |||
171 | /* Test 3 - 4chd1, no circular */ | ||
172 | run_test(test_3_msg, 4, 1, false); | ||
173 | |||
174 | /* Test 4 - 4ch8d, no circular */ | ||
175 | run_test(test_4_msg, 4, 8, false); | ||
176 | |||
177 | /* Test 5 - 1ch1d, circular */ | ||
178 | run_test(test_5_msg, 1, 1, true); | ||
179 | |||
180 | /* Test 6 - 1ch8d, circular */ | ||
181 | run_test(test_6_msg, 1, 8, true); | ||
182 | |||
183 | /* Test 7 - 4ch1d, circular */ | ||
184 | run_test(test_7_msg, 4, 1, true); | ||
185 | |||
186 | /* Test 8 - 4ch8d, circular */ | ||
187 | run_test(test_8_msg, 4, 8, true); | ||
188 | |||
189 | /* Test 9 - 1ch1d, synchronous */ | ||
190 | print(test_9_msg); | ||
191 | cb_arg = 0; | ||
192 | |||
193 | group.num_channels = 1; | ||
194 | group.circular = false; | ||
195 | group.end_cb = adc_callback; | ||
196 | |||
197 | cb_expect = 1; | ||
198 | |||
199 | adcConvert(&ADCD1, &group, buffer, 1); | ||
200 | |||
201 | while (ADCD1.state == ADC_ACTIVE) ; | ||
202 | |||
203 | sniprintf(out_string, 128, chn_fmt_string, group.channels[0]); | ||
204 | print(out_string); | ||
205 | |||
206 | sniprintf(out_string, 128, raw_fmt_string, buffer[0]); | ||
207 | print(out_string); | ||
208 | |||
209 | buffer[0] = adcMSP430XAdjustTemp(&group, buffer[0]); | ||
210 | |||
211 | sniprintf(out_string, 128, cooked_fmt_string, buffer[0]); | ||
212 | print(out_string); | ||
213 | |||
214 | if (cb_arg == cb_expect) { | ||
215 | print(success_string); | ||
216 | } | ||
217 | else { | ||
218 | print(fail_string); | ||
219 | } | ||
220 | } | ||
221 | } | ||
222 | |||
223 | /* | ||
224 | * Threads static table, one entry per thread. The number of entries must | ||
225 | * match NIL_CFG_NUM_THREADS. | ||
226 | */ | ||
227 | THD_TABLE_BEGIN | ||
228 | THD_TABLE_ENTRY(waThread1, "adc_test", Thread1, NULL) | ||
229 | THD_TABLE_END | ||
230 | |||
231 | /* | ||
232 | * Application entry point. | ||
233 | */ | ||
234 | int main(void) { | ||
235 | |||
236 | /* | ||
237 | * System initializations. | ||
238 | * - HAL initialization, this also initializes the configured device drivers | ||
239 | * and performs the board-specific initializations. | ||
240 | * - Kernel initialization, the main() function becomes a thread and the | ||
241 | * RTOS is active. | ||
242 | */ | ||
243 | WDTCTL = WDTPW | WDTHOLD; | ||
244 | |||
245 | halInit(); | ||
246 | chSysInit(); | ||
247 | |||
248 | /* This is now the idle thread loop, you may perform here a low priority | ||
249 | task but you must never try to sleep or wait in this loop. Note that | ||
250 | this tasks runs at the lowest priority level so any instruction added | ||
251 | here will be executed after all other tasks have been started.*/ | ||
252 | while (true) { | ||
253 | } | ||
254 | } | ||
diff --git a/lib/chibios-contrib/testhal/MSP430X/EXP430FR6989/ADC/mcuconf.h b/lib/chibios-contrib/testhal/MSP430X/EXP430FR6989/ADC/mcuconf.h new file mode 100644 index 000000000..f4d8f6daa --- /dev/null +++ b/lib/chibios-contrib/testhal/MSP430X/EXP430FR6989/ADC/mcuconf.h | |||
@@ -0,0 +1,68 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2016 Andrew Wygle aka awygle | ||
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 | #ifndef MCUCONF_H | ||
18 | #define MCUCONF_H | ||
19 | |||
20 | /* | ||
21 | * MSP430X drivers configuration. | ||
22 | * The following settings override the default settings present in | ||
23 | * the various device driver implementation headers. | ||
24 | * Note that the settings for each driver only have effect if the driver | ||
25 | * is enabled in halconf.h. | ||
26 | * | ||
27 | */ | ||
28 | |||
29 | #define MSP430X_MCUCONF | ||
30 | |||
31 | /* HAL driver system settings */ | ||
32 | #define MSP430X_ACLK_SRC MSP430X_VLOCLK | ||
33 | #define MSP430X_LFXTCLK_FREQ 0 | ||
34 | #define MSP430X_HFXTCLK_FREQ 0 | ||
35 | #define MSP430X_DCOCLK_FREQ 8000000 | ||
36 | #define MSP430X_MCLK_DIV 1 | ||
37 | #define MSP430X_SMCLK_DIV 32 | ||
38 | |||
39 | /* | ||
40 | * SERIAL driver system settings. | ||
41 | */ | ||
42 | #define MSP430X_SERIAL_USE_USART1 TRUE | ||
43 | #define MSP430X_USART1_CLK_SRC MSP430X_SMCLK_SRC | ||
44 | #define MSP430X_SERIAL_USE_USART0 FALSE | ||
45 | #define MSP430X_SERIAL_USE_USART2 FALSE | ||
46 | #define MSP430X_SERIAL_USE_USART3 FALSE | ||
47 | |||
48 | /* | ||
49 | * ST driver system settings. | ||
50 | */ | ||
51 | #define MSP430X_ST_CLK_SRC MSP430X_SMCLK_SRC | ||
52 | #define MSP430X_ST_TIMER_TYPE B | ||
53 | #define MSP430X_ST_TIMER_INDEX 0 | ||
54 | |||
55 | /* | ||
56 | * SPI driver system settings. | ||
57 | */ | ||
58 | #define MSP430X_SPI_USE_SPIA1 FALSE | ||
59 | #define MSP430X_SPI_USE_SPIB0 FALSE | ||
60 | #define MSP430X_SPI_EXCLUSIVE_DMA FALSE | ||
61 | |||
62 | /* | ||
63 | * ADC driver system settings | ||
64 | */ | ||
65 | #define MSP430X_ADC_EXCLUSIVE_DMA FALSE | ||
66 | #define MSP430X_ADC1_FREQ 5000000 / 256 | ||
67 | |||
68 | #endif /* _MCUCONF_H_ */ | ||
diff --git a/lib/chibios-contrib/testhal/MSP430X/EXP430FR6989/ADC/msp_vectors.c b/lib/chibios-contrib/testhal/MSP430X/EXP430FR6989/ADC/msp_vectors.c new file mode 100644 index 000000000..9730cbd83 --- /dev/null +++ b/lib/chibios-contrib/testhal/MSP430X/EXP430FR6989/ADC/msp_vectors.c | |||
@@ -0,0 +1,286 @@ | |||
1 | #include <msp430.h> | ||
2 | |||
3 | __attribute__((interrupt(1))) | ||
4 | void Vector1(void) { | ||
5 | |||
6 | while (1) { | ||
7 | } | ||
8 | } | ||
9 | __attribute__((interrupt(2))) | ||
10 | void Vector2(void) { | ||
11 | |||
12 | while (1) { | ||
13 | } | ||
14 | } | ||
15 | __attribute__((interrupt(3))) | ||
16 | void Vector3(void) { | ||
17 | |||
18 | while (1) { | ||
19 | } | ||
20 | } | ||
21 | __attribute__((interrupt(4))) | ||
22 | void Vector4(void) { | ||
23 | |||
24 | while (1) { | ||
25 | } | ||
26 | } | ||
27 | __attribute__((interrupt(5))) | ||
28 | void Vector5(void) { | ||
29 | |||
30 | while (1) { | ||
31 | } | ||
32 | } | ||
33 | __attribute__((interrupt(6))) | ||
34 | void Vector6(void) { | ||
35 | |||
36 | while (1) { | ||
37 | } | ||
38 | } | ||
39 | __attribute__((interrupt(7))) | ||
40 | void Vector7(void) { | ||
41 | |||
42 | while (1) { | ||
43 | } | ||
44 | } | ||
45 | __attribute__((interrupt(8))) | ||
46 | void Vector8(void) { | ||
47 | |||
48 | while (1) { | ||
49 | } | ||
50 | } | ||
51 | __attribute__((interrupt(9))) | ||
52 | void Vector9(void) { | ||
53 | |||
54 | while (1) { | ||
55 | } | ||
56 | } | ||
57 | __attribute__((interrupt(10))) | ||
58 | void Vector10(void) { | ||
59 | |||
60 | while (1) { | ||
61 | } | ||
62 | } | ||
63 | __attribute__((interrupt(11))) | ||
64 | void Vector11(void) { | ||
65 | |||
66 | while (1) { | ||
67 | } | ||
68 | } | ||
69 | __attribute__((interrupt(12))) | ||
70 | void Vector12(void) { | ||
71 | |||
72 | while (1) { | ||
73 | } | ||
74 | } | ||
75 | __attribute__((interrupt(13))) | ||
76 | void Vector13(void) { | ||
77 | |||
78 | while (1) { | ||
79 | } | ||
80 | } | ||
81 | __attribute__((interrupt(14))) | ||
82 | void Vector14(void) { | ||
83 | |||
84 | while (1) { | ||
85 | } | ||
86 | } | ||
87 | __attribute__((interrupt(15))) | ||
88 | void Vector15(void) { | ||
89 | |||
90 | while (1) { | ||
91 | } | ||
92 | } | ||
93 | __attribute__((interrupt(16))) | ||
94 | void Vector16(void) { | ||
95 | |||
96 | while (1) { | ||
97 | } | ||
98 | } | ||
99 | __attribute__((interrupt(17))) | ||
100 | void Vector17(void) { | ||
101 | |||
102 | while (1) { | ||
103 | } | ||
104 | } | ||
105 | __attribute__((interrupt(18))) | ||
106 | void Vector18(void) { | ||
107 | |||
108 | while (1) { | ||
109 | } | ||
110 | } | ||
111 | __attribute__((interrupt(19))) | ||
112 | void Vector19(void) { | ||
113 | |||
114 | while (1) { | ||
115 | } | ||
116 | } | ||
117 | __attribute__((interrupt(20))) | ||
118 | void Vector20(void) { | ||
119 | |||
120 | while (1) { | ||
121 | } | ||
122 | } | ||
123 | __attribute__((interrupt(21))) | ||
124 | void Vector21(void) { | ||
125 | |||
126 | while (1) { | ||
127 | } | ||
128 | } | ||
129 | __attribute__((interrupt(22))) | ||
130 | void Vector22(void) { | ||
131 | |||
132 | while (1) { | ||
133 | } | ||
134 | } | ||
135 | __attribute__((interrupt(23))) | ||
136 | void Vector23(void) { | ||
137 | |||
138 | while (1) { | ||
139 | } | ||
140 | } | ||
141 | __attribute__((interrupt(24))) | ||
142 | void Vector24(void) { | ||
143 | |||
144 | while (1) { | ||
145 | } | ||
146 | } | ||
147 | __attribute__((interrupt(25))) | ||
148 | void Vector25(void) { | ||
149 | |||
150 | while (1) { | ||
151 | } | ||
152 | } | ||
153 | __attribute__((interrupt(26))) | ||
154 | void Vector26(void) { | ||
155 | |||
156 | while (1) { | ||
157 | } | ||
158 | } | ||
159 | __attribute__((interrupt(27))) | ||
160 | void Vector27(void) { | ||
161 | |||
162 | while (1) { | ||
163 | } | ||
164 | } | ||
165 | __attribute__((interrupt(28))) | ||
166 | void Vector28(void) { | ||
167 | |||
168 | while (1) { | ||
169 | } | ||
170 | } | ||
171 | __attribute__((interrupt(29))) | ||
172 | void Vector29(void) { | ||
173 | |||
174 | while (1) { | ||
175 | } | ||
176 | } | ||
177 | __attribute__((interrupt(30))) | ||
178 | void Vector30(void) { | ||
179 | |||
180 | while (1) { | ||
181 | } | ||
182 | } | ||
183 | __attribute__((interrupt(33))) | ||
184 | void Vector33(void) { | ||
185 | |||
186 | while (1) { | ||
187 | } | ||
188 | } | ||
189 | __attribute__((interrupt(34))) | ||
190 | void Vector34(void) { | ||
191 | |||
192 | while (1) { | ||
193 | } | ||
194 | } | ||
195 | __attribute__((interrupt(36))) | ||
196 | void Vector36(void) { | ||
197 | |||
198 | while (1) { | ||
199 | } | ||
200 | } | ||
201 | __attribute__((interrupt(37))) | ||
202 | void Vector37(void) { | ||
203 | |||
204 | while (1) { | ||
205 | } | ||
206 | } | ||
207 | __attribute__((interrupt(39))) | ||
208 | void Vector39(void) { | ||
209 | |||
210 | while (1) { | ||
211 | } | ||
212 | } | ||
213 | __attribute__((interrupt(40))) | ||
214 | void Vector40(void) { | ||
215 | |||
216 | while (1) { | ||
217 | } | ||
218 | } | ||
219 | __attribute__((interrupt(42))) | ||
220 | void Vector42(void) { | ||
221 | |||
222 | while (1) { | ||
223 | } | ||
224 | } | ||
225 | __attribute__((interrupt(44))) | ||
226 | void Vector44(void) { | ||
227 | |||
228 | while (1) { | ||
229 | } | ||
230 | } | ||
231 | __attribute__((interrupt(45))) | ||
232 | void Vector45(void) { | ||
233 | |||
234 | while (1) { | ||
235 | } | ||
236 | } | ||
237 | __attribute__((interrupt(47))) | ||
238 | void Vector47(void) { | ||
239 | |||
240 | while (1) { | ||
241 | } | ||
242 | } | ||
243 | __attribute__((interrupt(48))) | ||
244 | void Vector48(void) { | ||
245 | |||
246 | while (1) { | ||
247 | } | ||
248 | } | ||
249 | __attribute__((interrupt(49))) | ||
250 | void Vector49(void) { | ||
251 | |||
252 | while (1) { | ||
253 | } | ||
254 | } | ||
255 | __attribute__((interrupt(50))) | ||
256 | void Vector50(void) { | ||
257 | |||
258 | while (1) { | ||
259 | } | ||
260 | } | ||
261 | __attribute__((interrupt(51))) | ||
262 | void Vector51(void) { | ||
263 | |||
264 | while (1) { | ||
265 | } | ||
266 | } | ||
267 | __attribute__((interrupt(53))) | ||
268 | void Vector53(void) { | ||
269 | |||
270 | while (1) { | ||
271 | } | ||
272 | } | ||
273 | __attribute__((interrupt(54))) | ||
274 | void Vector54(void) { | ||
275 | |||
276 | while (1) { | ||
277 | } | ||
278 | } | ||
279 | __attribute__((interrupt(55))) | ||
280 | void Vector55(void) { | ||
281 | |||
282 | while (1) { | ||
283 | } | ||
284 | } | ||
285 | |||
286 | |||