MSP432E4 DriverLib API Guide  1.11.00.03
rom.h
Go to the documentation of this file.
1 //*****************************************************************************
2 //
3 // rom.h - Macros to facilitate calling functions in the ROM.
4 //
5 // Copyright (c) 2007-2017 Texas Instruments Incorporated. All rights reserved.
6 // Software License Agreement
7 //
8 // Redistribution and use in source and binary forms, with or without
9 // modification, are permitted provided that the following conditions
10 // are met:
11 //
12 // Redistributions of source code must retain the above copyright
13 // notice, this list of conditions and the following disclaimer.
14 //
15 // Redistributions in binary form must reproduce the above copyright
16 // notice, this list of conditions and the following disclaimer in the
17 // documentation and/or other materials provided with the
18 // distribution.
19 //
20 // Neither the name of Texas Instruments Incorporated nor the names of
21 // its contributors may be used to endorse or promote products derived
22 // from this software without specific prior written permission.
23 //
24 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 //
36 //*****************************************************************************
37 
38 #ifndef __DRIVERLIB_ROM_H__
39 #define __DRIVERLIB_ROM_H__
40 
41 #include <stdint.h>
42 #include <stdbool.h>
43 
44 //*****************************************************************************
45 //
46 // Pointers to the main API tables.
47 //
48 //*****************************************************************************
49 #define ROM_APITABLE ((uint32_t *)0x01000010)
50 #define ROM_VERSION (ROM_APITABLE[0])
51 #define ROM_UARTTABLE ((uint32_t *)(ROM_APITABLE[1]))
52 #define ROM_SSITABLE ((uint32_t *)(ROM_APITABLE[2]))
53 #define ROM_I2CTABLE ((uint32_t *)(ROM_APITABLE[3]))
54 #define ROM_GPIOTABLE ((uint32_t *)(ROM_APITABLE[4]))
55 #define ROM_ADCTABLE ((uint32_t *)(ROM_APITABLE[5]))
56 #define ROM_COMPARATORTABLE ((uint32_t *)(ROM_APITABLE[6]))
57 #define ROM_FLASHTABLE ((uint32_t *)(ROM_APITABLE[7]))
58 #define ROM_PWMTABLE ((uint32_t *)(ROM_APITABLE[8]))
59 #define ROM_QEITABLE ((uint32_t *)(ROM_APITABLE[9]))
60 #define ROM_SYSTICKTABLE ((uint32_t *)(ROM_APITABLE[10]))
61 #define ROM_TIMERTABLE ((uint32_t *)(ROM_APITABLE[11]))
62 #define ROM_WATCHDOGTABLE ((uint32_t *)(ROM_APITABLE[12]))
63 #define ROM_SYSCTLTABLE ((uint32_t *)(ROM_APITABLE[13]))
64 #define ROM_INTERRUPTTABLE ((uint32_t *)(ROM_APITABLE[14]))
65 #define ROM_USBTABLE ((uint32_t *)(ROM_APITABLE[16]))
66 #define ROM_UDMATABLE ((uint32_t *)(ROM_APITABLE[17]))
67 #define ROM_CANTABLE ((uint32_t *)(ROM_APITABLE[18]))
68 #define ROM_HIBERNATETABLE ((uint32_t *)(ROM_APITABLE[19]))
69 #define ROM_MPUTABLE ((uint32_t *)(ROM_APITABLE[20]))
70 #define ROM_SOFTWARETABLE ((uint32_t *)(ROM_APITABLE[21]))
71 #define ROM_EPITABLE ((uint32_t *)(ROM_APITABLE[23]))
72 #define ROM_EEPROMTABLE ((uint32_t *)(ROM_APITABLE[24]))
73 #define ROM_FPUTABLE ((uint32_t *)(ROM_APITABLE[26]))
74 #define ROM_SMBUSTABLE ((uint32_t *)(ROM_APITABLE[29]))
75 #define ROM_SYSEXCTABLE ((uint32_t *)(ROM_APITABLE[30]))
76 #define ROM_ONEWIRETABLE ((uint32_t *)(ROM_APITABLE[34]))
77 #define ROM_SPIFLASHTABLE ((uint32_t *)(ROM_APITABLE[38]))
78 #define ROM_LCDTABLE ((uint32_t *)(ROM_APITABLE[41]))
79 #define ROM_EMACTABLE ((uint32_t *)(ROM_APITABLE[42]))
80 #define ROM_AESTABLE ((uint32_t *)(ROM_APITABLE[43]))
81 #define ROM_CRCTABLE ((uint32_t *)(ROM_APITABLE[44]))
82 #define ROM_DESTABLE ((uint32_t *)(ROM_APITABLE[45]))
83 #define ROM_SHAMD5TABLE ((uint32_t *)(ROM_APITABLE[46]))
84 
85 //*****************************************************************************
86 //
87 // Macros for calling ROM functions in the ADC API.
88 //
89 //*****************************************************************************
90 #define ROM_ADCSequenceDataGet \
91  ((int32_t (*)(uint32_t ui32Base, \
92  uint32_t ui32SequenceNum, \
93  uint32_t *pui32Buffer))ROM_ADCTABLE[0])
94 #define ROM_ADCIntDisable \
95  ((void (*)(uint32_t ui32Base, \
96  uint32_t ui32SequenceNum))ROM_ADCTABLE[1])
97 #define ROM_ADCIntEnable \
98  ((void (*)(uint32_t ui32Base, \
99  uint32_t ui32SequenceNum))ROM_ADCTABLE[2])
100 #define ROM_ADCIntStatus \
101  ((uint32_t (*)(uint32_t ui32Base, \
102  uint32_t ui32SequenceNum, \
103  bool bMasked))ROM_ADCTABLE[3])
104 #define ROM_ADCIntClear \
105  ((void (*)(uint32_t ui32Base, \
106  uint32_t ui32SequenceNum))ROM_ADCTABLE[4])
107 #define ROM_ADCSequenceEnable \
108  ((void (*)(uint32_t ui32Base, \
109  uint32_t ui32SequenceNum))ROM_ADCTABLE[5])
110 #define ROM_ADCSequenceDisable \
111  ((void (*)(uint32_t ui32Base, \
112  uint32_t ui32SequenceNum))ROM_ADCTABLE[6])
113 #define ROM_ADCSequenceConfigure \
114  ((void (*)(uint32_t ui32Base, \
115  uint32_t ui32SequenceNum, \
116  uint32_t ui32Trigger, \
117  uint32_t ui32Priority))ROM_ADCTABLE[7])
118 #define ROM_ADCSequenceOverflow \
119  ((int32_t (*)(uint32_t ui32Base, \
120  uint32_t ui32SequenceNum))ROM_ADCTABLE[9])
121 #define ROM_ADCSequenceOverflowClear \
122  ((void (*)(uint32_t ui32Base, \
123  uint32_t ui32SequenceNum))ROM_ADCTABLE[10])
124 #define ROM_ADCSequenceUnderflow \
125  ((int32_t (*)(uint32_t ui32Base, \
126  uint32_t ui32SequenceNum))ROM_ADCTABLE[11])
127 #define ROM_ADCSequenceUnderflowClear \
128  ((void (*)(uint32_t ui32Base, \
129  uint32_t ui32SequenceNum))ROM_ADCTABLE[12])
130 #define ROM_ADCProcessorTrigger \
131  ((void (*)(uint32_t ui32Base, \
132  uint32_t ui32SequenceNum))ROM_ADCTABLE[13])
133 #define ROM_ADCHardwareOversampleConfigure \
134  ((void (*)(uint32_t ui32Base, \
135  uint32_t ui32Factor))ROM_ADCTABLE[14])
136 #define ROM_ADCComparatorConfigure \
137  ((void (*)(uint32_t ui32Base, \
138  uint32_t ui32Comp, \
139  uint32_t ui32Config))ROM_ADCTABLE[15])
140 #define ROM_ADCComparatorRegionSet \
141  ((void (*)(uint32_t ui32Base, \
142  uint32_t ui32Comp, \
143  uint32_t ui32LowRef, \
144  uint32_t ui32HighRef))ROM_ADCTABLE[16])
145 #define ROM_ADCComparatorReset \
146  ((void (*)(uint32_t ui32Base, \
147  uint32_t ui32Comp, \
148  bool bTrigger, \
149  bool bInterrupt))ROM_ADCTABLE[17])
150 #define ROM_ADCComparatorIntDisable \
151  ((void (*)(uint32_t ui32Base, \
152  uint32_t ui32SequenceNum))ROM_ADCTABLE[18])
153 #define ROM_ADCComparatorIntEnable \
154  ((void (*)(uint32_t ui32Base, \
155  uint32_t ui32SequenceNum))ROM_ADCTABLE[19])
156 #define ROM_ADCComparatorIntStatus \
157  ((uint32_t (*)(uint32_t ui32Base))ROM_ADCTABLE[20])
158 #define ROM_ADCComparatorIntClear \
159  ((void (*)(uint32_t ui32Base, \
160  uint32_t ui32Status))ROM_ADCTABLE[21])
161 #define ROM_ADCReferenceSet \
162  ((void (*)(uint32_t ui32Base, \
163  uint32_t ui32Ref))ROM_ADCTABLE[22])
164 #define ROM_ADCReferenceGet \
165  ((uint32_t (*)(uint32_t ui32Base))ROM_ADCTABLE[23])
166 #define ROM_ADCPhaseDelaySet \
167  ((void (*)(uint32_t ui32Base, \
168  uint32_t ui32Phase))ROM_ADCTABLE[24])
169 #define ROM_ADCPhaseDelayGet \
170  ((uint32_t (*)(uint32_t ui32Base))ROM_ADCTABLE[25])
171 #define ROM_ADCIntDisableEx \
172  ((void (*)(uint32_t ui32Base, \
173  uint32_t ui32IntFlags))ROM_ADCTABLE[29])
174 #define ROM_ADCIntEnableEx \
175  ((void (*)(uint32_t ui32Base, \
176  uint32_t ui32IntFlags))ROM_ADCTABLE[30])
177 #define ROM_ADCIntStatusEx \
178  ((uint32_t (*)(uint32_t ui32Base, \
179  bool bMasked))ROM_ADCTABLE[31])
180 #define ROM_ADCSequenceDMAEnable \
181  ((void (*)(uint32_t ui32Base, \
182  uint32_t ui32SequenceNum))ROM_ADCTABLE[32])
183 #define ROM_ADCSequenceDMADisable \
184  ((void (*)(uint32_t ui32Base, \
185  uint32_t ui32SequenceNum))ROM_ADCTABLE[33])
186 #define ROM_ADCBusy \
187  ((bool (*)(uint32_t ui32Base))ROM_ADCTABLE[34])
188 
189 //*****************************************************************************
190 //
191 // Macros for calling ROM functions in the AES API.
192 //
193 //*****************************************************************************
194 #define ROM_AESIntStatus \
195  ((uint32_t (*)(uint32_t ui32Base, \
196  bool bMasked))ROM_AESTABLE[0])
197 #define ROM_AESAuthLengthSet \
198  ((void (*)(uint32_t ui32Base, \
199  uint32_t ui32Length))ROM_AESTABLE[1])
200 #define ROM_AESConfigSet \
201  ((void (*)(uint32_t ui32Base, \
202  uint32_t ui32Config))ROM_AESTABLE[2])
203 #define ROM_AESDataAuth \
204  ((bool (*)(uint32_t ui32Base, \
205  uint32_t *pui32Src, \
206  uint32_t ui32Length, \
207  uint32_t *pui32Tag))ROM_AESTABLE[3])
208 #define ROM_AESDataProcess \
209  ((bool (*)(uint32_t ui32Base, \
210  uint32_t *pui32Src, \
211  uint32_t *pui32Dest, \
212  uint32_t ui32Length))ROM_AESTABLE[4])
213 #define ROM_AESDataProcessAuth \
214  ((bool (*)(uint32_t ui32Base, \
215  uint32_t *pui32Src, \
216  uint32_t *pui32Dest, \
217  uint32_t ui32Length, \
218  uint32_t *pui32AuthSrc, \
219  uint32_t ui32AuthLength, \
220  uint32_t *pui32Tag))ROM_AESTABLE[5])
221 #define ROM_AESDataRead \
222  ((void (*)(uint32_t ui32Base, \
223  uint32_t *pui32Dest))ROM_AESTABLE[6])
224 #define ROM_AESDataReadNonBlocking \
225  ((bool (*)(uint32_t ui32Base, \
226  uint32_t *pui32Dest))ROM_AESTABLE[7])
227 #define ROM_AESDataWrite \
228  ((void (*)(uint32_t ui32Base, \
229  uint32_t *pui32Src))ROM_AESTABLE[8])
230 #define ROM_AESDataWriteNonBlocking \
231  ((bool (*)(uint32_t ui32Base, \
232  uint32_t *pui32Src))ROM_AESTABLE[9])
233 #define ROM_AESDMADisable \
234  ((void (*)(uint32_t ui32Base, \
235  uint32_t ui32Flags))ROM_AESTABLE[10])
236 #define ROM_AESDMAEnable \
237  ((void (*)(uint32_t ui32Base, \
238  uint32_t ui32Flags))ROM_AESTABLE[11])
239 #define ROM_AESIntClear \
240  ((void (*)(uint32_t ui32Base, \
241  uint32_t ui32IntFlags))ROM_AESTABLE[12])
242 #define ROM_AESIntDisable \
243  ((void (*)(uint32_t ui32Base, \
244  uint32_t ui32IntFlags))ROM_AESTABLE[13])
245 #define ROM_AESIntEnable \
246  ((void (*)(uint32_t ui32Base, \
247  uint32_t ui32IntFlags))ROM_AESTABLE[14])
248 #define ROM_AESIVSet \
249  ((void (*)(uint32_t ui32Base, \
250  uint32_t *pui32IVdata))ROM_AESTABLE[15])
251 #define ROM_AESKey1Set \
252  ((void (*)(uint32_t ui32Base, \
253  uint32_t *pui32Key, \
254  uint32_t ui32Keysize))ROM_AESTABLE[16])
255 #define ROM_AESKey2Set \
256  ((void (*)(uint32_t ui32Base, \
257  uint32_t *pui32Key, \
258  uint32_t ui32Keysize))ROM_AESTABLE[17])
259 #define ROM_AESKey3Set \
260  ((void (*)(uint32_t ui32Base, \
261  uint32_t *pui32Key))ROM_AESTABLE[18])
262 #define ROM_AESLengthSet \
263  ((void (*)(uint32_t ui32Base, \
264  uint64_t ui64Length))ROM_AESTABLE[19])
265 #define ROM_AESReset \
266  ((void (*)(uint32_t ui32Base))ROM_AESTABLE[20])
267 #define ROM_AESTagRead \
268  ((void (*)(uint32_t ui32Base, \
269  uint32_t *pui32TagData))ROM_AESTABLE[21])
270 #define ROM_AESIVRead \
271  ((void (*)(uint32_t ui32Base, \
272  uint32_t *pui32IVdata))ROM_AESTABLE[22])
273 
274 //*****************************************************************************
275 //
276 // Macros for calling ROM functions in the CAN API.
277 //
278 //*****************************************************************************
279 #define ROM_CANIntClear \
280  ((void (*)(uint32_t ui32Base, \
281  uint32_t ui32IntClr))ROM_CANTABLE[0])
282 #define ROM_CANInit \
283  ((void (*)(uint32_t ui32Base))ROM_CANTABLE[1])
284 #define ROM_CANEnable \
285  ((void (*)(uint32_t ui32Base))ROM_CANTABLE[2])
286 #define ROM_CANDisable \
287  ((void (*)(uint32_t ui32Base))ROM_CANTABLE[3])
288 #define ROM_CANBitTimingSet \
289  ((void (*)(uint32_t ui32Base, \
290  tCANBitClkParms *psClkParms))ROM_CANTABLE[4])
291 #define ROM_CANBitTimingGet \
292  ((void (*)(uint32_t ui32Base, \
293  tCANBitClkParms *psClkParms))ROM_CANTABLE[5])
294 #define ROM_CANMessageSet \
295  ((void (*)(uint32_t ui32Base, \
296  uint32_t ui32ObjID, \
297  tCANMsgObject *psMsgObject, \
298  tMsgObjType eMsgType))ROM_CANTABLE[6])
299 #define ROM_CANMessageGet \
300  ((void (*)(uint32_t ui32Base, \
301  uint32_t ui32ObjID, \
302  tCANMsgObject *psMsgObject, \
303  bool bClrPendingInt))ROM_CANTABLE[7])
304 #define ROM_CANStatusGet \
305  ((uint32_t (*)(uint32_t ui32Base, \
306  tCANStsReg eStatusReg))ROM_CANTABLE[8])
307 #define ROM_CANMessageClear \
308  ((void (*)(uint32_t ui32Base, \
309  uint32_t ui32ObjID))ROM_CANTABLE[9])
310 #define ROM_CANIntEnable \
311  ((void (*)(uint32_t ui32Base, \
312  uint32_t ui32IntFlags))ROM_CANTABLE[10])
313 #define ROM_CANIntDisable \
314  ((void (*)(uint32_t ui32Base, \
315  uint32_t ui32IntFlags))ROM_CANTABLE[11])
316 #define ROM_CANIntStatus \
317  ((uint32_t (*)(uint32_t ui32Base, \
318  tCANIntStsReg eIntStsReg))ROM_CANTABLE[12])
319 #define ROM_CANRetryGet \
320  ((bool (*)(uint32_t ui32Base))ROM_CANTABLE[13])
321 #define ROM_CANRetrySet \
322  ((void (*)(uint32_t ui32Base, \
323  bool bAutoRetry))ROM_CANTABLE[14])
324 #define ROM_CANErrCntrGet \
325  ((bool (*)(uint32_t ui32Base, \
326  uint32_t *pui32RxCount, \
327  uint32_t *pui32TxCount))ROM_CANTABLE[15])
328 #define ROM_CANBitRateSet \
329  ((uint32_t (*)(uint32_t ui32Base, \
330  uint32_t ui32SourceClock, \
331  uint32_t ui32BitRate))ROM_CANTABLE[16])
332 
333 //*****************************************************************************
334 //
335 // Macros for calling ROM functions in the Comparator API.
336 //
337 //*****************************************************************************
338 #define ROM_ComparatorIntClear \
339  ((void (*)(uint32_t ui32Base, \
340  uint32_t ui32Comp))ROM_COMPARATORTABLE[0])
341 #define ROM_ComparatorConfigure \
342  ((void (*)(uint32_t ui32Base, \
343  uint32_t ui32Comp, \
344  uint32_t ui32Config))ROM_COMPARATORTABLE[1])
345 #define ROM_ComparatorRefSet \
346  ((void (*)(uint32_t ui32Base, \
347  uint32_t ui32Ref))ROM_COMPARATORTABLE[2])
348 #define ROM_ComparatorValueGet \
349  ((bool (*)(uint32_t ui32Base, \
350  uint32_t ui32Comp))ROM_COMPARATORTABLE[3])
351 #define ROM_ComparatorIntEnable \
352  ((void (*)(uint32_t ui32Base, \
353  uint32_t ui32Comp))ROM_COMPARATORTABLE[4])
354 #define ROM_ComparatorIntDisable \
355  ((void (*)(uint32_t ui32Base, \
356  uint32_t ui32Comp))ROM_COMPARATORTABLE[5])
357 #define ROM_ComparatorIntStatus \
358  ((bool (*)(uint32_t ui32Base, \
359  uint32_t ui32Comp, \
360  bool bMasked))ROM_COMPARATORTABLE[6])
361 
362 //*****************************************************************************
363 //
364 // Macros for calling ROM functions in the CRC API.
365 //
366 //*****************************************************************************
367 #define ROM_CRCConfigSet \
368  ((void (*)(uint32_t ui32Base, \
369  uint32_t ui32CRCConfig))ROM_CRCTABLE[0])
370 #define ROM_CRCDataProcess \
371  ((uint32_t (*)(uint32_t ui32Base, \
372  uint32_t *pui32DataIn, \
373  uint32_t ui32DataLength, \
374  bool bPPResult))ROM_CRCTABLE[1])
375 #define ROM_CRCDataWrite \
376  ((void (*)(uint32_t ui32Base, \
377  uint32_t ui32Data))ROM_CRCTABLE[2])
378 #define ROM_CRCResultRead \
379  ((uint32_t (*)(uint32_t ui32Base, \
380  bool bPPResult))ROM_CRCTABLE[3])
381 #define ROM_CRCSeedSet \
382  ((void (*)(uint32_t ui32Base, \
383  uint32_t ui32Seed))ROM_CRCTABLE[4])
384 
385 //*****************************************************************************
386 //
387 // Macros for calling ROM functions in the DES API.
388 //
389 //*****************************************************************************
390 #define ROM_DESIntStatus \
391  ((uint32_t (*)(uint32_t ui32Base, \
392  bool bMasked))ROM_DESTABLE[0])
393 #define ROM_DESConfigSet \
394  ((void (*)(uint32_t ui32Base, \
395  uint32_t ui32Config))ROM_DESTABLE[1])
396 #define ROM_DESDataRead \
397  ((void (*)(uint32_t ui32Base, \
398  uint32_t *pui32Dest))ROM_DESTABLE[2])
399 #define ROM_DESDataReadNonBlocking \
400  ((bool (*)(uint32_t ui32Base, \
401  uint32_t *pui32Dest))ROM_DESTABLE[3])
402 #define ROM_DESDataProcess \
403  ((bool (*)(uint32_t ui32Base, \
404  uint32_t *pui32Src, \
405  uint32_t *pui32Dest, \
406  uint32_t ui32Length))ROM_DESTABLE[4])
407 #define ROM_DESDataWrite \
408  ((void (*)(uint32_t ui32Base, \
409  uint32_t *pui32Src))ROM_DESTABLE[5])
410 #define ROM_DESDataWriteNonBlocking \
411  ((bool (*)(uint32_t ui32Base, \
412  uint32_t *pui32Src))ROM_DESTABLE[6])
413 #define ROM_DESDMADisable \
414  ((void (*)(uint32_t ui32Base, \
415  uint32_t ui32Flags))ROM_DESTABLE[7])
416 #define ROM_DESDMAEnable \
417  ((void (*)(uint32_t ui32Base, \
418  uint32_t ui32Flags))ROM_DESTABLE[8])
419 #define ROM_DESIntClear \
420  ((void (*)(uint32_t ui32Base, \
421  uint32_t ui32IntFlags))ROM_DESTABLE[9])
422 #define ROM_DESIntDisable \
423  ((void (*)(uint32_t ui32Base, \
424  uint32_t ui32IntFlags))ROM_DESTABLE[10])
425 #define ROM_DESIntEnable \
426  ((void (*)(uint32_t ui32Base, \
427  uint32_t ui32IntFlags))ROM_DESTABLE[11])
428 #define ROM_DESIVSet \
429  ((bool (*)(uint32_t ui32Base, \
430  uint32_t *pui32IVdata))ROM_DESTABLE[12])
431 #define ROM_DESKeySet \
432  ((void (*)(uint32_t ui32Base, \
433  uint32_t *pui32Key))ROM_DESTABLE[13])
434 #define ROM_DESLengthSet \
435  ((void (*)(uint32_t ui32Base, \
436  uint32_t ui32Length))ROM_DESTABLE[14])
437 #define ROM_DESReset \
438  ((void (*)(uint32_t ui32Base))ROM_DESTABLE[15])
439 
440 //*****************************************************************************
441 //
442 // Macros for calling ROM functions in the EEPROM API.
443 //
444 //*****************************************************************************
445 #define ROM_EEPROMRead \
446  ((void (*)(uint32_t *pui32Data, \
447  uint32_t ui32Address, \
448  uint32_t ui32Count))ROM_EEPROMTABLE[0])
449 #define ROM_EEPROMBlockCountGet \
450  ((uint32_t (*)(void))ROM_EEPROMTABLE[1])
451 #define ROM_EEPROMBlockHide \
452  ((void (*)(uint32_t ui32Block))ROM_EEPROMTABLE[2])
453 #define ROM_EEPROMBlockLock \
454  ((uint32_t (*)(uint32_t ui32Block))ROM_EEPROMTABLE[3])
455 #define ROM_EEPROMBlockPasswordSet \
456  ((uint32_t (*)(uint32_t ui32Block, \
457  uint32_t *pui32Password, \
458  uint32_t ui32Count))ROM_EEPROMTABLE[4])
459 #define ROM_EEPROMBlockProtectGet \
460  ((uint32_t (*)(uint32_t ui32Block))ROM_EEPROMTABLE[5])
461 #define ROM_EEPROMBlockProtectSet \
462  ((uint32_t (*)(uint32_t ui32Block, \
463  uint32_t ui32Protect))ROM_EEPROMTABLE[6])
464 #define ROM_EEPROMBlockUnlock \
465  ((uint32_t (*)(uint32_t ui32Block, \
466  uint32_t *pui32Password, \
467  uint32_t ui32Count))ROM_EEPROMTABLE[7])
468 #define ROM_EEPROMIntClear \
469  ((void (*)(uint32_t ui32IntFlags))ROM_EEPROMTABLE[8])
470 #define ROM_EEPROMIntDisable \
471  ((void (*)(uint32_t ui32IntFlags))ROM_EEPROMTABLE[9])
472 #define ROM_EEPROMIntEnable \
473  ((void (*)(uint32_t ui32IntFlags))ROM_EEPROMTABLE[10])
474 #define ROM_EEPROMIntStatus \
475  ((uint32_t (*)(bool bMasked))ROM_EEPROMTABLE[11])
476 #define ROM_EEPROMProgram \
477  ((uint32_t (*)(uint32_t *pui32Data, \
478  uint32_t ui32Address, \
479  uint32_t ui32Count))ROM_EEPROMTABLE[13])
480 #define ROM_EEPROMProgramNonBlocking \
481  ((uint32_t (*)(uint32_t ui32Data, \
482  uint32_t ui32Address))ROM_EEPROMTABLE[14])
483 #define ROM_EEPROMSizeGet \
484  ((uint32_t (*)(void))ROM_EEPROMTABLE[15])
485 #define ROM_EEPROMStatusGet \
486  ((uint32_t (*)(void))ROM_EEPROMTABLE[16])
487 #define ROM_EEPROMInit \
488  ((uint32_t (*)(void))ROM_EEPROMTABLE[17])
489 
490 //*****************************************************************************
491 //
492 // Macros for calling ROM functions in the EPI API.
493 //
494 //*****************************************************************************
495 #define ROM_EPIIntStatus \
496  ((uint32_t (*)(uint32_t ui32Base, \
497  bool bMasked))ROM_EPITABLE[0])
498 #define ROM_EPIModeSet \
499  ((void (*)(uint32_t ui32Base, \
500  uint32_t ui32Mode))ROM_EPITABLE[1])
501 #define ROM_EPIDividerSet \
502  ((void (*)(uint32_t ui32Base, \
503  uint32_t ui32Divider))ROM_EPITABLE[2])
504 #define ROM_EPIConfigSDRAMSet \
505  ((void (*)(uint32_t ui32Base, \
506  uint32_t ui32Config, \
507  uint32_t ui32Refresh))ROM_EPITABLE[3])
508 #define ROM_EPIConfigGPModeSet \
509  ((void (*)(uint32_t ui32Base, \
510  uint32_t ui32Config, \
511  uint32_t ui32FrameCount, \
512  uint32_t ui32MaxWait))ROM_EPITABLE[4])
513 #define ROM_EPIConfigHB8Set \
514  ((void (*)(uint32_t ui32Base, \
515  uint32_t ui32Config, \
516  uint32_t ui32MaxWait))ROM_EPITABLE[5])
517 #define ROM_EPIConfigHB16Set \
518  ((void (*)(uint32_t ui32Base, \
519  uint32_t ui32Config, \
520  uint32_t ui32MaxWait))ROM_EPITABLE[6])
521 #define ROM_EPIAddressMapSet \
522  ((void (*)(uint32_t ui32Base, \
523  uint32_t ui32Map))ROM_EPITABLE[7])
524 #define ROM_EPINonBlockingReadConfigure \
525  ((void (*)(uint32_t ui32Base, \
526  uint32_t ui32Channel, \
527  uint32_t ui32DataSize, \
528  uint32_t ui32Address))ROM_EPITABLE[8])
529 #define ROM_EPINonBlockingReadStart \
530  ((void (*)(uint32_t ui32Base, \
531  uint32_t ui32Channel, \
532  uint32_t ui32Count))ROM_EPITABLE[9])
533 #define ROM_EPINonBlockingReadStop \
534  ((void (*)(uint32_t ui32Base, \
535  uint32_t ui32Channel))ROM_EPITABLE[10])
536 #define ROM_EPINonBlockingReadCount \
537  ((uint32_t (*)(uint32_t ui32Base, \
538  uint32_t ui32Channel))ROM_EPITABLE[11])
539 #define ROM_EPINonBlockingReadAvail \
540  ((uint32_t (*)(uint32_t ui32Base))ROM_EPITABLE[12])
541 #define ROM_EPINonBlockingReadGet32 \
542  ((uint32_t (*)(uint32_t ui32Base, \
543  uint32_t ui32Count, \
544  uint32_t *pui32Buf))ROM_EPITABLE[13])
545 #define ROM_EPINonBlockingReadGet16 \
546  ((uint32_t (*)(uint32_t ui32Base, \
547  uint32_t ui32Count, \
548  uint16_t *pui16Buf))ROM_EPITABLE[14])
549 #define ROM_EPINonBlockingReadGet8 \
550  ((uint32_t (*)(uint32_t ui32Base, \
551  uint32_t ui32Count, \
552  uint8_t *pui8Buf))ROM_EPITABLE[15])
553 #define ROM_EPIFIFOConfig \
554  ((void (*)(uint32_t ui32Base, \
555  uint32_t ui32Config))ROM_EPITABLE[16])
556 #define ROM_EPIWriteFIFOCountGet \
557  ((uint32_t (*)(uint32_t ui32Base))ROM_EPITABLE[17])
558 #define ROM_EPIIntEnable \
559  ((void (*)(uint32_t ui32Base, \
560  uint32_t ui32IntFlags))ROM_EPITABLE[18])
561 #define ROM_EPIIntDisable \
562  ((void (*)(uint32_t ui32Base, \
563  uint32_t ui32IntFlags))ROM_EPITABLE[19])
564 #define ROM_EPIIntErrorStatus \
565  ((uint32_t (*)(uint32_t ui32Base))ROM_EPITABLE[20])
566 #define ROM_EPIIntErrorClear \
567  ((void (*)(uint32_t ui32Base, \
568  uint32_t ui32ErrFlags))ROM_EPITABLE[21])
569 #define ROM_EPIDividerCSSet \
570  ((void (*)(uint32_t ui32Base, \
571  uint32_t ui32CS, \
572  uint32_t ui32Divider))ROM_EPITABLE[22])
573 #define ROM_EPIConfigHB8CSSet \
574  ((void (*)(uint32_t ui32Base, \
575  uint32_t ui32CS, \
576  uint32_t ui32Config))ROM_EPITABLE[24])
577 #define ROM_EPIConfigHB16CSSet \
578  ((void (*)(uint32_t ui32Base, \
579  uint32_t ui32CS, \
580  uint32_t ui32Config))ROM_EPITABLE[25])
581 #define ROM_EPIConfigHB8TimingSet \
582  ((void (*)(uint32_t ui32Base, \
583  uint32_t ui32CS, \
584  uint32_t ui32Config))ROM_EPITABLE[26])
585 #define ROM_EPIConfigHB16TimingSet \
586  ((void (*)(uint32_t ui32Base, \
587  uint32_t ui32CS, \
588  uint32_t ui32Config))ROM_EPITABLE[27])
589 #define ROM_EPIPSRAMConfigRegSet \
590  ((void (*)(uint32_t ui32Base, \
591  uint32_t ui32CS, \
592  uint32_t ui32CR))ROM_EPITABLE[28])
593 #define ROM_EPIPSRAMConfigRegRead \
594  ((void (*)(uint32_t ui32Base, \
595  uint32_t ui32CS))ROM_EPITABLE[29])
596 #define ROM_EPIPSRAMConfigRegGetNonBlocking \
597  ((bool (*)(uint32_t ui32Base, \
598  uint32_t ui32CS, \
599  uint32_t *pui32CR))ROM_EPITABLE[30])
600 #define ROM_EPIPSRAMConfigRegGet \
601  ((uint32_t (*)(uint32_t ui32Base, \
602  uint32_t ui32CS))ROM_EPITABLE[31])
603 
604 //*****************************************************************************
605 //
606 // Macros for calling ROM functions in the EMAC API.
607 //
608 //*****************************************************************************
609 #define ROM_EMACIntStatus \
610  ((uint32_t (*)(uint32_t ui32Base, \
611  bool bMasked))ROM_EMACTABLE[0])
612 #define ROM_EMACAddrGet \
613  ((void (*)(uint32_t ui32Base, \
614  uint32_t ui32Index, \
615  uint8_t *pui8MACAddr))ROM_EMACTABLE[1])
616 #define ROM_EMACAddrSet \
617  ((void (*)(uint32_t ui32Base, \
618  uint32_t ui32Index, \
619  const uint8_t *pui8MACAddr))ROM_EMACTABLE[2])
620 #define ROM_EMACConfigGet \
621  ((void (*)(uint32_t ui32Base, \
622  uint32_t *pui32Config, \
623  uint32_t *pui32Mode, \
624  uint32_t *pui32RxMaxFrameSize))ROM_EMACTABLE[3])
625 #define ROM_EMACConfigSet \
626  ((void (*)(uint32_t ui32Base, \
627  uint32_t ui32Config, \
628  uint32_t ui32ModeFlags, \
629  uint32_t ui32RxMaxFrameSize))ROM_EMACTABLE[4])
630 #define ROM_EMACDMAStateGet \
631  ((uint32_t (*)(uint32_t ui32Base))ROM_EMACTABLE[5])
632 #define ROM_EMACFrameFilterGet \
633  ((uint32_t (*)(uint32_t ui32Base))ROM_EMACTABLE[6])
634 #define ROM_EMACFrameFilterSet \
635  ((void (*)(uint32_t ui32Base, \
636  uint32_t ui32FilterOpts))ROM_EMACTABLE[7])
637 #define ROM_EMACInit \
638  ((void (*)(uint32_t ui32Base, \
639  uint32_t ui32SysClk, \
640  uint32_t ui32BusConfig, \
641  uint32_t ui32RxBurst, \
642  uint32_t ui32TxBurst, \
643  uint32_t ui32DescSkipSize))ROM_EMACTABLE[8])
644 #define ROM_EMACIntClear \
645  ((void (*)(uint32_t ui32Base, \
646  uint32_t ui32IntFlags))ROM_EMACTABLE[9])
647 #define ROM_EMACIntDisable \
648  ((void (*)(uint32_t ui32Base, \
649  uint32_t ui32IntFlags))ROM_EMACTABLE[10])
650 #define ROM_EMACIntEnable \
651  ((void (*)(uint32_t ui32Base, \
652  uint32_t ui32IntFlags))ROM_EMACTABLE[11])
653 #define ROM_EMACPHYConfigSet \
654  ((void (*)(uint32_t ui32Base, \
655  uint32_t ui32Config))ROM_EMACTABLE[12])
656 #define ROM_EMACPHYPowerOff \
657  ((void (*)(uint32_t ui32Base, \
658  uint8_t ui8PhyAddr))ROM_EMACTABLE[13])
659 #define ROM_EMACPHYPowerOn \
660  ((void (*)(uint32_t ui32Base, \
661  uint8_t ui8PhyAddr))ROM_EMACTABLE[14])
662 #define ROM_EMACPHYRead \
663  ((uint16_t (*)(uint32_t ui32Base, \
664  uint8_t ui8PhyAddr, \
665  uint8_t ui8RegAddr))ROM_EMACTABLE[15])
666 #define ROM_EMACPHYWrite \
667  ((void (*)(uint32_t ui32Base, \
668  uint8_t ui8PhyAddr, \
669  uint8_t ui8RegAddr, \
670  uint16_t ui16Data))ROM_EMACTABLE[16])
671 #define ROM_EMACReset \
672  ((void (*)(uint32_t ui32Base))ROM_EMACTABLE[17])
673 #define ROM_EMACRxDisable \
674  ((void (*)(uint32_t ui32Base))ROM_EMACTABLE[18])
675 #define ROM_EMACRxDMACurrentBufferGet \
676  ((uint8_t * (*)(uint32_t ui32Base))ROM_EMACTABLE[19])
677 #define ROM_EMACRxDMACurrentDescriptorGet \
678  ((tEMACDMADescriptor * (*)(uint32_t ui32Base))ROM_EMACTABLE[20])
679 #define ROM_EMACRxDMADescriptorListGet \
680  ((tEMACDMADescriptor * (*)(uint32_t ui32Base))ROM_EMACTABLE[21])
681 #define ROM_EMACRxDMADescriptorListSet \
682  ((void (*)(uint32_t ui32Base, \
683  tEMACDMADescriptor *pDescriptor))ROM_EMACTABLE[22])
684 #define ROM_EMACRxDMAPollDemand \
685  ((void (*)(uint32_t ui32Base))ROM_EMACTABLE[23])
686 #define ROM_EMACRxEnable \
687  ((void (*)(uint32_t ui32Base))ROM_EMACTABLE[24])
688 #define ROM_EMACRxWatchdogTimerSet \
689  ((void (*)(uint32_t ui32Base, \
690  uint8_t ui8Timeout))ROM_EMACTABLE[25])
691 #define ROM_EMACStatusGet \
692  ((uint32_t (*)(uint32_t ui32Base))ROM_EMACTABLE[26])
693 #define ROM_EMACTxDisable \
694  ((void (*)(uint32_t ui32Base))ROM_EMACTABLE[27])
695 #define ROM_EMACTxDMACurrentBufferGet \
696  ((uint8_t * (*)(uint32_t ui32Base))ROM_EMACTABLE[28])
697 #define ROM_EMACTxDMACurrentDescriptorGet \
698  ((tEMACDMADescriptor * (*)(uint32_t ui32Base))ROM_EMACTABLE[29])
699 #define ROM_EMACTxDMADescriptorListGet \
700  ((tEMACDMADescriptor * (*)(uint32_t ui32Base))ROM_EMACTABLE[30])
701 #define ROM_EMACTxDMADescriptorListSet \
702  ((void (*)(uint32_t ui32Base, \
703  tEMACDMADescriptor *pDescriptor))ROM_EMACTABLE[31])
704 #define ROM_EMACTxDMAPollDemand \
705  ((void (*)(uint32_t ui32Base))ROM_EMACTABLE[32])
706 #define ROM_EMACTxEnable \
707  ((void (*)(uint32_t ui32Base))ROM_EMACTABLE[33])
708 #define ROM_EMACTxFlush \
709  ((void (*)(uint32_t ui32Base))ROM_EMACTABLE[34])
710 #define ROM_EMACAddrFilterGet \
711  ((uint32_t (*)(uint32_t ui32Base, \
712  uint32_t ui32Index))ROM_EMACTABLE[35])
713 #define ROM_EMACAddrFilterSet \
714  ((void (*)(uint32_t ui32Base, \
715  uint32_t ui32Index, \
716  uint32_t ui32Config))ROM_EMACTABLE[36])
717 #define ROM_EMACHashFilterBitCalculate \
718  ((uint32_t (*)(uint8_t *pui8MACAddr))ROM_EMACTABLE[37])
719 #define ROM_EMACHashFilterGet \
720  ((void (*)(uint32_t ui32Base, \
721  uint32_t *pui32HashHi, \
722  uint32_t *pui32HashLo))ROM_EMACTABLE[38])
723 #define ROM_EMACHashFilterSet \
724  ((void (*)(uint32_t ui32Base, \
725  uint32_t ui32HashHi, \
726  uint32_t ui32HashLo))ROM_EMACTABLE[39])
727 #define ROM_EMACNumAddrGet \
728  ((uint32_t (*)(uint32_t ui32Base))ROM_EMACTABLE[40])
729 #define ROM_EMACPHYExtendedRead \
730  ((uint16_t (*)(uint32_t ui32Base, \
731  uint8_t ui8PhyAddr, \
732  uint16_t ui16RegAddr))ROM_EMACTABLE[41])
733 #define ROM_EMACPHYExtendedWrite \
734  ((void (*)(uint32_t ui32Base, \
735  uint8_t ui8PhyAddr, \
736  uint16_t ui16RegAddr, \
737  uint16_t ui16Data))ROM_EMACTABLE[42])
738 #define ROM_EMACPowerManagementControlGet \
739  ((uint32_t (*)(uint32_t ui32Base))ROM_EMACTABLE[43])
740 #define ROM_EMACPowerManagementControlSet \
741  ((void (*)(uint32_t ui32Base, \
742  uint32_t ui32Flags))ROM_EMACTABLE[44])
743 #define ROM_EMACPowerManagementStatusGet \
744  ((uint32_t (*)(uint32_t ui32Base))ROM_EMACTABLE[45])
745 #define ROM_EMACRemoteWakeUpFrameFilterGet \
746  ((void (*)(uint32_t ui32Base, \
747  tEMACWakeUpFrameFilter *pFilter))ROM_EMACTABLE[46])
748 #define ROM_EMACRemoteWakeUpFrameFilterSet \
749  ((void (*)(uint32_t ui32Base, \
750  const tEMACWakeUpFrameFilter *pFilter))ROM_EMACTABLE[47])
751 #define ROM_EMACTimestampAddendSet \
752  ((void (*)(uint32_t ui32Base, \
753  uint32_t ui32Seconds))ROM_EMACTABLE[48])
754 #define ROM_EMACTimestampConfigGet \
755  ((uint32_t (*)(uint32_t ui32Base, \
756  uint32_t *pui32SubSecondInc))ROM_EMACTABLE[49])
757 #define ROM_EMACTimestampConfigSet \
758  ((void (*)(uint32_t ui32Base, \
759  uint32_t ui32Config, \
760  uint32_t ui32SubSecondInc))ROM_EMACTABLE[50])
761 #define ROM_EMACTimestampDisable \
762  ((void (*)(uint32_t ui32Base))ROM_EMACTABLE[51])
763 #define ROM_EMACTimestampEnable \
764  ((void (*)(uint32_t ui32Base))ROM_EMACTABLE[52])
765 #define ROM_EMACTimestampIntStatus \
766  ((uint32_t (*)(uint32_t ui32Base))ROM_EMACTABLE[53])
767 #define ROM_EMACTimestampPPSCommand \
768  ((void (*)(uint32_t ui32Base, \
769  uint8_t ui8Cmd))ROM_EMACTABLE[54])
770 #define ROM_EMACTimestampPPSCommandModeSet \
771  ((void (*)(uint32_t ui32Base, \
772  uint32_t ui32Config))ROM_EMACTABLE[55])
773 #define ROM_EMACTimestampPPSPeriodSet \
774  ((void (*)(uint32_t ui32Base, \
775  uint32_t ui32Period, \
776  uint32_t ui32Width))ROM_EMACTABLE[56])
777 #define ROM_EMACTimestampPPSSimpleModeSet \
778  ((void (*)(uint32_t ui32Base, \
779  uint32_t ui32FreqConfig))ROM_EMACTABLE[57])
780 #define ROM_EMACTimestampSysTimeSet \
781  ((void (*)(uint32_t ui32Base, \
782  uint32_t ui32Seconds, \
783  uint32_t ui32SubSeconds))ROM_EMACTABLE[59])
784 #define ROM_EMACTimestampSysTimeUpdate \
785  ((void (*)(uint32_t ui32Base, \
786  uint32_t ui32Seconds, \
787  uint32_t ui32SubSeconds, \
788  bool bInc))ROM_EMACTABLE[60])
789 #define ROM_EMACTimestampTargetIntDisable \
790  ((void (*)(uint32_t ui32Base))ROM_EMACTABLE[61])
791 #define ROM_EMACTimestampTargetIntEnable \
792  ((void (*)(uint32_t ui32Base))ROM_EMACTABLE[62])
793 #define ROM_EMACTimestampTargetSet \
794  ((void (*)(uint32_t ui32Base, \
795  uint32_t ui32Seconds, \
796  uint32_t ui32Nanoseconds))ROM_EMACTABLE[63])
797 #define ROM_EMACVLANHashFilterBitCalculate \
798  ((uint32_t (*)(uint16_t ui16Tag))ROM_EMACTABLE[64])
799 #define ROM_EMACVLANHashFilterGet \
800  ((uint32_t (*)(uint32_t ui32Base))ROM_EMACTABLE[65])
801 #define ROM_EMACVLANHashFilterSet \
802  ((void (*)(uint32_t ui32Base, \
803  uint32_t ui32Hash))ROM_EMACTABLE[66])
804 #define ROM_EMACVLANRxConfigGet \
805  ((uint32_t (*)(uint32_t ui32Base, \
806  uint16_t *pui16Tag))ROM_EMACTABLE[67])
807 #define ROM_EMACVLANRxConfigSet \
808  ((void (*)(uint32_t ui32Base, \
809  uint16_t ui16Tag, \
810  uint32_t ui32Config))ROM_EMACTABLE[68])
811 #define ROM_EMACVLANTxConfigGet \
812  ((uint32_t (*)(uint32_t ui32Base, \
813  uint16_t *pui16Tag))ROM_EMACTABLE[69])
814 #define ROM_EMACVLANTxConfigSet \
815  ((void (*)(uint32_t ui32Base, \
816  uint16_t ui16Tag, \
817  uint32_t ui32Config))ROM_EMACTABLE[70])
818 #define ROM_UpdateEMAC \
819  ((void (*)(uint32_t ui32Clock))ROM_EMACTABLE[71])
820 
821 //*****************************************************************************
822 //
823 // Macros for calling ROM functions in the Flash API.
824 //
825 //*****************************************************************************
826 #define ROM_FlashProgram \
827  ((int32_t (*)(uint32_t *pui32Data, \
828  uint32_t ui32Address, \
829  uint32_t ui32Count))ROM_FLASHTABLE[0])
830 #define ROM_FlashErase \
831  ((int32_t (*)(uint32_t ui32Address))ROM_FLASHTABLE[3])
832 #define ROM_FlashProtectGet \
833  ((tFlashProtection (*)(uint32_t ui32Address))ROM_FLASHTABLE[4])
834 #define ROM_FlashProtectSet \
835  ((int32_t (*)(uint32_t ui32Address, \
836  tFlashProtection eProtect))ROM_FLASHTABLE[5])
837 #define ROM_FlashProtectSave \
838  ((int32_t (*)(void))ROM_FLASHTABLE[6])
839 #define ROM_FlashUserGet \
840  ((int32_t (*)(uint32_t *pui32User0, \
841  uint32_t *pui32User1))ROM_FLASHTABLE[7])
842 #define ROM_FlashUserSet \
843  ((int32_t (*)(uint32_t ui32User0, \
844  uint32_t ui32User1))ROM_FLASHTABLE[8])
845 #define ROM_FlashUserSave \
846  ((int32_t (*)(void))ROM_FLASHTABLE[9])
847 #define ROM_FlashIntEnable \
848  ((void (*)(uint32_t ui32IntFlags))ROM_FLASHTABLE[10])
849 #define ROM_FlashIntDisable \
850  ((void (*)(uint32_t ui32IntFlags))ROM_FLASHTABLE[11])
851 #define ROM_FlashIntStatus \
852  ((uint32_t (*)(bool bMasked))ROM_FLASHTABLE[12])
853 #define ROM_FlashIntClear \
854  ((void (*)(uint32_t ui32IntFlags))ROM_FLASHTABLE[13])
855 
856 //*****************************************************************************
857 //
858 // Macros for calling ROM functions in the FPU API.
859 //
860 //*****************************************************************************
861 #define ROM_FPUEnable \
862  ((void (*)(void))ROM_FPUTABLE[0])
863 #define ROM_FPUDisable \
864  ((void (*)(void))ROM_FPUTABLE[1])
865 #define ROM_FPUFlushToZeroModeSet \
866  ((void (*)(uint32_t ui32Mode))ROM_FPUTABLE[2])
867 #define ROM_FPUHalfPrecisionModeSet \
868  ((void (*)(uint32_t ui32Mode))ROM_FPUTABLE[3])
869 #define ROM_FPULazyStackingEnable \
870  ((void (*)(void))ROM_FPUTABLE[4])
871 #define ROM_FPUNaNModeSet \
872  ((void (*)(uint32_t ui32Mode))ROM_FPUTABLE[5])
873 #define ROM_FPURoundingModeSet \
874  ((void (*)(uint32_t ui32Mode))ROM_FPUTABLE[6])
875 #define ROM_FPUStackingDisable \
876  ((void (*)(void))ROM_FPUTABLE[7])
877 #define ROM_FPUStackingEnable \
878  ((void (*)(void))ROM_FPUTABLE[8])
879 
880 //*****************************************************************************
881 //
882 // Macros for calling ROM functions in the GPIO API.
883 //
884 //*****************************************************************************
885 #define ROM_GPIOPinWrite \
886  ((void (*)(uint32_t ui32Port, \
887  uint8_t ui8Pins, \
888  uint8_t ui8Val))ROM_GPIOTABLE[0])
889 #define ROM_GPIODirModeSet \
890  ((void (*)(uint32_t ui32Port, \
891  uint8_t ui8Pins, \
892  uint32_t ui32PinIO))ROM_GPIOTABLE[1])
893 #define ROM_GPIODirModeGet \
894  ((uint32_t (*)(uint32_t ui32Port, \
895  uint8_t ui8Pin))ROM_GPIOTABLE[2])
896 #define ROM_GPIOIntTypeSet \
897  ((void (*)(uint32_t ui32Port, \
898  uint8_t ui8Pins, \
899  uint32_t ui32IntType))ROM_GPIOTABLE[3])
900 #define ROM_GPIOIntTypeGet \
901  ((uint32_t (*)(uint32_t ui32Port, \
902  uint8_t ui8Pin))ROM_GPIOTABLE[4])
903 #define ROM_GPIOPadConfigGet \
904  ((void (*)(uint32_t ui32Port, \
905  uint8_t ui8Pin, \
906  uint32_t *pui32Strength, \
907  uint32_t *pui32PadType))ROM_GPIOTABLE[6])
908 #define ROM_GPIOPinRead \
909  ((int32_t (*)(uint32_t ui32Port, \
910  uint8_t ui8Pins))ROM_GPIOTABLE[11])
911 #define ROM_GPIOPinTypeComparator \
912  ((void (*)(uint32_t ui32Port, \
913  uint8_t ui8Pins))ROM_GPIOTABLE[13])
914 #define ROM_GPIOPinTypeGPIOInput \
915  ((void (*)(uint32_t ui32Port, \
916  uint8_t ui8Pins))ROM_GPIOTABLE[14])
917 #define ROM_GPIOPinTypeGPIOOutput \
918  ((void (*)(uint32_t ui32Port, \
919  uint8_t ui8Pins))ROM_GPIOTABLE[15])
920 #define ROM_GPIOPinTypeI2C \
921  ((void (*)(uint32_t ui32Port, \
922  uint8_t ui8Pins))ROM_GPIOTABLE[16])
923 #define ROM_GPIOPinTypePWM \
924  ((void (*)(uint32_t ui32Port, \
925  uint8_t ui8Pins))ROM_GPIOTABLE[17])
926 #define ROM_GPIOPinTypeQEI \
927  ((void (*)(uint32_t ui32Port, \
928  uint8_t ui8Pins))ROM_GPIOTABLE[18])
929 #define ROM_GPIOPinTypeSSI \
930  ((void (*)(uint32_t ui32Port, \
931  uint8_t ui8Pins))ROM_GPIOTABLE[19])
932 #define ROM_GPIOPinTypeTimer \
933  ((void (*)(uint32_t ui32Port, \
934  uint8_t ui8Pins))ROM_GPIOTABLE[20])
935 #define ROM_GPIOPinTypeUART \
936  ((void (*)(uint32_t ui32Port, \
937  uint8_t ui8Pins))ROM_GPIOTABLE[21])
938 #define ROM_GPIOPinTypeGPIOOutputOD \
939  ((void (*)(uint32_t ui32Port, \
940  uint8_t ui8Pins))ROM_GPIOTABLE[22])
941 #define ROM_GPIOPinTypeADC \
942  ((void (*)(uint32_t ui32Port, \
943  uint8_t ui8Pins))ROM_GPIOTABLE[23])
944 #define ROM_GPIOPinTypeUSBDigital \
945  ((void (*)(uint32_t ui32Port, \
946  uint8_t ui8Pins))ROM_GPIOTABLE[24])
947 #define ROM_GPIOPinConfigure \
948  ((void (*)(uint32_t ui32PinConfig))ROM_GPIOTABLE[26])
949 #define ROM_GPIOPinTypeUSBAnalog \
950  ((void (*)(uint32_t ui32Port, \
951  uint8_t ui8Pins))ROM_GPIOTABLE[28])
952 #define ROM_GPIOPinTypeI2CSCL \
953  ((void (*)(uint32_t ui32Port, \
954  uint8_t ui8Pins))ROM_GPIOTABLE[39])
955 #define ROM_GPIOPinTypeOneWire \
956  ((void (*)(uint32_t ui32Port, \
957  uint8_t ui8Pins))ROM_GPIOTABLE[44])
958 #define ROM_GPIOPinTypeWakeHigh \
959  ((void (*)(uint32_t ui32Port, \
960  uint8_t ui8Pins))ROM_GPIOTABLE[48])
961 #define ROM_GPIOPinTypeWakeLow \
962  ((void (*)(uint32_t ui32Port, \
963  uint8_t ui8Pins))ROM_GPIOTABLE[49])
964 #define ROM_GPIOIntClear \
965  ((void (*)(uint32_t ui32Port, \
966  uint32_t ui32IntFlags))ROM_GPIOTABLE[51])
967 #define ROM_GPIOIntDisable \
968  ((void (*)(uint32_t ui32Port, \
969  uint32_t ui32IntFlags))ROM_GPIOTABLE[52])
970 #define ROM_GPIOIntEnable \
971  ((void (*)(uint32_t ui32Port, \
972  uint32_t ui32IntFlags))ROM_GPIOTABLE[53])
973 #define ROM_GPIOIntStatus \
974  ((uint32_t (*)(uint32_t ui32Port, \
975  bool bMasked))ROM_GPIOTABLE[54])
976 
977 //*****************************************************************************
978 //
979 // Macros for calling ROM functions in the Hibernate API.
980 //
981 //*****************************************************************************
982 #define ROM_HibernateIntClear \
983  ((void (*)(uint32_t ui32IntFlags))ROM_HIBERNATETABLE[0])
984 #define ROM_HibernateEnableExpClk \
985  ((void (*)(uint32_t ui32HibClk))ROM_HIBERNATETABLE[1])
986 #define ROM_HibernateDisable \
987  ((void (*)(void))ROM_HIBERNATETABLE[2])
988 #define ROM_HibernateRTCEnable \
989  ((void (*)(void))ROM_HIBERNATETABLE[4])
990 #define ROM_HibernateRTCDisable \
991  ((void (*)(void))ROM_HIBERNATETABLE[5])
992 #define ROM_HibernateWakeSet \
993  ((void (*)(uint32_t ui32WakeFlags))ROM_HIBERNATETABLE[6])
994 #define ROM_HibernateWakeGet \
995  ((uint32_t (*)(void))ROM_HIBERNATETABLE[7])
996 #define ROM_HibernateLowBatSet \
997  ((void (*)(uint32_t ui32LowBatFlags))ROM_HIBERNATETABLE[8])
998 #define ROM_HibernateLowBatGet \
999  ((uint32_t (*)(void))ROM_HIBERNATETABLE[9])
1000 #define ROM_HibernateRTCSet \
1001  ((void (*)(uint32_t ui32RTCValue))ROM_HIBERNATETABLE[10])
1002 #define ROM_HibernateRTCGet \
1003  ((uint32_t (*)(void))ROM_HIBERNATETABLE[11])
1004 #define ROM_HibernateRTCTrimSet \
1005  ((void (*)(uint32_t ui32Trim))ROM_HIBERNATETABLE[16])
1006 #define ROM_HibernateRTCTrimGet \
1007  ((uint32_t (*)(void))ROM_HIBERNATETABLE[17])
1008 #define ROM_HibernateDataSet \
1009  ((void (*)(uint32_t *pui32Data, \
1010  uint32_t ui32Count))ROM_HIBERNATETABLE[18])
1011 #define ROM_HibernateDataGet \
1012  ((void (*)(uint32_t *pui32Data, \
1013  uint32_t ui32Count))ROM_HIBERNATETABLE[19])
1014 #define ROM_HibernateRequest \
1015  ((void (*)(void))ROM_HIBERNATETABLE[20])
1016 #define ROM_HibernateIntEnable \
1017  ((void (*)(uint32_t ui32IntFlags))ROM_HIBERNATETABLE[21])
1018 #define ROM_HibernateIntDisable \
1019  ((void (*)(uint32_t ui32IntFlags))ROM_HIBERNATETABLE[22])
1020 #define ROM_HibernateIntStatus \
1021  ((uint32_t (*)(bool bMasked))ROM_HIBERNATETABLE[23])
1022 #define ROM_HibernateIsActive \
1023  ((uint32_t (*)(void))ROM_HIBERNATETABLE[24])
1024 #define ROM_HibernateRTCSSGet \
1025  ((uint32_t (*)(void))ROM_HIBERNATETABLE[27])
1026 #define ROM_HibernateClockConfig \
1027  ((void (*)(uint32_t ui32Config))ROM_HIBERNATETABLE[28])
1028 #define ROM_HibernateBatCheckStart \
1029  ((void (*)(void))ROM_HIBERNATETABLE[29])
1030 #define ROM_HibernateBatCheckDone \
1031  ((uint32_t (*)(void))ROM_HIBERNATETABLE[30])
1032 #define ROM_HibernateGPIORetentionEnable \
1033  ((void (*)(void))ROM_HIBERNATETABLE[31])
1034 #define ROM_HibernateGPIORetentionDisable \
1035  ((void (*)(void))ROM_HIBERNATETABLE[32])
1036 #define ROM_HibernateGPIORetentionGet \
1037  ((bool (*)(void))ROM_HIBERNATETABLE[33])
1038 #define ROM_HibernateCounterMode \
1039  ((void (*)(uint32_t ui32Config))ROM_HIBERNATETABLE[34])
1040 #define ROM_HibernateCalendarSet \
1041  ((void (*)(struct tm *psTime))ROM_HIBERNATETABLE[35])
1042 #define ROM_HibernateCalendarGet \
1043  ((int (*)(struct tm *psTime))ROM_HIBERNATETABLE[36])
1044 #define ROM_HibernateCalendarMatchSet \
1045  ((void (*)(uint32_t ui32Index, \
1046  struct tm *psTime))ROM_HIBERNATETABLE[37])
1047 #define ROM_HibernateCalendarMatchGet \
1048  ((void (*)(uint32_t ui32Index, \
1049  struct tm *psTime))ROM_HIBERNATETABLE[38])
1050 #define ROM_HibernateTamperDisable \
1051  ((void (*)(void))ROM_HIBERNATETABLE[39])
1052 #define ROM_HibernateTamperEnable \
1053  ((void (*)(void))ROM_HIBERNATETABLE[40])
1054 #define ROM_HibernateTamperEventsClear \
1055  ((void (*)(void))ROM_HIBERNATETABLE[41])
1056 #define ROM_HibernateTamperEventsConfig \
1057  ((void (*)(uint32_t ui32Config))ROM_HIBERNATETABLE[42])
1058 #define ROM_HibernateTamperEventsGet \
1059  ((bool (*)(uint32_t ui32Index, \
1060  uint32_t *pui32RTC, \
1061  uint32_t *pui32Event))ROM_HIBERNATETABLE[43])
1062 #define ROM_HibernateTamperExtOscValid \
1063  ((bool (*)(void))ROM_HIBERNATETABLE[44])
1064 #define ROM_HibernateTamperExtOscRecover \
1065  ((void (*)(void))ROM_HIBERNATETABLE[45])
1066 #define ROM_HibernateTamperIODisable \
1067  ((void (*)(uint32_t ui32Input))ROM_HIBERNATETABLE[46])
1068 #define ROM_HibernateTamperIOEnable \
1069  ((void (*)(uint32_t ui32Input, \
1070  uint32_t ui32Config))ROM_HIBERNATETABLE[47])
1071 #define ROM_HibernateTamperStatusGet \
1072  ((uint32_t (*)(void))ROM_HIBERNATETABLE[48])
1073 #define ROM_HibernateRTCMatchGet \
1074  ((uint32_t (*)(uint32_t ui32Match))ROM_HIBERNATETABLE[49])
1075 #define ROM_HibernateRTCMatchSet \
1076  ((void (*)(uint32_t ui32Match, \
1077  uint32_t ui32Value))ROM_HIBERNATETABLE[50])
1078 #define ROM_HibernateRTCSSMatchGet \
1079  ((uint32_t (*)(uint32_t ui32Match))ROM_HIBERNATETABLE[51])
1080 #define ROM_HibernateRTCSSMatchSet \
1081  ((void (*)(uint32_t ui32Match, \
1082  uint32_t ui32Value))ROM_HIBERNATETABLE[52])
1083 
1084 //*****************************************************************************
1085 //
1086 // Macros for calling ROM functions in the I2C API.
1087 //
1088 //*****************************************************************************
1089 #define ROM_I2CMasterDataPut \
1090  ((void (*)(uint32_t ui32Base, \
1091  uint8_t ui8Data))ROM_I2CTABLE[0])
1092 #define ROM_I2CMasterInitExpClk \
1093  ((void (*)(uint32_t ui32Base, \
1094  uint32_t ui32I2CClk, \
1095  bool bFast))ROM_I2CTABLE[1])
1096 #define ROM_I2CSlaveInit \
1097  ((void (*)(uint32_t ui32Base, \
1098  uint8_t ui8SlaveAddr))ROM_I2CTABLE[2])
1099 #define ROM_I2CMasterEnable \
1100  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[3])
1101 #define ROM_I2CSlaveEnable \
1102  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[4])
1103 #define ROM_I2CMasterDisable \
1104  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[5])
1105 #define ROM_I2CSlaveDisable \
1106  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[6])
1107 #define ROM_I2CMasterIntEnable \
1108  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[7])
1109 #define ROM_I2CSlaveIntEnable \
1110  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[8])
1111 #define ROM_I2CMasterIntDisable \
1112  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[9])
1113 #define ROM_I2CSlaveIntDisable \
1114  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[10])
1115 #define ROM_I2CMasterIntStatus \
1116  ((bool (*)(uint32_t ui32Base, \
1117  bool bMasked))ROM_I2CTABLE[11])
1118 #define ROM_I2CSlaveIntStatus \
1119  ((bool (*)(uint32_t ui32Base, \
1120  bool bMasked))ROM_I2CTABLE[12])
1121 #define ROM_I2CMasterIntClear \
1122  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[13])
1123 #define ROM_I2CSlaveIntClear \
1124  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[14])
1125 #define ROM_I2CMasterSlaveAddrSet \
1126  ((void (*)(uint32_t ui32Base, \
1127  uint8_t ui8SlaveAddr, \
1128  bool bReceive))ROM_I2CTABLE[15])
1129 #define ROM_I2CMasterBusy \
1130  ((bool (*)(uint32_t ui32Base))ROM_I2CTABLE[16])
1131 #define ROM_I2CMasterBusBusy \
1132  ((bool (*)(uint32_t ui32Base))ROM_I2CTABLE[17])
1133 #define ROM_I2CMasterControl \
1134  ((void (*)(uint32_t ui32Base, \
1135  uint32_t ui32Cmd))ROM_I2CTABLE[18])
1136 #define ROM_I2CMasterErr \
1137  ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[19])
1138 #define ROM_I2CMasterDataGet \
1139  ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[20])
1140 #define ROM_I2CSlaveStatus \
1141  ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[21])
1142 #define ROM_I2CSlaveDataPut \
1143  ((void (*)(uint32_t ui32Base, \
1144  uint8_t ui8Data))ROM_I2CTABLE[22])
1145 #define ROM_I2CSlaveDataGet \
1146  ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[23])
1147 #define ROM_UpdateI2C \
1148  ((void (*)(void))ROM_I2CTABLE[24])
1149 #define ROM_I2CSlaveIntEnableEx \
1150  ((void (*)(uint32_t ui32Base, \
1151  uint32_t ui32IntFlags))ROM_I2CTABLE[25])
1152 #define ROM_I2CSlaveIntDisableEx \
1153  ((void (*)(uint32_t ui32Base, \
1154  uint32_t ui32IntFlags))ROM_I2CTABLE[26])
1155 #define ROM_I2CSlaveIntStatusEx \
1156  ((uint32_t (*)(uint32_t ui32Base, \
1157  bool bMasked))ROM_I2CTABLE[27])
1158 #define ROM_I2CSlaveIntClearEx \
1159  ((void (*)(uint32_t ui32Base, \
1160  uint32_t ui32IntFlags))ROM_I2CTABLE[28])
1161 #define ROM_I2CMasterIntEnableEx \
1162  ((void (*)(uint32_t ui32Base, \
1163  uint32_t ui32IntFlags))ROM_I2CTABLE[29])
1164 #define ROM_I2CMasterIntDisableEx \
1165  ((void (*)(uint32_t ui32Base, \
1166  uint32_t ui32IntFlags))ROM_I2CTABLE[30])
1167 #define ROM_I2CMasterIntStatusEx \
1168  ((uint32_t (*)(uint32_t ui32Base, \
1169  bool bMasked))ROM_I2CTABLE[31])
1170 #define ROM_I2CMasterIntClearEx \
1171  ((void (*)(uint32_t ui32Base, \
1172  uint32_t ui32IntFlags))ROM_I2CTABLE[32])
1173 #define ROM_I2CMasterTimeoutSet \
1174  ((void (*)(uint32_t ui32Base, \
1175  uint32_t ui32Value))ROM_I2CTABLE[33])
1176 #define ROM_I2CSlaveACKOverride \
1177  ((void (*)(uint32_t ui32Base, \
1178  bool bEnable))ROM_I2CTABLE[34])
1179 #define ROM_I2CSlaveACKValueSet \
1180  ((void (*)(uint32_t ui32Base, \
1181  bool bACK))ROM_I2CTABLE[35])
1182 #define ROM_I2CSlaveAddressSet \
1183  ((void (*)(uint32_t ui32Base, \
1184  uint8_t ui8AddrNum, \
1185  uint8_t ui8SlaveAddr))ROM_I2CTABLE[37])
1186 #define ROM_I2CMasterLineStateGet \
1187  ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[38])
1188 #define ROM_I2CTxFIFOConfigSet \
1189  ((void (*)(uint32_t ui32Base, \
1190  uint32_t ui32Config))ROM_I2CTABLE[39])
1191 #define ROM_I2CTxFIFOFlush \
1192  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[40])
1193 #define ROM_I2CRxFIFOConfigSet \
1194  ((void (*)(uint32_t ui32Base, \
1195  uint32_t ui32Config))ROM_I2CTABLE[41])
1196 #define ROM_I2CRxFIFOFlush \
1197  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[42])
1198 #define ROM_I2CFIFOStatus \
1199  ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[43])
1200 #define ROM_I2CFIFODataPut \
1201  ((void (*)(uint32_t ui32Base, \
1202  uint8_t ui8Data))ROM_I2CTABLE[44])
1203 #define ROM_I2CFIFODataPutNonBlocking \
1204  ((uint32_t (*)(uint32_t ui32Base, \
1205  uint8_t ui8Data))ROM_I2CTABLE[45])
1206 #define ROM_I2CFIFODataGet \
1207  ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[46])
1208 #define ROM_I2CFIFODataGetNonBlocking \
1209  ((uint32_t (*)(uint32_t ui32Base, \
1210  uint8_t *pui8Data))ROM_I2CTABLE[47])
1211 #define ROM_I2CMasterBurstLengthSet \
1212  ((void (*)(uint32_t ui32Base, \
1213  uint8_t ui8Length))ROM_I2CTABLE[48])
1214 #define ROM_I2CMasterBurstCountGet \
1215  ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[49])
1216 #define ROM_I2CSlaveFIFODisable \
1217  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[50])
1218 #define ROM_I2CSlaveFIFOEnable \
1219  ((void (*)(uint32_t ui32Base, \
1220  uint32_t ui32Config))ROM_I2CTABLE[51])
1221 #define ROM_I2CMasterGlitchFilterConfigSet \
1222  ((void (*)(uint32_t ui32Base, \
1223  uint32_t ui32Config))ROM_I2CTABLE[54])
1224 
1225 //*****************************************************************************
1226 //
1227 // Macros for calling ROM functions in the Interrupt API.
1228 //
1229 //*****************************************************************************
1230 #define ROM_IntEnable \
1231  ((void (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[0])
1232 #define ROM_IntMasterEnable \
1233  ((bool (*)(void))ROM_INTERRUPTTABLE[1])
1234 #define ROM_IntMasterDisable \
1235  ((bool (*)(void))ROM_INTERRUPTTABLE[2])
1236 #define ROM_IntDisable \
1237  ((void (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[3])
1238 #define ROM_IntPriorityGroupingSet \
1239  ((void (*)(uint32_t ui32Bits))ROM_INTERRUPTTABLE[4])
1240 #define ROM_IntPriorityGroupingGet \
1241  ((uint32_t (*)(void))ROM_INTERRUPTTABLE[5])
1242 #define ROM_IntPrioritySet \
1243  ((void (*)(uint32_t ui32Interrupt, \
1244  uint8_t ui8Priority))ROM_INTERRUPTTABLE[6])
1245 #define ROM_IntPriorityGet \
1246  ((int32_t (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[7])
1247 #define ROM_IntPendSet \
1248  ((void (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[8])
1249 #define ROM_IntPendClear \
1250  ((void (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[9])
1251 #define ROM_IntPriorityMaskSet \
1252  ((void (*)(uint32_t ui32PriorityMask))ROM_INTERRUPTTABLE[10])
1253 #define ROM_IntPriorityMaskGet \
1254  ((uint32_t (*)(void))ROM_INTERRUPTTABLE[11])
1255 #define ROM_IntIsEnabled \
1256  ((uint32_t (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[12])
1257 #define ROM_IntTrigger \
1258  ((void (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[13])
1259 
1260 //*****************************************************************************
1261 //
1262 // Macros for calling ROM functions in the LCD API.
1263 //
1264 //*****************************************************************************
1265 #define ROM_LCDIntStatus \
1266  ((uint32_t (*)(uint32_t ui32Base, \
1267  bool bMasked))ROM_LCDTABLE[0])
1268 #define ROM_LCDClockReset \
1269  ((void (*)(uint32_t ui32Base, \
1270  uint32_t ui32Clocks))ROM_LCDTABLE[1])
1271 #define ROM_LCDDMAConfigSet \
1272  ((void (*)(uint32_t ui32Base, \
1273  uint32_t ui32Config))ROM_LCDTABLE[2])
1274 #define ROM_LCDIDDCommandWrite \
1275  ((void (*)(uint32_t ui32Base, \
1276  uint32_t ui32CS, \
1277  uint16_t ui16Cmd))ROM_LCDTABLE[3])
1278 #define ROM_LCDIDDConfigSet \
1279  ((void (*)(uint32_t ui32Base, \
1280  uint32_t ui32Config))ROM_LCDTABLE[4])
1281 #define ROM_LCDIDDDataRead \
1282  ((uint16_t (*)(uint32_t ui32Base, \
1283  uint32_t ui32CS))ROM_LCDTABLE[5])
1284 #define ROM_LCDIDDDataWrite \
1285  ((void (*)(uint32_t ui32Base, \
1286  uint32_t ui32CS, \
1287  uint16_t ui16Data))ROM_LCDTABLE[6])
1288 #define ROM_LCDIDDDMADisable \
1289  ((void (*)(uint32_t ui32Base))ROM_LCDTABLE[7])
1290 #define ROM_LCDIDDDMAWrite \
1291  ((void (*)(uint32_t ui32Base, \
1292  uint32_t ui32CS, \
1293  const uint32_t *pui32Data, \
1294  uint32_t ui32Count))ROM_LCDTABLE[8])
1295 #define ROM_LCDIDDIndexedRead \
1296  ((uint16_t (*)(uint32_t ui32Base, \
1297  uint32_t ui32CS, \
1298  uint16_t ui16Addr))ROM_LCDTABLE[9])
1299 #define ROM_LCDIDDIndexedWrite \
1300  ((void (*)(uint32_t ui32Base, \
1301  uint32_t ui32CS, \
1302  uint16_t ui16Addr, \
1303  uint16_t ui16Data))ROM_LCDTABLE[10])
1304 #define ROM_LCDIDDStatusRead \
1305  ((uint16_t (*)(uint32_t ui32Base, \
1306  uint32_t ui32CS))ROM_LCDTABLE[11])
1307 #define ROM_LCDIDDTimingSet \
1308  ((void (*)(uint32_t ui32Base, \
1309  uint32_t ui32CS, \
1310  const tLCDIDDTiming *pTiming))ROM_LCDTABLE[12])
1311 #define ROM_LCDIntClear \
1312  ((void (*)(uint32_t ui32Base, \
1313  uint32_t ui32IntFlags))ROM_LCDTABLE[13])
1314 #define ROM_LCDIntDisable \
1315  ((void (*)(uint32_t ui32Base, \
1316  uint32_t ui32IntFlags))ROM_LCDTABLE[14])
1317 #define ROM_LCDIntEnable \
1318  ((void (*)(uint32_t ui32Base, \
1319  uint32_t ui32IntFlags))ROM_LCDTABLE[15])
1320 #define ROM_LCDModeSet \
1321  ((uint32_t (*)(uint32_t ui32Base, \
1322  uint8_t ui8Mode, \
1323  uint32_t ui32PixClk, \
1324  uint32_t ui32SysClk))ROM_LCDTABLE[16])
1325 #define ROM_LCDRasterACBiasIntCountSet \
1326  ((void (*)(uint32_t ui32Base, \
1327  uint8_t ui8Count))ROM_LCDTABLE[17])
1328 #define ROM_LCDRasterConfigSet \
1329  ((void (*)(uint32_t ui32Base, \
1330  uint32_t ui32Config, \
1331  uint8_t ui8PalLoadDelay))ROM_LCDTABLE[18])
1332 #define ROM_LCDRasterDisable \
1333  ((void (*)(uint32_t ui32Base))ROM_LCDTABLE[19])
1334 #define ROM_LCDRasterEnable \
1335  ((void (*)(uint32_t ui32Base))ROM_LCDTABLE[20])
1336 #define ROM_LCDRasterFrameBufferSet \
1337  ((void (*)(uint32_t ui32Base, \
1338  uint8_t ui8Buffer, \
1339  uint32_t *pui32Addr, \
1340  uint32_t ui32NumBytes))ROM_LCDTABLE[21])
1341 #define ROM_LCDRasterPaletteSet \
1342  ((void (*)(uint32_t ui32Base, \
1343  uint32_t ui32Type, \
1344  uint32_t *pui32PalAddr, \
1345  const uint32_t *pui32SrcColors, \
1346  uint32_t ui32Start, \
1347  uint32_t ui32Count))ROM_LCDTABLE[22])
1348 #define ROM_LCDRasterSubPanelConfigSet \
1349  ((void (*)(uint32_t ui32Base, \
1350  uint32_t ui32Flags, \
1351  uint32_t ui32BottomLines, \
1352  uint32_t ui32DefaultPixel))ROM_LCDTABLE[23])
1353 #define ROM_LCDRasterSubPanelDisable \
1354  ((void (*)(uint32_t ui32Base))ROM_LCDTABLE[24])
1355 #define ROM_LCDRasterSubPanelEnable \
1356  ((void (*)(uint32_t ui32Base))ROM_LCDTABLE[25])
1357 #define ROM_LCDRasterTimingSet \
1358  ((void (*)(uint32_t ui32Base, \
1359  const tLCDRasterTiming *pTiming))ROM_LCDTABLE[26])
1360 #define ROM_LCDRasterEnabled \
1361  ((bool (*)(uint32_t ui32Base))ROM_LCDTABLE[27])
1362 
1363 //*****************************************************************************
1364 //
1365 // Macros for calling ROM functions in the MPU API.
1366 //
1367 //*****************************************************************************
1368 #define ROM_MPUEnable \
1369  ((void (*)(uint32_t ui32MPUConfig))ROM_MPUTABLE[0])
1370 #define ROM_MPUDisable \
1371  ((void (*)(void))ROM_MPUTABLE[1])
1372 #define ROM_MPURegionCountGet \
1373  ((uint32_t (*)(void))ROM_MPUTABLE[2])
1374 #define ROM_MPURegionEnable \
1375  ((void (*)(uint32_t ui32Region))ROM_MPUTABLE[3])
1376 #define ROM_MPURegionDisable \
1377  ((void (*)(uint32_t ui32Region))ROM_MPUTABLE[4])
1378 #define ROM_MPURegionSet \
1379  ((void (*)(uint32_t ui32Region, \
1380  uint32_t ui32Addr, \
1381  uint32_t ui32Flags))ROM_MPUTABLE[5])
1382 #define ROM_MPURegionGet \
1383  ((void (*)(uint32_t ui32Region, \
1384  uint32_t *pui32Addr, \
1385  uint32_t *pui32Flags))ROM_MPUTABLE[6])
1386 
1387 //*****************************************************************************
1388 //
1389 // Macros for calling ROM functions in the OneWire API.
1390 //
1391 //*****************************************************************************
1392 #define ROM_OneWireIntStatus \
1393  ((uint32_t (*)(uint32_t ui32Base, \
1394  bool bMasked))ROM_ONEWIRETABLE[0])
1395 #define ROM_OneWireBusReset \
1396  ((void (*)(uint32_t ui32Base))ROM_ONEWIRETABLE[1])
1397 #define ROM_OneWireBusStatus \
1398  ((uint32_t (*)(uint32_t ui32Base))ROM_ONEWIRETABLE[2])
1399 #define ROM_OneWireDataGet \
1400  ((void (*)(uint32_t u3i2Base, \
1401  uint32_t *pui32Data))ROM_ONEWIRETABLE[3])
1402 #define ROM_OneWireDataGetNonBlocking \
1403  ((bool (*)(uint32_t ui32Base, \
1404  uint32_t *pui32Data))ROM_ONEWIRETABLE[4])
1405 #define ROM_OneWireInit \
1406  ((void (*)(uint32_t ui32Base, \
1407  uint32_t ui32InitFlags))ROM_ONEWIRETABLE[5])
1408 #define ROM_OneWireIntClear \
1409  ((void (*)(uint32_t ui32Base, \
1410  uint32_t ui32IntFlags))ROM_ONEWIRETABLE[6])
1411 #define ROM_OneWireIntDisable \
1412  ((void (*)(uint32_t ui32Base, \
1413  uint32_t ui32IntFlags))ROM_ONEWIRETABLE[7])
1414 #define ROM_OneWireIntEnable \
1415  ((void (*)(uint32_t ui32Base, \
1416  uint32_t ui32IntFlags))ROM_ONEWIRETABLE[8])
1417 #define ROM_OneWireTransaction \
1418  ((void (*)(uint32_t ui32Base, \
1419  uint32_t ui32OpFlags, \
1420  uint32_t ui32Data, \
1421  uint32_t ui32BitCnt))ROM_ONEWIRETABLE[9])
1422 #define ROM_OneWireDMADisable \
1423  ((void (*)(uint32_t ui32Base, \
1424  uint32_t ui32DMAFlags))ROM_ONEWIRETABLE[10])
1425 #define ROM_OneWireDMAEnable \
1426  ((void (*)(uint32_t ui32Base, \
1427  uint32_t ui32DMAFlags))ROM_ONEWIRETABLE[11])
1428 
1429 //*****************************************************************************
1430 //
1431 // Macros for calling ROM functions in the PWM API.
1432 //
1433 //*****************************************************************************
1434 #define ROM_PWMPulseWidthSet \
1435  ((void (*)(uint32_t ui32Base, \
1436  uint32_t ui32PWMOut, \
1437  uint32_t ui32Width))ROM_PWMTABLE[0])
1438 #define ROM_PWMGenConfigure \
1439  ((void (*)(uint32_t ui32Base, \
1440  uint32_t ui32Gen, \
1441  uint32_t ui32Config))ROM_PWMTABLE[1])
1442 #define ROM_PWMGenPeriodSet \
1443  ((void (*)(uint32_t ui32Base, \
1444  uint32_t ui32Gen, \
1445  uint32_t ui32Period))ROM_PWMTABLE[2])
1446 #define ROM_PWMGenPeriodGet \
1447  ((uint32_t (*)(uint32_t ui32Base, \
1448  uint32_t ui32Gen))ROM_PWMTABLE[3])
1449 #define ROM_PWMGenEnable \
1450  ((void (*)(uint32_t ui32Base, \
1451  uint32_t ui32Gen))ROM_PWMTABLE[4])
1452 #define ROM_PWMGenDisable \
1453  ((void (*)(uint32_t ui32Base, \
1454  uint32_t ui32Gen))ROM_PWMTABLE[5])
1455 #define ROM_PWMPulseWidthGet \
1456  ((uint32_t (*)(uint32_t ui32Base, \
1457  uint32_t ui32PWMOut))ROM_PWMTABLE[6])
1458 #define ROM_PWMDeadBandEnable \
1459  ((void (*)(uint32_t ui32Base, \
1460  uint32_t ui32Gen, \
1461  uint16_t ui16Rise, \
1462  uint16_t ui16Fall))ROM_PWMTABLE[7])
1463 #define ROM_PWMDeadBandDisable \
1464  ((void (*)(uint32_t ui32Base, \
1465  uint32_t ui32Gen))ROM_PWMTABLE[8])
1466 #define ROM_PWMSyncUpdate \
1467  ((void (*)(uint32_t ui32Base, \
1468  uint32_t ui32GenBits))ROM_PWMTABLE[9])
1469 #define ROM_PWMSyncTimeBase \
1470  ((void (*)(uint32_t ui32Base, \
1471  uint32_t ui32GenBits))ROM_PWMTABLE[10])
1472 #define ROM_PWMOutputState \
1473  ((void (*)(uint32_t ui32Base, \
1474  uint32_t ui32PWMOutBits, \
1475  bool bEnable))ROM_PWMTABLE[11])
1476 #define ROM_PWMOutputInvert \
1477  ((void (*)(uint32_t ui32Base, \
1478  uint32_t ui32PWMOutBits, \
1479  bool bInvert))ROM_PWMTABLE[12])
1480 #define ROM_PWMOutputFault \
1481  ((void (*)(uint32_t ui32Base, \
1482  uint32_t ui32PWMOutBits, \
1483  bool bFaultSuppress))ROM_PWMTABLE[13])
1484 #define ROM_PWMGenIntTrigEnable \
1485  ((void (*)(uint32_t ui32Base, \
1486  uint32_t ui32Gen, \
1487  uint32_t ui32IntTrig))ROM_PWMTABLE[14])
1488 #define ROM_PWMGenIntTrigDisable \
1489  ((void (*)(uint32_t ui32Base, \
1490  uint32_t ui32Gen, \
1491  uint32_t ui32IntTrig))ROM_PWMTABLE[15])
1492 #define ROM_PWMGenIntStatus \
1493  ((uint32_t (*)(uint32_t ui32Base, \
1494  uint32_t ui32Gen, \
1495  bool bMasked))ROM_PWMTABLE[16])
1496 #define ROM_PWMGenIntClear \
1497  ((void (*)(uint32_t ui32Base, \
1498  uint32_t ui32Gen, \
1499  uint32_t ui32Ints))ROM_PWMTABLE[17])
1500 #define ROM_PWMIntEnable \
1501  ((void (*)(uint32_t ui32Base, \
1502  uint32_t ui32GenFault))ROM_PWMTABLE[18])
1503 #define ROM_PWMIntDisable \
1504  ((void (*)(uint32_t ui32Base, \
1505  uint32_t ui32GenFault))ROM_PWMTABLE[19])
1506 #define ROM_PWMIntStatus \
1507  ((uint32_t (*)(uint32_t ui32Base, \
1508  bool bMasked))ROM_PWMTABLE[21])
1509 #define ROM_PWMOutputFaultLevel \
1510  ((void (*)(uint32_t ui32Base, \
1511  uint32_t ui32PWMOutBits, \
1512  bool bDriveHigh))ROM_PWMTABLE[22])
1513 #define ROM_PWMFaultIntClearExt \
1514  ((void (*)(uint32_t ui32Base, \
1515  uint32_t ui32FaultInts))ROM_PWMTABLE[23])
1516 #define ROM_PWMGenFaultConfigure \
1517  ((void (*)(uint32_t ui32Base, \
1518  uint32_t ui32Gen, \
1519  uint32_t ui32MinFaultPeriod, \
1520  uint32_t ui32FaultSenses))ROM_PWMTABLE[24])
1521 #define ROM_PWMGenFaultTriggerSet \
1522  ((void (*)(uint32_t ui32Base, \
1523  uint32_t ui32Gen, \
1524  uint32_t ui32Group, \
1525  uint32_t ui32FaultTriggers))ROM_PWMTABLE[25])
1526 #define ROM_PWMGenFaultTriggerGet \
1527  ((uint32_t (*)(uint32_t ui32Base, \
1528  uint32_t ui32Gen, \
1529  uint32_t ui32Group))ROM_PWMTABLE[26])
1530 #define ROM_PWMGenFaultStatus \
1531  ((uint32_t (*)(uint32_t ui32Base, \
1532  uint32_t ui32Gen, \
1533  uint32_t ui32Group))ROM_PWMTABLE[27])
1534 #define ROM_PWMGenFaultClear \
1535  ((void (*)(uint32_t ui32Base, \
1536  uint32_t ui32Gen, \
1537  uint32_t ui32Group, \
1538  uint32_t ui32FaultTriggers))ROM_PWMTABLE[28])
1539 #define ROM_PWMClockSet \
1540  ((void (*)(uint32_t ui32Base, \
1541  uint32_t ui32Config))ROM_PWMTABLE[29])
1542 #define ROM_PWMClockGet \
1543  ((uint32_t (*)(uint32_t ui32Base))ROM_PWMTABLE[30])
1544 #define ROM_PWMOutputUpdateMode \
1545  ((void (*)(uint32_t ui32Base, \
1546  uint32_t ui32PWMOutBits, \
1547  uint32_t ui32Mode))ROM_PWMTABLE[31])
1548 
1549 //*****************************************************************************
1550 //
1551 // Macros for calling ROM functions in the QEI API.
1552 //
1553 //*****************************************************************************
1554 #define ROM_QEIPositionGet \
1555  ((uint32_t (*)(uint32_t ui32Base))ROM_QEITABLE[0])
1556 #define ROM_QEIEnable \
1557  ((void (*)(uint32_t ui32Base))ROM_QEITABLE[1])
1558 #define ROM_QEIDisable \
1559  ((void (*)(uint32_t ui32Base))ROM_QEITABLE[2])
1560 #define ROM_QEIConfigure \
1561  ((void (*)(uint32_t ui32Base, \
1562  uint32_t ui32Config, \
1563  uint32_t ui32MaxPosition))ROM_QEITABLE[3])
1564 #define ROM_QEIPositionSet \
1565  ((void (*)(uint32_t ui32Base, \
1566  uint32_t ui32Position))ROM_QEITABLE[4])
1567 #define ROM_QEIDirectionGet \
1568  ((int32_t (*)(uint32_t ui32Base))ROM_QEITABLE[5])
1569 #define ROM_QEIErrorGet \
1570  ((bool (*)(uint32_t ui32Base))ROM_QEITABLE[6])
1571 #define ROM_QEIVelocityEnable \
1572  ((void (*)(uint32_t ui32Base))ROM_QEITABLE[7])
1573 #define ROM_QEIVelocityDisable \
1574  ((void (*)(uint32_t ui32Base))ROM_QEITABLE[8])
1575 #define ROM_QEIVelocityConfigure \
1576  ((void (*)(uint32_t ui32Base, \
1577  uint32_t ui32PreDiv, \
1578  uint32_t ui32Period))ROM_QEITABLE[9])
1579 #define ROM_QEIVelocityGet \
1580  ((uint32_t (*)(uint32_t ui32Base))ROM_QEITABLE[10])
1581 #define ROM_QEIIntEnable \
1582  ((void (*)(uint32_t ui32Base, \
1583  uint32_t ui32IntFlags))ROM_QEITABLE[11])
1584 #define ROM_QEIIntDisable \
1585  ((void (*)(uint32_t ui32Base, \
1586  uint32_t ui32IntFlags))ROM_QEITABLE[12])
1587 #define ROM_QEIIntStatus \
1588  ((uint32_t (*)(uint32_t ui32Base, \
1589  bool bMasked))ROM_QEITABLE[13])
1590 #define ROM_QEIIntClear \
1591  ((void (*)(uint32_t ui32Base, \
1592  uint32_t ui32IntFlags))ROM_QEITABLE[14])
1593 
1594 //*****************************************************************************
1595 //
1596 // Macros for calling ROM functions in the SHAMD5 API.
1597 //
1598 //*****************************************************************************
1599 #define ROM_SHAMD5IntStatus \
1600  ((uint32_t (*)(uint32_t ui32Base, \
1601  bool bMasked))ROM_SHAMD5TABLE[0])
1602 #define ROM_SHAMD5ConfigSet \
1603  ((void (*)(uint32_t ui32Base, \
1604  uint32_t ui32Mode))ROM_SHAMD5TABLE[1])
1605 #define ROM_SHAMD5DataProcess \
1606  ((void (*)(uint32_t ui32Base, \
1607  uint32_t *pui32DataSrc, \
1608  uint32_t ui32DataLength, \
1609  uint32_t *pui32HashResult))ROM_SHAMD5TABLE[2])
1610 #define ROM_SHAMD5DataWrite \
1611  ((void (*)(uint32_t ui32Base, \
1612  uint32_t *pui32Src))ROM_SHAMD5TABLE[3])
1613 #define ROM_SHAMD5DataWriteNonBlocking \
1614  ((bool (*)(uint32_t ui32Base, \
1615  uint32_t *pui32Src))ROM_SHAMD5TABLE[4])
1616 #define ROM_SHAMD5DMADisable \
1617  ((void (*)(uint32_t ui32Base))ROM_SHAMD5TABLE[5])
1618 #define ROM_SHAMD5DMAEnable \
1619  ((void (*)(uint32_t ui32Base))ROM_SHAMD5TABLE[6])
1620 #define ROM_SHAMD5HashLengthSet \
1621  ((void (*)(uint32_t ui32Base, \
1622  uint32_t ui32Length))ROM_SHAMD5TABLE[7])
1623 #define ROM_SHAMD5HMACKeySet \
1624  ((void (*)(uint32_t ui32Base, \
1625  uint32_t *pui32Src))ROM_SHAMD5TABLE[8])
1626 #define ROM_SHAMD5HMACPPKeyGenerate \
1627  ((void (*)(uint32_t ui32Base, \
1628  uint32_t *pui32Key, \
1629  uint32_t *pui32PPKey))ROM_SHAMD5TABLE[9])
1630 #define ROM_SHAMD5HMACPPKeySet \
1631  ((void (*)(uint32_t ui32Base, \
1632  uint32_t *pui32Src))ROM_SHAMD5TABLE[10])
1633 #define ROM_SHAMD5HMACProcess \
1634  ((void (*)(uint32_t ui32Base, \
1635  uint32_t *pui32DataSrc, \
1636  uint32_t ui32DataLength, \
1637  uint32_t *pui32HashResult))ROM_SHAMD5TABLE[11])
1638 #define ROM_SHAMD5IntClear \
1639  ((void (*)(uint32_t ui32Base, \
1640  uint32_t ui32IntFlags))ROM_SHAMD5TABLE[12])
1641 #define ROM_SHAMD5IntDisable \
1642  ((void (*)(uint32_t ui32Base, \
1643  uint32_t ui32IntFlags))ROM_SHAMD5TABLE[13])
1644 #define ROM_SHAMD5IntEnable \
1645  ((void (*)(uint32_t ui32Base, \
1646  uint32_t ui32IntFlags))ROM_SHAMD5TABLE[14])
1647 #define ROM_SHAMD5Reset \
1648  ((void (*)(uint32_t ui32Base))ROM_SHAMD5TABLE[15])
1649 #define ROM_SHAMD5ResultRead \
1650  ((void (*)(uint32_t ui32Base, \
1651  uint32_t *pui32Dest))ROM_SHAMD5TABLE[16])
1652 
1653 //*****************************************************************************
1654 //
1655 // Macros for calling ROM functions in the SMBus API.
1656 //
1657 //*****************************************************************************
1658 #define ROM_SMBusMasterIntProcess \
1659  ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[0])
1660 #define ROM_SMBusARPDisable \
1661  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[1])
1662 #define ROM_SMBusARPEnable \
1663  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[2])
1664 #define ROM_SMBusARPUDIDPacketDecode \
1665  ((void (*)(tSMBusUDID *pUDID, \
1666  uint8_t *pui8Address, \
1667  uint8_t *pui8Data))ROM_SMBUSTABLE[3])
1668 #define ROM_SMBusARPUDIDPacketEncode \
1669  ((void (*)(tSMBusUDID *pUDID, \
1670  uint8_t ui8Address, \
1671  uint8_t *pui8Data))ROM_SMBUSTABLE[4])
1672 #define ROM_SMBusMasterARPAssignAddress \
1673  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1674  uint8_t *pui8Data))ROM_SMBUSTABLE[5])
1675 #define ROM_SMBusMasterARPGetUDIDDir \
1676  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1677  uint8_t ui8TargetAddress, \
1678  uint8_t *pui8Data))ROM_SMBUSTABLE[6])
1679 #define ROM_SMBusMasterARPGetUDIDGen \
1680  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1681  uint8_t *pui8Data))ROM_SMBUSTABLE[7])
1682 #define ROM_SMBusMasterARPNotifyMaster \
1683  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1684  uint8_t *pui8Data))ROM_SMBUSTABLE[8])
1685 #define ROM_SMBusMasterARPPrepareToARP \
1686  ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[9])
1687 #define ROM_SMBusMasterARPResetDeviceDir \
1688  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1689  uint8_t ui8TargetAddress))ROM_SMBUSTABLE[10])
1690 #define ROM_SMBusMasterARPResetDeviceGen \
1691  ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[11])
1692 #define ROM_SMBusMasterBlockProcessCall \
1693  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1694  uint8_t ui8TargetAddress, \
1695  uint8_t ui8Command, \
1696  uint8_t *pui8TxData, \
1697  uint8_t ui8TxSize, \
1698  uint8_t *pui8RxData))ROM_SMBUSTABLE[12])
1699 #define ROM_SMBusMasterBlockRead \
1700  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1701  uint8_t ui8TargetAddress, \
1702  uint8_t ui8Command, \
1703  uint8_t *pui8Data))ROM_SMBUSTABLE[13])
1704 #define ROM_SMBusMasterBlockWrite \
1705  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1706  uint8_t ui8TargetAddress, \
1707  uint8_t ui8Command, \
1708  uint8_t *pui8Data, \
1709  uint8_t ui8Size))ROM_SMBUSTABLE[14])
1710 #define ROM_SMBusMasterByteReceive \
1711  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1712  uint8_t ui8TargetAddress, \
1713  uint8_t *pui8Data))ROM_SMBUSTABLE[15])
1714 #define ROM_SMBusMasterByteSend \
1715  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1716  uint8_t ui8TargetAddress, \
1717  uint8_t ui8Data))ROM_SMBUSTABLE[16])
1718 #define ROM_SMBusMasterByteWordRead \
1719  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1720  uint8_t ui8TargetAddress, \
1721  uint8_t ui8Command, \
1722  uint8_t *pui8Data, \
1723  uint8_t ui8Size))ROM_SMBUSTABLE[17])
1724 #define ROM_SMBusMasterByteWordWrite \
1725  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1726  uint8_t ui8TargetAddress, \
1727  uint8_t ui8Command, \
1728  uint8_t *pui8Data, \
1729  uint8_t ui8Size))ROM_SMBUSTABLE[18])
1730 #define ROM_SMBusMasterHostNotify \
1731  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1732  uint8_t ui8OwnSlaveAddress, \
1733  uint8_t *pui8Data))ROM_SMBUSTABLE[19])
1734 #define ROM_SMBusMasterI2CRead \
1735  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1736  uint8_t ui8TargetAddress, \
1737  uint8_t *pui8Data, \
1738  uint8_t ui8Size))ROM_SMBUSTABLE[20])
1739 #define ROM_SMBusMasterI2CWrite \
1740  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1741  uint8_t ui8TargetAddress, \
1742  uint8_t *pui8Data, \
1743  uint8_t ui8Size))ROM_SMBUSTABLE[21])
1744 #define ROM_SMBusMasterI2CWriteRead \
1745  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1746  uint8_t ui8TargetAddress, \
1747  uint8_t *pui8TxData, \
1748  uint8_t ui8TxSize, \
1749  uint8_t *pui8RxData, \
1750  uint8_t ui8RxSize))ROM_SMBUSTABLE[22])
1751 #define ROM_SMBusMasterInit \
1752  ((void (*)(tSMBus *psSMBus, \
1753  uint32_t ui32I2CBase, \
1754  uint32_t ui32SMBusClock))ROM_SMBUSTABLE[23])
1755 #define ROM_SMBusMasterIntEnable \
1756  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[24])
1757 #define ROM_SMBusMasterProcessCall \
1758  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1759  uint8_t ui8TargetAddress, \
1760  uint8_t ui8Command, \
1761  uint8_t *pui8TxData, \
1762  uint8_t *pui8RxData))ROM_SMBUSTABLE[25])
1763 #define ROM_SMBusMasterQuickCommand \
1764  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1765  uint8_t ui8TargetAddress, \
1766  bool bData))ROM_SMBUSTABLE[26])
1767 #define ROM_SMBusPECDisable \
1768  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[27])
1769 #define ROM_SMBusPECEnable \
1770  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[28])
1771 #define ROM_SMBusRxPacketSizeGet \
1772  ((uint8_t (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[29])
1773 #define ROM_SMBusSlaveACKSend \
1774  ((void (*)(tSMBus *psSMBus, \
1775  bool bACK))ROM_SMBUSTABLE[30])
1776 #define ROM_SMBusSlaveAddressSet \
1777  ((void (*)(tSMBus *psSMBus, \
1778  uint8_t ui8AddressNum, \
1779  uint8_t ui8SlaveAddress))ROM_SMBUSTABLE[31])
1780 #define ROM_SMBusSlaveARPFlagARGet \
1781  ((bool (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[32])
1782 #define ROM_SMBusSlaveARPFlagARSet \
1783  ((void (*)(tSMBus *psSMBus, \
1784  bool bValue))ROM_SMBUSTABLE[33])
1785 #define ROM_SMBusSlaveARPFlagAVGet \
1786  ((bool (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[34])
1787 #define ROM_SMBusSlaveARPFlagAVSet \
1788  ((void (*)(tSMBus *psSMBus, \
1789  bool bValue))ROM_SMBUSTABLE[35])
1790 #define ROM_SMBusSlaveBlockTransferDisable \
1791  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[36])
1792 #define ROM_SMBusSlaveBlockTransferEnable \
1793  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[37])
1794 #define ROM_SMBusSlaveCommandGet \
1795  ((uint8_t (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[38])
1796 #define ROM_SMBusSlaveI2CDisable \
1797  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[39])
1798 #define ROM_SMBusSlaveI2CEnable \
1799  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[40])
1800 #define ROM_SMBusSlaveInit \
1801  ((void (*)(tSMBus *psSMBus, \
1802  uint32_t ui32I2CBase))ROM_SMBUSTABLE[41])
1803 #define ROM_SMBusSlaveIntAddressGet \
1804  ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[42])
1805 #define ROM_SMBusSlaveIntEnable \
1806  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[43])
1807 #define ROM_SMBusSlaveIntProcess \
1808  ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[44])
1809 #define ROM_SMBusSlaveManualACKDisable \
1810  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[45])
1811 #define ROM_SMBusSlaveManualACKEnable \
1812  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[46])
1813 #define ROM_SMBusSlaveManualACKStatusGet \
1814  ((bool (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[47])
1815 #define ROM_SMBusSlaveProcessCallDisable \
1816  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[48])
1817 #define ROM_SMBusSlaveProcessCallEnable \
1818  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[49])
1819 #define ROM_SMBusSlaveRxBufferSet \
1820  ((void (*)(tSMBus *psSMBus, \
1821  uint8_t *pui8Data, \
1822  uint8_t ui8Size))ROM_SMBUSTABLE[50])
1823 #define ROM_SMBusSlaveTransferInit \
1824  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[51])
1825 #define ROM_SMBusSlaveTxBufferSet \
1826  ((void (*)(tSMBus *psSMBus, \
1827  uint8_t *pui8Data, \
1828  uint8_t ui8Size))ROM_SMBUSTABLE[52])
1829 #define ROM_SMBusSlaveUDIDSet \
1830  ((void (*)(tSMBus *psSMBus, \
1831  tSMBusUDID *pUDID))ROM_SMBUSTABLE[53])
1832 #define ROM_SMBusStatusGet \
1833  ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[54])
1834 #define ROM_SMBusSlaveDataSend \
1835  ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[55])
1836 #define ROM_SMBusFIFOEnable \
1837  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[56])
1838 #define ROM_SMBusFIFODisable \
1839  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[57])
1840 #define ROM_SMBusDMAEnable \
1841  ((void (*)(tSMBus *psSMBus, \
1842  uint8_t ui8TxChannel, \
1843  uint8_t ui8RxChannel))ROM_SMBUSTABLE[58])
1844 #define ROM_SMBusDMADisable \
1845  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[59])
1846 
1847 //*****************************************************************************
1848 //
1849 // Macros for calling ROM functions in the SPIFlash API.
1850 //
1851 //*****************************************************************************
1852 #define ROM_SPIFlashIntHandler \
1853  ((uint32_t (*)(tSPIFlashState *pState))ROM_SPIFLASHTABLE[0])
1854 #define ROM_SPIFlashInit \
1855  ((void (*)(uint32_t ui32Base, \
1856  uint32_t ui32Clock, \
1857  uint32_t ui32BitRate))ROM_SPIFLASHTABLE[1])
1858 #define ROM_SPIFlashWriteStatus \
1859  ((void (*)(uint32_t ui32Base, \
1860  uint8_t ui8Status))ROM_SPIFLASHTABLE[2])
1861 #define ROM_SPIFlashPageProgram \
1862  ((void (*)(uint32_t ui32Base, \
1863  uint32_t ui32Addr, \
1864  const uint8_t *pui8Data, \
1865  uint32_t ui32Count))ROM_SPIFLASHTABLE[3])
1866 #define ROM_SPIFlashPageProgramNonBlocking \
1867  ((void (*)(tSPIFlashState *pState, \
1868  uint32_t ui32Base, \
1869  uint32_t ui32Addr, \
1870  const uint8_t *pui8Data, \
1871  uint32_t ui32Count, \
1872  bool bUseDMA, \
1873  uint32_t ui32TxChannel))ROM_SPIFLASHTABLE[4])
1874 #define ROM_SPIFlashRead \
1875  ((void (*)(uint32_t ui32Base, \
1876  uint32_t ui32Addr, \
1877  uint8_t *pui8Data, \
1878  uint32_t ui32Count))ROM_SPIFLASHTABLE[5])
1879 #define ROM_SPIFlashReadNonBlocking \
1880  ((void (*)(tSPIFlashState *pState, \
1881  uint32_t ui32Base, \
1882  uint32_t ui32Addr, \
1883  uint8_t *pui8Data, \
1884  uint32_t ui32Count, \
1885  bool bUseDMA, \
1886  uint32_t ui32TxChannel, \
1887  uint32_t ui32RxChannel))ROM_SPIFLASHTABLE[6])
1888 #define ROM_SPIFlashWriteDisable \
1889  ((void (*)(uint32_t ui32Base))ROM_SPIFLASHTABLE[7])
1890 #define ROM_SPIFlashReadStatus \
1891  ((uint8_t (*)(uint32_t ui32Base))ROM_SPIFLASHTABLE[8])
1892 #define ROM_SPIFlashWriteEnable \
1893  ((void (*)(uint32_t ui32Base))ROM_SPIFLASHTABLE[9])
1894 #define ROM_SPIFlashFastRead \
1895  ((void (*)(uint32_t ui32Base, \
1896  uint32_t ui32Addr, \
1897  uint8_t *pui8Data, \
1898  uint32_t ui32Count))ROM_SPIFLASHTABLE[10])
1899 #define ROM_SPIFlashFastReadNonBlocking \
1900  ((void (*)(tSPIFlashState *pState, \
1901  uint32_t ui32Base, \
1902  uint32_t ui32Addr, \
1903  uint8_t *pui8Data, \
1904  uint32_t ui32Count, \
1905  bool bUseDMA, \
1906  uint32_t ui32TxChannel, \
1907  uint32_t ui32RxChannel))ROM_SPIFLASHTABLE[11])
1908 #define ROM_SPIFlashSectorErase \
1909  ((void (*)(uint32_t ui32Base, \
1910  uint32_t ui32Addr))ROM_SPIFLASHTABLE[12])
1911 #define ROM_SPIFlashDualRead \
1912  ((void (*)(uint32_t ui32Base, \
1913  uint32_t ui32Addr, \
1914  uint8_t *pui8Data, \
1915  uint32_t ui32Count))ROM_SPIFLASHTABLE[13])
1916 #define ROM_SPIFlashDualReadNonBlocking \
1917  ((void (*)(tSPIFlashState *pState, \
1918  uint32_t ui32Base, \
1919  uint32_t ui32Addr, \
1920  uint8_t *pui8Data, \
1921  uint32_t ui32Count, \
1922  bool bUseDMA, \
1923  uint32_t ui32TxChannel, \
1924  uint32_t ui32RxChannel))ROM_SPIFLASHTABLE[14])
1925 #define ROM_SPIFlashBlockErase32 \
1926  ((void (*)(uint32_t ui32Base, \
1927  uint32_t ui32Addr))ROM_SPIFLASHTABLE[15])
1928 #define ROM_SPIFlashQuadRead \
1929  ((void (*)(uint32_t ui32Base, \
1930  uint32_t ui32Addr, \
1931  uint8_t *pui8Data, \
1932  uint32_t ui32Count))ROM_SPIFLASHTABLE[16])
1933 #define ROM_SPIFlashQuadReadNonBlocking \
1934  ((void (*)(tSPIFlashState *pState, \
1935  uint32_t ui32Base, \
1936  uint32_t ui32Addr, \
1937  uint8_t *pui8Data, \
1938  uint32_t ui32Count, \
1939  bool bUseDMA, \
1940  uint32_t ui32TxChannel, \
1941  uint32_t ui32RxChannel))ROM_SPIFLASHTABLE[17])
1942 #define ROM_SPIFlashReadID \
1943  ((void (*)(uint32_t ui32Base, \
1944  uint8_t *pui8ManufacturerID, \
1945  uint16_t *pui16DeviceID))ROM_SPIFLASHTABLE[18])
1946 #define ROM_SPIFlashChipErase \
1947  ((void (*)(uint32_t ui32Base))ROM_SPIFLASHTABLE[19])
1948 #define ROM_SPIFlashBlockErase64 \
1949  ((void (*)(uint32_t ui32Base, \
1950  uint32_t ui32Addr))ROM_SPIFLASHTABLE[20])
1951 
1952 //*****************************************************************************
1953 //
1954 // Macros for calling ROM functions in the SSI API.
1955 //
1956 //*****************************************************************************
1957 #define ROM_SSIDataPut \
1958  ((void (*)(uint32_t ui32Base, \
1959  uint32_t ui32Data))ROM_SSITABLE[0])
1960 #define ROM_SSIConfigSetExpClk \
1961  ((void (*)(uint32_t ui32Base, \
1962  uint32_t ui32SSIClk, \
1963  uint32_t ui32Protocol, \
1964  uint32_t ui32Mode, \
1965  uint32_t ui32BitRate, \
1966  uint32_t ui32DataWidth))ROM_SSITABLE[1])
1967 #define ROM_SSIEnable \
1968  ((void (*)(uint32_t ui32Base))ROM_SSITABLE[2])
1969 #define ROM_SSIDisable \
1970  ((void (*)(uint32_t ui32Base))ROM_SSITABLE[3])
1971 #define ROM_SSIIntEnable \
1972  ((void (*)(uint32_t ui32Base, \
1973  uint32_t ui32IntFlags))ROM_SSITABLE[4])
1974 #define ROM_SSIIntDisable \
1975  ((void (*)(uint32_t ui32Base, \
1976  uint32_t ui32IntFlags))ROM_SSITABLE[5])
1977 #define ROM_SSIIntStatus \
1978  ((uint32_t (*)(uint32_t ui32Base, \
1979  bool bMasked))ROM_SSITABLE[6])
1980 #define ROM_SSIIntClear \
1981  ((void (*)(uint32_t ui32Base, \
1982  uint32_t ui32IntFlags))ROM_SSITABLE[7])
1983 #define ROM_SSIDataPutNonBlocking \
1984  ((int32_t (*)(uint32_t ui32Base, \
1985  uint32_t ui32Data))ROM_SSITABLE[8])
1986 #define ROM_SSIDataGet \
1987  ((void (*)(uint32_t ui32Base, \
1988  uint32_t *pui32Data))ROM_SSITABLE[9])
1989 #define ROM_SSIDataGetNonBlocking \
1990  ((int32_t (*)(uint32_t ui32Base, \
1991  uint32_t *pui32Data))ROM_SSITABLE[10])
1992 #define ROM_UpdateSSI \
1993  ((void (*)(void))ROM_SSITABLE[11])
1994 #define ROM_SSIDMAEnable \
1995  ((void (*)(uint32_t ui32Base, \
1996  uint32_t ui32DMAFlags))ROM_SSITABLE[12])
1997 #define ROM_SSIDMADisable \
1998  ((void (*)(uint32_t ui32Base, \
1999  uint32_t ui32DMAFlags))ROM_SSITABLE[13])
2000 #define ROM_SSIBusy \
2001  ((bool (*)(uint32_t ui32Base))ROM_SSITABLE[14])
2002 #define ROM_SSIClockSourceGet \
2003  ((uint32_t (*)(uint32_t ui32Base))ROM_SSITABLE[15])
2004 #define ROM_SSIClockSourceSet \
2005  ((void (*)(uint32_t ui32Base, \
2006  uint32_t ui32Source))ROM_SSITABLE[16])
2007 #define ROM_SSIAdvModeSet \
2008  ((void (*)(uint32_t ui32Base, \
2009  uint32_t ui32Mode))ROM_SSITABLE[17])
2010 #define ROM_SSIAdvFrameHoldEnable \
2011  ((void (*)(uint32_t ui32Base))ROM_SSITABLE[20])
2012 #define ROM_SSIAdvFrameHoldDisable \
2013  ((void (*)(uint32_t ui32Base))ROM_SSITABLE[21])
2014 
2015 //*****************************************************************************
2016 //
2017 // Macros for calling ROM functions in the SysCtl API.
2018 //
2019 //*****************************************************************************
2020 #define ROM_SysCtlSleep \
2021  ((void (*)(void))ROM_SYSCTLTABLE[0])
2022 #define ROM_SysCtlSRAMSizeGet \
2023  ((uint32_t (*)(void))ROM_SYSCTLTABLE[1])
2024 #define ROM_SysCtlFlashSizeGet \
2025  ((uint32_t (*)(void))ROM_SYSCTLTABLE[2])
2026 #define ROM_SysCtlPeripheralPresent \
2027  ((bool (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[4])
2028 #define ROM_SysCtlPeripheralReset \
2029  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[5])
2030 #define ROM_SysCtlPeripheralEnable \
2031  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[6])
2032 #define ROM_SysCtlPeripheralDisable \
2033  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[7])
2034 #define ROM_SysCtlPeripheralSleepEnable \
2035  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[8])
2036 #define ROM_SysCtlPeripheralSleepDisable \
2037  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[9])
2038 #define ROM_SysCtlPeripheralDeepSleepEnable \
2039  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[10])
2040 #define ROM_SysCtlPeripheralDeepSleepDisable \
2041  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[11])
2042 #define ROM_SysCtlPeripheralClockGating \
2043  ((void (*)(bool bEnable))ROM_SYSCTLTABLE[12])
2044 #define ROM_SysCtlIntEnable \
2045  ((void (*)(uint32_t ui32Ints))ROM_SYSCTLTABLE[13])
2046 #define ROM_SysCtlIntDisable \
2047  ((void (*)(uint32_t ui32Ints))ROM_SYSCTLTABLE[14])
2048 #define ROM_SysCtlIntClear \
2049  ((void (*)(uint32_t ui32Ints))ROM_SYSCTLTABLE[15])
2050 #define ROM_SysCtlIntStatus \
2051  ((uint32_t (*)(bool bMasked))ROM_SYSCTLTABLE[16])
2052 #define ROM_SysCtlReset \
2053  ((void (*)(void))ROM_SYSCTLTABLE[19])
2054 #define ROM_SysCtlDeepSleep \
2055  ((void (*)(void))ROM_SYSCTLTABLE[20])
2056 #define ROM_SysCtlResetCauseGet \
2057  ((uint32_t (*)(void))ROM_SYSCTLTABLE[21])
2058 #define ROM_SysCtlResetCauseClear \
2059  ((void (*)(uint32_t ui32Causes))ROM_SYSCTLTABLE[22])
2060 #define ROM_SysCtlDelay \
2061  ((void (*)(uint32_t ui32Count))ROM_SYSCTLTABLE[34])
2062 #define ROM_SysCtlPeripheralReady \
2063  ((bool (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[35])
2064 #define ROM_SysCtlPeripheralPowerOn \
2065  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[36])
2066 #define ROM_SysCtlPeripheralPowerOff \
2067  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[37])
2068 #define ROM_SysCtlMOSCConfigSet \
2069  ((void (*)(uint32_t ui32Config))ROM_SYSCTLTABLE[44])
2070 #define ROM_SysCtlPIOSCCalibrate \
2071  ((uint32_t (*)(uint32_t ui32Type))ROM_SYSCTLTABLE[45])
2072 #define ROM_SysCtlDeepSleepClockConfigSet \
2073  ((void (*)(uint32_t ui32Div, \
2074  uint32_t ui32Config))ROM_SYSCTLTABLE[47])
2075 #define ROM_SysCtlResetBehaviorSet \
2076  ((void (*)(uint32_t ui32Behavior))ROM_SYSCTLTABLE[51])
2077 #define ROM_SysCtlResetBehaviorGet \
2078  ((uint32_t (*)(void))ROM_SYSCTLTABLE[52])
2079 #define ROM_SysCtlFlashSectorSizeGet \
2080  ((uint32_t (*)(void))ROM_SYSCTLTABLE[54])
2081 #define ROM_SysCtlVoltageEventConfig \
2082  ((void (*)(uint32_t ui32Config))ROM_SYSCTLTABLE[55])
2083 #define ROM_SysCtlVoltageEventStatus \
2084  ((uint32_t (*)(void))ROM_SYSCTLTABLE[56])
2085 #define ROM_SysCtlVoltageEventClear \
2086  ((void (*)(uint32_t ui32Status))ROM_SYSCTLTABLE[57])
2087 #define ROM_SysCtlNMIStatus \
2088  ((uint32_t (*)(void))ROM_SYSCTLTABLE[58])
2089 #define ROM_SysCtlNMIClear \
2090  ((void (*)(uint32_t ui32Status))ROM_SYSCTLTABLE[59])
2091 #define ROM_SysCtlClockOutConfig \
2092  ((void (*)(uint32_t ui32Config, \
2093  uint32_t ui32Div))ROM_SYSCTLTABLE[60])
2094 #define ROM_SysCtlAltClkConfig \
2095  ((void (*)(uint32_t ui32Config))ROM_SYSCTLTABLE[61])
2096 
2097 //*****************************************************************************
2098 //
2099 // Macros for calling ROM functions in the SysExc API.
2100 //
2101 //*****************************************************************************
2102 #define ROM_SysExcIntStatus \
2103  ((uint32_t (*)(bool bMasked))ROM_SYSEXCTABLE[0])
2104 #define ROM_SysExcIntClear \
2105  ((void (*)(uint32_t ui32IntFlags))ROM_SYSEXCTABLE[1])
2106 #define ROM_SysExcIntDisable \
2107  ((void (*)(uint32_t ui32IntFlags))ROM_SYSEXCTABLE[2])
2108 #define ROM_SysExcIntEnable \
2109  ((void (*)(uint32_t ui32IntFlags))ROM_SYSEXCTABLE[3])
2110 
2111 //*****************************************************************************
2112 //
2113 // Macros for calling ROM functions in the SysTick API.
2114 //
2115 //*****************************************************************************
2116 #define ROM_SysTickValueGet \
2117  ((uint32_t (*)(void))ROM_SYSTICKTABLE[0])
2118 #define ROM_SysTickEnable \
2119  ((void (*)(void))ROM_SYSTICKTABLE[1])
2120 #define ROM_SysTickDisable \
2121  ((void (*)(void))ROM_SYSTICKTABLE[2])
2122 #define ROM_SysTickIntEnable \
2123  ((void (*)(void))ROM_SYSTICKTABLE[3])
2124 #define ROM_SysTickIntDisable \
2125  ((void (*)(void))ROM_SYSTICKTABLE[4])
2126 #define ROM_SysTickPeriodSet \
2127  ((void (*)(uint32_t ui32Period))ROM_SYSTICKTABLE[5])
2128 #define ROM_SysTickPeriodGet \
2129  ((uint32_t (*)(void))ROM_SYSTICKTABLE[6])
2130 
2131 //*****************************************************************************
2132 //
2133 // Macros for calling ROM functions in the Timer API.
2134 //
2135 //*****************************************************************************
2136 #define ROM_TimerIntClear \
2137  ((void (*)(uint32_t ui32Base, \
2138  uint32_t ui32IntFlags))ROM_TIMERTABLE[0])
2139 #define ROM_TimerEnable \
2140  ((void (*)(uint32_t ui32Base, \
2141  uint32_t ui32Timer))ROM_TIMERTABLE[1])
2142 #define ROM_TimerDisable \
2143  ((void (*)(uint32_t ui32Base, \
2144  uint32_t ui32Timer))ROM_TIMERTABLE[2])
2145 #define ROM_TimerConfigure \
2146  ((void (*)(uint32_t ui32Base, \
2147  uint32_t ui32Config))ROM_TIMERTABLE[3])
2148 #define ROM_TimerControlLevel \
2149  ((void (*)(uint32_t ui32Base, \
2150  uint32_t ui32Timer, \
2151  bool bInvert))ROM_TIMERTABLE[4])
2152 #define ROM_TimerControlEvent \
2153  ((void (*)(uint32_t ui32Base, \
2154  uint32_t ui32Timer, \
2155  uint32_t ui32Event))ROM_TIMERTABLE[6])
2156 #define ROM_TimerControlStall \
2157  ((void (*)(uint32_t ui32Base, \
2158  uint32_t ui32Timer, \
2159  bool bStall))ROM_TIMERTABLE[7])
2160 #define ROM_TimerRTCEnable \
2161  ((void (*)(uint32_t ui32Base))ROM_TIMERTABLE[8])
2162 #define ROM_TimerRTCDisable \
2163  ((void (*)(uint32_t ui32Base))ROM_TIMERTABLE[9])
2164 #define ROM_TimerPrescaleSet \
2165  ((void (*)(uint32_t ui32Base, \
2166  uint32_t ui32Timer, \
2167  uint32_t ui32Value))ROM_TIMERTABLE[10])
2168 #define ROM_TimerPrescaleGet \
2169  ((uint32_t (*)(uint32_t ui32Base, \
2170  uint32_t ui32Timer))ROM_TIMERTABLE[11])
2171 #define ROM_TimerPrescaleMatchSet \
2172  ((void (*)(uint32_t ui32Base, \
2173  uint32_t ui32Timer, \
2174  uint32_t ui32Value))ROM_TIMERTABLE[12])
2175 #define ROM_TimerPrescaleMatchGet \
2176  ((uint32_t (*)(uint32_t ui32Base, \
2177  uint32_t ui32Timer))ROM_TIMERTABLE[13])
2178 #define ROM_TimerLoadSet \
2179  ((void (*)(uint32_t ui32Base, \
2180  uint32_t ui32Timer, \
2181  uint32_t ui32Value))ROM_TIMERTABLE[14])
2182 #define ROM_TimerLoadGet \
2183  ((uint32_t (*)(uint32_t ui32Base, \
2184  uint32_t ui32Timer))ROM_TIMERTABLE[15])
2185 #define ROM_TimerValueGet \
2186  ((uint32_t (*)(uint32_t ui32Base, \
2187  uint32_t ui32Timer))ROM_TIMERTABLE[16])
2188 #define ROM_TimerMatchSet \
2189  ((void (*)(uint32_t ui32Base, \
2190  uint32_t ui32Timer, \
2191  uint32_t ui32Value))ROM_TIMERTABLE[17])
2192 #define ROM_TimerMatchGet \
2193  ((uint32_t (*)(uint32_t ui32Base, \
2194  uint32_t ui32Timer))ROM_TIMERTABLE[18])
2195 #define ROM_TimerIntEnable \
2196  ((void (*)(uint32_t ui32Base, \
2197  uint32_t ui32IntFlags))ROM_TIMERTABLE[19])
2198 #define ROM_TimerIntDisable \
2199  ((void (*)(uint32_t ui32Base, \
2200  uint32_t ui32IntFlags))ROM_TIMERTABLE[20])
2201 #define ROM_TimerIntStatus \
2202  ((uint32_t (*)(uint32_t ui32Base, \
2203  bool bMasked))ROM_TIMERTABLE[21])
2204 #define ROM_TimerControlWaitOnTrigger \
2205  ((void (*)(uint32_t ui32Base, \
2206  uint32_t ui32Timer, \
2207  bool bWait))ROM_TIMERTABLE[22])
2208 #define ROM_TimerClockSourceGet \
2209  ((uint32_t (*)(uint32_t ui32Base))ROM_TIMERTABLE[28])
2210 #define ROM_TimerClockSourceSet \
2211  ((void (*)(uint32_t ui32Base, \
2212  uint32_t ui32Source))ROM_TIMERTABLE[29])
2213 #define ROM_TimerADCEventGet \
2214  ((uint32_t (*)(uint32_t ui32Base))ROM_TIMERTABLE[30])
2215 #define ROM_TimerADCEventSet \
2216  ((void (*)(uint32_t ui32Base, \
2217  uint32_t ui32ADCEvent))ROM_TIMERTABLE[31])
2218 #define ROM_TimerDMAEventGet \
2219  ((uint32_t (*)(uint32_t ui32Base))ROM_TIMERTABLE[32])
2220 #define ROM_TimerDMAEventSet \
2221  ((void (*)(uint32_t ui32Base, \
2222  uint32_t ui32DMAEvent))ROM_TIMERTABLE[33])
2223 #define ROM_TimerSynchronize \
2224  ((void (*)(uint32_t ui32Base, \
2225  uint32_t ui32Timers))ROM_TIMERTABLE[34])
2226 
2227 //*****************************************************************************
2228 //
2229 // Macros for calling ROM functions in the UART API.
2230 //
2231 //*****************************************************************************
2232 #define ROM_UARTCharPut \
2233  ((void (*)(uint32_t ui32Base, \
2234  unsigned char ucData))ROM_UARTTABLE[0])
2235 #define ROM_UARTParityModeSet \
2236  ((void (*)(uint32_t ui32Base, \
2237  uint32_t ui32Parity))ROM_UARTTABLE[1])
2238 #define ROM_UARTParityModeGet \
2239  ((uint32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[2])
2240 #define ROM_UARTFIFOLevelSet \
2241  ((void (*)(uint32_t ui32Base, \
2242  uint32_t ui32TxLevel, \
2243  uint32_t ui32RxLevel))ROM_UARTTABLE[3])
2244 #define ROM_UARTFIFOLevelGet \
2245  ((void (*)(uint32_t ui32Base, \
2246  uint32_t *pui32TxLevel, \
2247  uint32_t *pui32RxLevel))ROM_UARTTABLE[4])
2248 #define ROM_UARTConfigSetExpClk \
2249  ((void (*)(uint32_t ui32Base, \
2250  uint32_t ui32UARTClk, \
2251  uint32_t ui32Baud, \
2252  uint32_t ui32Config))ROM_UARTTABLE[5])
2253 #define ROM_UARTConfigGetExpClk \
2254  ((void (*)(uint32_t ui32Base, \
2255  uint32_t ui32UARTClk, \
2256  uint32_t *pui32Baud, \
2257  uint32_t *pui32Config))ROM_UARTTABLE[6])
2258 #define ROM_UARTEnable \
2259  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[7])
2260 #define ROM_UARTDisable \
2261  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[8])
2262 #define ROM_UARTEnableSIR \
2263  ((void (*)(uint32_t ui32Base, \
2264  bool bLowPower))ROM_UARTTABLE[9])
2265 #define ROM_UARTDisableSIR \
2266  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[10])
2267 #define ROM_UARTCharsAvail \
2268  ((bool (*)(uint32_t ui32Base))ROM_UARTTABLE[11])
2269 #define ROM_UARTSpaceAvail \
2270  ((bool (*)(uint32_t ui32Base))ROM_UARTTABLE[12])
2271 #define ROM_UARTCharGetNonBlocking \
2272  ((int32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[13])
2273 #define ROM_UARTCharGet \
2274  ((int32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[14])
2275 #define ROM_UARTCharPutNonBlocking \
2276  ((bool (*)(uint32_t ui32Base, \
2277  unsigned char ucData))ROM_UARTTABLE[15])
2278 #define ROM_UARTBreakCtl \
2279  ((void (*)(uint32_t ui32Base, \
2280  bool bBreakState))ROM_UARTTABLE[16])
2281 #define ROM_UARTIntEnable \
2282  ((void (*)(uint32_t ui32Base, \
2283  uint32_t ui32IntFlags))ROM_UARTTABLE[17])
2284 #define ROM_UARTIntDisable \
2285  ((void (*)(uint32_t ui32Base, \
2286  uint32_t ui32IntFlags))ROM_UARTTABLE[18])
2287 #define ROM_UARTIntStatus \
2288  ((uint32_t (*)(uint32_t ui32Base, \
2289  bool bMasked))ROM_UARTTABLE[19])
2290 #define ROM_UARTIntClear \
2291  ((void (*)(uint32_t ui32Base, \
2292  uint32_t ui32IntFlags))ROM_UARTTABLE[20])
2293 #define ROM_UpdateUART \
2294  ((void (*)(void))ROM_UARTTABLE[21])
2295 #define ROM_UARTDMAEnable \
2296  ((void (*)(uint32_t ui32Base, \
2297  uint32_t ui32DMAFlags))ROM_UARTTABLE[22])
2298 #define ROM_UARTDMADisable \
2299  ((void (*)(uint32_t ui32Base, \
2300  uint32_t ui32DMAFlags))ROM_UARTTABLE[23])
2301 #define ROM_UARTFIFOEnable \
2302  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[24])
2303 #define ROM_UARTFIFODisable \
2304  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[25])
2305 #define ROM_UARTBusy \
2306  ((bool (*)(uint32_t ui32Base))ROM_UARTTABLE[26])
2307 #define ROM_UARTTxIntModeSet \
2308  ((void (*)(uint32_t ui32Base, \
2309  uint32_t ui32Mode))ROM_UARTTABLE[27])
2310 #define ROM_UARTTxIntModeGet \
2311  ((uint32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[28])
2312 #define ROM_UARTRxErrorGet \
2313  ((uint32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[29])
2314 #define ROM_UARTRxErrorClear \
2315  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[30])
2316 #define ROM_UARTClockSourceSet \
2317  ((void (*)(uint32_t ui32Base, \
2318  uint32_t ui32Source))ROM_UARTTABLE[31])
2319 #define ROM_UARTClockSourceGet \
2320  ((uint32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[32])
2321 #define ROM_UART9BitEnable \
2322  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[33])
2323 #define ROM_UART9BitDisable \
2324  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[34])
2325 #define ROM_UART9BitAddrSet \
2326  ((void (*)(uint32_t ui32Base, \
2327  uint8_t ui8Addr, \
2328  uint8_t ui8Mask))ROM_UARTTABLE[35])
2329 #define ROM_UART9BitAddrSend \
2330  ((void (*)(uint32_t ui32Base, \
2331  uint8_t ui8Addr))ROM_UARTTABLE[36])
2332 #define ROM_UARTSmartCardDisable \
2333  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[37])
2334 #define ROM_UARTSmartCardEnable \
2335  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[38])
2336 #define ROM_UARTModemControlClear \
2337  ((void (*)(uint32_t ui32Base, \
2338  uint32_t ui32Control))ROM_UARTTABLE[39])
2339 #define ROM_UARTModemControlGet \
2340  ((uint32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[40])
2341 #define ROM_UARTModemControlSet \
2342  ((void (*)(uint32_t ui32Base, \
2343  uint32_t ui32Control))ROM_UARTTABLE[41])
2344 #define ROM_UARTModemStatusGet \
2345  ((uint32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[42])
2346 #define ROM_UARTFlowControlGet \
2347  ((uint32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[43])
2348 #define ROM_UARTFlowControlSet \
2349  ((void (*)(uint32_t ui32Base, \
2350  uint32_t ui32Mode))ROM_UARTTABLE[44])
2351 
2352 //*****************************************************************************
2353 //
2354 // Macros for calling ROM functions in the uDMA API.
2355 //
2356 //*****************************************************************************
2357 #define ROM_uDMAChannelTransferSet \
2358  ((void (*)(uint32_t ui32ChannelStructIndex, \
2359  uint32_t ui32Mode, \
2360  void *pvSrcAddr, \
2361  void *pvDstAddr, \
2362  uint32_t ui32TransferSize))ROM_UDMATABLE[0])
2363 #define ROM_uDMAEnable \
2364  ((void (*)(void))ROM_UDMATABLE[1])
2365 #define ROM_uDMADisable \
2366  ((void (*)(void))ROM_UDMATABLE[2])
2367 #define ROM_uDMAErrorStatusGet \
2368  ((uint32_t (*)(void))ROM_UDMATABLE[3])
2369 #define ROM_uDMAErrorStatusClear \
2370  ((void (*)(void))ROM_UDMATABLE[4])
2371 #define ROM_uDMAChannelEnable \
2372  ((void (*)(uint32_t ui32ChannelNum))ROM_UDMATABLE[5])
2373 #define ROM_uDMAChannelDisable \
2374  ((void (*)(uint32_t ui32ChannelNum))ROM_UDMATABLE[6])
2375 #define ROM_uDMAChannelIsEnabled \
2376  ((bool (*)(uint32_t ui32ChannelNum))ROM_UDMATABLE[7])
2377 #define ROM_uDMAControlBaseSet \
2378  ((void (*)(void *pControlTable))ROM_UDMATABLE[8])
2379 #define ROM_uDMAControlBaseGet \
2380  ((void * (*)(void))ROM_UDMATABLE[9])
2381 #define ROM_uDMAChannelRequest \
2382  ((void (*)(uint32_t ui32ChannelNum))ROM_UDMATABLE[10])
2383 #define ROM_uDMAChannelAttributeEnable \
2384  ((void (*)(uint32_t ui32ChannelNum, \
2385  uint32_t ui32Attr))ROM_UDMATABLE[11])
2386 #define ROM_uDMAChannelAttributeDisable \
2387  ((void (*)(uint32_t ui32ChannelNum, \
2388  uint32_t ui32Attr))ROM_UDMATABLE[12])
2389 #define ROM_uDMAChannelAttributeGet \
2390  ((uint32_t (*)(uint32_t ui32ChannelNum))ROM_UDMATABLE[13])
2391 #define ROM_uDMAChannelControlSet \
2392  ((void (*)(uint32_t ui32ChannelStructIndex, \
2393  uint32_t ui32Control))ROM_UDMATABLE[14])
2394 #define ROM_uDMAChannelSizeGet \
2395  ((uint32_t (*)(uint32_t ui32ChannelStructIndex))ROM_UDMATABLE[15])
2396 #define ROM_uDMAChannelModeGet \
2397  ((uint32_t (*)(uint32_t ui32ChannelStructIndex))ROM_UDMATABLE[16])
2398 #define ROM_uDMAControlAlternateBaseGet \
2399  ((void * (*)(void))ROM_UDMATABLE[21])
2400 #define ROM_uDMAChannelScatterGatherSet \
2401  ((void (*)(uint32_t ui32ChannelNum, \
2402  uint32_t ui32TaskCount, \
2403  void *pvTaskList, \
2404  uint32_t ui32IsPeriphSG))ROM_UDMATABLE[22])
2405 #define ROM_uDMAChannelAssign \
2406  ((void (*)(uint32_t ui32Mapping))ROM_UDMATABLE[23])
2407 
2408 //*****************************************************************************
2409 //
2410 // Macros for calling ROM functions in the USB API.
2411 //
2412 //*****************************************************************************
2413 #define ROM_USBDevAddrGet \
2414  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[1])
2415 #define ROM_USBDevAddrSet \
2416  ((void (*)(uint32_t ui32Base, \
2417  uint32_t ui32Address))ROM_USBTABLE[2])
2418 #define ROM_USBDevConnect \
2419  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[3])
2420 #define ROM_USBDevDisconnect \
2421  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[4])
2422 #define ROM_USBDevEndpointConfigSet \
2423  ((void (*)(uint32_t ui32Base, \
2424  uint32_t ui32Endpoint, \
2425  uint32_t ui32MaxPacketSize, \
2426  uint32_t ui32Flags))ROM_USBTABLE[5])
2427 #define ROM_USBDevEndpointDataAck \
2428  ((void (*)(uint32_t ui32Base, \
2429  uint32_t ui32Endpoint, \
2430  bool bIsLastPacket))ROM_USBTABLE[6])
2431 #define ROM_USBDevEndpointStall \
2432  ((void (*)(uint32_t ui32Base, \
2433  uint32_t ui32Endpoint, \
2434  uint32_t ui32Flags))ROM_USBTABLE[7])
2435 #define ROM_USBDevEndpointStallClear \
2436  ((void (*)(uint32_t ui32Base, \
2437  uint32_t ui32Endpoint, \
2438  uint32_t ui32Flags))ROM_USBTABLE[8])
2439 #define ROM_USBDevEndpointStatusClear \
2440  ((void (*)(uint32_t ui32Base, \
2441  uint32_t ui32Endpoint, \
2442  uint32_t ui32Flags))ROM_USBTABLE[9])
2443 #define ROM_USBEndpointDataGet \
2444  ((int32_t (*)(uint32_t ui32Base, \
2445  uint32_t ui32Endpoint, \
2446  uint8_t *pui8Data, \
2447  uint32_t *pui32Size))ROM_USBTABLE[10])
2448 #define ROM_USBEndpointDataPut \
2449  ((int32_t (*)(uint32_t ui32Base, \
2450  uint32_t ui32Endpoint, \
2451  uint8_t *pui8Data, \
2452  uint32_t ui32Size))ROM_USBTABLE[11])
2453 #define ROM_USBEndpointDataSend \
2454  ((int32_t (*)(uint32_t ui32Base, \
2455  uint32_t ui32Endpoint, \
2456  uint32_t ui32TransType))ROM_USBTABLE[12])
2457 #define ROM_USBEndpointDataToggleClear \
2458  ((void (*)(uint32_t ui32Base, \
2459  uint32_t ui32Endpoint, \
2460  uint32_t ui32Flags))ROM_USBTABLE[13])
2461 #define ROM_USBEndpointStatus \
2462  ((uint32_t (*)(uint32_t ui32Base, \
2463  uint32_t ui32Endpoint))ROM_USBTABLE[14])
2464 #define ROM_USBFIFOAddrGet \
2465  ((uint32_t (*)(uint32_t ui32Base, \
2466  uint32_t ui32Endpoint))ROM_USBTABLE[15])
2467 #define ROM_USBFIFOConfigGet \
2468  ((void (*)(uint32_t ui32Base, \
2469  uint32_t ui32Endpoint, \
2470  uint32_t *pui32FIFOAddress, \
2471  uint32_t *pui32FIFOSize, \
2472  uint32_t ui32Flags))ROM_USBTABLE[16])
2473 #define ROM_USBFIFOConfigSet \
2474  ((void (*)(uint32_t ui32Base, \
2475  uint32_t ui32Endpoint, \
2476  uint32_t ui32FIFOAddress, \
2477  uint32_t ui32FIFOSize, \
2478  uint32_t ui32Flags))ROM_USBTABLE[17])
2479 #define ROM_USBFIFOFlush \
2480  ((void (*)(uint32_t ui32Base, \
2481  uint32_t ui32Endpoint, \
2482  uint32_t ui32Flags))ROM_USBTABLE[18])
2483 #define ROM_USBFrameNumberGet \
2484  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[19])
2485 #define ROM_USBHostAddrGet \
2486  ((uint32_t (*)(uint32_t ui32Base, \
2487  uint32_t ui32Endpoint, \
2488  uint32_t ui32Flags))ROM_USBTABLE[20])
2489 #define ROM_USBHostAddrSet \
2490  ((void (*)(uint32_t ui32Base, \
2491  uint32_t ui32Endpoint, \
2492  uint32_t ui32Addr, \
2493  uint32_t ui32Flags))ROM_USBTABLE[21])
2494 #define ROM_USBHostEndpointConfig \
2495  ((void (*)(uint32_t ui32Base, \
2496  uint32_t ui32Endpoint, \
2497  uint32_t ui32MaxPacketSize, \
2498  uint32_t ui32NAKPollInterval, \
2499  uint32_t ui32TargetEndpoint, \
2500  uint32_t ui32Flags))ROM_USBTABLE[22])
2501 #define ROM_USBHostEndpointDataAck \
2502  ((void (*)(uint32_t ui32Base, \
2503  uint32_t ui32Endpoint))ROM_USBTABLE[23])
2504 #define ROM_USBHostEndpointDataToggle \
2505  ((void (*)(uint32_t ui32Base, \
2506  uint32_t ui32Endpoint, \
2507  bool bDataToggle, \
2508  uint32_t ui32Flags))ROM_USBTABLE[24])
2509 #define ROM_USBHostEndpointStatusClear \
2510  ((void (*)(uint32_t ui32Base, \
2511  uint32_t ui32Endpoint, \
2512  uint32_t ui32Flags))ROM_USBTABLE[25])
2513 #define ROM_USBHostHubAddrGet \
2514  ((uint32_t (*)(uint32_t ui32Base, \
2515  uint32_t ui32Endpoint, \
2516  uint32_t ui32Flags))ROM_USBTABLE[26])
2517 #define ROM_USBHostHubAddrSet \
2518  ((void (*)(uint32_t ui32Base, \
2519  uint32_t ui32Endpoint, \
2520  uint32_t ui32Addr, \
2521  uint32_t ui32Flags))ROM_USBTABLE[27])
2522 #define ROM_USBHostPwrDisable \
2523  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[28])
2524 #define ROM_USBHostPwrEnable \
2525  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[29])
2526 #define ROM_USBHostPwrConfig \
2527  ((void (*)(uint32_t ui32Base, \
2528  uint32_t ui32Flags))ROM_USBTABLE[30])
2529 #define ROM_USBHostPwrFaultDisable \
2530  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[31])
2531 #define ROM_USBHostPwrFaultEnable \
2532  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[32])
2533 #define ROM_USBHostRequestIN \
2534  ((void (*)(uint32_t ui32Base, \
2535  uint32_t ui32Endpoint))ROM_USBTABLE[33])
2536 #define ROM_USBHostRequestStatus \
2537  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[34])
2538 #define ROM_USBHostReset \
2539  ((void (*)(uint32_t ui32Base, \
2540  bool bStart))ROM_USBTABLE[35])
2541 #define ROM_USBHostResume \
2542  ((void (*)(uint32_t ui32Base, \
2543  bool bStart))ROM_USBTABLE[36])
2544 #define ROM_USBHostSpeedGet \
2545  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[37])
2546 #define ROM_USBHostSuspend \
2547  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[38])
2548 #define ROM_USBDevEndpointConfigGet \
2549  ((void (*)(uint32_t ui32Base, \
2550  uint32_t ui32Endpoint, \
2551  uint32_t *pui32MaxPacketSize, \
2552  uint32_t *pui32Flags))ROM_USBTABLE[41])
2553 #define ROM_USBEndpointDMAEnable \
2554  ((void (*)(uint32_t ui32Base, \
2555  uint32_t ui32Endpoint, \
2556  uint32_t ui32Flags))ROM_USBTABLE[42])
2557 #define ROM_USBEndpointDMADisable \
2558  ((void (*)(uint32_t ui32Base, \
2559  uint32_t ui32Endpoint, \
2560  uint32_t ui32Flags))ROM_USBTABLE[43])
2561 #define ROM_USBEndpointDataAvail \
2562  ((uint32_t (*)(uint32_t ui32Base, \
2563  uint32_t ui32Endpoint))ROM_USBTABLE[44])
2564 #define ROM_USBModeGet \
2565  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[46])
2566 #define ROM_USBIntDisableControl \
2567  ((void (*)(uint32_t ui32Base, \
2568  uint32_t ui32IntFlags))ROM_USBTABLE[48])
2569 #define ROM_USBIntEnableControl \
2570  ((void (*)(uint32_t ui32Base, \
2571  uint32_t ui32IntFlags))ROM_USBTABLE[49])
2572 #define ROM_USBIntStatusControl \
2573  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[50])
2574 #define ROM_USBIntDisableEndpoint \
2575  ((void (*)(uint32_t ui32Base, \
2576  uint32_t ui32IntFlags))ROM_USBTABLE[51])
2577 #define ROM_USBIntEnableEndpoint \
2578  ((void (*)(uint32_t ui32Base, \
2579  uint32_t ui32IntFlags))ROM_USBTABLE[52])
2580 #define ROM_USBIntStatusEndpoint \
2581  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[53])
2582 #define ROM_USBHostMode \
2583  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[54])
2584 #define ROM_USBDevMode \
2585  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[55])
2586 #define ROM_USBPHYPowerOff \
2587  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[56])
2588 #define ROM_USBPHYPowerOn \
2589  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[57])
2590 #define ROM_UpdateUSB \
2591  ((void (*)(uint8_t *pui8DescriptorInfo))ROM_USBTABLE[58])
2592 #define ROM_USBOTGMode \
2593  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[59])
2594 #define ROM_USBHostRequestINClear \
2595  ((void (*)(uint32_t ui32Base, \
2596  uint32_t ui32Endpoint))ROM_USBTABLE[60])
2597 #define ROM_USBNumEndpointsGet \
2598  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[61])
2599 #define ROM_USBClockDisable \
2600  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[62])
2601 #define ROM_USBClockEnable \
2602  ((void (*)(uint32_t ui32Base, \
2603  uint32_t ui32Div, \
2604  uint32_t ui32Flags))ROM_USBTABLE[63])
2605 #define ROM_USBDevLPMConfig \
2606  ((void (*)(uint32_t ui32Base, \
2607  uint32_t ui32Config))ROM_USBTABLE[65])
2608 #define ROM_USBDevLPMDisable \
2609  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[66])
2610 #define ROM_USBDevLPMEnable \
2611  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[67])
2612 #define ROM_USBDevLPMRemoteWake \
2613  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[68])
2614 #define ROM_USBDevSpeedGet \
2615  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[69])
2616 #define ROM_USBDMAChannelAddressGet \
2617  ((void * (*)(uint32_t ui32Base, \
2618  uint32_t ui32Channel))ROM_USBTABLE[70])
2619 #define ROM_USBDMAChannelAddressSet \
2620  ((void (*)(uint32_t ui32Base, \
2621  uint32_t ui32Channel, \
2622  void *pvAddress))ROM_USBTABLE[71])
2623 #define ROM_USBDMAChannelConfigSet \
2624  ((void (*)(uint32_t ui32Base, \
2625  uint32_t ui32Channel, \
2626  uint32_t ui32Endpoint, \
2627  uint32_t ui32Config))ROM_USBTABLE[72])
2628 #define ROM_USBDMAChannelDisable \
2629  ((void (*)(uint32_t ui32Base, \
2630  uint32_t ui32Channel))ROM_USBTABLE[73])
2631 #define ROM_USBDMAChannelEnable \
2632  ((void (*)(uint32_t ui32Base, \
2633  uint32_t ui32Channel))ROM_USBTABLE[74])
2634 #define ROM_USBDMAChannelIntDisable \
2635  ((void (*)(uint32_t ui32Base, \
2636  uint32_t ui32Channel))ROM_USBTABLE[75])
2637 #define ROM_USBDMAChannelIntEnable \
2638  ((void (*)(uint32_t ui32Base, \
2639  uint32_t ui32Channel))ROM_USBTABLE[76])
2640 #define ROM_USBDMAChannelCountGet \
2641  ((uint32_t (*)(uint32_t ui32Base, \
2642  uint32_t ui32Channel))ROM_USBTABLE[77])
2643 #define ROM_USBDMAChannelCountSet \
2644  ((void (*)(uint32_t ui32Base, \
2645  uint32_t ui32Count, \
2646  uint32_t ui32Channel))ROM_USBTABLE[78])
2647 #define ROM_USBDMAChannelIntStatus \
2648  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[79])
2649 #define ROM_USBDMAChannelStatus \
2650  ((uint32_t (*)(uint32_t ui32Base, \
2651  uint32_t ui32Channel))ROM_USBTABLE[80])
2652 #define ROM_USBDMAChannelStatusClear \
2653  ((void (*)(uint32_t ui32Base, \
2654  uint32_t ui32Channel, \
2655  uint32_t ui32Status))ROM_USBTABLE[81])
2656 #define ROM_USBHighSpeed \
2657  ((void (*)(uint32_t ui32Base, \
2658  bool bEnable))ROM_USBTABLE[82])
2659 #define ROM_USBHostEndpointPing \
2660  ((void (*)(uint32_t ui32Base, \
2661  uint32_t ui32Endpoint, \
2662  bool bEnable))ROM_USBTABLE[83])
2663 #define ROM_USBHostEndpointSpeed \
2664  ((void (*)(uint32_t ui32Base, \
2665  uint32_t ui32Endpoint, \
2666  uint32_t ui32Flags))ROM_USBTABLE[84])
2667 #define ROM_USBHostLPMConfig \
2668  ((void (*)(uint32_t ui32Base, \
2669  uint32_t ui32ResumeTime, \
2670  uint32_t ui32Config))ROM_USBTABLE[85])
2671 #define ROM_USBHostLPMResume \
2672  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[86])
2673 #define ROM_USBHostLPMSend \
2674  ((void (*)(uint32_t ui32Base, \
2675  uint32_t ui32Address, \
2676  uint32_t uiEndpoint))ROM_USBTABLE[87])
2677 #define ROM_USBLPMIntDisable \
2678  ((void (*)(uint32_t ui32Base, \
2679  uint32_t ui32Ints))ROM_USBTABLE[88])
2680 #define ROM_USBLPMIntEnable \
2681  ((void (*)(uint32_t ui32Base, \
2682  uint32_t ui32Ints))ROM_USBTABLE[89])
2683 #define ROM_USBLPMIntStatus \
2684  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[90])
2685 #define ROM_USBLPMLinkStateGet \
2686  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[91])
2687 #define ROM_USBEndpointPacketCountSet \
2688  ((void (*)(uint32_t ui32Base, \
2689  uint32_t ui32Endpoint, \
2690  uint32_t ui32Count))ROM_USBTABLE[92])
2691 #define ROM_USBULPIConfig \
2692  ((void (*)(uint32_t ui32Base, \
2693  uint32_t ui32Config))ROM_USBTABLE[93])
2694 #define ROM_USBULPIDisable \
2695  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[94])
2696 #define ROM_USBULPIEnable \
2697  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[95])
2698 #define ROM_USBULPIRegRead \
2699  ((uint8_t (*)(uint32_t ui32Base, \
2700  uint8_t ui8Reg))ROM_USBTABLE[96])
2701 #define ROM_USBULPIRegWrite \
2702  ((void (*)(uint32_t ui32Base, \
2703  uint8_t ui8Reg, \
2704  uint8_t ui8Data))ROM_USBTABLE[97])
2705 #define ROM_USBOTGSessionRequest \
2706  ((void (*)(uint32_t ui32Base, \
2707  bool bStart))ROM_USBTABLE[98])
2708 #define ROM_USBDMANumChannels \
2709  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[99])
2710 #define ROM_USBEndpointDMAConfigSet \
2711  ((void (*)(uint32_t ui32Base, \
2712  uint32_t ui32Endpoint, \
2713  uint32_t ui32Config))ROM_USBTABLE[100])
2714 #define ROM_USBLPMRemoteWakeEnabled \
2715  ((bool (*)(uint32_t ui32Base))ROM_USBTABLE[102])
2716 #define ROM_USBModeConfig \
2717  ((void (*)(uint32_t ui32Base, \
2718  uint32_t ui32Mode))ROM_USBTABLE[103])
2719 
2720 //*****************************************************************************
2721 //
2722 // Macros for calling ROM functions in the Watchdog API.
2723 //
2724 //*****************************************************************************
2725 #define ROM_WatchdogIntClear \
2726  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[0])
2727 #define ROM_WatchdogRunning \
2728  ((bool (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[1])
2729 #define ROM_WatchdogEnable \
2730  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[2])
2731 #define ROM_WatchdogResetEnable \
2732  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[3])
2733 #define ROM_WatchdogResetDisable \
2734  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[4])
2735 #define ROM_WatchdogLock \
2736  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[5])
2737 #define ROM_WatchdogUnlock \
2738  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[6])
2739 #define ROM_WatchdogLockState \
2740  ((bool (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[7])
2741 #define ROM_WatchdogReloadSet \
2742  ((void (*)(uint32_t ui32Base, \
2743  uint32_t ui32LoadVal))ROM_WATCHDOGTABLE[8])
2744 #define ROM_WatchdogReloadGet \
2745  ((uint32_t (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[9])
2746 #define ROM_WatchdogValueGet \
2747  ((uint32_t (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[10])
2748 #define ROM_WatchdogIntEnable \
2749  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[11])
2750 #define ROM_WatchdogIntStatus \
2751  ((uint32_t (*)(uint32_t ui32Base, \
2752  bool bMasked))ROM_WATCHDOGTABLE[12])
2753 #define ROM_WatchdogStallEnable \
2754  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[13])
2755 #define ROM_WatchdogStallDisable \
2756  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[14])
2757 #define ROM_WatchdogIntTypeSet \
2758  ((void (*)(uint32_t ui32Base, \
2759  uint32_t ui32Type))ROM_WATCHDOGTABLE[15])
2760 
2761 //*****************************************************************************
2762 //
2763 // Macros for calling ROM functions in the Software API.
2764 //
2765 //*****************************************************************************
2766 #define ROM_Crc16Array \
2767  ((uint16_t (*)(uint32_t ui32WordLen, \
2768  const uint32_t *pui32Data))ROM_SOFTWARETABLE[1])
2769 #define ROM_Crc16Array3 \
2770  ((void (*)(uint32_t ui32WordLen, \
2771  const uint32_t *pui32Data, \
2772  uint16_t *pui16Crc3))ROM_SOFTWARETABLE[2])
2773 #define ROM_Crc16 \
2774  ((uint16_t (*)(uint16_t ui16Crc, \
2775  const uint8_t *pui8Data, \
2776  uint32_t ui32Count))ROM_SOFTWARETABLE[3])
2777 #define ROM_Crc8CCITT \
2778  ((uint8_t (*)(uint8_t ui8Crc, \
2779  const uint8_t *pui8Data, \
2780  uint32_t ui32Count))ROM_SOFTWARETABLE[4])
2781 #define ROM_Crc32 \
2782  ((uint32_t (*)(uint32_t ui32Crc, \
2783  const uint8_t *pui8Data, \
2784  uint32_t ui32Count))ROM_SOFTWARETABLE[5])
2785 #define ROM_pvAESTable \
2786  ((void *)&(ROM_SOFTWARETABLE[7]))
2787 
2788 #endif // __DRIVERLIB_ROM_H__
© Copyright 1995-2019, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale