1 //*****************************************************************************
2 //
3 // rom.h - Macros to facilitate calling functions in the ROM.
4 //
5 // Copyright (c) 2013 Texas Instruments Incorporated.  All rights reserved.
6 // TI Information - Selective Disclosure
7 //
8 //*****************************************************************************
9 //
10 
11 #ifndef __ROM_H__
12 #define __ROM_H__
13 
14 //*****************************************************************************
15 //
16 // Pointers to the main API tables.
17 //
18 //*****************************************************************************
19 #define ROM_APITABLE            ((unsigned long *)0x02000800)
20 #define ROM_VERSION             (ROM_APITABLE[0])
21 #define ROM_ADC14TABLE          ((unsigned long *)(ROM_APITABLE[1]))
22 #define ROM_AES256TABLE         ((unsigned long *)(ROM_APITABLE[2]))
23 #define ROM_COMPTABLE           ((unsigned long *)(ROM_APITABLE[3]))
24 #define ROM_CRC32TABLE          ((unsigned long *)(ROM_APITABLE[4]))
25 #define ROM_CSTABLE             ((unsigned long *)(ROM_APITABLE[5]))
26 #define ROM_DMATABLE            ((unsigned long *)(ROM_APITABLE[6]))
27 #define ROM_FLASHCTLTABLE       ((unsigned long *)(ROM_APITABLE[7]))
28 #define ROM_FPUTABLE            ((unsigned long *)(ROM_APITABLE[8]))
29 #define ROM_GPIOTABLE           ((unsigned long *)(ROM_APITABLE[9]))
30 #define ROM_I2CTABLE            ((unsigned long *)(ROM_APITABLE[10]))
31 #define ROM_INTTABLE            ((unsigned long *)(ROM_APITABLE[11]))
32 #define ROM_MPUTABLE            ((unsigned long *)(ROM_APITABLE[12]))
33 #define ROM_PCMTABLE            ((unsigned long *)(ROM_APITABLE[13]))
34 #define ROM_PMAPTABLE           ((unsigned long *)(ROM_APITABLE[14]))
35 #define ROM_PSSTABLE            ((unsigned long *)(ROM_APITABLE[15]))
36 #define ROM_REFTABLE            ((unsigned long *)(ROM_APITABLE[16]))
37 #define ROM_RESETCTLTABLE       ((unsigned long *)(ROM_APITABLE[17]))
38 #define ROM_RTCTABLE            ((unsigned long *)(ROM_APITABLE[18]))
39 #define ROM_SPITABLE            ((unsigned long *)(ROM_APITABLE[19]))
40 #define ROM_SYSCTLTABLE         ((unsigned long *)(ROM_APITABLE[20]))
41 #define ROM_SYSTICKTABLE        ((unsigned long *)(ROM_APITABLE[21]))
42 #define ROM_TIMER_ATABLE        ((unsigned long *)(ROM_APITABLE[22]))
43 #define ROM_TIMER32TABLE        ((unsigned long *)(ROM_APITABLE[23]))
44 #define ROM_UARTTABLE           ((unsigned long *)(ROM_APITABLE[24]))
45 #define ROM_WDTTABLE            ((unsigned long *)(ROM_APITABLE[25]))
46 #define ROM_SYSCTLATABLE        ((unsigned long *)(ROM_APITABLE[26]))
47 #define ROM_FLASHCTLATABLE      ((unsigned long *)(ROM_APITABLE[27]))
48 #define ROM_LCDFTABLE           ((unsigned long *)(ROM_APITABLE[28]))
49 
50 #if defined(__MSP432P401R__) || defined(__MSP432P401M__)
51 #define TARGET_IS_MSP432P4XX
52 #else
53 #define TARGET_IS_MSP432P4XX_NEXT
54 #endif
55 
56 //*****************************************************************************
57 //
58 // Macros for calling ROM functions in the ADC14 API.
59 //
60 //*****************************************************************************
61 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
62     defined(TARGET_IS_MSP432P4XX_NEXT)
63 #define ROM_ADC14_enableModule                                                \
64         ((void (*)(void))ROM_ADC14TABLE[0])
65 #endif
66 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
67     defined(TARGET_IS_MSP432P4XX_NEXT)
68 #define ROM_ADC14_disableModule                                               \
69         ((bool (*)(void))ROM_ADC14TABLE[1])
70 #endif
71 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
72     defined(TARGET_IS_MSP432P4XX_NEXT)
73 #define ROM_ADC14_initModule                                                  \
74         ((bool (*)(uint32_t clockSource,                                      \
75                    uint32_t clockPredivider,                                  \
76                    uint32_t clockDivider,                                     \
77                    uint32_t internalChannelMask))ROM_ADC14TABLE[2])
78 #endif
79 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
80     defined(TARGET_IS_MSP432P4XX_NEXT)
81 #define ROM_ADC14_setResolution                                               \
82         ((void (*)(uint32_t resolution))ROM_ADC14TABLE[3])
83 #endif
84 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
85     defined(TARGET_IS_MSP432P4XX_NEXT)
86 #define ROM_ADC14_getResolution                                               \
87         ((uint_fast32_t (*)(void))ROM_ADC14TABLE[4])
88 #endif
89 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
90     defined(TARGET_IS_MSP432P4XX_NEXT)
91 #define ROM_ADC14_setSampleHoldTrigger                                        \
92         ((bool (*)(uint32_t source,                                           \
93                    bool invertSignal))ROM_ADC14TABLE[5])
94 #endif
95 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
96     defined(TARGET_IS_MSP432P4XX_NEXT)
97 #define ROM_ADC14_setSampleHoldTime                                           \
98         ((bool (*)(uint32_t firstPulseWidth,                                  \
99                    uint32_t secondPulseWidth))ROM_ADC14TABLE[6])
100 #endif
101 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
102     defined(TARGET_IS_MSP432P4XX_NEXT)
103 #define ROM_ADC14_configureMultiSequenceMode                                  \
104         ((bool (*)(uint32_t memoryStart,                                      \
105                    uint32_t memoryEnd,                                        \
106                    bool repeatMode))ROM_ADC14TABLE[7])
107 #endif
108 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
109     defined(TARGET_IS_MSP432P4XX_NEXT)
110 #define ROM_ADC14_configureSingleSampleMode                                   \
111         ((bool (*)(uint32_t memoryDestination,                                \
112                    bool repeatMode))ROM_ADC14TABLE[8])
113 #endif
114 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
115     defined(TARGET_IS_MSP432P4XX_NEXT)
116 #define ROM_ADC14_enableConversion                                            \
117         ((bool (*)(void))ROM_ADC14TABLE[9])
118 #endif
119 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
120     defined(TARGET_IS_MSP432P4XX_NEXT)
121 #define ROM_ADC14_disableConversion                                           \
122         ((void (*)(void))ROM_ADC14TABLE[10])
123 #endif
124 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
125     defined(TARGET_IS_MSP432P4XX_NEXT)
126 #define ROM_ADC14_isBusy                                                      \
127         ((bool (*)(void))ROM_ADC14TABLE[11])
128 #endif
129 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
130     defined(TARGET_IS_MSP432P4XX_NEXT)
131 #define ROM_ADC14_configureConversionMemory                                   \
132         ((bool (*)(uint32_t memorySelect,                                     \
133                    uint32_t refSelect,                                        \
134                    uint32_t channelSelect,                                    \
135                    bool differntialMode))ROM_ADC14TABLE[12])
136 #endif
137 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
138     defined(TARGET_IS_MSP432P4XX_NEXT)
139 #define ROM_ADC14_enableComparatorWindow                                      \
140         ((bool (*)(uint32_t memorySelect,                                     \
141                    uint32_t windowSelect))ROM_ADC14TABLE[13])
142 #endif
143 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
144     defined(TARGET_IS_MSP432P4XX_NEXT)
145 #define ROM_ADC14_disableComparatorWindow                                     \
146         ((bool (*)(uint32_t memorySelect))ROM_ADC14TABLE[14])
147 #endif
148 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
149     defined(TARGET_IS_MSP432P4XX_NEXT)
150 #define ROM_ADC14_setComparatorWindowValue                                    \
151         ((bool (*)(uint32_t window,                                           \
152                    int16_t low,                                               \
153                    int16_t high))ROM_ADC14TABLE[15])
154 #endif
155 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
156     defined(TARGET_IS_MSP432P4XX_NEXT)
157 #define ROM_ADC14_setResultFormat                                             \
158         ((bool (*)(uint32_t resultFormat))ROM_ADC14TABLE[16])
159 #endif
160 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
161     defined(TARGET_IS_MSP432P4XX_NEXT)
162 #define ROM_ADC14_getResult                                                   \
163         ((uint_fast16_t (*)(uint32_t memorySelect))ROM_ADC14TABLE[17])
164 #endif
165 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
166     defined(TARGET_IS_MSP432P4XX_NEXT)
167 #define ROM_ADC14_getMultiSequenceResult                                      \
168         ((void (*)(uint16_t* res))ROM_ADC14TABLE[18])
169 #endif
170 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
171     defined(TARGET_IS_MSP432P4XX_NEXT)
172 #define ROM_ADC14_getResultArray                                              \
173         ((void (*)(uint32_t memoryStart,                                      \
174                    uint32_t memoryEnd,                                        \
175                    uint16_t* res))ROM_ADC14TABLE[19])
176 #endif
177 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
178     defined(TARGET_IS_MSP432P4XX_NEXT)
179 #define ROM_ADC14_enableReferenceBurst                                        \
180         ((bool (*)(void))ROM_ADC14TABLE[20])
181 #endif
182 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
183     defined(TARGET_IS_MSP432P4XX_NEXT)
184 #define ROM_ADC14_disableReferenceBurst                                       \
185         ((bool (*)(void))ROM_ADC14TABLE[21])
186 #endif
187 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
188     defined(TARGET_IS_MSP432P4XX_NEXT)
189 #define ROM_ADC14_setPowerMode                                                \
190         ((bool (*)(uint32_t powerMode))ROM_ADC14TABLE[22])
191 #endif
192 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
193     defined(TARGET_IS_MSP432P4XX_NEXT)
194 #define ROM_ADC14_enableInterrupt                                             \
195         ((void (*)(uint_fast64_t mask))ROM_ADC14TABLE[23])
196 #endif
197 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
198     defined(TARGET_IS_MSP432P4XX_NEXT)
199 #define ROM_ADC14_disableInterrupt                                            \
200         ((void (*)(uint_fast64_t mask))ROM_ADC14TABLE[24])
201 #endif
202 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
203     defined(TARGET_IS_MSP432P4XX_NEXT)
204 #define ROM_ADC14_getInterruptStatus                                          \
205         ((uint_fast64_t (*)(void))ROM_ADC14TABLE[25])
206 #endif
207 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
208     defined(TARGET_IS_MSP432P4XX_NEXT)
209 #define ROM_ADC14_getEnabledInterruptStatus                                   \
210         ((uint_fast64_t (*)(void))ROM_ADC14TABLE[26])
211 #endif
212 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
213     defined(TARGET_IS_MSP432P4XX_NEXT)
214 #define ROM_ADC14_clearInterruptFlag                                          \
215         ((void (*)(uint_fast64_t mask))ROM_ADC14TABLE[27])
216 #endif
217 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
218     defined(TARGET_IS_MSP432P4XX_NEXT)
219 #define ROM_ADC14_toggleConversionTrigger                                     \
220         ((bool (*)(void))ROM_ADC14TABLE[28])
221 #endif
222 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
223     defined(TARGET_IS_MSP432P4XX_NEXT)
224 #define ROM_ADC14_enableSampleTimer                                           \
225         ((bool (*)(uint32_t multiSampleConvert))ROM_ADC14TABLE[29])
226 #endif
227 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
228     defined(TARGET_IS_MSP432P4XX_NEXT)
229 #define ROM_ADC14_disableSampleTimer                                          \
230         ((bool (*)(void))ROM_ADC14TABLE[30])
231 #endif
232 
233 //*****************************************************************************
234 //
235 // Macros for calling ROM functions in the AES256 API.
236 //
237 //*****************************************************************************
238 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
239     defined(TARGET_IS_MSP432P4XX_NEXT)
240 #define ROM_AES256_setCipherKey                                               \
241         ((bool (*)(uint32_t moduleInstance,                                   \
242                    const uint8_t *cipherKey,                                  \
243                    uint_fast16_t keyLength))ROM_AES256TABLE[0])
244 #endif
245 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
246     defined(TARGET_IS_MSP432P4XX_NEXT)
247 #define ROM_AES256_encryptData                                                \
248         ((void (*)(uint32_t moduleInstance,                                   \
249                    const uint8_t *data,                                       \
250                    uint8_t *encryptedData))ROM_AES256TABLE[1])
251 #endif
252 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
253     defined(TARGET_IS_MSP432P4XX_NEXT)
254 #define ROM_AES256_decryptData                                                \
255         ((void (*)(uint32_t moduleInstance,                                   \
256                    const uint8_t *data,                                       \
257                    uint8_t *decryptedData))ROM_AES256TABLE[2])
258 #endif
259 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
260     defined(TARGET_IS_MSP432P4XX_NEXT)
261 #define ROM_AES256_setDecipherKey                                             \
262         ((bool (*)(uint32_t moduleInstance,                                   \
263                    const uint8_t *cipherKey,                                  \
264                    uint_fast16_t keyLength))ROM_AES256TABLE[3])
265 #endif
266 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
267     defined(TARGET_IS_MSP432P4XX_NEXT)
268 #define ROM_AES256_reset                                                      \
269         ((void (*)(uint32_t moduleInstance))ROM_AES256TABLE[4])
270 #endif
271 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
272     defined(TARGET_IS_MSP432P4XX_NEXT)
273 #define ROM_AES256_startEncryptData                                           \
274         ((void (*)(uint32_t moduleInstance,                                   \
275                    const uint8_t *data))ROM_AES256TABLE[5])
276 #endif
277 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
278     defined(TARGET_IS_MSP432P4XX_NEXT)
279 #define ROM_AES256_startDecryptData                                           \
280         ((void (*)(uint32_t moduleInstance,                                   \
281                    const uint8_t *data))ROM_AES256TABLE[6])
282 #endif
283 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
284     defined(TARGET_IS_MSP432P4XX_NEXT)
285 #define ROM_AES256_startSetDecipherKey                                        \
286         ((bool (*)(uint32_t moduleInstance,                                   \
287                    const uint8_t *cipherKey,                                  \
288                    uint_fast16_t keyLength))ROM_AES256TABLE[7])
289 #endif
290 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
291     defined(TARGET_IS_MSP432P4XX_NEXT)
292 #define ROM_AES256_getDataOut                                                 \
293         ((bool (*)(uint32_t moduleInstance,                                   \
294                    uint8_t *outputData))ROM_AES256TABLE[8])
295 #endif
296 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
297     defined(TARGET_IS_MSP432P4XX_NEXT)
298 #define ROM_AES256_isBusy                                                     \
299         ((bool (*)(uint32_t moduleInstance))ROM_AES256TABLE[9])
300 #endif
301 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
302     defined(TARGET_IS_MSP432P4XX_NEXT)
303 #define ROM_AES256_clearErrorFlag                                             \
304         ((void (*)(uint32_t moduleInstance))ROM_AES256TABLE[10])
305 #endif
306 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
307     defined(TARGET_IS_MSP432P4XX_NEXT)
308 #define ROM_AES256_getErrorFlagStatus                                         \
309         ((uint32_t (*)(uint32_t moduleInstance))ROM_AES256TABLE[11])
310 #endif
311 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
312     defined(TARGET_IS_MSP432P4XX_NEXT)
313 #define ROM_AES256_clearInterruptFlag                                         \
314         ((void (*)(uint32_t moduleInstance))ROM_AES256TABLE[12])
315 #endif
316 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
317     defined(TARGET_IS_MSP432P4XX_NEXT)
318 #define ROM_AES256_getInterruptStatus                                         \
319         ((uint32_t (*)(uint32_t moduleInstance))ROM_AES256TABLE[13])
320 #endif
321 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
322     defined(TARGET_IS_MSP432P4XX_NEXT)
323 #define ROM_AES256_enableInterrupt                                            \
324         ((void (*)(uint32_t moduleInstance))ROM_AES256TABLE[14])
325 #endif
326 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
327     defined(TARGET_IS_MSP432P4XX_NEXT)
328 #define ROM_AES256_disableInterrupt                                           \
329         ((void (*)(uint32_t moduleInstance))ROM_AES256TABLE[15])
330 #endif
331 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
332     defined(TARGET_IS_MSP432P4XX_NEXT)
333 #define ROM_AES256_getInterruptFlagStatus                                     \
334         ((uint32_t (*)(uint32_t moduleInstance))ROM_AES256TABLE[18])
335 #endif
336 
337 //*****************************************************************************
338 //
339 // Macros for calling ROM functions in the Comp API.
340 //
341 //*****************************************************************************
342 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
343     defined(TARGET_IS_MSP432P4XX_NEXT)
344 #define ROM_COMP_E_initModule                                                 \
345         ((bool (*)(uint32_t comparator,                                       \
346                    const COMP_E_Config *config))ROM_COMPTABLE[0])
347 #endif
348 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
349     defined(TARGET_IS_MSP432P4XX_NEXT)
350 #define ROM_COMP_E_setReferenceVoltage                                        \
351         ((void (*)(uint32_t comparator,                                       \
352                    uint_fast16_t supplyVoltageReferenceBase,                  \
353                    uint_fast16_t lowerLimitSupplyVoltageFractionOf32,         \
354                    uint_fast16_t upperLimitSupplyVoltageFractionOf32))ROM_COMPTABLE[1])
355 #endif
356 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
357     defined(TARGET_IS_MSP432P4XX_NEXT)
358 #define ROM_COMP_E_setReferenceAccuracy                                       \
359         ((void (*)(uint32_t comparator,                                       \
360                    uint_fast16_t referenceAccuracy))ROM_COMPTABLE[2])
361 #endif
362 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
363     defined(TARGET_IS_MSP432P4XX_NEXT)
364 #define ROM_COMP_E_setPowerMode                                               \
365         ((void (*)(uint32_t comparator,                                       \
366                    uint_fast16_t powerMode))ROM_COMPTABLE[3])
367 #endif
368 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
369     defined(TARGET_IS_MSP432P4XX_NEXT)
370 #define ROM_COMP_E_enableModule                                               \
371         ((void (*)(uint32_t comparator))ROM_COMPTABLE[4])
372 #endif
373 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
374     defined(TARGET_IS_MSP432P4XX_NEXT)
375 #define ROM_COMP_E_disableModule                                              \
376         ((void (*)(uint32_t comparator))ROM_COMPTABLE[5])
377 #endif
378 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
379     defined(TARGET_IS_MSP432P4XX_NEXT)
380 #define ROM_COMP_E_shortInputs                                                \
381         ((void (*)(uint32_t comparator))ROM_COMPTABLE[6])
382 #endif
383 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
384     defined(TARGET_IS_MSP432P4XX_NEXT)
385 #define ROM_COMP_E_unshortInputs                                              \
386         ((void (*)(uint32_t comparator))ROM_COMPTABLE[7])
387 #endif
388 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
389     defined(TARGET_IS_MSP432P4XX_NEXT)
390 #define ROM_COMP_E_disableInputBuffer                                         \
391         ((void (*)(uint32_t comparator,                                       \
392                    uint_fast16_t inputPort))ROM_COMPTABLE[8])
393 #endif
394 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
395     defined(TARGET_IS_MSP432P4XX_NEXT)
396 #define ROM_COMP_E_enableInputBuffer                                          \
397         ((void (*)(uint32_t comparator,                                       \
398                    uint_fast16_t inputPort))ROM_COMPTABLE[9])
399 #endif
400 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
401     defined(TARGET_IS_MSP432P4XX_NEXT)
402 #define ROM_COMP_E_swapIO                                                     \
403         ((void (*)(uint32_t comparator))ROM_COMPTABLE[10])
404 #endif
405 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
406     defined(TARGET_IS_MSP432P4XX_NEXT)
407 #define ROM_COMP_E_outputValue                                                \
408         ((uint8_t (*)(uint32_t comparator))ROM_COMPTABLE[11])
409 #endif
410 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
411     defined(TARGET_IS_MSP432P4XX_NEXT)
412 #define ROM_COMP_E_enableInterrupt                                            \
413         ((void (*)(uint32_t comparator,                                       \
414                    uint_fast16_t mask))ROM_COMPTABLE[12])
415 #endif
416 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
417     defined(TARGET_IS_MSP432P4XX_NEXT)
418 #define ROM_COMP_E_disableInterrupt                                           \
419         ((void (*)(uint32_t comparator,                                       \
420                    uint_fast16_t mask))ROM_COMPTABLE[13])
421 #endif
422 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
423     defined(TARGET_IS_MSP432P4XX_NEXT)
424 #define ROM_COMP_E_clearInterruptFlag                                         \
425         ((void (*)(uint32_t comparator,                                       \
426                    uint_fast16_t mask))ROM_COMPTABLE[14])
427 #endif
428 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
429     defined(TARGET_IS_MSP432P4XX_NEXT)
430 #define ROM_COMP_E_getInterruptStatus                                         \
431         ((uint_fast16_t (*)(uint32_t comparator))ROM_COMPTABLE[15])
432 #endif
433 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
434     defined(TARGET_IS_MSP432P4XX_NEXT)
435 #define ROM_COMP_E_getEnabledInterruptStatus                                  \
436         ((uint_fast16_t (*)(uint32_t comparator))ROM_COMPTABLE[16])
437 #endif
438 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
439     defined(TARGET_IS_MSP432P4XX_NEXT)
440 #define ROM_COMP_E_setInterruptEdgeDirection                                  \
441         ((void (*)(uint32_t comparator,                                       \
442                    uint_fast8_t edgeDirection))ROM_COMPTABLE[17])
443 #endif
444 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
445     defined(TARGET_IS_MSP432P4XX_NEXT)
446 #define ROM_COMP_E_toggleInterruptEdgeDirection                               \
447         ((void (*)(uint32_t comparator))ROM_COMPTABLE[18])
448 #endif
449 
450 //*****************************************************************************
451 //
452 // Macros for calling ROM functions in the CRC32 API.
453 //
454 //*****************************************************************************
455 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
456     defined(TARGET_IS_MSP432P4XX_NEXT)
457 #define ROM_CRC32_setSeed                                                     \
458         ((void (*)(uint32_t seed,                                             \
459                    uint_fast8_t crcType))ROM_CRC32TABLE[0])
460 #endif
461 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
462     defined(TARGET_IS_MSP432P4XX_NEXT)
463 #define ROM_CRC32_set8BitData                                                 \
464         ((void (*)(uint8_t dataIn,                                            \
465                    uint_fast8_t crcType))ROM_CRC32TABLE[1])
466 #endif
467 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
468     defined(TARGET_IS_MSP432P4XX_NEXT)
469 #define ROM_CRC32_set16BitData                                                \
470         ((void (*)(uint16_t dataIn,                                           \
471                    uint_fast8_t crcType))ROM_CRC32TABLE[2])
472 #endif
473 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
474     defined(TARGET_IS_MSP432P4XX_NEXT)
475 #define ROM_CRC32_set32BitData                                                \
476         ((void (*)(uint32_t dataIn))ROM_CRC32TABLE[3])
477 #endif
478 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
479     defined(TARGET_IS_MSP432P4XX_NEXT)
480 #define ROM_CRC32_set8BitDataReversed                                         \
481         ((void (*)(uint8_t dataIn,                                            \
482                    uint_fast8_t crcType))ROM_CRC32TABLE[4])
483 #endif
484 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
485     defined(TARGET_IS_MSP432P4XX_NEXT)
486 #define ROM_CRC32_set16BitDataReversed                                        \
487         ((void (*)(uint16_t dataIn,                                           \
488                    uint_fast8_t crcType))ROM_CRC32TABLE[5])
489 #endif
490 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
491     defined(TARGET_IS_MSP432P4XX_NEXT)
492 #define ROM_CRC32_set32BitDataReversed                                        \
493         ((void (*)(uint32_t dataIn))ROM_CRC32TABLE[6])
494 #endif
495 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
496     defined(TARGET_IS_MSP432P4XX_NEXT)
497 #define ROM_CRC32_getResult                                                   \
498         ((uint32_t (*)(uint_fast8_t crcType))ROM_CRC32TABLE[7])
499 #endif
500 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
501     defined(TARGET_IS_MSP432P4XX_NEXT)
502 #define ROM_CRC32_getResultReversed                                           \
503         ((uint32_t (*)(uint_fast8_t crcType))ROM_CRC32TABLE[8])
504 #endif
505 
506 //*****************************************************************************
507 //
508 // Macros for calling ROM functions in the CS API.
509 //
510 //*****************************************************************************
511 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
512     defined(TARGET_IS_MSP432P4XX_NEXT)
513 #define ROM_CS_initClockSignal                                                \
514         ((void (*)(uint32_t selectedClockSignal,                              \
515                    uint32_t clockSource,                                      \
516                    uint32_t clockSourceDivider))ROM_CSTABLE[0])
517 #endif
518 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
519     defined(TARGET_IS_MSP432P4XX_NEXT)
520 #define ROM_CS_setReferenceOscillatorFrequency                                \
521         ((void (*)(uint8_t referenceFrequency))ROM_CSTABLE[1])
522 #endif
523 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
524     defined(TARGET_IS_MSP432P4XX_NEXT)
525 #define ROM_CS_enableClockRequest                                             \
526         ((void (*)(uint32_t selectClock))ROM_CSTABLE[2])
527 #endif
528 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
529     defined(TARGET_IS_MSP432P4XX_NEXT)
530 #define ROM_CS_disableClockRequest                                            \
531         ((void (*)(uint32_t selectClock))ROM_CSTABLE[3])
532 #endif
533 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
534     defined(TARGET_IS_MSP432P4XX_NEXT)
535 #define ROM_CS_setDCOCenteredFrequency                                        \
536         ((void (*)(uint32_t dcoFreq))ROM_CSTABLE[4])
537 #endif
538 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
539     defined(TARGET_IS_MSP432P4XX_NEXT)
540 #define ROM_CS_tuneDCOFrequency                                               \
541         ((void (*)(int16_t tuneParameter))ROM_CSTABLE[5])
542 #endif
543 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
544     defined(TARGET_IS_MSP432P4XX_NEXT)
545 #define ROM_CS_enableDCOExternalResistor                                      \
546         ((void (*)(void))ROM_CSTABLE[6])
547 #endif
548 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
549     defined(TARGET_IS_MSP432P4XX_NEXT)
550 #define ROM_CS_disableDCOExternalResistor                                     \
551         ((void (*)(void))ROM_CSTABLE[7])
552 #endif
553 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
554     defined(TARGET_IS_MSP432P4XX_NEXT)
555 #define ROM_CS_enableInterrupt                                                \
556         ((void (*)(uint32_t flags))ROM_CSTABLE[8])
557 #endif
558 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
559     defined(TARGET_IS_MSP432P4XX_NEXT)
560 #define ROM_CS_disableInterrupt                                               \
561         ((void (*)(uint32_t flags))ROM_CSTABLE[9])
562 #endif
563 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
564     defined(TARGET_IS_MSP432P4XX_NEXT)
565 #define ROM_CS_getEnabledInterruptStatus                                      \
566         ((uint32_t (*)(void))ROM_CSTABLE[10])
567 #endif
568 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
569     defined(TARGET_IS_MSP432P4XX_NEXT)
570 #define ROM_CS_getInterruptStatus                                             \
571         ((uint32_t (*)(void))ROM_CSTABLE[11])
572 #endif
573 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
574     defined(TARGET_IS_MSP432P4XX_NEXT)
575 #define ROM_CS_setDCOFrequency                                                \
576         ((void (*)(uint32_t dcoFrequency))ROM_CSTABLE[12])
577 #endif
578 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
579     defined(TARGET_IS_MSP432P4XX_NEXT)
580 #define ROM_CS_getDCOFrequency                                                \
581         ((uint32_t (*)(void))ROM_CSTABLE[13])
582 #endif
583 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
584     defined(TARGET_IS_MSP432P4XX_NEXT)
585 #define ROM_CS_enableFaultCounter                                             \
586         ((void (*)(uint_fast8_t counterSelect))ROM_CSTABLE[14])
587 #endif
588 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
589     defined(TARGET_IS_MSP432P4XX_NEXT)
590 #define ROM_CS_disableFaultCounter                                            \
591         ((void (*)(uint_fast8_t counterSelect))ROM_CSTABLE[15])
592 #endif
593 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
594     defined(TARGET_IS_MSP432P4XX_NEXT)
595 #define ROM_CS_resetFaultCounter                                              \
596         ((void (*)(uint_fast8_t counterSelect))ROM_CSTABLE[16])
597 #endif
598 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
599     defined(TARGET_IS_MSP432P4XX_NEXT)
600 #define ROM_CS_startFaultCounter                                              \
601         ((void (*)(uint_fast8_t counterSelect,                                \
602                    uint_fast8_t countValue))ROM_CSTABLE[17])
603 #endif
604 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
605     defined(TARGET_IS_MSP432P4XX_NEXT)
606 #define ROM_CS_clearInterruptFlag                                             \
607         ((void (*)(uint32_t flags))ROM_CSTABLE[20])
608 #endif
609 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
610     defined(TARGET_IS_MSP432P4XX_NEXT)
611 #define ROM_CS_setDCOExternalResistorCalibration                              \
612         ((void (*)(uint_fast8_t uiCalData,                                    \
613                    uint_fast8_t freqRange))ROM_CSTABLE[31])
614 #endif
615 
616 //*****************************************************************************
617 //
618 // Macros for calling ROM functions in the DMA API.
619 //
620 //*****************************************************************************
621 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
622     defined(TARGET_IS_MSP432P4XX_NEXT)
623 #define ROM_DMA_enableModule                                                  \
624         ((void (*)(void))ROM_DMATABLE[0])
625 #endif
626 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
627     defined(TARGET_IS_MSP432P4XX_NEXT)
628 #define ROM_DMA_disableModule                                                 \
629         ((void (*)(void))ROM_DMATABLE[1])
630 #endif
631 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
632     defined(TARGET_IS_MSP432P4XX_NEXT)
633 #define ROM_DMA_getErrorStatus                                                \
634         ((uint32_t (*)(void))ROM_DMATABLE[2])
635 #endif
636 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
637     defined(TARGET_IS_MSP432P4XX_NEXT)
638 #define ROM_DMA_clearErrorStatus                                              \
639         ((void (*)(void))ROM_DMATABLE[3])
640 #endif
641 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
642     defined(TARGET_IS_MSP432P4XX_NEXT)
643 #define ROM_DMA_enableChannel                                                 \
644         ((void (*)(uint32_t channelNum))ROM_DMATABLE[4])
645 #endif
646 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
647     defined(TARGET_IS_MSP432P4XX_NEXT)
648 #define ROM_DMA_disableChannel                                                \
649         ((void (*)(uint32_t channelNum))ROM_DMATABLE[5])
650 #endif
651 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
652     defined(TARGET_IS_MSP432P4XX_NEXT)
653 #define ROM_DMA_isChannelEnabled                                              \
654         ((bool (*)(uint32_t channelNum))ROM_DMATABLE[6])
655 #endif
656 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
657     defined(TARGET_IS_MSP432P4XX_NEXT)
658 #define ROM_DMA_setControlBase                                                \
659         ((void (*)(void *controlTable))ROM_DMATABLE[7])
660 #endif
661 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
662     defined(TARGET_IS_MSP432P4XX_NEXT)
663 #define ROM_DMA_getControlBase                                                \
664         ((void* (*)(void))ROM_DMATABLE[8])
665 #endif
666 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
667     defined(TARGET_IS_MSP432P4XX_NEXT)
668 #define ROM_DMA_getControlAlternateBase                                       \
669         ((void* (*)(void))ROM_DMATABLE[9])
670 #endif
671 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
672     defined(TARGET_IS_MSP432P4XX_NEXT)
673 #define ROM_DMA_requestChannel                                                \
674         ((void (*)(uint32_t channelNum))ROM_DMATABLE[10])
675 #endif
676 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
677     defined(TARGET_IS_MSP432P4XX_NEXT)
678 #define ROM_DMA_enableChannelAttribute                                        \
679         ((void (*)(uint32_t channelNum,                                       \
680                    uint32_t attr))ROM_DMATABLE[11])
681 #endif
682 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
683     defined(TARGET_IS_MSP432P4XX_NEXT)
684 #define ROM_DMA_disableChannelAttribute                                       \
685         ((void (*)(uint32_t channelNum,                                       \
686                    uint32_t attr))ROM_DMATABLE[12])
687 #endif
688 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
689     defined(TARGET_IS_MSP432P4XX_NEXT)
690 #define ROM_DMA_getChannelAttribute                                           \
691         ((uint32_t (*)(uint32_t channelNum))ROM_DMATABLE[13])
692 #endif
693 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
694     defined(TARGET_IS_MSP432P4XX_NEXT)
695 #define ROM_DMA_setChannelControl                                             \
696         ((void (*)(uint32_t channelStructIndex,                               \
697                    uint32_t control))ROM_DMATABLE[14])
698 #endif
699 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
700     defined(TARGET_IS_MSP432P4XX_NEXT)
701 #define ROM_DMA_setChannelTransfer                                            \
702         ((void (*)(uint32_t channelStructIndex,                               \
703                    uint32_t mode,                                             \
704                    void *srcAddr,                                             \
705                    void *dstAddr,                                             \
706                    uint32_t transferSize))ROM_DMATABLE[15])
707 #endif
708 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
709     defined(TARGET_IS_MSP432P4XX_NEXT)
710 #define ROM_DMA_setChannelScatterGather                                       \
711         ((void (*)(uint32_t channelNum,                                       \
712                    uint32_t taskCount,                                        \
713                    void *taskList,                                            \
714                    uint32_t isPeriphSG))ROM_DMATABLE[16])
715 #endif
716 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
717     defined(TARGET_IS_MSP432P4XX_NEXT)
718 #define ROM_DMA_getChannelSize                                                \
719         ((uint32_t (*)(uint32_t channelStructIndex))ROM_DMATABLE[17])
720 #endif
721 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
722     defined(TARGET_IS_MSP432P4XX_NEXT)
723 #define ROM_DMA_getChannelMode                                                \
724         ((uint32_t (*)(uint32_t channelStructIndex))ROM_DMATABLE[18])
725 #endif
726 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
727     defined(TARGET_IS_MSP432P4XX_NEXT)
728 #define ROM_DMA_assignChannel                                                 \
729         ((void (*)(uint32_t mapping))ROM_DMATABLE[19])
730 #endif
731 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
732     defined(TARGET_IS_MSP432P4XX_NEXT)
733 #define ROM_DMA_requestSoftwareTransfer                                       \
734         ((void (*)(uint32_t channel))ROM_DMATABLE[20])
735 #endif
736 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
737     defined(TARGET_IS_MSP432P4XX_NEXT)
738 #define ROM_DMA_assignInterrupt                                               \
739         ((void (*)(uint32_t interruptNumber,                                  \
740                    uint32_t channel))ROM_DMATABLE[21])
741 #endif
742 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
743     defined(TARGET_IS_MSP432P4XX_NEXT)
744 #define ROM_DMA_enableInterrupt                                               \
745         ((void (*)(uint32_t interruptNumber))ROM_DMATABLE[22])
746 #endif
747 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
748     defined(TARGET_IS_MSP432P4XX_NEXT)
749 #define ROM_DMA_disableInterrupt                                              \
750         ((void (*)(uint32_t interruptNumber))ROM_DMATABLE[23])
751 #endif
752 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
753     defined(TARGET_IS_MSP432P4XX_NEXT)
754 #define ROM_DMA_getInterruptStatus                                            \
755         ((uint32_t (*)(void))ROM_DMATABLE[24])
756 #endif
757 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
758     defined(TARGET_IS_MSP432P4XX_NEXT)
759 #define ROM_DMA_clearInterruptFlag                                            \
760         ((void (*)(uint32_t intChannel))ROM_DMATABLE[25])
761 #endif
762 
763 //*****************************************************************************
764 //
765 // Macros for calling ROM functions in the Flash API.
766 //
767 //*****************************************************************************
768 #if defined(TARGET_IS_MSP432P4XX)
769 #define ROM_FlashCtl_enableReadBuffering                                      \
770         ((void (*)(uint_fast8_t memoryBank,                                   \
771                    uint_fast8_t accessMethod))ROM_FLASHCTLTABLE[2])
772 #endif
773 #if defined(TARGET_IS_MSP432P4XX)
774 #define ROM_FlashCtl_disableReadBuffering                                     \
775         ((void (*)(uint_fast8_t memoryBank,                                   \
776                    uint_fast8_t accessMethod))ROM_FLASHCTLTABLE[3])
777 #endif
778 #if defined(TARGET_IS_MSP432P4XX)
779 #define ROM_FlashCtl_unprotectSector                                          \
780         ((bool (*)(uint_fast8_t memorySpace,                                  \
781                    uint32_t sectorMask))ROM_FLASHCTLTABLE[4])
782 #endif
783 #if defined(TARGET_IS_MSP432P4XX)
784 #define ROM_FlashCtl_protectSector                                            \
785         ((bool (*)(uint_fast8_t memorySpace,                                  \
786                    uint32_t sectorMask))ROM_FLASHCTLTABLE[5])
787 #endif
788 #if defined(TARGET_IS_MSP432P4XX)
789 #define ROM_FlashCtl_isSectorProtected                                        \
790         ((bool (*)(uint_fast8_t memorySpace,                                  \
791                    uint32_t sector))ROM_FLASHCTLTABLE[6])
792 #endif
793 #if defined(TARGET_IS_MSP432P4XX)
794 #define ROM_FlashCtl_verifyMemory                                             \
795         ((bool (*)(void* verifyAddr,                                          \
796                    uint32_t length,                                           \
797                    uint_fast8_t pattern))ROM_FLASHCTLTABLE[7])
798 #endif
799 #if defined(TARGET_IS_MSP432P4XX)
800 #define ROM_FlashCtl_performMassErase                                         \
801         ((bool (*)(void))ROM_FLASHCTLTABLE[8])
802 #endif
803 #if defined(TARGET_IS_MSP432P4XX)
804 #define ROM_FlashCtl_eraseSector                                              \
805         ((bool (*)(uint32_t addr))ROM_FLASHCTLTABLE[9])
806 #endif
807 #if defined(TARGET_IS_MSP432P4XX)
808 #define ROM_FlashCtl_programMemory                                            \
809         ((bool (*)(void* src,                                                 \
810                    void* dest,                                                \
811                    uint32_t length))ROM_FLASHCTLTABLE[10])
812 #endif
813 #if defined(TARGET_IS_MSP432P4XX)
814 #define ROM_FlashCtl_setProgramVerification                                   \
815         ((void (*)(uint32_t verificationSetting))ROM_FLASHCTLTABLE[11])
816 #endif
817 #if defined(TARGET_IS_MSP432P4XX)
818 #define ROM_FlashCtl_clearProgramVerification                                 \
819         ((void (*)(uint32_t verificationSetting))ROM_FLASHCTLTABLE[12])
820 #endif
821 #if defined(TARGET_IS_MSP432P4XX)
822 #define ROM_FlashCtl_enableWordProgramming                                    \
823         ((void (*)(uint32_t mode))ROM_FLASHCTLTABLE[13])
824 #endif
825 #if defined(TARGET_IS_MSP432P4XX)
826 #define ROM_FlashCtl_disableWordProgramming                                   \
827         ((void (*)(void))ROM_FLASHCTLTABLE[14])
828 #endif
829 #if defined(TARGET_IS_MSP432P4XX)
830 #define ROM_FlashCtl_isWordProgrammingEnabled                                 \
831         ((uint32_t (*)(void))ROM_FLASHCTLTABLE[15])
832 #endif
833 #if defined(TARGET_IS_MSP432P4XX)
834 #define ROM_FlashCtl_enableInterrupt                                          \
835         ((void (*)(uint32_t flags))ROM_FLASHCTLTABLE[16])
836 #endif
837 #if defined(TARGET_IS_MSP432P4XX)
838 #define ROM_FlashCtl_disableInterrupt                                         \
839         ((void (*)(uint32_t flags))ROM_FLASHCTLTABLE[17])
840 #endif
841 #if defined(TARGET_IS_MSP432P4XX)
842 #define ROM_FlashCtl_getEnabledInterruptStatus                                \
843         ((uint32_t (*)(void))ROM_FLASHCTLTABLE[18])
844 #endif
845 #if defined(TARGET_IS_MSP432P4XX)
846 #define ROM_FlashCtl_getInterruptStatus                                       \
847         ((uint32_t (*)(void))ROM_FLASHCTLTABLE[19])
848 #endif
849 #if defined(TARGET_IS_MSP432P4XX)
850 #define ROM_FlashCtl_clearInterruptFlag                                       \
851         ((void (*)(uint32_t flags))ROM_FLASHCTLTABLE[20])
852 #endif
853 #if defined(TARGET_IS_MSP432P4XX)
854 #define ROM_FlashCtl_setWaitState                                             \
855         ((void (*)(uint32_t bank,                                             \
856                    uint32_t waitState))ROM_FLASHCTLTABLE[21])
857 #endif
858 #if defined(TARGET_IS_MSP432P4XX)
859 #define ROM_FlashCtl_getWaitState                                             \
860         ((uint32_t (*)(uint32_t bank))ROM_FLASHCTLTABLE[22])
861 #endif
862 #if defined(TARGET_IS_MSP432P4XX)
863 #define ROM_FlashCtl_setReadMode                                              \
864         ((bool (*)(uint32_t flashBank,                                        \
865                    uint32_t readMode))ROM_FLASHCTLTABLE[23])
866 #endif
867 #if defined(TARGET_IS_MSP432P4XX)
868 #define ROM_FlashCtl_getReadMode                                              \
869         ((uint32_t (*)(uint32_t flashBank))ROM_FLASHCTLTABLE[24])
870 #endif
871 #if defined(TARGET_IS_MSP432P4XX)
872 #define ROM___FlashCtl_remaskData8Post                                        \
873         ((uint8_t (*)(uint8_t data,                                           \
874                       uint32_t addr))ROM_FLASHCTLTABLE[27])
875 #endif
876 #if defined(TARGET_IS_MSP432P4XX)
877 #define ROM___FlashCtl_remaskData8Pre                                         \
878         ((uint8_t (*)(uint8_t data,                                           \
879                       uint32_t addr))ROM_FLASHCTLTABLE[28])
880 #endif
881 #if defined(TARGET_IS_MSP432P4XX)
882 #define ROM___FlashCtl_remaskData32Pre                                        \
883         ((uint32_t (*)(uint32_t data,                                         \
884                        uint32_t addr))ROM_FLASHCTLTABLE[29])
885 #endif
886 #if defined(TARGET_IS_MSP432P4XX)
887 #define ROM___FlashCtl_remaskData32Post                                       \
888         ((uint32_t (*)(uint32_t data,                                         \
889                        uint32_t addr))ROM_FLASHCTLTABLE[30])
890 #endif
891 #if defined(TARGET_IS_MSP432P4XX)
892 #define ROM___FlashCtl_remaskBurstDataPre                                     \
893         ((void (*)(uint32_t addr,                                             \
894                    uint32_t size))ROM_FLASHCTLTABLE[31])
895 #endif
896 #if defined(TARGET_IS_MSP432P4XX)
897 #define ROM___FlashCtl_remaskBurstDataPost                                    \
898         ((void (*)(uint32_t addr,                                             \
899                    uint32_t size))ROM_FLASHCTLTABLE[32])
900 #endif
901 #if defined(TARGET_IS_MSP432P4XX)
902 #define ROM_FlashCtl_initiateSectorErase                                      \
903         ((void (*)(uint32_t addr))ROM_FLASHCTLTABLE[33])
904 #endif
905 #if defined(TARGET_IS_MSP432P4XX)
906 #define ROM_FlashCtl_initiateMassErase                                        \
907         ((void (*)(void))ROM_FLASHCTLTABLE[34])
908 #endif
909 
910 //*****************************************************************************
911 //
912 // Macros for calling ROM functions in the FPU API.
913 //
914 //*****************************************************************************
915 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
916     defined(TARGET_IS_MSP432P4XX_NEXT)
917 #define ROM_FPU_enableModule                                                  \
918         ((void (*)(void))ROM_FPUTABLE[0])
919 #endif
920 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
921     defined(TARGET_IS_MSP432P4XX_NEXT)
922 #define ROM_FPU_disableModule                                                 \
923         ((void (*)(void))ROM_FPUTABLE[1])
924 #endif
925 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
926     defined(TARGET_IS_MSP432P4XX_NEXT)
927 #define ROM_FPU_enableStacking                                                \
928         ((void (*)(void))ROM_FPUTABLE[2])
929 #endif
930 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
931     defined(TARGET_IS_MSP432P4XX_NEXT)
932 #define ROM_FPU_enableLazyStacking                                            \
933         ((void (*)(void))ROM_FPUTABLE[3])
934 #endif
935 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
936     defined(TARGET_IS_MSP432P4XX_NEXT)
937 #define ROM_FPU_disableStacking                                               \
938         ((void (*)(void))ROM_FPUTABLE[4])
939 #endif
940 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
941     defined(TARGET_IS_MSP432P4XX_NEXT)
942 #define ROM_FPU_setHalfPrecisionMode                                          \
943         ((void (*)(uint32_t mode))ROM_FPUTABLE[5])
944 #endif
945 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
946     defined(TARGET_IS_MSP432P4XX_NEXT)
947 #define ROM_FPU_setNaNMode                                                    \
948         ((void (*)(uint32_t mode))ROM_FPUTABLE[6])
949 #endif
950 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
951     defined(TARGET_IS_MSP432P4XX_NEXT)
952 #define ROM_FPU_setFlushToZeroMode                                            \
953         ((void (*)(uint32_t mode))ROM_FPUTABLE[7])
954 #endif
955 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
956     defined(TARGET_IS_MSP432P4XX_NEXT)
957 #define ROM_FPU_setRoundingMode                                               \
958         ((void (*)(uint32_t mode))ROM_FPUTABLE[8])
959 #endif
960 
961 //*****************************************************************************
962 //
963 // Macros for calling ROM functions in the GPIO API.
964 //
965 //*****************************************************************************
966 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
967     defined(TARGET_IS_MSP432P4XX_NEXT)
968 #define ROM_GPIO_setAsOutputPin                                               \
969         ((void (*)(uint_fast8_t selectedPort,                                 \
970                    uint_fast16_t selectedPins))ROM_GPIOTABLE[0])
971 #endif
972 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
973     defined(TARGET_IS_MSP432P4XX_NEXT)
974 #define ROM_GPIO_setOutputHighOnPin                                           \
975         ((void (*)(uint_fast8_t selectedPort,                                 \
976                    uint_fast16_t selectedPins))ROM_GPIOTABLE[1])
977 #endif
978 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
979     defined(TARGET_IS_MSP432P4XX_NEXT)
980 #define ROM_GPIO_setOutputLowOnPin                                            \
981         ((void (*)(uint_fast8_t selectedPort,                                 \
982                    uint_fast16_t selectedPins))ROM_GPIOTABLE[2])
983 #endif
984 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
985     defined(TARGET_IS_MSP432P4XX_NEXT)
986 #define ROM_GPIO_toggleOutputOnPin                                            \
987         ((void (*)(uint_fast8_t selectedPort,                                 \
988                    uint_fast16_t selectedPins))ROM_GPIOTABLE[3])
989 #endif
990 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
991     defined(TARGET_IS_MSP432P4XX_NEXT)
992 #define ROM_GPIO_setAsInputPinWithPullDownResistor                            \
993         ((void (*)(uint_fast8_t selectedPort,                                 \
994                    uint_fast16_t selectedPins))ROM_GPIOTABLE[4])
995 #endif
996 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
997     defined(TARGET_IS_MSP432P4XX_NEXT)
998 #define ROM_GPIO_setAsInputPinWithPullUpResistor                              \
999         ((void (*)(uint_fast8_t selectedPort,                                 \
1000                    uint_fast16_t selectedPins))ROM_GPIOTABLE[5])
1001 #endif
1002 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1003     defined(TARGET_IS_MSP432P4XX_NEXT)
1004 #define ROM_GPIO_setAsPeripheralModuleFunctionOutputPin                       \
1005         ((void (*)( uint_fast8_t selectedPort,                                \
1006                    uint_fast16_t selectedPins,                                \
1007                    uint_fast8_t mode))ROM_GPIOTABLE[6])
1008 #endif
1009 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1010     defined(TARGET_IS_MSP432P4XX_NEXT)
1011 #define ROM_GPIO_setAsPeripheralModuleFunctionInputPin                        \
1012         ((void (*)( uint_fast8_t selectedPort,                                \
1013                    uint_fast16_t selectedPins,                                \
1014                    uint_fast8_t mode))ROM_GPIOTABLE[7])
1015 #endif
1016 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1017     defined(TARGET_IS_MSP432P4XX_NEXT)
1018 #define ROM_GPIO_getInputPinValue                                             \
1019         ((uint8_t (*)(uint_fast8_t selectedPort,                              \
1020                       uint_fast16_t selectedPins))ROM_GPIOTABLE[8])
1021 #endif
1022 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1023     defined(TARGET_IS_MSP432P4XX_NEXT)
1024 #define ROM_GPIO_interruptEdgeSelect                                          \
1025         ((void (*)(uint_fast8_t selectedPort,                                 \
1026                    uint_fast16_t selectedPins,                                \
1027                    uint_fast8_t edgeSelect))ROM_GPIOTABLE[9])
1028 #endif
1029 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1030     defined(TARGET_IS_MSP432P4XX_NEXT)
1031 #define ROM_GPIO_enableInterrupt                                              \
1032         ((void (*)(uint_fast8_t selectedPort,                                 \
1033                    uint_fast16_t selectedPins))ROM_GPIOTABLE[10])
1034 #endif
1035 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1036     defined(TARGET_IS_MSP432P4XX_NEXT)
1037 #define ROM_GPIO_disableInterrupt                                             \
1038         ((void (*)(uint_fast8_t selectedPort,                                 \
1039                    uint_fast16_t selectedPins))ROM_GPIOTABLE[11])
1040 #endif
1041 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1042     defined(TARGET_IS_MSP432P4XX_NEXT)
1043 #define ROM_GPIO_getInterruptStatus                                           \
1044         ((uint_fast16_t (*)(uint_fast8_t selectedPort,                        \
1045                             uint_fast16_t selectedPins))ROM_GPIOTABLE[12])
1046 #endif
1047 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1048     defined(TARGET_IS_MSP432P4XX_NEXT)
1049 #define ROM_GPIO_clearInterruptFlag                                           \
1050         ((void (*)(uint_fast8_t selectedPort,                                 \
1051                    uint_fast16_t selectedPins))ROM_GPIOTABLE[13])
1052 #endif
1053 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1054     defined(TARGET_IS_MSP432P4XX_NEXT)
1055 #define ROM_GPIO_setAsInputPin                                                \
1056         ((void (*)(uint_fast8_t selectedPort,                                 \
1057                    uint_fast16_t selectedPins))ROM_GPIOTABLE[14])
1058 #endif
1059 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1060     defined(TARGET_IS_MSP432P4XX_NEXT)
1061 #define ROM_GPIO_getEnabledInterruptStatus                                    \
1062         ((uint_fast16_t (*)(uint_fast8_t selectedPort))ROM_GPIOTABLE[15])
1063 #endif
1064 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1065     defined(TARGET_IS_MSP432P4XX_NEXT)
1066 #define ROM_GPIO_setDriveStrengthHigh                                         \
1067         ((void (*)(uint_fast8_t selectedPort,                                 \
1068                    uint_fast8_t selectedPins))ROM_GPIOTABLE[16])
1069 #endif
1070 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1071     defined(TARGET_IS_MSP432P4XX_NEXT)
1072 #define ROM_GPIO_setDriveStrengthLow                                          \
1073         ((void (*)(uint_fast8_t selectedPort,                                 \
1074                    uint_fast8_t selectedPins))ROM_GPIOTABLE[17])
1075 #endif
1076 
1077 //*****************************************************************************
1078 //
1079 // Macros for calling ROM functions in the I2C API.
1080 //
1081 //*****************************************************************************
1082 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1083     defined(TARGET_IS_MSP432P4XX_NEXT)
1084 #define ROM_I2C_initMaster                                                    \
1085         ((void (*)(uint32_t moduleInstance,                                   \
1086                    const eUSCI_I2C_MasterConfig *config))ROM_I2CTABLE[0])
1087 #endif
1088 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1089     defined(TARGET_IS_MSP432P4XX_NEXT)
1090 #define ROM_I2C_initSlave                                                     \
1091         ((void (*)(uint32_t moduleInstance,                                   \
1092                    uint_fast16_t slaveAddress,                                \
1093                    uint_fast8_t slaveAddressOffset,                           \
1094                    uint32_t slaveOwnAddressEnable))ROM_I2CTABLE[1])
1095 #endif
1096 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1097     defined(TARGET_IS_MSP432P4XX_NEXT)
1098 #define ROM_I2C_enableModule                                                  \
1099         ((void (*)(uint32_t moduleInstance))ROM_I2CTABLE[2])
1100 #endif
1101 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1102     defined(TARGET_IS_MSP432P4XX_NEXT)
1103 #define ROM_I2C_disableModule                                                 \
1104         ((void (*)(uint32_t moduleInstance))ROM_I2CTABLE[3])
1105 #endif
1106 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1107     defined(TARGET_IS_MSP432P4XX_NEXT)
1108 #define ROM_I2C_setSlaveAddress                                               \
1109         ((void (*)(uint32_t moduleInstance,                                   \
1110                    uint_fast16_t slaveAddress))ROM_I2CTABLE[4])
1111 #endif
1112 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1113     defined(TARGET_IS_MSP432P4XX_NEXT)
1114 #define ROM_I2C_setMode                                                       \
1115         ((void (*)(uint32_t moduleInstance,                                   \
1116                    uint_fast8_t mode))ROM_I2CTABLE[5])
1117 #endif
1118 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1119     defined(TARGET_IS_MSP432P4XX_NEXT)
1120 #define ROM_I2C_slavePutData                                                  \
1121         ((void (*)(uint32_t moduleInstance,                                   \
1122                    uint8_t transmitData))ROM_I2CTABLE[6])
1123 #endif
1124 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1125     defined(TARGET_IS_MSP432P4XX_NEXT)
1126 #define ROM_I2C_slaveGetData                                                  \
1127         ((uint8_t (*)(uint32_t moduleInstance))ROM_I2CTABLE[7])
1128 #endif
1129 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1130     defined(TARGET_IS_MSP432P4XX_NEXT)
1131 #define ROM_I2C_isBusBusy                                                     \
1132         ((uint8_t (*)(uint32_t moduleInstance))ROM_I2CTABLE[8])
1133 #endif
1134 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1135     defined(TARGET_IS_MSP432P4XX_NEXT)
1136 #define ROM_I2C_masterSendSingleByte                                          \
1137         ((void (*)(uint32_t moduleInstance,                                   \
1138                    uint8_t txData))ROM_I2CTABLE[9])
1139 #endif
1140 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1141     defined(TARGET_IS_MSP432P4XX_NEXT)
1142 #define ROM_I2C_masterSendMultiByteNext                                       \
1143         ((void (*)(uint32_t moduleInstance,                                   \
1144                    uint8_t txData))ROM_I2CTABLE[13])
1145 #endif
1146 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1147     defined(TARGET_IS_MSP432P4XX_NEXT)
1148 #define ROM_I2C_masterSendMultiByteNextWithTimeout                            \
1149         ((bool (*)(uint32_t moduleInstance,                                   \
1150                    uint8_t txData,                                            \
1151                    uint32_t timeout))ROM_I2CTABLE[14])
1152 #endif
1153 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1154     defined(TARGET_IS_MSP432P4XX_NEXT)
1155 #define ROM_I2C_masterSendMultiByteStop                                       \
1156         ((void (*)(uint32_t moduleInstance))ROM_I2CTABLE[17])
1157 #endif
1158 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1159     defined(TARGET_IS_MSP432P4XX_NEXT)
1160 #define ROM_I2C_masterSendMultiByteStopWithTimeout                            \
1161         ((bool (*)(uint32_t moduleInstance,                                   \
1162                    uint32_t timeout))ROM_I2CTABLE[18])
1163 #endif
1164 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1165     defined(TARGET_IS_MSP432P4XX_NEXT)
1166 #define ROM_I2C_masterReceiveStart                                            \
1167         ((void (*)(uint32_t moduleInstance))ROM_I2CTABLE[19])
1168 #endif
1169 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1170     defined(TARGET_IS_MSP432P4XX_NEXT)
1171 #define ROM_I2C_masterReceiveMultiByteNext                                    \
1172         ((uint8_t (*)(uint32_t moduleInstance))ROM_I2CTABLE[20])
1173 #endif
1174 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1175     defined(TARGET_IS_MSP432P4XX_NEXT)
1176 #define ROM_I2C_masterReceiveMultiByteFinish                                  \
1177         ((uint8_t (*)(uint32_t moduleInstance))ROM_I2CTABLE[21])
1178 #endif
1179 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1180     defined(TARGET_IS_MSP432P4XX_NEXT)
1181 #define ROM_I2C_masterReceiveMultiByteFinishWithTimeout                       \
1182         ((bool (*)(uint32_t moduleInstance,                                   \
1183                    uint8_t *txData,                                           \
1184                    uint32_t timeout))ROM_I2CTABLE[22])
1185 #endif
1186 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1187     defined(TARGET_IS_MSP432P4XX_NEXT)
1188 #define ROM_I2C_masterReceiveMultiByteStop                                    \
1189         ((void (*)(uint32_t moduleInstance))ROM_I2CTABLE[23])
1190 #endif
1191 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1192     defined(TARGET_IS_MSP432P4XX_NEXT)
1193 #define ROM_I2C_masterReceiveSingleByte                                       \
1194         ((uint8_t (*)(uint32_t moduleInstance))ROM_I2CTABLE[24])
1195 #endif
1196 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1197     defined(TARGET_IS_MSP432P4XX_NEXT)
1198 #define ROM_I2C_masterReceiveSingle                                           \
1199         ((uint8_t (*)(uint32_t moduleInstance))ROM_I2CTABLE[25])
1200 #endif
1201 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1202     defined(TARGET_IS_MSP432P4XX_NEXT)
1203 #define ROM_I2C_getReceiveBufferAddressForDMA                                 \
1204         ((uint32_t (*)(uint32_t moduleInstance))ROM_I2CTABLE[26])
1205 #endif
1206 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1207     defined(TARGET_IS_MSP432P4XX_NEXT)
1208 #define ROM_I2C_getTransmitBufferAddressForDMA                                \
1209         ((uint32_t (*)(uint32_t moduleInstance))ROM_I2CTABLE[27])
1210 #endif
1211 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1212     defined(TARGET_IS_MSP432P4XX_NEXT)
1213 #define ROM_I2C_masterIsStopSent                                              \
1214         ((uint8_t (*)(uint32_t moduleInstance))ROM_I2CTABLE[28])
1215 #endif
1216 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1217     defined(TARGET_IS_MSP432P4XX_NEXT)
1218 #define ROM_I2C_masterIsStartSent                                             \
1219         ((bool (*)(uint32_t moduleInstance))ROM_I2CTABLE[29])
1220 #endif
1221 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1222     defined(TARGET_IS_MSP432P4XX_NEXT)
1223 #define ROM_I2C_masterSendStart                                               \
1224         ((void (*)(uint32_t moduleInstance))ROM_I2CTABLE[30])
1225 #endif
1226 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1227     defined(TARGET_IS_MSP432P4XX_NEXT)
1228 #define ROM_I2C_enableMultiMasterMode                                         \
1229         ((void (*)(uint32_t moduleInstance))ROM_I2CTABLE[31])
1230 #endif
1231 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1232     defined(TARGET_IS_MSP432P4XX_NEXT)
1233 #define ROM_I2C_disableMultiMasterMode                                        \
1234         ((void (*)(uint32_t moduleInstance))ROM_I2CTABLE[32])
1235 #endif
1236 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1237     defined(TARGET_IS_MSP432P4XX_NEXT)
1238 #define ROM_I2C_enableInterrupt                                               \
1239         ((void (*)(uint32_t moduleInstance,                                   \
1240                    uint_fast16_t mask))ROM_I2CTABLE[33])
1241 #endif
1242 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1243     defined(TARGET_IS_MSP432P4XX_NEXT)
1244 #define ROM_I2C_disableInterrupt                                              \
1245         ((void (*)(uint32_t moduleInstance,                                   \
1246                    uint_fast16_t mask))ROM_I2CTABLE[34])
1247 #endif
1248 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1249     defined(TARGET_IS_MSP432P4XX_NEXT)
1250 #define ROM_I2C_clearInterruptFlag                                            \
1251         ((void (*)(uint32_t moduleInstance,                                   \
1252                    uint_fast16_t mask))ROM_I2CTABLE[35])
1253 #endif
1254 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1255     defined(TARGET_IS_MSP432P4XX_NEXT)
1256 #define ROM_I2C_getInterruptStatus                                            \
1257         ((uint_fast16_t (*)(uint32_t moduleInstance,                          \
1258                             uint16_t mask))ROM_I2CTABLE[36])
1259 #endif
1260 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1261     defined(TARGET_IS_MSP432P4XX_NEXT)
1262 #define ROM_I2C_getEnabledInterruptStatus                                     \
1263         ((uint_fast16_t (*)(uint32_t moduleInstance))ROM_I2CTABLE[37])
1264 #endif
1265 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1266     defined(TARGET_IS_MSP432P4XX_NEXT)
1267 #define ROM_I2C_getMode                                                       \
1268         ((uint_fast8_t (*)(uint32_t moduleInstance))ROM_I2CTABLE[38])
1269 #endif
1270 #if defined(TARGET_IS_MSP432P4XX_NEXT)
1271 #define ROM_I2C_slaveSendNAK                                                  \
1272         ((void (*)(uint32_t moduleInstance))ROM_I2CTABLE[41])
1273 #endif
1274 
1275 //*****************************************************************************
1276 //
1277 // Macros for calling ROM functions in the Interrupt API.
1278 //
1279 //*****************************************************************************
1280 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1281     defined(TARGET_IS_MSP432P4XX_NEXT)
1282 #define ROM_Interrupt_enableMaster                                            \
1283         ((bool (*)(void))ROM_INTTABLE[0])
1284 #endif
1285 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1286     defined(TARGET_IS_MSP432P4XX_NEXT)
1287 #define ROM_Interrupt_disableMaster                                           \
1288         ((bool (*)(void))ROM_INTTABLE[1])
1289 #endif
1290 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1291     defined(TARGET_IS_MSP432P4XX_NEXT)
1292 #define ROM_Interrupt_setPriorityGrouping                                     \
1293         ((void (*)(uint32_t bits))ROM_INTTABLE[2])
1294 #endif
1295 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1296     defined(TARGET_IS_MSP432P4XX_NEXT)
1297 #define ROM_Interrupt_getPriorityGrouping                                     \
1298         ((uint32_t (*)(void))ROM_INTTABLE[3])
1299 #endif
1300 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1301     defined(TARGET_IS_MSP432P4XX_NEXT)
1302 #define ROM_Interrupt_setPriority                                             \
1303         ((void (*)(uint32_t interruptNumber,                                  \
1304                    uint8_t priority))ROM_INTTABLE[4])
1305 #endif
1306 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1307     defined(TARGET_IS_MSP432P4XX_NEXT)
1308 #define ROM_Interrupt_getPriority                                             \
1309         ((uint8_t (*)(uint32_t interruptNumber))ROM_INTTABLE[5])
1310 #endif
1311 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1312     defined(TARGET_IS_MSP432P4XX_NEXT)
1313 #define ROM_Interrupt_enableInterrupt                                         \
1314         ((void (*)(uint32_t interruptNumber))ROM_INTTABLE[6])
1315 #endif
1316 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1317     defined(TARGET_IS_MSP432P4XX_NEXT)
1318 #define ROM_Interrupt_disableInterrupt                                        \
1319         ((void (*)(uint32_t interruptNumber))ROM_INTTABLE[7])
1320 #endif
1321 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1322     defined(TARGET_IS_MSP432P4XX_NEXT)
1323 #define ROM_Interrupt_isEnabled                                               \
1324         ((bool (*)(uint32_t interruptNumber))ROM_INTTABLE[8])
1325 #endif
1326 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1327     defined(TARGET_IS_MSP432P4XX_NEXT)
1328 #define ROM_Interrupt_pendInterrupt                                           \
1329         ((void (*)(uint32_t interruptNumber))ROM_INTTABLE[9])
1330 #endif
1331 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1332     defined(TARGET_IS_MSP432P4XX_NEXT)
1333 #define ROM_Interrupt_setPriorityMask                                         \
1334         ((void (*)(uint8_t priorityMask))ROM_INTTABLE[10])
1335 #endif
1336 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1337     defined(TARGET_IS_MSP432P4XX_NEXT)
1338 #define ROM_Interrupt_getPriorityMask                                         \
1339         ((uint8_t (*)(void))ROM_INTTABLE[11])
1340 #endif
1341 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1342     defined(TARGET_IS_MSP432P4XX_NEXT)
1343 #define ROM_Interrupt_setVectorTableAddress                                   \
1344         ((void (*)(uint32_t addr))ROM_INTTABLE[12])
1345 #endif
1346 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1347     defined(TARGET_IS_MSP432P4XX_NEXT)
1348 #define ROM_Interrupt_getVectorTableAddress                                   \
1349         ((uint32_t (*)(void))ROM_INTTABLE[13])
1350 #endif
1351 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1352     defined(TARGET_IS_MSP432P4XX_NEXT)
1353 #define ROM_Interrupt_enableSleepOnIsrExit                                    \
1354         ((void (*)(void))ROM_INTTABLE[14])
1355 #endif
1356 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1357     defined(TARGET_IS_MSP432P4XX_NEXT)
1358 #define ROM_Interrupt_disableSleepOnIsrExit                                   \
1359         ((void (*)(void))ROM_INTTABLE[15])
1360 #endif
1361 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1362     defined(TARGET_IS_MSP432P4XX_NEXT)
1363 #define ROM_Interrupt_unpendInterrupt                                         \
1364         ((void (*)(uint32_t interruptNumber))ROM_INTTABLE[18])
1365 #endif
1366 
1367 //*****************************************************************************
1368 //
1369 // Macros for calling ROM functions in the MPU API.
1370 //
1371 //*****************************************************************************
1372 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1373     defined(TARGET_IS_MSP432P4XX_NEXT)
1374 #define ROM_MPU_enableModule                                                  \
1375         ((void (*)(uint32_t mpuConfig))ROM_MPUTABLE[0])
1376 #endif
1377 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1378     defined(TARGET_IS_MSP432P4XX_NEXT)
1379 #define ROM_MPU_disableModule                                                 \
1380         ((void (*)(void))ROM_MPUTABLE[1])
1381 #endif
1382 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1383     defined(TARGET_IS_MSP432P4XX_NEXT)
1384 #define ROM_MPU_getRegionCount                                                \
1385         ((uint32_t (*)(void))ROM_MPUTABLE[2])
1386 #endif
1387 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1388     defined(TARGET_IS_MSP432P4XX_NEXT)
1389 #define ROM_MPU_enableRegion                                                  \
1390         ((void (*)(uint32_t region))ROM_MPUTABLE[3])
1391 #endif
1392 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1393     defined(TARGET_IS_MSP432P4XX_NEXT)
1394 #define ROM_MPU_disableRegion                                                 \
1395         ((void (*)(uint32_t region))ROM_MPUTABLE[4])
1396 #endif
1397 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1398     defined(TARGET_IS_MSP432P4XX_NEXT)
1399 #define ROM_MPU_setRegion                                                     \
1400         ((void (*)(uint32_t region,                                           \
1401                    uint32_t addr,                                             \
1402                    uint32_t flags))ROM_MPUTABLE[5])
1403 #endif
1404 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1405     defined(TARGET_IS_MSP432P4XX_NEXT)
1406 #define ROM_MPU_getRegion                                                     \
1407         ((void (*)(uint32_t region,                                           \
1408                    uint32_t *addr,                                            \
1409                    uint32_t *pflags))ROM_MPUTABLE[6])
1410 #endif
1411 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1412     defined(TARGET_IS_MSP432P4XX_NEXT)
1413 #define ROM_MPU_enableInterrupt                                               \
1414         ((void (*)(void))ROM_MPUTABLE[7])
1415 #endif
1416 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1417     defined(TARGET_IS_MSP432P4XX_NEXT)
1418 #define ROM_MPU_disableInterrupt                                              \
1419         ((void (*)(void))ROM_MPUTABLE[8])
1420 #endif
1421 
1422 //*****************************************************************************
1423 //
1424 // Macros for calling ROM functions in the PCM API.
1425 //
1426 //*****************************************************************************
1427 #if defined(TARGET_IS_MSP432P4XX)
1428 #define ROM_PCM_setCoreVoltageLevel                                           \
1429         ((bool (*)(uint_fast8_t voltageLevel))ROM_PCMTABLE[0])
1430 #endif
1431 #if defined(TARGET_IS_MSP432P4XX)
1432 #define ROM_PCM_getCoreVoltageLevel                                           \
1433         ((uint8_t (*)(void))ROM_PCMTABLE[1])
1434 #endif
1435 #if defined(TARGET_IS_MSP432P4XX)
1436 #define ROM_PCM_setCoreVoltageLevelWithTimeout                                \
1437         ((bool (*)(uint_fast8_t voltageLevel,                                 \
1438                    uint32_t timeOut))ROM_PCMTABLE[2])
1439 #endif
1440 #if defined(TARGET_IS_MSP432P4XX)
1441 #define ROM_PCM_setPowerMode                                                  \
1442         ((bool (*)(uint_fast8_t powerMode))ROM_PCMTABLE[3])
1443 #endif
1444 #if defined(TARGET_IS_MSP432P4XX)
1445 #define ROM_PCM_setPowerModeWithTimeout                                       \
1446         ((bool (*)(uint_fast8_t powerMode,                                    \
1447                    uint32_t timeOut))ROM_PCMTABLE[4])
1448 #endif
1449 #if defined(TARGET_IS_MSP432P4XX)
1450 #define ROM_PCM_getPowerMode                                                  \
1451         ((uint8_t (*)(void))ROM_PCMTABLE[5])
1452 #endif
1453 #if defined(TARGET_IS_MSP432P4XX)
1454 #define ROM_PCM_setPowerState                                                 \
1455         ((bool (*)(uint_fast8_t powerState))ROM_PCMTABLE[6])
1456 #endif
1457 #if defined(TARGET_IS_MSP432P4XX)
1458 #define ROM_PCM_setPowerStateWithTimeout                                      \
1459         ((bool (*)(uint_fast8_t powerState,                                   \
1460                    uint32_t timeout))ROM_PCMTABLE[7])
1461 #endif
1462 #if defined(TARGET_IS_MSP432P4XX)
1463 #define ROM_PCM_getPowerState                                                 \
1464         ((uint8_t (*)(void))ROM_PCMTABLE[8])
1465 #endif
1466 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1467     defined(TARGET_IS_MSP432P4XX_NEXT)
1468 #define ROM_PCM_shutdownDevice                                                \
1469         ((bool (*)(uint32_t shutdownMode))ROM_PCMTABLE[9])
1470 #endif
1471 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1472     defined(TARGET_IS_MSP432P4XX_NEXT)
1473 #define ROM_PCM_gotoLPM0                                                      \
1474         ((bool (*)(void))ROM_PCMTABLE[10])
1475 #endif
1476 #if defined(TARGET_IS_MSP432P4XX)
1477 #define ROM_PCM_gotoLPM3                                                      \
1478         ((bool (*)(void))ROM_PCMTABLE[11])
1479 #endif
1480 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1481     defined(TARGET_IS_MSP432P4XX_NEXT)
1482 #define ROM_PCM_enableInterrupt                                               \
1483         ((void (*)(uint32_t flags))ROM_PCMTABLE[12])
1484 #endif
1485 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1486     defined(TARGET_IS_MSP432P4XX_NEXT)
1487 #define ROM_PCM_disableInterrupt                                              \
1488         ((void (*)(uint32_t flags))ROM_PCMTABLE[13])
1489 #endif
1490 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1491     defined(TARGET_IS_MSP432P4XX_NEXT)
1492 #define ROM_PCM_getInterruptStatus                                            \
1493         ((uint32_t (*)(void))ROM_PCMTABLE[14])
1494 #endif
1495 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1496     defined(TARGET_IS_MSP432P4XX_NEXT)
1497 #define ROM_PCM_getEnabledInterruptStatus                                     \
1498         ((uint32_t (*)(void))ROM_PCMTABLE[15])
1499 #endif
1500 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1501     defined(TARGET_IS_MSP432P4XX_NEXT)
1502 #define ROM_PCM_clearInterruptFlag                                            \
1503         ((void (*)(uint32_t flags))ROM_PCMTABLE[16])
1504 #endif
1505 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1506     defined(TARGET_IS_MSP432P4XX_NEXT)
1507 #define ROM_PCM_enableRudeMode                                                \
1508         ((void (*)(void))ROM_PCMTABLE[17])
1509 #endif
1510 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1511     defined(TARGET_IS_MSP432P4XX_NEXT)
1512 #define ROM_PCM_disableRudeMode                                               \
1513         ((void (*)(void))ROM_PCMTABLE[18])
1514 #endif
1515 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1516     defined(TARGET_IS_MSP432P4XX_NEXT)
1517 #define ROM_PCM_gotoLPM0InterruptSafe                                         \
1518         ((bool (*)(void))ROM_PCMTABLE[19])
1519 #endif
1520 #if defined(TARGET_IS_MSP432P4XX)
1521 #define ROM_PCM_gotoLPM3InterruptSafe                                         \
1522         ((bool (*)(void))ROM_PCMTABLE[20])
1523 #endif
1524 #if defined(TARGET_IS_MSP432P4XX)
1525 #define ROM_PCM_setCoreVoltageLevelNonBlocking                                \
1526         ((bool (*)(uint_fast8_t voltageLevel))ROM_PCMTABLE[23])
1527 #endif
1528 #if defined(TARGET_IS_MSP432P4XX)
1529 #define ROM_PCM_setPowerModeNonBlocking                                       \
1530         ((bool (*)(uint_fast8_t powerMode))ROM_PCMTABLE[24])
1531 #endif
1532 #if defined(TARGET_IS_MSP432P4XX)
1533 #define ROM_PCM_setPowerStateNonBlocking                                      \
1534         ((bool (*)(uint_fast8_t powerState))ROM_PCMTABLE[25])
1535 #endif
1536 #if defined(TARGET_IS_MSP432P4XX)
1537 #define ROM_PCM_gotoLPM4                                                      \
1538         ((bool (*)(void))ROM_PCMTABLE[26])
1539 #endif
1540 #if defined(TARGET_IS_MSP432P4XX)
1541 #define ROM_PCM_gotoLPM4InterruptSafe                                         \
1542         ((bool (*)(void))ROM_PCMTABLE[27])
1543 #endif
1544 
1545 //*****************************************************************************
1546 //
1547 // Macros for calling ROM functions in the PMAP API.
1548 //
1549 //*****************************************************************************
1550 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1551     defined(TARGET_IS_MSP432P4XX_NEXT)
1552 #define ROM_PMAP_configurePorts                                               \
1553         ((void (*)(const uint8_t *portMapping,                                \
1554                    uint8_t pxMAPy,                                            \
1555                    uint8_t numberOfPorts,                                     \
1556                    uint8_t portMapReconfigure))ROM_PMAPTABLE[0])
1557 #endif
1558 
1559 //*****************************************************************************
1560 //
1561 // Macros for calling ROM functions in the PSS API.
1562 //
1563 //*****************************************************************************
1564 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1565     defined(TARGET_IS_MSP432P4XX_NEXT)
1566 #define ROM_PSS_enableHighSidePinToggle                                       \
1567         ((void (*)(bool activeLow))ROM_PSSTABLE[0])
1568 #endif
1569 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1570     defined(TARGET_IS_MSP432P4XX_NEXT)
1571 #define ROM_PSS_disableHighSidePinToggle                                      \
1572         ((void (*)(void))ROM_PSSTABLE[1])
1573 #endif
1574 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1575     defined(TARGET_IS_MSP432P4XX_NEXT)
1576 #define ROM_PSS_enableHighSide                                                \
1577         ((void (*)(void))ROM_PSSTABLE[2])
1578 #endif
1579 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1580     defined(TARGET_IS_MSP432P4XX_NEXT)
1581 #define ROM_PSS_disableHighSide                                               \
1582         ((void (*)(void))ROM_PSSTABLE[3])
1583 #endif
1584 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1585     defined(TARGET_IS_MSP432P4XX_NEXT)
1586 #define ROM_PSS_setHighSidePerformanceMode                                    \
1587         ((void (*)(uint_fast8_t powerMode))ROM_PSSTABLE[6])
1588 #endif
1589 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1590     defined(TARGET_IS_MSP432P4XX_NEXT)
1591 #define ROM_PSS_getHighSidePerformanceMode                                    \
1592         ((uint_fast8_t (*)(void))ROM_PSSTABLE[7])
1593 #endif
1594 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1595     defined(TARGET_IS_MSP432P4XX_NEXT)
1596 #define ROM_PSS_enableHighSideMonitor                                         \
1597         ((void (*)(void))ROM_PSSTABLE[10])
1598 #endif
1599 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1600     defined(TARGET_IS_MSP432P4XX_NEXT)
1601 #define ROM_PSS_disableHighSideMonitor                                        \
1602         ((void (*)(void))ROM_PSSTABLE[11])
1603 #endif
1604 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1605     defined(TARGET_IS_MSP432P4XX_NEXT)
1606 #define ROM_PSS_setHighSideVoltageTrigger                                     \
1607         ((void (*)(uint_fast8_t triggerVoltage))ROM_PSSTABLE[12])
1608 #endif
1609 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1610     defined(TARGET_IS_MSP432P4XX_NEXT)
1611 #define ROM_PSS_getHighSideVoltageTrigger                                     \
1612         ((uint_fast8_t (*)(void))ROM_PSSTABLE[13])
1613 #endif
1614 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1615     defined(TARGET_IS_MSP432P4XX_NEXT)
1616 #define ROM_PSS_enableInterrupt                                               \
1617         ((void (*)(void))ROM_PSSTABLE[14])
1618 #endif
1619 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1620     defined(TARGET_IS_MSP432P4XX_NEXT)
1621 #define ROM_PSS_disableInterrupt                                              \
1622         ((void (*)(void))ROM_PSSTABLE[15])
1623 #endif
1624 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1625     defined(TARGET_IS_MSP432P4XX_NEXT)
1626 #define ROM_PSS_getInterruptStatus                                            \
1627         ((uint32_t (*)(void))ROM_PSSTABLE[16])
1628 #endif
1629 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1630     defined(TARGET_IS_MSP432P4XX_NEXT)
1631 #define ROM_PSS_clearInterruptFlag                                            \
1632         ((void (*)(void))ROM_PSSTABLE[17])
1633 #endif
1634 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1635     defined(TARGET_IS_MSP432P4XX_NEXT)
1636 #define ROM_PSS_enableForcedDCDCOperation                                     \
1637         ((void (*)(void))ROM_PSSTABLE[20])
1638 #endif
1639 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1640     defined(TARGET_IS_MSP432P4XX_NEXT)
1641 #define ROM_PSS_disableForcedDCDCOperation                                    \
1642         ((void (*)(void))ROM_PSSTABLE[21])
1643 #endif
1644 
1645 //*****************************************************************************
1646 //
1647 // Macros for calling ROM functions in the Ref API.
1648 //
1649 //*****************************************************************************
1650 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1651     defined(TARGET_IS_MSP432P4XX_NEXT)
1652 #define ROM_REF_A_setReferenceVoltage                                         \
1653         ((void (*)(uint_fast8_t referenceVoltageSelect))ROM_REFTABLE[0])
1654 #endif
1655 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1656     defined(TARGET_IS_MSP432P4XX_NEXT)
1657 #define ROM_REF_A_disableTempSensor                                           \
1658         ((void (*)(void))ROM_REFTABLE[1])
1659 #endif
1660 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1661     defined(TARGET_IS_MSP432P4XX_NEXT)
1662 #define ROM_REF_A_enableTempSensor                                            \
1663         ((void (*)(void))ROM_REFTABLE[2])
1664 #endif
1665 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1666     defined(TARGET_IS_MSP432P4XX_NEXT)
1667 #define ROM_REF_A_enableReferenceVoltageOutput                                \
1668         ((void (*)(void))ROM_REFTABLE[3])
1669 #endif
1670 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1671     defined(TARGET_IS_MSP432P4XX_NEXT)
1672 #define ROM_REF_A_disableReferenceVoltageOutput                               \
1673         ((void (*)(void))ROM_REFTABLE[4])
1674 #endif
1675 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1676     defined(TARGET_IS_MSP432P4XX_NEXT)
1677 #define ROM_REF_A_enableReferenceVoltage                                      \
1678         ((void (*)(void))ROM_REFTABLE[5])
1679 #endif
1680 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1681     defined(TARGET_IS_MSP432P4XX_NEXT)
1682 #define ROM_REF_A_disableReferenceVoltage                                     \
1683         ((void (*)(void))ROM_REFTABLE[6])
1684 #endif
1685 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1686     defined(TARGET_IS_MSP432P4XX_NEXT)
1687 #define ROM_REF_A_getBandgapMode                                              \
1688         ((uint_fast8_t (*)(void))ROM_REFTABLE[7])
1689 #endif
1690 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1691     defined(TARGET_IS_MSP432P4XX_NEXT)
1692 #define ROM_REF_A_isBandgapActive                                             \
1693         ((bool (*)(void))ROM_REFTABLE[8])
1694 #endif
1695 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1696     defined(TARGET_IS_MSP432P4XX_NEXT)
1697 #define ROM_REF_A_isRefGenBusy                                                \
1698         ((bool (*)(void))ROM_REFTABLE[9])
1699 #endif
1700 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1701     defined(TARGET_IS_MSP432P4XX_NEXT)
1702 #define ROM_REF_A_isRefGenActive                                              \
1703         ((bool (*)(void))ROM_REFTABLE[10])
1704 #endif
1705 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1706     defined(TARGET_IS_MSP432P4XX_NEXT)
1707 #define ROM_REF_A_getBufferedBandgapVoltageStatus                             \
1708         ((bool (*)(void))ROM_REFTABLE[11])
1709 #endif
1710 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1711     defined(TARGET_IS_MSP432P4XX_NEXT)
1712 #define ROM_REF_A_getVariableReferenceVoltageStatus                           \
1713         ((bool (*)(void))ROM_REFTABLE[12])
1714 #endif
1715 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1716     defined(TARGET_IS_MSP432P4XX_NEXT)
1717 #define ROM_REF_A_setReferenceVoltageOneTimeTrigger                           \
1718         ((void (*)(void))ROM_REFTABLE[13])
1719 #endif
1720 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1721     defined(TARGET_IS_MSP432P4XX_NEXT)
1722 #define ROM_REF_A_setBufferedBandgapVoltageOneTimeTrigger                     \
1723         ((void (*)(void))ROM_REFTABLE[14])
1724 #endif
1725 
1726 //*****************************************************************************
1727 //
1728 // Macros for calling ROM functions in the ResetCtl API.
1729 //
1730 //*****************************************************************************
1731 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1732     defined(TARGET_IS_MSP432P4XX_NEXT)
1733 #define ROM_ResetCtl_initiateSoftReset                                        \
1734         ((void (*)(void))ROM_RESETCTLTABLE[0])
1735 #endif
1736 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1737     defined(TARGET_IS_MSP432P4XX_NEXT)
1738 #define ROM_ResetCtl_initiateSoftResetWithSource                              \
1739         ((void (*)(uint32_t source))ROM_RESETCTLTABLE[1])
1740 #endif
1741 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1742     defined(TARGET_IS_MSP432P4XX_NEXT)
1743 #define ROM_ResetCtl_getSoftResetSource                                       \
1744         ((uint32_t (*)(void))ROM_RESETCTLTABLE[2])
1745 #endif
1746 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1747     defined(TARGET_IS_MSP432P4XX_NEXT)
1748 #define ROM_ResetCtl_clearSoftResetSource                                     \
1749         ((void (*)(uint32_t mask))ROM_RESETCTLTABLE[3])
1750 #endif
1751 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1752     defined(TARGET_IS_MSP432P4XX_NEXT)
1753 #define ROM_ResetCtl_initiateHardReset                                        \
1754         ((void (*)(void))ROM_RESETCTLTABLE[4])
1755 #endif
1756 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1757     defined(TARGET_IS_MSP432P4XX_NEXT)
1758 #define ROM_ResetCtl_initiateHardResetWithSource                              \
1759         ((void (*)(uint32_t source))ROM_RESETCTLTABLE[5])
1760 #endif
1761 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1762     defined(TARGET_IS_MSP432P4XX_NEXT)
1763 #define ROM_ResetCtl_getHardResetSource                                       \
1764         ((uint32_t (*)(void))ROM_RESETCTLTABLE[6])
1765 #endif
1766 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1767     defined(TARGET_IS_MSP432P4XX_NEXT)
1768 #define ROM_ResetCtl_clearHardResetSource                                     \
1769         ((void (*)(uint32_t mask))ROM_RESETCTLTABLE[7])
1770 #endif
1771 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1772     defined(TARGET_IS_MSP432P4XX_NEXT)
1773 #define ROM_ResetCtl_getPSSSource                                             \
1774         ((uint32_t (*)(void))ROM_RESETCTLTABLE[8])
1775 #endif
1776 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1777     defined(TARGET_IS_MSP432P4XX_NEXT)
1778 #define ROM_ResetCtl_clearPSSFlags                                            \
1779         ((void (*)(void))ROM_RESETCTLTABLE[9])
1780 #endif
1781 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1782     defined(TARGET_IS_MSP432P4XX_NEXT)
1783 #define ROM_ResetCtl_getPCMSource                                             \
1784         ((uint32_t (*)(void))ROM_RESETCTLTABLE[10])
1785 #endif
1786 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1787     defined(TARGET_IS_MSP432P4XX_NEXT)
1788 #define ROM_ResetCtl_clearPCMFlags                                            \
1789         ((void (*)(void))ROM_RESETCTLTABLE[11])
1790 #endif
1791 
1792 //*****************************************************************************
1793 //
1794 // Macros for calling ROM functions in the RTC API.
1795 //
1796 //*****************************************************************************
1797 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1798     defined(TARGET_IS_MSP432P4XX_NEXT)
1799 #define ROM_RTC_C_startClock                                                  \
1800         ((void (*)(void))ROM_RTCTABLE[0])
1801 #endif
1802 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1803     defined(TARGET_IS_MSP432P4XX_NEXT)
1804 #define ROM_RTC_C_holdClock                                                   \
1805         ((void (*)(void))ROM_RTCTABLE[1])
1806 #endif
1807 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1808     defined(TARGET_IS_MSP432P4XX_NEXT)
1809 #define ROM_RTC_C_setCalibrationFrequency                                     \
1810         ((void (*)(uint_fast16_t frequencySelect))ROM_RTCTABLE[2])
1811 #endif
1812 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1813     defined(TARGET_IS_MSP432P4XX_NEXT)
1814 #define ROM_RTC_C_setCalibrationData                                          \
1815         ((void (*)(uint_fast8_t offsetDirection,                              \
1816                    uint_fast8_t offsetValue))ROM_RTCTABLE[3])
1817 #endif
1818 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1819     defined(TARGET_IS_MSP432P4XX_NEXT)
1820 #define ROM_RTC_C_setTemperatureCompensation                                  \
1821         ((bool (*)(uint_fast16_t offsetDirection,                             \
1822                    uint_fast8_t offsetValue))ROM_RTCTABLE[4])
1823 #endif
1824 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1825     defined(TARGET_IS_MSP432P4XX_NEXT)
1826 #define ROM_RTC_C_initCalendar                                                \
1827         ((void (*)(const RTC_C_Calendar *calendarTime,                        \
1828                    uint_fast16_t formatSelect))ROM_RTCTABLE[5])
1829 #endif
1830 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1831     defined(TARGET_IS_MSP432P4XX_NEXT)
1832 #define ROM_RTC_C_setCalendarAlarm                                            \
1833         ((void (*)(uint_fast8_t minutesAlarm,                                 \
1834                    uint_fast8_t hoursAlarm,                                   \
1835                    uint_fast8_t dayOfWeekAlarm,                               \
1836                    uint_fast8_t dayOfmonthAlarm))ROM_RTCTABLE[7])
1837 #endif
1838 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1839     defined(TARGET_IS_MSP432P4XX_NEXT)
1840 #define ROM_RTC_C_setCalendarEvent                                            \
1841         ((void (*)(uint_fast16_t eventSelect))ROM_RTCTABLE[8])
1842 #endif
1843 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1844     defined(TARGET_IS_MSP432P4XX_NEXT)
1845 #define ROM_RTC_C_getPrescaleValue                                            \
1846         ((uint_fast8_t (*)(uint_fast8_t prescaleSelect))ROM_RTCTABLE[10])
1847 #endif
1848 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1849     defined(TARGET_IS_MSP432P4XX_NEXT)
1850 #define ROM_RTC_C_setPrescaleValue                                            \
1851         ((void (*)(uint_fast8_t prescaleSelect,                               \
1852                    uint_fast8_t prescaleCounterValue))ROM_RTCTABLE[11])
1853 #endif
1854 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1855     defined(TARGET_IS_MSP432P4XX_NEXT)
1856 #define ROM_RTC_C_convertBCDToBinary                                          \
1857         ((uint16_t (*)(uint16_t valueToConvert))ROM_RTCTABLE[12])
1858 #endif
1859 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1860     defined(TARGET_IS_MSP432P4XX_NEXT)
1861 #define ROM_RTC_C_convertBinaryToBCD                                          \
1862         ((uint16_t (*)(uint16_t valueToConvert))ROM_RTCTABLE[13])
1863 #endif
1864 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1865     defined(TARGET_IS_MSP432P4XX_NEXT)
1866 #define ROM_RTC_C_getInterruptStatus                                          \
1867         ((uint_fast8_t (*)(void))ROM_RTCTABLE[16])
1868 #endif
1869 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1870     defined(TARGET_IS_MSP432P4XX_NEXT)
1871 #define ROM_RTC_C_getEnabledInterruptStatus                                   \
1872         ((uint_fast8_t (*)(void))ROM_RTCTABLE[17])
1873 #endif
1874 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1875     defined(TARGET_IS_MSP432P4XX_NEXT)
1876 #define ROM_RTC_C_clearInterruptFlag                                          \
1877         ((void (*)(uint_fast8_t interruptFlagMask))ROM_RTCTABLE[18])
1878 #endif
1879 
1880 //*****************************************************************************
1881 //
1882 // Macros for calling ROM functions in the SPI API.
1883 //
1884 //*****************************************************************************
1885 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1886     defined(TARGET_IS_MSP432P4XX_NEXT)
1887 #define ROM_SPI_selectFourPinFunctionality                                    \
1888         ((void (*)(uint32_t moduleInstance,                                   \
1889                    uint_fast8_t select4PinFunctionality))ROM_SPITABLE[1])
1890 #endif
1891 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1892     defined(TARGET_IS_MSP432P4XX_NEXT)
1893 #define ROM_SPI_changeMasterClock                                             \
1894         ((void (*)(uint32_t moduleInstance,                                   \
1895                    uint32_t clockSourceFrequency,                             \
1896                    uint32_t desiredSpiClock))ROM_SPITABLE[2])
1897 #endif
1898 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1899     defined(TARGET_IS_MSP432P4XX_NEXT)
1900 #define ROM_SPI_initSlave                                                     \
1901         ((bool (*)(uint32_t moduleInstance,                                   \
1902                    const eUSCI_SPI_SlaveConfig *config))ROM_SPITABLE[3])
1903 #endif
1904 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1905     defined(TARGET_IS_MSP432P4XX_NEXT)
1906 #define ROM_SPI_changeClockPhasePolarity                                      \
1907         ((void (*)(uint32_t moduleInstance,                                   \
1908                    uint_fast16_t clockPhase,                                  \
1909                    uint_fast16_t clockPolarity))ROM_SPITABLE[4])
1910 #endif
1911 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1912     defined(TARGET_IS_MSP432P4XX_NEXT)
1913 #define ROM_SPI_transmitData                                                  \
1914         ((void (*)(uint32_t moduleInstance,                                   \
1915                    uint_fast8_t transmitData))ROM_SPITABLE[5])
1916 #endif
1917 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1918     defined(TARGET_IS_MSP432P4XX_NEXT)
1919 #define ROM_SPI_receiveData                                                   \
1920         ((uint8_t (*)(uint32_t moduleInstance))ROM_SPITABLE[6])
1921 #endif
1922 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1923     defined(TARGET_IS_MSP432P4XX_NEXT)
1924 #define ROM_SPI_enableModule                                                  \
1925         ((void (*)(uint32_t moduleInstance))ROM_SPITABLE[7])
1926 #endif
1927 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1928     defined(TARGET_IS_MSP432P4XX_NEXT)
1929 #define ROM_SPI_disableModule                                                 \
1930         ((void (*)(uint32_t moduleInstance))ROM_SPITABLE[8])
1931 #endif
1932 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1933     defined(TARGET_IS_MSP432P4XX_NEXT)
1934 #define ROM_SPI_getReceiveBufferAddressForDMA                                 \
1935         ((uint32_t (*)(uint32_t moduleInstance))ROM_SPITABLE[9])
1936 #endif
1937 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1938     defined(TARGET_IS_MSP432P4XX_NEXT)
1939 #define ROM_SPI_getTransmitBufferAddressForDMA                                \
1940         ((uint32_t (*)(uint32_t moduleInstance))ROM_SPITABLE[10])
1941 #endif
1942 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1943     defined(TARGET_IS_MSP432P4XX_NEXT)
1944 #define ROM_SPI_isBusy                                                        \
1945         ((uint_fast8_t (*)(uint32_t moduleInstance))ROM_SPITABLE[11])
1946 #endif
1947 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1948     defined(TARGET_IS_MSP432P4XX_NEXT)
1949 #define ROM_SPI_enableInterrupt                                               \
1950         ((void (*)(uint32_t moduleInstance,                                   \
1951                    uint_fast8_t mask))ROM_SPITABLE[12])
1952 #endif
1953 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1954     defined(TARGET_IS_MSP432P4XX_NEXT)
1955 #define ROM_SPI_disableInterrupt                                              \
1956         ((void (*)(uint32_t moduleInstance,                                   \
1957                    uint_fast8_t mask))ROM_SPITABLE[13])
1958 #endif
1959 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1960     defined(TARGET_IS_MSP432P4XX_NEXT)
1961 #define ROM_SPI_getInterruptStatus                                            \
1962         ((uint_fast8_t (*)(uint32_t moduleInstance,                           \
1963                            uint16_t mask))ROM_SPITABLE[14])
1964 #endif
1965 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1966     defined(TARGET_IS_MSP432P4XX_NEXT)
1967 #define ROM_SPI_getEnabledInterruptStatus                                     \
1968         ((uint_fast8_t (*)(uint32_t moduleInstance))ROM_SPITABLE[15])
1969 #endif
1970 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
1971     defined(TARGET_IS_MSP432P4XX_NEXT)
1972 #define ROM_SPI_clearInterruptFlag                                            \
1973         ((void (*)(uint32_t moduleInstance,                                   \
1974                    uint_fast8_t mask))ROM_SPITABLE[16])
1975 #endif
1976 
1977 //*****************************************************************************
1978 //
1979 // Macros for calling ROM functions in the SysCtl API.
1980 //
1981 //*****************************************************************************
1982 #if defined(TARGET_IS_MSP432P4XX)
1983 #define ROM_SysCtl_getSRAMSize                                                \
1984         ((uint_least32_t (*)(void))ROM_SYSCTLTABLE[0])
1985 #endif
1986 #if defined(TARGET_IS_MSP432P4XX)
1987 #define ROM_SysCtl_getFlashSize                                               \
1988         ((uint_least32_t (*)(void))ROM_SYSCTLTABLE[1])
1989 #endif
1990 #if defined(TARGET_IS_MSP432P4XX)
1991 #define ROM_SysCtl_rebootDevice                                               \
1992         ((void (*)(void))ROM_SYSCTLTABLE[2])
1993 #endif
1994 #if defined(TARGET_IS_MSP432P4XX)
1995 #define ROM_SysCtl_enableSRAMBank                                             \
1996         ((void (*)(uint_fast8_t sramBank))ROM_SYSCTLTABLE[3])
1997 #endif
1998 #if defined(TARGET_IS_MSP432P4XX)
1999 #define ROM_SysCtl_disableSRAMBank                                            \
2000         ((void (*)(uint_fast8_t sramBank))ROM_SYSCTLTABLE[4])
2001 #endif
2002 #if defined(TARGET_IS_MSP432P4XX)
2003 #define ROM_SysCtl_enableSRAMBankRetention                                    \
2004         ((void (*)(uint_fast8_t sramBank))ROM_SYSCTLTABLE[5])
2005 #endif
2006 #if defined(TARGET_IS_MSP432P4XX)
2007 #define ROM_SysCtl_disableSRAMBankRetention                                   \
2008         ((void (*)(uint_fast8_t sramBank))ROM_SYSCTLTABLE[6])
2009 #endif
2010 #if defined(TARGET_IS_MSP432P4XX)
2011 #define ROM_SysCtl_enablePeripheralAtCPUHalt                                  \
2012         ((void (*)(uint_fast16_t devices))ROM_SYSCTLTABLE[7])
2013 #endif
2014 #if defined(TARGET_IS_MSP432P4XX)
2015 #define ROM_SysCtl_disablePeripheralAtCPUHalt                                 \
2016         ((void (*)(uint_fast16_t devices))ROM_SYSCTLTABLE[8])
2017 #endif
2018 #if defined(TARGET_IS_MSP432P4XX)
2019 #define ROM_SysCtl_setWDTTimeoutResetType                                     \
2020         ((void (*)(uint_fast8_t resetType))ROM_SYSCTLTABLE[9])
2021 #endif
2022 #if defined(TARGET_IS_MSP432P4XX)
2023 #define ROM_SysCtl_setWDTPasswordViolationResetType                           \
2024         ((void (*)(uint_fast8_t resetType))ROM_SYSCTLTABLE[10])
2025 #endif
2026 #if defined(TARGET_IS_MSP432P4XX)
2027 #define ROM_SysCtl_disableNMISource                                           \
2028         ((void (*)(uint_fast8_t flags))ROM_SYSCTLTABLE[11])
2029 #endif
2030 #if defined(TARGET_IS_MSP432P4XX)
2031 #define ROM_SysCtl_enableNMISource                                            \
2032         ((void (*)(uint_fast8_t flags))ROM_SYSCTLTABLE[12])
2033 #endif
2034 #if defined(TARGET_IS_MSP432P4XX)
2035 #define ROM_SysCtl_getTempCalibrationConstant                                 \
2036         ((uint_fast16_t (*)(uint32_t refVoltage,                              \
2037                             uint32_t temperature))ROM_SYSCTLTABLE[14])
2038 #endif
2039 #if defined(TARGET_IS_MSP432P4XX)
2040 #define ROM_SysCtl_enableGlitchFilter                                         \
2041         ((void (*)(void))ROM_SYSCTLTABLE[15])
2042 #endif
2043 #if defined(TARGET_IS_MSP432P4XX)
2044 #define ROM_SysCtl_disableGlitchFilter                                        \
2045         ((void (*)(void))ROM_SYSCTLTABLE[16])
2046 #endif
2047 #if defined(TARGET_IS_MSP432P4XX)
2048 #define ROM_SysCtl_getTLVInfo                                                 \
2049         ((void (*)(uint_fast8_t tag,                                          \
2050                    uint_fast8_t instance,                                     \
2051                    uint_fast8_t *length,                                      \
2052                    uint32_t **data_address))ROM_SYSCTLTABLE[17])
2053 #endif
2054 
2055 //*****************************************************************************
2056 //
2057 // Macros for calling ROM functions in the SysTick API.
2058 //
2059 //*****************************************************************************
2060 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2061     defined(TARGET_IS_MSP432P4XX_NEXT)
2062 #define ROM_SysTick_enableModule                                              \
2063         ((void (*)(void))ROM_SYSTICKTABLE[0])
2064 #endif
2065 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2066     defined(TARGET_IS_MSP432P4XX_NEXT)
2067 #define ROM_SysTick_disableModule                                             \
2068         ((void (*)(void))ROM_SYSTICKTABLE[1])
2069 #endif
2070 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2071     defined(TARGET_IS_MSP432P4XX_NEXT)
2072 #define ROM_SysTick_enableInterrupt                                           \
2073         ((void (*)(void))ROM_SYSTICKTABLE[2])
2074 #endif
2075 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2076     defined(TARGET_IS_MSP432P4XX_NEXT)
2077 #define ROM_SysTick_disableInterrupt                                          \
2078         ((void (*)(void))ROM_SYSTICKTABLE[3])
2079 #endif
2080 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2081     defined(TARGET_IS_MSP432P4XX_NEXT)
2082 #define ROM_SysTick_setPeriod                                                 \
2083         ((void (*)(uint32_t period))ROM_SYSTICKTABLE[4])
2084 #endif
2085 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2086     defined(TARGET_IS_MSP432P4XX_NEXT)
2087 #define ROM_SysTick_getPeriod                                                 \
2088         ((uint32_t (*)(void))ROM_SYSTICKTABLE[5])
2089 #endif
2090 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2091     defined(TARGET_IS_MSP432P4XX_NEXT)
2092 #define ROM_SysTick_getValue                                                  \
2093         ((uint32_t (*)(void))ROM_SYSTICKTABLE[6])
2094 #endif
2095 
2096 //*****************************************************************************
2097 //
2098 // Macros for calling ROM functions in the Timer_A API.
2099 //
2100 //*****************************************************************************
2101 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2102     defined(TARGET_IS_MSP432P4XX_NEXT)
2103 #define ROM_Timer_A_startCounter                                              \
2104         ((void (*)(uint32_t timer,                                            \
2105                    uint_fast16_t timerMode))ROM_TIMER_ATABLE[0])
2106 #endif
2107 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2108     defined(TARGET_IS_MSP432P4XX_NEXT)
2109 #define ROM_Timer_A_configureContinuousMode                                   \
2110         ((void (*)(uint32_t timer,                                            \
2111                    const Timer_A_ContinuousModeConfig *config))ROM_TIMER_ATABLE[1])
2112 #endif
2113 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2114     defined(TARGET_IS_MSP432P4XX_NEXT)
2115 #define ROM_Timer_A_configureUpMode                                           \
2116         ((void (*)(uint32_t timer,                                            \
2117                    const Timer_A_UpModeConfig *config))ROM_TIMER_ATABLE[2])
2118 #endif
2119 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2120     defined(TARGET_IS_MSP432P4XX_NEXT)
2121 #define ROM_Timer_A_configureUpDownMode                                       \
2122         ((void (*)(uint32_t timer,                                            \
2123                    const Timer_A_UpDownModeConfig *config))ROM_TIMER_ATABLE[3])
2124 #endif
2125 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2126     defined(TARGET_IS_MSP432P4XX_NEXT)
2127 #define ROM_Timer_A_initCapture                                               \
2128         ((void (*)(uint32_t timer,                                            \
2129                    const Timer_A_CaptureModeConfig *config))ROM_TIMER_ATABLE[4])
2130 #endif
2131 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2132     defined(TARGET_IS_MSP432P4XX_NEXT)
2133 #define ROM_Timer_A_initCompare                                               \
2134         ((void (*)(uint32_t timer,                                            \
2135                    const Timer_A_CompareModeConfig *config))ROM_TIMER_ATABLE[5])
2136 #endif
2137 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2138     defined(TARGET_IS_MSP432P4XX_NEXT)
2139 #define ROM_Timer_A_clearTimer                                                \
2140         ((void (*)(uint32_t timer))ROM_TIMER_ATABLE[6])
2141 #endif
2142 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2143     defined(TARGET_IS_MSP432P4XX_NEXT)
2144 #define ROM_Timer_A_getSynchronizedCaptureCompareInput                        \
2145         ((uint_fast8_t (*)(uint32_t timer,                                    \
2146                            uint_fast16_t captureCompareRegister,              \
2147                            uint_fast16_t synchronizedSetting))ROM_TIMER_ATABLE[7])
2148 #endif
2149 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2150     defined(TARGET_IS_MSP432P4XX_NEXT)
2151 #define ROM_Timer_A_getOutputForOutputModeOutBitValue                         \
2152         ((uint_fast8_t (*)(uint32_t timer,                                    \
2153                            uint_fast16_t captureCompareRegister))ROM_TIMER_ATABLE[8])
2154 #endif
2155 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2156     defined(TARGET_IS_MSP432P4XX_NEXT)
2157 #define ROM_Timer_A_getCaptureCompareCount                                    \
2158         ((uint_fast16_t (*)(uint32_t timer,                                   \
2159                             uint_fast16_t captureCompareRegister))ROM_TIMER_ATABLE[9])
2160 #endif
2161 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2162 #define ROM_Timer_A_setOutputForOutputModeOutBitValue                         \
2163         ((void (*)(uint32_t timer,                                            \
2164                    uint_fast16_t captureCompareRegister,                      \
2165                    uint_fast8_t outputModeOutBitValue))ROM_TIMER_ATABLE[10])
2166 #endif
2167 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2168     defined(TARGET_IS_MSP432P4XX_NEXT)
2169 #define ROM_Timer_A_generatePWM                                               \
2170         ((void (*)(uint32_t timer,                                            \
2171                    const Timer_A_PWMConfig *config))ROM_TIMER_ATABLE[11])
2172 #endif
2173 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2174     defined(TARGET_IS_MSP432P4XX_NEXT)
2175 #define ROM_Timer_A_stopTimer                                                 \
2176         ((void (*)(uint32_t timer))ROM_TIMER_ATABLE[12])
2177 #endif
2178 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2179     defined(TARGET_IS_MSP432P4XX_NEXT)
2180 #define ROM_Timer_A_setCompareValue                                           \
2181         ((void (*)(uint32_t timer,                                            \
2182                    uint_fast16_t compareRegister,                             \
2183                    uint_fast16_t compareValue))ROM_TIMER_ATABLE[13])
2184 #endif
2185 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2186     defined(TARGET_IS_MSP432P4XX_NEXT)
2187 #define ROM_Timer_A_clearInterruptFlag                                        \
2188         ((void (*)(uint32_t timer))ROM_TIMER_ATABLE[14])
2189 #endif
2190 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2191     defined(TARGET_IS_MSP432P4XX_NEXT)
2192 #define ROM_Timer_A_clearCaptureCompareInterrupt                              \
2193         ((void (*)(uint32_t timer,                                            \
2194                    uint_fast16_t captureCompareRegister))ROM_TIMER_ATABLE[15])
2195 #endif
2196 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2197     defined(TARGET_IS_MSP432P4XX_NEXT)
2198 #define ROM_Timer_A_enableInterrupt                                           \
2199         ((void (*)(uint32_t timer))ROM_TIMER_ATABLE[16])
2200 #endif
2201 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2202     defined(TARGET_IS_MSP432P4XX_NEXT)
2203 #define ROM_Timer_A_disableInterrupt                                          \
2204         ((void (*)(uint32_t timer))ROM_TIMER_ATABLE[17])
2205 #endif
2206 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2207     defined(TARGET_IS_MSP432P4XX_NEXT)
2208 #define ROM_Timer_A_getInterruptStatus                                        \
2209         ((uint32_t (*)(uint32_t timer))ROM_TIMER_ATABLE[18])
2210 #endif
2211 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2212     defined(TARGET_IS_MSP432P4XX_NEXT)
2213 #define ROM_Timer_A_getEnabledInterruptStatus                                 \
2214         ((uint32_t (*)(uint32_t timer))ROM_TIMER_ATABLE[19])
2215 #endif
2216 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2217     defined(TARGET_IS_MSP432P4XX_NEXT)
2218 #define ROM_Timer_A_enableCaptureCompareInterrupt                             \
2219         ((void (*)(uint32_t timer,                                            \
2220                    uint_fast16_t captureCompareRegister))ROM_TIMER_ATABLE[20])
2221 #endif
2222 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2223     defined(TARGET_IS_MSP432P4XX_NEXT)
2224 #define ROM_Timer_A_disableCaptureCompareInterrupt                            \
2225         ((void (*)(uint32_t timer,                                            \
2226                    uint_fast16_t captureCompareRegister))ROM_TIMER_ATABLE[21])
2227 #endif
2228 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2229     defined(TARGET_IS_MSP432P4XX_NEXT)
2230 #define ROM_Timer_A_getCaptureCompareInterruptStatus                          \
2231         ((uint32_t (*)(uint32_t timer,                                        \
2232                        uint_fast16_t captureCompareRegister,                  \
2233                        uint_fast16_t mask))ROM_TIMER_ATABLE[22])
2234 #endif
2235 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2236     defined(TARGET_IS_MSP432P4XX_NEXT)
2237 #define ROM_Timer_A_getCaptureCompareEnabledInterruptStatus                   \
2238         ((uint32_t (*)(uint32_t timer,                                        \
2239                        uint_fast16_t captureCompareRegister))ROM_TIMER_ATABLE[23])
2240 #endif
2241 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2242     defined(TARGET_IS_MSP432P4XX_NEXT)
2243 #define ROM_Timer_A_getCounterValue                                           \
2244         ((uint16_t (*)(uint32_t timer))ROM_TIMER_ATABLE[26])
2245 #endif
2246 
2247 //*****************************************************************************
2248 //
2249 // Macros for calling ROM functions in the Timer32 API.
2250 //
2251 //*****************************************************************************
2252 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2253     defined(TARGET_IS_MSP432P4XX_NEXT)
2254 #define ROM_Timer32_initModule                                                \
2255         ((void (*)(uint32_t timer,                                            \
2256                    uint32_t preScaler,                                        \
2257                    uint32_t resolution,                                       \
2258                    uint32_t mode))ROM_TIMER32TABLE[0])
2259 #endif
2260 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2261     defined(TARGET_IS_MSP432P4XX_NEXT)
2262 #define ROM_Timer32_setCount                                                  \
2263         ((void (*)(uint32_t timer,                                            \
2264                    uint32_t count))ROM_TIMER32TABLE[1])
2265 #endif
2266 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2267     defined(TARGET_IS_MSP432P4XX_NEXT)
2268 #define ROM_Timer32_setCountInBackground                                      \
2269         ((void (*)(uint32_t timer,                                            \
2270                    uint32_t count))ROM_TIMER32TABLE[2])
2271 #endif
2272 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2273     defined(TARGET_IS_MSP432P4XX_NEXT)
2274 #define ROM_Timer32_getValue                                                  \
2275         ((uint32_t (*)(uint32_t timer))ROM_TIMER32TABLE[3])
2276 #endif
2277 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2278     defined(TARGET_IS_MSP432P4XX_NEXT)
2279 #define ROM_Timer32_startTimer                                                \
2280         ((void (*)(uint32_t timer,                                            \
2281                    bool oneShot))ROM_TIMER32TABLE[4])
2282 #endif
2283 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2284     defined(TARGET_IS_MSP432P4XX_NEXT)
2285 #define ROM_Timer32_haltTimer                                                 \
2286         ((void (*)(uint32_t timer))ROM_TIMER32TABLE[5])
2287 #endif
2288 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2289     defined(TARGET_IS_MSP432P4XX_NEXT)
2290 #define ROM_Timer32_enableInterrupt                                           \
2291         ((void (*)(uint32_t timer))ROM_TIMER32TABLE[6])
2292 #endif
2293 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2294     defined(TARGET_IS_MSP432P4XX_NEXT)
2295 #define ROM_Timer32_disableInterrupt                                          \
2296         ((void (*)(uint32_t timer))ROM_TIMER32TABLE[7])
2297 #endif
2298 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2299     defined(TARGET_IS_MSP432P4XX_NEXT)
2300 #define ROM_Timer32_clearInterruptFlag                                        \
2301         ((void (*)(uint32_t timer))ROM_TIMER32TABLE[8])
2302 #endif
2303 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2304     defined(TARGET_IS_MSP432P4XX_NEXT)
2305 #define ROM_Timer32_getInterruptStatus                                        \
2306         ((uint32_t (*)(uint32_t timer))ROM_TIMER32TABLE[9])
2307 #endif
2308 
2309 //*****************************************************************************
2310 //
2311 // Macros for calling ROM functions in the UART API.
2312 //
2313 //*****************************************************************************
2314 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2315     defined(TARGET_IS_MSP432P4XX_NEXT)
2316 #define ROM_UART_initModule                                                   \
2317         ((bool (*)(uint32_t moduleInstance,                                   \
2318                    const eUSCI_UART_Config *config))ROM_UARTTABLE[0])
2319 #endif
2320 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2321     defined(TARGET_IS_MSP432P4XX_NEXT)
2322 #define ROM_UART_transmitData                                                 \
2323         ((void (*)(uint32_t moduleInstance,                                   \
2324                    uint_fast8_t transmitData))ROM_UARTTABLE[1])
2325 #endif
2326 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2327     defined(TARGET_IS_MSP432P4XX_NEXT)
2328 #define ROM_UART_enableModule                                                 \
2329         ((void (*)(uint32_t moduleInstance))ROM_UARTTABLE[2])
2330 #endif
2331 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2332     defined(TARGET_IS_MSP432P4XX_NEXT)
2333 #define ROM_UART_disableModule                                                \
2334         ((void (*)(uint32_t moduleInstance))ROM_UARTTABLE[3])
2335 #endif
2336 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2337     defined(TARGET_IS_MSP432P4XX_NEXT)
2338 #define ROM_UART_queryStatusFlags                                             \
2339         ((uint_fast8_t (*)(uint32_t moduleInstance,                           \
2340                            uint_fast8_t mask))ROM_UARTTABLE[4])
2341 #endif
2342 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2343     defined(TARGET_IS_MSP432P4XX_NEXT)
2344 #define ROM_UART_setDormant                                                   \
2345         ((void (*)(uint32_t moduleInstance))ROM_UARTTABLE[5])
2346 #endif
2347 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2348     defined(TARGET_IS_MSP432P4XX_NEXT)
2349 #define ROM_UART_resetDormant                                                 \
2350         ((void (*)(uint32_t moduleInstance))ROM_UARTTABLE[6])
2351 #endif
2352 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2353     defined(TARGET_IS_MSP432P4XX_NEXT)
2354 #define ROM_UART_transmitAddress                                              \
2355         ((void (*)(uint32_t moduleInstance,                                   \
2356                    uint_fast8_t transmitAddress))ROM_UARTTABLE[7])
2357 #endif
2358 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2359     defined(TARGET_IS_MSP432P4XX_NEXT)
2360 #define ROM_UART_transmitBreak                                                \
2361         ((void (*)(uint32_t moduleInstance))ROM_UARTTABLE[8])
2362 #endif
2363 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2364     defined(TARGET_IS_MSP432P4XX_NEXT)
2365 #define ROM_UART_getReceiveBufferAddressForDMA                                \
2366         ((uint32_t (*)(uint32_t moduleInstance))ROM_UARTTABLE[9])
2367 #endif
2368 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2369     defined(TARGET_IS_MSP432P4XX_NEXT)
2370 #define ROM_UART_getTransmitBufferAddressForDMA                               \
2371         ((uint32_t (*)(uint32_t moduleInstance))ROM_UARTTABLE[10])
2372 #endif
2373 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2374     defined(TARGET_IS_MSP432P4XX_NEXT)
2375 #define ROM_UART_selectDeglitchTime                                           \
2376         ((void (*)(uint32_t moduleInstance,                                   \
2377                    uint32_t deglitchTime))ROM_UARTTABLE[11])
2378 #endif
2379 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2380     defined(TARGET_IS_MSP432P4XX_NEXT)
2381 #define ROM_UART_enableInterrupt                                              \
2382         ((void (*)(uint32_t moduleInstance,                                   \
2383                    uint_fast8_t mask))ROM_UARTTABLE[12])
2384 #endif
2385 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2386     defined(TARGET_IS_MSP432P4XX_NEXT)
2387 #define ROM_UART_disableInterrupt                                             \
2388         ((void (*)(uint32_t moduleInstance,                                   \
2389                    uint_fast8_t mask))ROM_UARTTABLE[13])
2390 #endif
2391 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2392     defined(TARGET_IS_MSP432P4XX_NEXT)
2393 #define ROM_UART_getInterruptStatus                                           \
2394         ((uint_fast8_t (*)(uint32_t moduleInstance,                           \
2395                            uint8_t mask))ROM_UARTTABLE[14])
2396 #endif
2397 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2398     defined(TARGET_IS_MSP432P4XX_NEXT)
2399 #define ROM_UART_clearInterruptFlag                                           \
2400         ((void (*)(uint32_t moduleInstance,                                   \
2401                    uint_fast8_t mask))ROM_UARTTABLE[15])
2402 #endif
2403 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2404     defined(TARGET_IS_MSP432P4XX_NEXT)
2405 #define ROM_UART_receiveData                                                  \
2406         ((uint8_t (*)(uint32_t moduleInstance))ROM_UARTTABLE[16])
2407 #endif
2408 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2409     defined(TARGET_IS_MSP432P4XX_NEXT)
2410 #define ROM_UART_getEnabledInterruptStatus                                    \
2411         ((uint_fast8_t (*)(uint32_t moduleInstance))ROM_UARTTABLE[17])
2412 #endif
2413 
2414 //*****************************************************************************
2415 //
2416 // Macros for calling ROM functions in the WDT API.
2417 //
2418 //*****************************************************************************
2419 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2420     defined(TARGET_IS_MSP432P4XX_NEXT)
2421 #define ROM_WDT_A_holdTimer                                                   \
2422         ((void (*)(void))ROM_WDTTABLE[0])
2423 #endif
2424 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2425     defined(TARGET_IS_MSP432P4XX_NEXT)
2426 #define ROM_WDT_A_startTimer                                                  \
2427         ((void (*)(void))ROM_WDTTABLE[1])
2428 #endif
2429 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2430     defined(TARGET_IS_MSP432P4XX_NEXT)
2431 #define ROM_WDT_A_clearTimer                                                  \
2432         ((void (*)(void))ROM_WDTTABLE[2])
2433 #endif
2434 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2435     defined(TARGET_IS_MSP432P4XX_NEXT)
2436 #define ROM_WDT_A_initWatchdogTimer                                           \
2437         ((void (*)(uint_fast8_t clockSelect,                                  \
2438                    uint_fast8_t clockDivider))ROM_WDTTABLE[3])
2439 #endif
2440 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2441     defined(TARGET_IS_MSP432P4XX_NEXT)
2442 #define ROM_WDT_A_initIntervalTimer                                           \
2443         ((void (*)(uint_fast8_t clockSelect,                                  \
2444                    uint_fast8_t clockDivider))ROM_WDTTABLE[4])
2445 #endif
2446 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2447     defined(TARGET_IS_MSP432P4XX_NEXT)
2448 #define ROM_WDT_A_setPasswordViolationReset                                   \
2449         ((void (*)(uint_fast8_t resetType))ROM_WDTTABLE[7])
2450 #endif
2451 #if defined(TARGET_IS_MSP432P4XX) ||                                          \
2452     defined(TARGET_IS_MSP432P4XX_NEXT)
2453 #define ROM_WDT_A_setTimeoutReset                                             \
2454         ((void (*)(uint_fast8_t resetType))ROM_WDTTABLE[8])
2455 #endif
2456 
2457 //*****************************************************************************
2458 //
2459 // Macros for calling ROM functions in the SysCtl_A API.
2460 //
2461 //*****************************************************************************
2462 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2463 #define ROM_SysCtl_A_getSRAMSize                                              \
2464         ((uint_least32_t (*)(void))ROM_SYSCTLATABLE[0])
2465 #endif
2466 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2467 #define ROM_SysCtl_A_getFlashSize                                             \
2468         ((uint_least32_t (*)(void))ROM_SYSCTLATABLE[1])
2469 #endif
2470 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2471 #define ROM_SysCtl_A_rebootDevice                                             \
2472         ((void (*)(void))ROM_SYSCTLATABLE[2])
2473 #endif
2474 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2475 #define ROM_SysCtl_A_enableSRAM                                               \
2476         ((bool (*)(uint32_t addr))ROM_SYSCTLATABLE[3])
2477 #endif
2478 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2479 #define ROM_SysCtl_A_disableSRAM                                              \
2480         ((bool (*)(uint32_t addr))ROM_SYSCTLATABLE[4])
2481 #endif
2482 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2483 #define ROM_SysCtl_A_enableSRAMRetention                                      \
2484         ((bool (*)(uint32_t startAddr,                                        \
2485                    uint32_t endAddr))ROM_SYSCTLATABLE[5])
2486 #endif
2487 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2488 #define ROM_SysCtl_A_disableSRAMRetention                                     \
2489         ((bool (*)(uint32_t startAddr,                                        \
2490                    uint32_t endAddr))ROM_SYSCTLATABLE[6])
2491 #endif
2492 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2493 #define ROM_SysCtl_A_enablePeripheralAtCPUHalt                                \
2494         ((void (*)(uint_fast16_t devices))ROM_SYSCTLATABLE[7])
2495 #endif
2496 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2497 #define ROM_SysCtl_A_disablePeripheralAtCPUHalt                               \
2498         ((void (*)(uint_fast16_t devices))ROM_SYSCTLATABLE[8])
2499 #endif
2500 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2501 #define ROM_SysCtl_A_setWDTTimeoutResetType                                   \
2502         ((void (*)(uint_fast8_t resetType))ROM_SYSCTLATABLE[9])
2503 #endif
2504 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2505 #define ROM_SysCtl_A_setWDTPasswordViolationResetType                         \
2506         ((void (*)(uint_fast8_t resetType))ROM_SYSCTLATABLE[10])
2507 #endif
2508 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2509 #define ROM_SysCtl_A_disableNMISource                                         \
2510         ((void (*)(uint_fast8_t flags))ROM_SYSCTLATABLE[11])
2511 #endif
2512 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2513 #define ROM_SysCtl_A_enableNMISource                                          \
2514         ((void (*)(uint_fast8_t flags))ROM_SYSCTLATABLE[12])
2515 #endif
2516 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2517 #define ROM_SysCtl_A_getTempCalibrationConstant                               \
2518         ((uint_fast16_t (*)(uint32_t refVoltage,                              \
2519                             uint32_t temperature))ROM_SYSCTLATABLE[14])
2520 #endif
2521 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2522 #define ROM_SysCtl_A_enableGlitchFilter                                       \
2523         ((void (*)(void))ROM_SYSCTLATABLE[15])
2524 #endif
2525 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2526 #define ROM_SysCtl_A_disableGlitchFilter                                      \
2527         ((void (*)(void))ROM_SYSCTLATABLE[16])
2528 #endif
2529 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2530 #define ROM_SysCtl_A_getTLVInfo                                               \
2531         ((void (*)(uint_fast8_t tag,                                          \
2532                    uint_fast8_t instance,                                     \
2533                    uint_fast8_t *length,                                      \
2534                    uint32_t **data_address))ROM_SYSCTLATABLE[17])
2535 #endif
2536 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2537 #define ROM_SysCtl_A_getInfoFlashSize                                         \
2538         ((uint_least32_t (*)(void))ROM_SYSCTLATABLE[18])
2539 #endif
2540 
2541 //*****************************************************************************
2542 //
2543 // Macros for calling ROM functions in the Flash_A API.
2544 //
2545 //*****************************************************************************
2546 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2547 #define ROM_FlashCtl_A_enableReadBuffering                                    \
2548         ((void (*)(uint_fast8_t memoryBank,                                   \
2549                    uint_fast8_t accessMethod))ROM_FLASHCTLATABLE[2])
2550 #endif
2551 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2552 #define ROM_FlashCtl_A_disableReadBuffering                                   \
2553         ((void (*)(uint_fast8_t memoryBank,                                   \
2554                    uint_fast8_t accessMethod))ROM_FLASHCTLATABLE[3])
2555 #endif
2556 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2557 #define ROM_FlashCtl_A_unprotectMemory                                        \
2558         ((bool (*)(uint32_t startAddr,                                        \
2559                    uint32_t endAddr))ROM_FLASHCTLATABLE[4])
2560 #endif
2561 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2562 #define ROM_FlashCtl_A_protectMemory                                          \
2563         ((bool (*)(uint32_t startAddr,                                        \
2564                    uint32_t endAddr))ROM_FLASHCTLATABLE[5])
2565 #endif
2566 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2567 #define ROM_FlashCtl_A_isMemoryRangeProtected                                 \
2568         ((bool (*)(uint32_t startAddr,                                        \
2569                    uint32_t endAddr))ROM_FLASHCTLATABLE[6])
2570 #endif
2571 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2572 #define ROM_FlashCtl_A_verifyMemory                                           \
2573         ((bool (*)(void* verifyAddr,                                          \
2574                    uint32_t length,                                           \
2575                    uint_fast8_t pattern))ROM_FLASHCTLATABLE[7])
2576 #endif
2577 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2578 #define ROM_FlashCtl_A_performMassErase                                       \
2579         ((bool (*)(void))ROM_FLASHCTLATABLE[8])
2580 #endif
2581 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2582 #define ROM_FlashCtl_A_eraseSector                                            \
2583         ((bool (*)(uint32_t addr))ROM_FLASHCTLATABLE[9])
2584 #endif
2585 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2586 #define ROM_FlashCtl_A_programMemory                                          \
2587         ((bool (*)(void* src,                                                 \
2588                    void* dest,                                                \
2589                    uint32_t length))ROM_FLASHCTLATABLE[10])
2590 #endif
2591 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2592 #define ROM_FlashCtl_A_setProgramVerification                                 \
2593         ((void (*)(uint32_t verificationSetting))ROM_FLASHCTLATABLE[11])
2594 #endif
2595 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2596 #define ROM_FlashCtl_A_clearProgramVerification                               \
2597         ((void (*)( uint32_t verificationSetting))ROM_FLASHCTLATABLE[12])
2598 #endif
2599 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2600 #define ROM_FlashCtl_A_enableWordProgramming                                  \
2601         ((void (*)(uint32_t mode))ROM_FLASHCTLATABLE[13])
2602 #endif
2603 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2604 #define ROM_FlashCtl_A_disableWordProgramming                                 \
2605         ((void (*)(void))ROM_FLASHCTLATABLE[14])
2606 #endif
2607 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2608 #define ROM_FlashCtl_A_isWordProgrammingEnabled                               \
2609         ((uint32_t (*)(void))ROM_FLASHCTLATABLE[15])
2610 #endif
2611 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2612 #define ROM_FlashCtl_A_enableInterrupt                                        \
2613         ((void (*)(uint32_t flags))ROM_FLASHCTLATABLE[16])
2614 #endif
2615 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2616 #define ROM_FlashCtl_A_disableInterrupt                                       \
2617         ((void (*)(uint32_t flags))ROM_FLASHCTLATABLE[17])
2618 #endif
2619 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2620 #define ROM_FlashCtl_A_getEnabledInterruptStatus                              \
2621         ((uint32_t (*)(void))ROM_FLASHCTLATABLE[18])
2622 #endif
2623 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2624 #define ROM_FlashCtl_A_getInterruptStatus                                     \
2625         ((uint32_t (*)(void))ROM_FLASHCTLATABLE[19])
2626 #endif
2627 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2628 #define ROM_FlashCtl_A_clearInterruptFlag                                     \
2629         ((void (*)(uint32_t flags))ROM_FLASHCTLATABLE[20])
2630 #endif
2631 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2632 #define ROM_FlashCtl_A_setWaitState                                           \
2633         ((void (*)(uint32_t bank,                                             \
2634                    uint32_t waitState))ROM_FLASHCTLATABLE[21])
2635 #endif
2636 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2637 #define ROM_FlashCtl_A_getWaitState                                           \
2638         ((uint32_t (*)(uint32_t bank))ROM_FLASHCTLATABLE[22])
2639 #endif
2640 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2641 #define ROM_FlashCtl_A_setReadMode                                            \
2642         ((bool (*)(uint32_t flashBank,                                        \
2643                    uint32_t readMode))ROM_FLASHCTLATABLE[23])
2644 #endif
2645 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2646 #define ROM_FlashCtl_A_getReadMode                                            \
2647         ((uint32_t (*)(uint32_t flashBank))ROM_FLASHCTLATABLE[24])
2648 #endif
2649 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2650 #define ROM___FlashCtl_A_remaskData8Post                                      \
2651         ((uint8_t (*)(uint8_t data,                                           \
2652                       uint32_t addr))ROM_FLASHCTLATABLE[27])
2653 #endif
2654 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2655 #define ROM___FlashCtl_A_remaskData8Pre                                       \
2656         ((uint8_t (*)(uint8_t data,                                           \
2657                       uint32_t addr))ROM_FLASHCTLATABLE[28])
2658 #endif
2659 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2660 #define ROM___FlashCtl_A_remaskData32Pre                                      \
2661         ((uint32_t (*)(uint32_t data,                                         \
2662                        uint32_t addr))ROM_FLASHCTLATABLE[29])
2663 #endif
2664 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2665 #define ROM___FlashCtl_A_remaskData32Post                                     \
2666         ((uint32_t (*)(uint32_t data,                                         \
2667                        uint32_t addr))ROM_FLASHCTLATABLE[30])
2668 #endif
2669 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2670 #define ROM___FlashCtl_A_remaskBurstDataPre                                   \
2671         ((void (*)(uint32_t addr,                                             \
2672                    uint32_t size))ROM_FLASHCTLATABLE[31])
2673 #endif
2674 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2675 #define ROM___FlashCtl_A_remaskBurstDataPost                                  \
2676         ((void (*)(uint32_t addr,                                             \
2677                    uint32_t size))ROM_FLASHCTLATABLE[32])
2678 #endif
2679 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2680 #define ROM_FlashCtl_A_initiateSectorErase                                    \
2681         ((void (*)(uint32_t addr))ROM_FLASHCTLATABLE[33])
2682 #endif
2683 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2684 #define ROM_FlashCtl_A_initiateMassErase                                      \
2685         ((void (*)(void))ROM_FLASHCTLATABLE[34])
2686 #endif
2687 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2688 #define ROM_FlashCtl_A_isMemoryProtected                                      \
2689         ((bool (*)(uint32_t addr))ROM_FLASHCTLATABLE[35])
2690 #endif
2691 
2692 //*****************************************************************************
2693 //
2694 // Macros for calling ROM functions in the LCD_F API.
2695 //
2696 //*****************************************************************************
2697 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2698 #define ROM_LCD_F_turnOff                                                     \
2699         ((void (*)(void))ROM_LCDFTABLE[2])
2700 #endif
2701 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2702 #define ROM_LCD_F_clearAllMemory                                              \
2703         ((void (*)(void))ROM_LCDFTABLE[3])
2704 #endif
2705 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2706 #define ROM_LCD_F_clearAllBlinkingMemory                                      \
2707         ((void (*)(void))ROM_LCDFTABLE[4])
2708 #endif
2709 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2710 #define ROM_LCD_F_selectDisplayMemory                                         \
2711         ((void (*)(uint_fast16_t displayMemory))ROM_LCDFTABLE[5])
2712 #endif
2713 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2714 #define ROM_LCD_F_setBlinkingControl                                          \
2715         ((void (*)(uint_fast16_t clockPrescalar,                              \
2716                    uint_fast16_t divider,                                     \
2717                    uint_fast16_t mode))ROM_LCDFTABLE[6])
2718 #endif
2719 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2720 #define ROM_LCD_F_setAnimationControl                                         \
2721         ((void (*)(uint_fast16_t clockPrescalar,                              \
2722                    uint_fast16_t divider,                                     \
2723                    uint_fast16_t frames))ROM_LCDFTABLE[7])
2724 #endif
2725 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2726 #define ROM_LCD_F_clearAllAnimationMemory                                     \
2727         ((void (*)(void))ROM_LCDFTABLE[8])
2728 #endif
2729 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2730 #define ROM_LCD_F_setPinAsLCDFunction                                         \
2731         ((void (*)(uint_fast8_t pin))ROM_LCDFTABLE[9])
2732 #endif
2733 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2734 #define ROM_LCD_F_setPinAsPortFunction                                        \
2735         ((void (*)(uint_fast8_t pin))ROM_LCDFTABLE[10])
2736 #endif
2737 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2738 #define ROM_LCD_F_setPinAsSEG                                                 \
2739         ((void (*)(uint_fast8_t pin))ROM_LCDFTABLE[13])
2740 #endif
2741 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2742 #define ROM_LCD_F_selectBias                                                  \
2743         ((void (*)(uint_fast16_t bias))ROM_LCDFTABLE[14])
2744 #endif
2745 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2746 #define ROM_LCD_F_setVLCDSource                                               \
2747         ((void (*)(uint_fast16_t v2v3v4Source,                                \
2748                    uint_fast16_t v5Source))ROM_LCDFTABLE[15])
2749 #endif
2750 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2751 #define ROM_LCD_F_clearInterrupt                                              \
2752         ((void (*)(uint32_t mask))ROM_LCDFTABLE[16])
2753 #endif
2754 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2755 #define ROM_LCD_F_getInterruptStatus                                          \
2756         ((uint32_t (*)(void))ROM_LCDFTABLE[17])
2757 #endif
2758 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2759 #define ROM_LCD_F_getEnabledInterruptStatus                                   \
2760         ((uint32_t (*)(void))ROM_LCDFTABLE[18])
2761 #endif
2762 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2763 #define ROM_LCD_F_enableInterrupt                                             \
2764         ((void (*)(uint32_t mask))ROM_LCDFTABLE[19])
2765 #endif
2766 #if defined(TARGET_IS_MSP432P4XX_NEXT)
2767 #define ROM_LCD_F_disableInterrupt                                            \
2768         ((void (*)(uint32_t mask))ROM_LCDFTABLE[20])
2769 #endif
2770 
2771 #endif // __ROM_H__
2772