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_EMACTimestampSysTimeGet \
781  ((void (*)(uint32_t ui32Base, \
782  uint32_t *pui32Seconds, \
783  uint32_t *pui32SubSeconds))ROM_EMACTABLE[58])
784 #define ROM_EMACTimestampSysTimeSet \
785  ((void (*)(uint32_t ui32Base, \
786  uint32_t ui32Seconds, \
787  uint32_t ui32SubSeconds))ROM_EMACTABLE[59])
788 #define ROM_EMACTimestampSysTimeUpdate \
789  ((void (*)(uint32_t ui32Base, \
790  uint32_t ui32Seconds, \
791  uint32_t ui32SubSeconds, \
792  bool bInc))ROM_EMACTABLE[60])
793 #define ROM_EMACTimestampTargetIntDisable \
794  ((void (*)(uint32_t ui32Base))ROM_EMACTABLE[61])
795 #define ROM_EMACTimestampTargetIntEnable \
796  ((void (*)(uint32_t ui32Base))ROM_EMACTABLE[62])
797 #define ROM_EMACTimestampTargetSet \
798  ((void (*)(uint32_t ui32Base, \
799  uint32_t ui32Seconds, \
800  uint32_t ui32Nanoseconds))ROM_EMACTABLE[63])
801 #define ROM_EMACVLANHashFilterBitCalculate \
802  ((uint32_t (*)(uint16_t ui16Tag))ROM_EMACTABLE[64])
803 #define ROM_EMACVLANHashFilterGet \
804  ((uint32_t (*)(uint32_t ui32Base))ROM_EMACTABLE[65])
805 #define ROM_EMACVLANHashFilterSet \
806  ((void (*)(uint32_t ui32Base, \
807  uint32_t ui32Hash))ROM_EMACTABLE[66])
808 #define ROM_EMACVLANRxConfigGet \
809  ((uint32_t (*)(uint32_t ui32Base, \
810  uint16_t *pui16Tag))ROM_EMACTABLE[67])
811 #define ROM_EMACVLANRxConfigSet \
812  ((void (*)(uint32_t ui32Base, \
813  uint16_t ui16Tag, \
814  uint32_t ui32Config))ROM_EMACTABLE[68])
815 #define ROM_EMACVLANTxConfigGet \
816  ((uint32_t (*)(uint32_t ui32Base, \
817  uint16_t *pui16Tag))ROM_EMACTABLE[69])
818 #define ROM_EMACVLANTxConfigSet \
819  ((void (*)(uint32_t ui32Base, \
820  uint16_t ui16Tag, \
821  uint32_t ui32Config))ROM_EMACTABLE[70])
822 #define ROM_UpdateEMAC \
823  ((void (*)(uint32_t ui32Clock))ROM_EMACTABLE[71])
824 
825 //*****************************************************************************
826 //
827 // Macros for calling ROM functions in the Flash API.
828 //
829 //*****************************************************************************
830 #define ROM_FlashProgram \
831  ((int32_t (*)(uint32_t *pui32Data, \
832  uint32_t ui32Address, \
833  uint32_t ui32Count))ROM_FLASHTABLE[0])
834 #define ROM_FlashErase \
835  ((int32_t (*)(uint32_t ui32Address))ROM_FLASHTABLE[3])
836 #define ROM_FlashProtectGet \
837  ((tFlashProtection (*)(uint32_t ui32Address))ROM_FLASHTABLE[4])
838 #define ROM_FlashProtectSet \
839  ((int32_t (*)(uint32_t ui32Address, \
840  tFlashProtection eProtect))ROM_FLASHTABLE[5])
841 #define ROM_FlashProtectSave \
842  ((int32_t (*)(void))ROM_FLASHTABLE[6])
843 #define ROM_FlashUserGet \
844  ((int32_t (*)(uint32_t *pui32User0, \
845  uint32_t *pui32User1))ROM_FLASHTABLE[7])
846 #define ROM_FlashUserSet \
847  ((int32_t (*)(uint32_t ui32User0, \
848  uint32_t ui32User1))ROM_FLASHTABLE[8])
849 #define ROM_FlashUserSave \
850  ((int32_t (*)(void))ROM_FLASHTABLE[9])
851 #define ROM_FlashIntEnable \
852  ((void (*)(uint32_t ui32IntFlags))ROM_FLASHTABLE[10])
853 #define ROM_FlashIntDisable \
854  ((void (*)(uint32_t ui32IntFlags))ROM_FLASHTABLE[11])
855 #define ROM_FlashIntStatus \
856  ((uint32_t (*)(bool bMasked))ROM_FLASHTABLE[12])
857 #define ROM_FlashIntClear \
858  ((void (*)(uint32_t ui32IntFlags))ROM_FLASHTABLE[13])
859 
860 //*****************************************************************************
861 //
862 // Macros for calling ROM functions in the FPU API.
863 //
864 //*****************************************************************************
865 #define ROM_FPUEnable \
866  ((void (*)(void))ROM_FPUTABLE[0])
867 #define ROM_FPUDisable \
868  ((void (*)(void))ROM_FPUTABLE[1])
869 #define ROM_FPUFlushToZeroModeSet \
870  ((void (*)(uint32_t ui32Mode))ROM_FPUTABLE[2])
871 #define ROM_FPUHalfPrecisionModeSet \
872  ((void (*)(uint32_t ui32Mode))ROM_FPUTABLE[3])
873 #define ROM_FPULazyStackingEnable \
874  ((void (*)(void))ROM_FPUTABLE[4])
875 #define ROM_FPUNaNModeSet \
876  ((void (*)(uint32_t ui32Mode))ROM_FPUTABLE[5])
877 #define ROM_FPURoundingModeSet \
878  ((void (*)(uint32_t ui32Mode))ROM_FPUTABLE[6])
879 #define ROM_FPUStackingDisable \
880  ((void (*)(void))ROM_FPUTABLE[7])
881 #define ROM_FPUStackingEnable \
882  ((void (*)(void))ROM_FPUTABLE[8])
883 
884 //*****************************************************************************
885 //
886 // Macros for calling ROM functions in the GPIO API.
887 //
888 //*****************************************************************************
889 #define ROM_GPIOPinWrite \
890  ((void (*)(uint32_t ui32Port, \
891  uint8_t ui8Pins, \
892  uint8_t ui8Val))ROM_GPIOTABLE[0])
893 #define ROM_GPIODirModeSet \
894  ((void (*)(uint32_t ui32Port, \
895  uint8_t ui8Pins, \
896  uint32_t ui32PinIO))ROM_GPIOTABLE[1])
897 #define ROM_GPIODirModeGet \
898  ((uint32_t (*)(uint32_t ui32Port, \
899  uint8_t ui8Pin))ROM_GPIOTABLE[2])
900 #define ROM_GPIOIntTypeSet \
901  ((void (*)(uint32_t ui32Port, \
902  uint8_t ui8Pins, \
903  uint32_t ui32IntType))ROM_GPIOTABLE[3])
904 #define ROM_GPIOIntTypeGet \
905  ((uint32_t (*)(uint32_t ui32Port, \
906  uint8_t ui8Pin))ROM_GPIOTABLE[4])
907 #define ROM_GPIOPadConfigGet \
908  ((void (*)(uint32_t ui32Port, \
909  uint8_t ui8Pin, \
910  uint32_t *pui32Strength, \
911  uint32_t *pui32PadType))ROM_GPIOTABLE[6])
912 #define ROM_GPIOPinRead \
913  ((int32_t (*)(uint32_t ui32Port, \
914  uint8_t ui8Pins))ROM_GPIOTABLE[11])
915 #define ROM_GPIOPinTypeComparator \
916  ((void (*)(uint32_t ui32Port, \
917  uint8_t ui8Pins))ROM_GPIOTABLE[13])
918 #define ROM_GPIOPinTypeGPIOInput \
919  ((void (*)(uint32_t ui32Port, \
920  uint8_t ui8Pins))ROM_GPIOTABLE[14])
921 #define ROM_GPIOPinTypeGPIOOutput \
922  ((void (*)(uint32_t ui32Port, \
923  uint8_t ui8Pins))ROM_GPIOTABLE[15])
924 #define ROM_GPIOPinTypeI2C \
925  ((void (*)(uint32_t ui32Port, \
926  uint8_t ui8Pins))ROM_GPIOTABLE[16])
927 #define ROM_GPIOPinTypePWM \
928  ((void (*)(uint32_t ui32Port, \
929  uint8_t ui8Pins))ROM_GPIOTABLE[17])
930 #define ROM_GPIOPinTypeQEI \
931  ((void (*)(uint32_t ui32Port, \
932  uint8_t ui8Pins))ROM_GPIOTABLE[18])
933 #define ROM_GPIOPinTypeSSI \
934  ((void (*)(uint32_t ui32Port, \
935  uint8_t ui8Pins))ROM_GPIOTABLE[19])
936 #define ROM_GPIOPinTypeTimer \
937  ((void (*)(uint32_t ui32Port, \
938  uint8_t ui8Pins))ROM_GPIOTABLE[20])
939 #define ROM_GPIOPinTypeUART \
940  ((void (*)(uint32_t ui32Port, \
941  uint8_t ui8Pins))ROM_GPIOTABLE[21])
942 #define ROM_GPIOPinTypeGPIOOutputOD \
943  ((void (*)(uint32_t ui32Port, \
944  uint8_t ui8Pins))ROM_GPIOTABLE[22])
945 #define ROM_GPIOPinTypeADC \
946  ((void (*)(uint32_t ui32Port, \
947  uint8_t ui8Pins))ROM_GPIOTABLE[23])
948 #define ROM_GPIOPinTypeUSBDigital \
949  ((void (*)(uint32_t ui32Port, \
950  uint8_t ui8Pins))ROM_GPIOTABLE[24])
951 #define ROM_GPIOPinConfigure \
952  ((void (*)(uint32_t ui32PinConfig))ROM_GPIOTABLE[26])
953 #define ROM_GPIOPinTypeUSBAnalog \
954  ((void (*)(uint32_t ui32Port, \
955  uint8_t ui8Pins))ROM_GPIOTABLE[28])
956 #define ROM_GPIODMATriggerEnable \
957  ((void (*)(uint32_t ui32Port, \
958  uint8_t ui8Pins))ROM_GPIOTABLE[31])
959 #define ROM_GPIODMATriggerDisable \
960  ((void (*)(uint32_t ui32Port, \
961  uint8_t ui8Pins))ROM_GPIOTABLE[32])
962 #define ROM_GPIOADCTriggerEnable \
963  ((void (*)(uint32_t ui32Port, \
964  uint8_t ui8Pins))ROM_GPIOTABLE[33])
965 #define ROM_GPIOADCTriggerDisable \
966  ((void (*)(uint32_t ui32Port, \
967  uint8_t ui8Pins))ROM_GPIOTABLE[34])
968 #define ROM_GPIOPinTypeI2CSCL \
969  ((void (*)(uint32_t ui32Port, \
970  uint8_t ui8Pins))ROM_GPIOTABLE[39])
971 #define ROM_GPIOPinTypeOneWire \
972  ((void (*)(uint32_t ui32Port, \
973  uint8_t ui8Pins))ROM_GPIOTABLE[44])
974 #define ROM_GPIOPinTypeWakeHigh \
975  ((void (*)(uint32_t ui32Port, \
976  uint8_t ui8Pins))ROM_GPIOTABLE[48])
977 #define ROM_GPIOPinTypeWakeLow \
978  ((void (*)(uint32_t ui32Port, \
979  uint8_t ui8Pins))ROM_GPIOTABLE[49])
980 #define ROM_GPIOIntClear \
981  ((void (*)(uint32_t ui32Port, \
982  uint32_t ui32IntFlags))ROM_GPIOTABLE[51])
983 #define ROM_GPIOIntDisable \
984  ((void (*)(uint32_t ui32Port, \
985  uint32_t ui32IntFlags))ROM_GPIOTABLE[52])
986 #define ROM_GPIOIntEnable \
987  ((void (*)(uint32_t ui32Port, \
988  uint32_t ui32IntFlags))ROM_GPIOTABLE[53])
989 #define ROM_GPIOIntStatus \
990  ((uint32_t (*)(uint32_t ui32Port, \
991  bool bMasked))ROM_GPIOTABLE[54])
992 
993 //*****************************************************************************
994 //
995 // Macros for calling ROM functions in the Hibernate API.
996 //
997 //*****************************************************************************
998 #define ROM_HibernateIntClear \
999  ((void (*)(uint32_t ui32IntFlags))ROM_HIBERNATETABLE[0])
1000 #define ROM_HibernateEnableExpClk \
1001  ((void (*)(uint32_t ui32HibClk))ROM_HIBERNATETABLE[1])
1002 #define ROM_HibernateDisable \
1003  ((void (*)(void))ROM_HIBERNATETABLE[2])
1004 #define ROM_HibernateRTCEnable \
1005  ((void (*)(void))ROM_HIBERNATETABLE[4])
1006 #define ROM_HibernateRTCDisable \
1007  ((void (*)(void))ROM_HIBERNATETABLE[5])
1008 #define ROM_HibernateWakeSet \
1009  ((void (*)(uint32_t ui32WakeFlags))ROM_HIBERNATETABLE[6])
1010 #define ROM_HibernateWakeGet \
1011  ((uint32_t (*)(void))ROM_HIBERNATETABLE[7])
1012 #define ROM_HibernateLowBatSet \
1013  ((void (*)(uint32_t ui32LowBatFlags))ROM_HIBERNATETABLE[8])
1014 #define ROM_HibernateLowBatGet \
1015  ((uint32_t (*)(void))ROM_HIBERNATETABLE[9])
1016 #define ROM_HibernateRTCSet \
1017  ((void (*)(uint32_t ui32RTCValue))ROM_HIBERNATETABLE[10])
1018 #define ROM_HibernateRTCGet \
1019  ((uint32_t (*)(void))ROM_HIBERNATETABLE[11])
1020 #define ROM_HibernateRTCTrimSet \
1021  ((void (*)(uint32_t ui32Trim))ROM_HIBERNATETABLE[16])
1022 #define ROM_HibernateRTCTrimGet \
1023  ((uint32_t (*)(void))ROM_HIBERNATETABLE[17])
1024 #define ROM_HibernateDataSet \
1025  ((void (*)(uint32_t *pui32Data, \
1026  uint32_t ui32Count))ROM_HIBERNATETABLE[18])
1027 #define ROM_HibernateDataGet \
1028  ((void (*)(uint32_t *pui32Data, \
1029  uint32_t ui32Count))ROM_HIBERNATETABLE[19])
1030 #define ROM_HibernateRequest \
1031  ((void (*)(void))ROM_HIBERNATETABLE[20])
1032 #define ROM_HibernateIntEnable \
1033  ((void (*)(uint32_t ui32IntFlags))ROM_HIBERNATETABLE[21])
1034 #define ROM_HibernateIntDisable \
1035  ((void (*)(uint32_t ui32IntFlags))ROM_HIBERNATETABLE[22])
1036 #define ROM_HibernateIntStatus \
1037  ((uint32_t (*)(bool bMasked))ROM_HIBERNATETABLE[23])
1038 #define ROM_HibernateIsActive \
1039  ((uint32_t (*)(void))ROM_HIBERNATETABLE[24])
1040 #define ROM_HibernateRTCSSGet \
1041  ((uint32_t (*)(void))ROM_HIBERNATETABLE[27])
1042 #define ROM_HibernateClockConfig \
1043  ((void (*)(uint32_t ui32Config))ROM_HIBERNATETABLE[28])
1044 #define ROM_HibernateBatCheckStart \
1045  ((void (*)(void))ROM_HIBERNATETABLE[29])
1046 #define ROM_HibernateBatCheckDone \
1047  ((uint32_t (*)(void))ROM_HIBERNATETABLE[30])
1048 #define ROM_HibernateGPIORetentionEnable \
1049  ((void (*)(void))ROM_HIBERNATETABLE[31])
1050 #define ROM_HibernateGPIORetentionDisable \
1051  ((void (*)(void))ROM_HIBERNATETABLE[32])
1052 #define ROM_HibernateGPIORetentionGet \
1053  ((bool (*)(void))ROM_HIBERNATETABLE[33])
1054 #define ROM_HibernateCounterMode \
1055  ((void (*)(uint32_t ui32Config))ROM_HIBERNATETABLE[34])
1056 #define ROM_HibernateCalendarSet \
1057  ((void (*)(struct tm *psTime))ROM_HIBERNATETABLE[35])
1058 #define ROM_HibernateCalendarGet \
1059  ((int (*)(struct tm *psTime))ROM_HIBERNATETABLE[36])
1060 #define ROM_HibernateCalendarMatchSet \
1061  ((void (*)(uint32_t ui32Index, \
1062  struct tm *psTime))ROM_HIBERNATETABLE[37])
1063 #define ROM_HibernateCalendarMatchGet \
1064  ((void (*)(uint32_t ui32Index, \
1065  struct tm *psTime))ROM_HIBERNATETABLE[38])
1066 #define ROM_HibernateTamperDisable \
1067  ((void (*)(void))ROM_HIBERNATETABLE[39])
1068 #define ROM_HibernateTamperEnable \
1069  ((void (*)(void))ROM_HIBERNATETABLE[40])
1070 #define ROM_HibernateTamperEventsClear \
1071  ((void (*)(void))ROM_HIBERNATETABLE[41])
1072 #define ROM_HibernateTamperEventsConfig \
1073  ((void (*)(uint32_t ui32Config))ROM_HIBERNATETABLE[42])
1074 #define ROM_HibernateTamperEventsGet \
1075  ((bool (*)(uint32_t ui32Index, \
1076  uint32_t *pui32RTC, \
1077  uint32_t *pui32Event))ROM_HIBERNATETABLE[43])
1078 #define ROM_HibernateTamperExtOscValid \
1079  ((bool (*)(void))ROM_HIBERNATETABLE[44])
1080 #define ROM_HibernateTamperExtOscRecover \
1081  ((void (*)(void))ROM_HIBERNATETABLE[45])
1082 #define ROM_HibernateTamperIODisable \
1083  ((void (*)(uint32_t ui32Input))ROM_HIBERNATETABLE[46])
1084 #define ROM_HibernateTamperIOEnable \
1085  ((void (*)(uint32_t ui32Input, \
1086  uint32_t ui32Config))ROM_HIBERNATETABLE[47])
1087 #define ROM_HibernateTamperStatusGet \
1088  ((uint32_t (*)(void))ROM_HIBERNATETABLE[48])
1089 #define ROM_HibernateRTCMatchGet \
1090  ((uint32_t (*)(uint32_t ui32Match))ROM_HIBERNATETABLE[49])
1091 #define ROM_HibernateRTCMatchSet \
1092  ((void (*)(uint32_t ui32Match, \
1093  uint32_t ui32Value))ROM_HIBERNATETABLE[50])
1094 #define ROM_HibernateRTCSSMatchGet \
1095  ((uint32_t (*)(uint32_t ui32Match))ROM_HIBERNATETABLE[51])
1096 #define ROM_HibernateRTCSSMatchSet \
1097  ((void (*)(uint32_t ui32Match, \
1098  uint32_t ui32Value))ROM_HIBERNATETABLE[52])
1099 
1100 //*****************************************************************************
1101 //
1102 // Macros for calling ROM functions in the I2C API.
1103 //
1104 //*****************************************************************************
1105 #define ROM_I2CMasterDataPut \
1106  ((void (*)(uint32_t ui32Base, \
1107  uint8_t ui8Data))ROM_I2CTABLE[0])
1108 #define ROM_I2CMasterInitExpClk \
1109  ((void (*)(uint32_t ui32Base, \
1110  uint32_t ui32I2CClk, \
1111  bool bFast))ROM_I2CTABLE[1])
1112 #define ROM_I2CSlaveInit \
1113  ((void (*)(uint32_t ui32Base, \
1114  uint8_t ui8SlaveAddr))ROM_I2CTABLE[2])
1115 #define ROM_I2CMasterEnable \
1116  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[3])
1117 #define ROM_I2CSlaveEnable \
1118  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[4])
1119 #define ROM_I2CMasterDisable \
1120  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[5])
1121 #define ROM_I2CSlaveDisable \
1122  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[6])
1123 #define ROM_I2CMasterIntEnable \
1124  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[7])
1125 #define ROM_I2CSlaveIntEnable \
1126  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[8])
1127 #define ROM_I2CMasterIntDisable \
1128  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[9])
1129 #define ROM_I2CSlaveIntDisable \
1130  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[10])
1131 #define ROM_I2CMasterIntStatus \
1132  ((bool (*)(uint32_t ui32Base, \
1133  bool bMasked))ROM_I2CTABLE[11])
1134 #define ROM_I2CSlaveIntStatus \
1135  ((bool (*)(uint32_t ui32Base, \
1136  bool bMasked))ROM_I2CTABLE[12])
1137 #define ROM_I2CMasterIntClear \
1138  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[13])
1139 #define ROM_I2CSlaveIntClear \
1140  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[14])
1141 #define ROM_I2CMasterSlaveAddrSet \
1142  ((void (*)(uint32_t ui32Base, \
1143  uint8_t ui8SlaveAddr, \
1144  bool bReceive))ROM_I2CTABLE[15])
1145 #define ROM_I2CMasterBusy \
1146  ((bool (*)(uint32_t ui32Base))ROM_I2CTABLE[16])
1147 #define ROM_I2CMasterBusBusy \
1148  ((bool (*)(uint32_t ui32Base))ROM_I2CTABLE[17])
1149 #define ROM_I2CMasterControl \
1150  ((void (*)(uint32_t ui32Base, \
1151  uint32_t ui32Cmd))ROM_I2CTABLE[18])
1152 #define ROM_I2CMasterErr \
1153  ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[19])
1154 #define ROM_I2CMasterDataGet \
1155  ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[20])
1156 #define ROM_I2CSlaveStatus \
1157  ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[21])
1158 #define ROM_I2CSlaveDataPut \
1159  ((void (*)(uint32_t ui32Base, \
1160  uint8_t ui8Data))ROM_I2CTABLE[22])
1161 #define ROM_I2CSlaveDataGet \
1162  ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[23])
1163 #define ROM_UpdateI2C \
1164  ((void (*)(void))ROM_I2CTABLE[24])
1165 #define ROM_I2CSlaveIntEnableEx \
1166  ((void (*)(uint32_t ui32Base, \
1167  uint32_t ui32IntFlags))ROM_I2CTABLE[25])
1168 #define ROM_I2CSlaveIntDisableEx \
1169  ((void (*)(uint32_t ui32Base, \
1170  uint32_t ui32IntFlags))ROM_I2CTABLE[26])
1171 #define ROM_I2CSlaveIntStatusEx \
1172  ((uint32_t (*)(uint32_t ui32Base, \
1173  bool bMasked))ROM_I2CTABLE[27])
1174 #define ROM_I2CSlaveIntClearEx \
1175  ((void (*)(uint32_t ui32Base, \
1176  uint32_t ui32IntFlags))ROM_I2CTABLE[28])
1177 #define ROM_I2CMasterIntEnableEx \
1178  ((void (*)(uint32_t ui32Base, \
1179  uint32_t ui32IntFlags))ROM_I2CTABLE[29])
1180 #define ROM_I2CMasterIntDisableEx \
1181  ((void (*)(uint32_t ui32Base, \
1182  uint32_t ui32IntFlags))ROM_I2CTABLE[30])
1183 #define ROM_I2CMasterIntStatusEx \
1184  ((uint32_t (*)(uint32_t ui32Base, \
1185  bool bMasked))ROM_I2CTABLE[31])
1186 #define ROM_I2CMasterIntClearEx \
1187  ((void (*)(uint32_t ui32Base, \
1188  uint32_t ui32IntFlags))ROM_I2CTABLE[32])
1189 #define ROM_I2CMasterTimeoutSet \
1190  ((void (*)(uint32_t ui32Base, \
1191  uint32_t ui32Value))ROM_I2CTABLE[33])
1192 #define ROM_I2CSlaveACKOverride \
1193  ((void (*)(uint32_t ui32Base, \
1194  bool bEnable))ROM_I2CTABLE[34])
1195 #define ROM_I2CSlaveACKValueSet \
1196  ((void (*)(uint32_t ui32Base, \
1197  bool bACK))ROM_I2CTABLE[35])
1198 #define ROM_I2CSlaveAddressSet \
1199  ((void (*)(uint32_t ui32Base, \
1200  uint8_t ui8AddrNum, \
1201  uint8_t ui8SlaveAddr))ROM_I2CTABLE[37])
1202 #define ROM_I2CMasterLineStateGet \
1203  ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[38])
1204 #define ROM_I2CTxFIFOConfigSet \
1205  ((void (*)(uint32_t ui32Base, \
1206  uint32_t ui32Config))ROM_I2CTABLE[39])
1207 #define ROM_I2CTxFIFOFlush \
1208  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[40])
1209 #define ROM_I2CRxFIFOConfigSet \
1210  ((void (*)(uint32_t ui32Base, \
1211  uint32_t ui32Config))ROM_I2CTABLE[41])
1212 #define ROM_I2CRxFIFOFlush \
1213  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[42])
1214 #define ROM_I2CFIFOStatus \
1215  ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[43])
1216 #define ROM_I2CFIFODataPut \
1217  ((void (*)(uint32_t ui32Base, \
1218  uint8_t ui8Data))ROM_I2CTABLE[44])
1219 #define ROM_I2CFIFODataPutNonBlocking \
1220  ((uint32_t (*)(uint32_t ui32Base, \
1221  uint8_t ui8Data))ROM_I2CTABLE[45])
1222 #define ROM_I2CFIFODataGet \
1223  ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[46])
1224 #define ROM_I2CFIFODataGetNonBlocking \
1225  ((uint32_t (*)(uint32_t ui32Base, \
1226  uint8_t *pui8Data))ROM_I2CTABLE[47])
1227 #define ROM_I2CMasterBurstLengthSet \
1228  ((void (*)(uint32_t ui32Base, \
1229  uint8_t ui8Length))ROM_I2CTABLE[48])
1230 #define ROM_I2CMasterBurstCountGet \
1231  ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[49])
1232 #define ROM_I2CSlaveFIFODisable \
1233  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[50])
1234 #define ROM_I2CSlaveFIFOEnable \
1235  ((void (*)(uint32_t ui32Base, \
1236  uint32_t ui32Config))ROM_I2CTABLE[51])
1237 #define ROM_I2CMasterGlitchFilterConfigSet \
1238  ((void (*)(uint32_t ui32Base, \
1239  uint32_t ui32Config))ROM_I2CTABLE[54])
1240 
1241 //*****************************************************************************
1242 //
1243 // Macros for calling ROM functions in the Interrupt API.
1244 //
1245 //*****************************************************************************
1246 #define ROM_IntEnable \
1247  ((void (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[0])
1248 #define ROM_IntMasterEnable \
1249  ((bool (*)(void))ROM_INTERRUPTTABLE[1])
1250 #define ROM_IntMasterDisable \
1251  ((bool (*)(void))ROM_INTERRUPTTABLE[2])
1252 #define ROM_IntDisable \
1253  ((void (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[3])
1254 #define ROM_IntPriorityGroupingSet \
1255  ((void (*)(uint32_t ui32Bits))ROM_INTERRUPTTABLE[4])
1256 #define ROM_IntPriorityGroupingGet \
1257  ((uint32_t (*)(void))ROM_INTERRUPTTABLE[5])
1258 #define ROM_IntPrioritySet \
1259  ((void (*)(uint32_t ui32Interrupt, \
1260  uint8_t ui8Priority))ROM_INTERRUPTTABLE[6])
1261 #define ROM_IntPriorityGet \
1262  ((int32_t (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[7])
1263 #define ROM_IntPendSet \
1264  ((void (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[8])
1265 #define ROM_IntPendClear \
1266  ((void (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[9])
1267 #define ROM_IntPriorityMaskSet \
1268  ((void (*)(uint32_t ui32PriorityMask))ROM_INTERRUPTTABLE[10])
1269 #define ROM_IntPriorityMaskGet \
1270  ((uint32_t (*)(void))ROM_INTERRUPTTABLE[11])
1271 #define ROM_IntIsEnabled \
1272  ((uint32_t (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[12])
1273 #define ROM_IntTrigger \
1274  ((void (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[13])
1275 
1276 //*****************************************************************************
1277 //
1278 // Macros for calling ROM functions in the LCD API.
1279 //
1280 //*****************************************************************************
1281 #define ROM_LCDIntStatus \
1282  ((uint32_t (*)(uint32_t ui32Base, \
1283  bool bMasked))ROM_LCDTABLE[0])
1284 #define ROM_LCDClockReset \
1285  ((void (*)(uint32_t ui32Base, \
1286  uint32_t ui32Clocks))ROM_LCDTABLE[1])
1287 #define ROM_LCDDMAConfigSet \
1288  ((void (*)(uint32_t ui32Base, \
1289  uint32_t ui32Config))ROM_LCDTABLE[2])
1290 #define ROM_LCDIDDCommandWrite \
1291  ((void (*)(uint32_t ui32Base, \
1292  uint32_t ui32CS, \
1293  uint16_t ui16Cmd))ROM_LCDTABLE[3])
1294 #define ROM_LCDIDDConfigSet \
1295  ((void (*)(uint32_t ui32Base, \
1296  uint32_t ui32Config))ROM_LCDTABLE[4])
1297 #define ROM_LCDIDDDataRead \
1298  ((uint16_t (*)(uint32_t ui32Base, \
1299  uint32_t ui32CS))ROM_LCDTABLE[5])
1300 #define ROM_LCDIDDDataWrite \
1301  ((void (*)(uint32_t ui32Base, \
1302  uint32_t ui32CS, \
1303  uint16_t ui16Data))ROM_LCDTABLE[6])
1304 #define ROM_LCDIDDDMADisable \
1305  ((void (*)(uint32_t ui32Base))ROM_LCDTABLE[7])
1306 #define ROM_LCDIDDDMAWrite \
1307  ((void (*)(uint32_t ui32Base, \
1308  uint32_t ui32CS, \
1309  const uint32_t *pui32Data, \
1310  uint32_t ui32Count))ROM_LCDTABLE[8])
1311 #define ROM_LCDIDDIndexedRead \
1312  ((uint16_t (*)(uint32_t ui32Base, \
1313  uint32_t ui32CS, \
1314  uint16_t ui16Addr))ROM_LCDTABLE[9])
1315 #define ROM_LCDIDDIndexedWrite \
1316  ((void (*)(uint32_t ui32Base, \
1317  uint32_t ui32CS, \
1318  uint16_t ui16Addr, \
1319  uint16_t ui16Data))ROM_LCDTABLE[10])
1320 #define ROM_LCDIDDStatusRead \
1321  ((uint16_t (*)(uint32_t ui32Base, \
1322  uint32_t ui32CS))ROM_LCDTABLE[11])
1323 #define ROM_LCDIDDTimingSet \
1324  ((void (*)(uint32_t ui32Base, \
1325  uint32_t ui32CS, \
1326  const tLCDIDDTiming *pTiming))ROM_LCDTABLE[12])
1327 #define ROM_LCDIntClear \
1328  ((void (*)(uint32_t ui32Base, \
1329  uint32_t ui32IntFlags))ROM_LCDTABLE[13])
1330 #define ROM_LCDIntDisable \
1331  ((void (*)(uint32_t ui32Base, \
1332  uint32_t ui32IntFlags))ROM_LCDTABLE[14])
1333 #define ROM_LCDIntEnable \
1334  ((void (*)(uint32_t ui32Base, \
1335  uint32_t ui32IntFlags))ROM_LCDTABLE[15])
1336 #define ROM_LCDModeSet \
1337  ((uint32_t (*)(uint32_t ui32Base, \
1338  uint8_t ui8Mode, \
1339  uint32_t ui32PixClk, \
1340  uint32_t ui32SysClk))ROM_LCDTABLE[16])
1341 #define ROM_LCDRasterACBiasIntCountSet \
1342  ((void (*)(uint32_t ui32Base, \
1343  uint8_t ui8Count))ROM_LCDTABLE[17])
1344 #define ROM_LCDRasterConfigSet \
1345  ((void (*)(uint32_t ui32Base, \
1346  uint32_t ui32Config, \
1347  uint8_t ui8PalLoadDelay))ROM_LCDTABLE[18])
1348 #define ROM_LCDRasterDisable \
1349  ((void (*)(uint32_t ui32Base))ROM_LCDTABLE[19])
1350 #define ROM_LCDRasterEnable \
1351  ((void (*)(uint32_t ui32Base))ROM_LCDTABLE[20])
1352 #define ROM_LCDRasterFrameBufferSet \
1353  ((void (*)(uint32_t ui32Base, \
1354  uint8_t ui8Buffer, \
1355  uint32_t *pui32Addr, \
1356  uint32_t ui32NumBytes))ROM_LCDTABLE[21])
1357 #define ROM_LCDRasterPaletteSet \
1358  ((void (*)(uint32_t ui32Base, \
1359  uint32_t ui32Type, \
1360  uint32_t *pui32PalAddr, \
1361  const uint32_t *pui32SrcColors, \
1362  uint32_t ui32Start, \
1363  uint32_t ui32Count))ROM_LCDTABLE[22])
1364 #define ROM_LCDRasterSubPanelConfigSet \
1365  ((void (*)(uint32_t ui32Base, \
1366  uint32_t ui32Flags, \
1367  uint32_t ui32BottomLines, \
1368  uint32_t ui32DefaultPixel))ROM_LCDTABLE[23])
1369 #define ROM_LCDRasterSubPanelDisable \
1370  ((void (*)(uint32_t ui32Base))ROM_LCDTABLE[24])
1371 #define ROM_LCDRasterSubPanelEnable \
1372  ((void (*)(uint32_t ui32Base))ROM_LCDTABLE[25])
1373 #define ROM_LCDRasterTimingSet \
1374  ((void (*)(uint32_t ui32Base, \
1375  const tLCDRasterTiming *pTiming))ROM_LCDTABLE[26])
1376 #define ROM_LCDRasterEnabled \
1377  ((bool (*)(uint32_t ui32Base))ROM_LCDTABLE[27])
1378 
1379 //*****************************************************************************
1380 //
1381 // Macros for calling ROM functions in the MPU API.
1382 //
1383 //*****************************************************************************
1384 #define ROM_MPUEnable \
1385  ((void (*)(uint32_t ui32MPUConfig))ROM_MPUTABLE[0])
1386 #define ROM_MPUDisable \
1387  ((void (*)(void))ROM_MPUTABLE[1])
1388 #define ROM_MPURegionCountGet \
1389  ((uint32_t (*)(void))ROM_MPUTABLE[2])
1390 #define ROM_MPURegionEnable \
1391  ((void (*)(uint32_t ui32Region))ROM_MPUTABLE[3])
1392 #define ROM_MPURegionDisable \
1393  ((void (*)(uint32_t ui32Region))ROM_MPUTABLE[4])
1394 #define ROM_MPURegionSet \
1395  ((void (*)(uint32_t ui32Region, \
1396  uint32_t ui32Addr, \
1397  uint32_t ui32Flags))ROM_MPUTABLE[5])
1398 #define ROM_MPURegionGet \
1399  ((void (*)(uint32_t ui32Region, \
1400  uint32_t *pui32Addr, \
1401  uint32_t *pui32Flags))ROM_MPUTABLE[6])
1402 
1403 //*****************************************************************************
1404 //
1405 // Macros for calling ROM functions in the OneWire API.
1406 //
1407 //*****************************************************************************
1408 #define ROM_OneWireIntStatus \
1409  ((uint32_t (*)(uint32_t ui32Base, \
1410  bool bMasked))ROM_ONEWIRETABLE[0])
1411 #define ROM_OneWireBusReset \
1412  ((void (*)(uint32_t ui32Base))ROM_ONEWIRETABLE[1])
1413 #define ROM_OneWireBusStatus \
1414  ((uint32_t (*)(uint32_t ui32Base))ROM_ONEWIRETABLE[2])
1415 #define ROM_OneWireDataGet \
1416  ((void (*)(uint32_t u3i2Base, \
1417  uint32_t *pui32Data))ROM_ONEWIRETABLE[3])
1418 #define ROM_OneWireDataGetNonBlocking \
1419  ((bool (*)(uint32_t ui32Base, \
1420  uint32_t *pui32Data))ROM_ONEWIRETABLE[4])
1421 #define ROM_OneWireInit \
1422  ((void (*)(uint32_t ui32Base, \
1423  uint32_t ui32InitFlags))ROM_ONEWIRETABLE[5])
1424 #define ROM_OneWireIntClear \
1425  ((void (*)(uint32_t ui32Base, \
1426  uint32_t ui32IntFlags))ROM_ONEWIRETABLE[6])
1427 #define ROM_OneWireIntDisable \
1428  ((void (*)(uint32_t ui32Base, \
1429  uint32_t ui32IntFlags))ROM_ONEWIRETABLE[7])
1430 #define ROM_OneWireIntEnable \
1431  ((void (*)(uint32_t ui32Base, \
1432  uint32_t ui32IntFlags))ROM_ONEWIRETABLE[8])
1433 #define ROM_OneWireTransaction \
1434  ((void (*)(uint32_t ui32Base, \
1435  uint32_t ui32OpFlags, \
1436  uint32_t ui32Data, \
1437  uint32_t ui32BitCnt))ROM_ONEWIRETABLE[9])
1438 #define ROM_OneWireDMADisable \
1439  ((void (*)(uint32_t ui32Base, \
1440  uint32_t ui32DMAFlags))ROM_ONEWIRETABLE[10])
1441 #define ROM_OneWireDMAEnable \
1442  ((void (*)(uint32_t ui32Base, \
1443  uint32_t ui32DMAFlags))ROM_ONEWIRETABLE[11])
1444 
1445 //*****************************************************************************
1446 //
1447 // Macros for calling ROM functions in the PWM API.
1448 //
1449 //*****************************************************************************
1450 #define ROM_PWMPulseWidthSet \
1451  ((void (*)(uint32_t ui32Base, \
1452  uint32_t ui32PWMOut, \
1453  uint32_t ui32Width))ROM_PWMTABLE[0])
1454 #define ROM_PWMGenConfigure \
1455  ((void (*)(uint32_t ui32Base, \
1456  uint32_t ui32Gen, \
1457  uint32_t ui32Config))ROM_PWMTABLE[1])
1458 #define ROM_PWMGenPeriodSet \
1459  ((void (*)(uint32_t ui32Base, \
1460  uint32_t ui32Gen, \
1461  uint32_t ui32Period))ROM_PWMTABLE[2])
1462 #define ROM_PWMGenPeriodGet \
1463  ((uint32_t (*)(uint32_t ui32Base, \
1464  uint32_t ui32Gen))ROM_PWMTABLE[3])
1465 #define ROM_PWMGenEnable \
1466  ((void (*)(uint32_t ui32Base, \
1467  uint32_t ui32Gen))ROM_PWMTABLE[4])
1468 #define ROM_PWMGenDisable \
1469  ((void (*)(uint32_t ui32Base, \
1470  uint32_t ui32Gen))ROM_PWMTABLE[5])
1471 #define ROM_PWMPulseWidthGet \
1472  ((uint32_t (*)(uint32_t ui32Base, \
1473  uint32_t ui32PWMOut))ROM_PWMTABLE[6])
1474 #define ROM_PWMDeadBandEnable \
1475  ((void (*)(uint32_t ui32Base, \
1476  uint32_t ui32Gen, \
1477  uint16_t ui16Rise, \
1478  uint16_t ui16Fall))ROM_PWMTABLE[7])
1479 #define ROM_PWMDeadBandDisable \
1480  ((void (*)(uint32_t ui32Base, \
1481  uint32_t ui32Gen))ROM_PWMTABLE[8])
1482 #define ROM_PWMSyncUpdate \
1483  ((void (*)(uint32_t ui32Base, \
1484  uint32_t ui32GenBits))ROM_PWMTABLE[9])
1485 #define ROM_PWMSyncTimeBase \
1486  ((void (*)(uint32_t ui32Base, \
1487  uint32_t ui32GenBits))ROM_PWMTABLE[10])
1488 #define ROM_PWMOutputState \
1489  ((void (*)(uint32_t ui32Base, \
1490  uint32_t ui32PWMOutBits, \
1491  bool bEnable))ROM_PWMTABLE[11])
1492 #define ROM_PWMOutputInvert \
1493  ((void (*)(uint32_t ui32Base, \
1494  uint32_t ui32PWMOutBits, \
1495  bool bInvert))ROM_PWMTABLE[12])
1496 #define ROM_PWMOutputFault \
1497  ((void (*)(uint32_t ui32Base, \
1498  uint32_t ui32PWMOutBits, \
1499  bool bFaultSuppress))ROM_PWMTABLE[13])
1500 #define ROM_PWMGenIntTrigEnable \
1501  ((void (*)(uint32_t ui32Base, \
1502  uint32_t ui32Gen, \
1503  uint32_t ui32IntTrig))ROM_PWMTABLE[14])
1504 #define ROM_PWMGenIntTrigDisable \
1505  ((void (*)(uint32_t ui32Base, \
1506  uint32_t ui32Gen, \
1507  uint32_t ui32IntTrig))ROM_PWMTABLE[15])
1508 #define ROM_PWMGenIntStatus \
1509  ((uint32_t (*)(uint32_t ui32Base, \
1510  uint32_t ui32Gen, \
1511  bool bMasked))ROM_PWMTABLE[16])
1512 #define ROM_PWMGenIntClear \
1513  ((void (*)(uint32_t ui32Base, \
1514  uint32_t ui32Gen, \
1515  uint32_t ui32Ints))ROM_PWMTABLE[17])
1516 #define ROM_PWMIntEnable \
1517  ((void (*)(uint32_t ui32Base, \
1518  uint32_t ui32GenFault))ROM_PWMTABLE[18])
1519 #define ROM_PWMIntDisable \
1520  ((void (*)(uint32_t ui32Base, \
1521  uint32_t ui32GenFault))ROM_PWMTABLE[19])
1522 #define ROM_PWMIntStatus \
1523  ((uint32_t (*)(uint32_t ui32Base, \
1524  bool bMasked))ROM_PWMTABLE[21])
1525 #define ROM_PWMOutputFaultLevel \
1526  ((void (*)(uint32_t ui32Base, \
1527  uint32_t ui32PWMOutBits, \
1528  bool bDriveHigh))ROM_PWMTABLE[22])
1529 #define ROM_PWMFaultIntClearExt \
1530  ((void (*)(uint32_t ui32Base, \
1531  uint32_t ui32FaultInts))ROM_PWMTABLE[23])
1532 #define ROM_PWMGenFaultConfigure \
1533  ((void (*)(uint32_t ui32Base, \
1534  uint32_t ui32Gen, \
1535  uint32_t ui32MinFaultPeriod, \
1536  uint32_t ui32FaultSenses))ROM_PWMTABLE[24])
1537 #define ROM_PWMGenFaultTriggerSet \
1538  ((void (*)(uint32_t ui32Base, \
1539  uint32_t ui32Gen, \
1540  uint32_t ui32Group, \
1541  uint32_t ui32FaultTriggers))ROM_PWMTABLE[25])
1542 #define ROM_PWMGenFaultTriggerGet \
1543  ((uint32_t (*)(uint32_t ui32Base, \
1544  uint32_t ui32Gen, \
1545  uint32_t ui32Group))ROM_PWMTABLE[26])
1546 #define ROM_PWMGenFaultStatus \
1547  ((uint32_t (*)(uint32_t ui32Base, \
1548  uint32_t ui32Gen, \
1549  uint32_t ui32Group))ROM_PWMTABLE[27])
1550 #define ROM_PWMGenFaultClear \
1551  ((void (*)(uint32_t ui32Base, \
1552  uint32_t ui32Gen, \
1553  uint32_t ui32Group, \
1554  uint32_t ui32FaultTriggers))ROM_PWMTABLE[28])
1555 #define ROM_PWMClockSet \
1556  ((void (*)(uint32_t ui32Base, \
1557  uint32_t ui32Config))ROM_PWMTABLE[29])
1558 #define ROM_PWMClockGet \
1559  ((uint32_t (*)(uint32_t ui32Base))ROM_PWMTABLE[30])
1560 #define ROM_PWMOutputUpdateMode \
1561  ((void (*)(uint32_t ui32Base, \
1562  uint32_t ui32PWMOutBits, \
1563  uint32_t ui32Mode))ROM_PWMTABLE[31])
1564 
1565 //*****************************************************************************
1566 //
1567 // Macros for calling ROM functions in the QEI API.
1568 //
1569 //*****************************************************************************
1570 #define ROM_QEIPositionGet \
1571  ((uint32_t (*)(uint32_t ui32Base))ROM_QEITABLE[0])
1572 #define ROM_QEIEnable \
1573  ((void (*)(uint32_t ui32Base))ROM_QEITABLE[1])
1574 #define ROM_QEIDisable \
1575  ((void (*)(uint32_t ui32Base))ROM_QEITABLE[2])
1576 #define ROM_QEIConfigure \
1577  ((void (*)(uint32_t ui32Base, \
1578  uint32_t ui32Config, \
1579  uint32_t ui32MaxPosition))ROM_QEITABLE[3])
1580 #define ROM_QEIPositionSet \
1581  ((void (*)(uint32_t ui32Base, \
1582  uint32_t ui32Position))ROM_QEITABLE[4])
1583 #define ROM_QEIDirectionGet \
1584  ((int32_t (*)(uint32_t ui32Base))ROM_QEITABLE[5])
1585 #define ROM_QEIErrorGet \
1586  ((bool (*)(uint32_t ui32Base))ROM_QEITABLE[6])
1587 #define ROM_QEIVelocityEnable \
1588  ((void (*)(uint32_t ui32Base))ROM_QEITABLE[7])
1589 #define ROM_QEIVelocityDisable \
1590  ((void (*)(uint32_t ui32Base))ROM_QEITABLE[8])
1591 #define ROM_QEIVelocityConfigure \
1592  ((void (*)(uint32_t ui32Base, \
1593  uint32_t ui32PreDiv, \
1594  uint32_t ui32Period))ROM_QEITABLE[9])
1595 #define ROM_QEIVelocityGet \
1596  ((uint32_t (*)(uint32_t ui32Base))ROM_QEITABLE[10])
1597 #define ROM_QEIIntEnable \
1598  ((void (*)(uint32_t ui32Base, \
1599  uint32_t ui32IntFlags))ROM_QEITABLE[11])
1600 #define ROM_QEIIntDisable \
1601  ((void (*)(uint32_t ui32Base, \
1602  uint32_t ui32IntFlags))ROM_QEITABLE[12])
1603 #define ROM_QEIIntStatus \
1604  ((uint32_t (*)(uint32_t ui32Base, \
1605  bool bMasked))ROM_QEITABLE[13])
1606 #define ROM_QEIIntClear \
1607  ((void (*)(uint32_t ui32Base, \
1608  uint32_t ui32IntFlags))ROM_QEITABLE[14])
1609 
1610 //*****************************************************************************
1611 //
1612 // Macros for calling ROM functions in the SHAMD5 API.
1613 //
1614 //*****************************************************************************
1615 #define ROM_SHAMD5IntStatus \
1616  ((uint32_t (*)(uint32_t ui32Base, \
1617  bool bMasked))ROM_SHAMD5TABLE[0])
1618 #define ROM_SHAMD5ConfigSet \
1619  ((void (*)(uint32_t ui32Base, \
1620  uint32_t ui32Mode))ROM_SHAMD5TABLE[1])
1621 #define ROM_SHAMD5DataProcess \
1622  ((void (*)(uint32_t ui32Base, \
1623  uint32_t *pui32DataSrc, \
1624  uint32_t ui32DataLength, \
1625  uint32_t *pui32HashResult))ROM_SHAMD5TABLE[2])
1626 #define ROM_SHAMD5DataWrite \
1627  ((void (*)(uint32_t ui32Base, \
1628  uint32_t *pui32Src))ROM_SHAMD5TABLE[3])
1629 #define ROM_SHAMD5DataWriteNonBlocking \
1630  ((bool (*)(uint32_t ui32Base, \
1631  uint32_t *pui32Src))ROM_SHAMD5TABLE[4])
1632 #define ROM_SHAMD5DMADisable \
1633  ((void (*)(uint32_t ui32Base))ROM_SHAMD5TABLE[5])
1634 #define ROM_SHAMD5DMAEnable \
1635  ((void (*)(uint32_t ui32Base))ROM_SHAMD5TABLE[6])
1636 #define ROM_SHAMD5HashLengthSet \
1637  ((void (*)(uint32_t ui32Base, \
1638  uint32_t ui32Length))ROM_SHAMD5TABLE[7])
1639 #define ROM_SHAMD5HMACKeySet \
1640  ((void (*)(uint32_t ui32Base, \
1641  uint32_t *pui32Src))ROM_SHAMD5TABLE[8])
1642 #define ROM_SHAMD5HMACPPKeyGenerate \
1643  ((void (*)(uint32_t ui32Base, \
1644  uint32_t *pui32Key, \
1645  uint32_t *pui32PPKey))ROM_SHAMD5TABLE[9])
1646 #define ROM_SHAMD5HMACPPKeySet \
1647  ((void (*)(uint32_t ui32Base, \
1648  uint32_t *pui32Src))ROM_SHAMD5TABLE[10])
1649 #define ROM_SHAMD5HMACProcess \
1650  ((void (*)(uint32_t ui32Base, \
1651  uint32_t *pui32DataSrc, \
1652  uint32_t ui32DataLength, \
1653  uint32_t *pui32HashResult))ROM_SHAMD5TABLE[11])
1654 #define ROM_SHAMD5IntClear \
1655  ((void (*)(uint32_t ui32Base, \
1656  uint32_t ui32IntFlags))ROM_SHAMD5TABLE[12])
1657 #define ROM_SHAMD5IntDisable \
1658  ((void (*)(uint32_t ui32Base, \
1659  uint32_t ui32IntFlags))ROM_SHAMD5TABLE[13])
1660 #define ROM_SHAMD5IntEnable \
1661  ((void (*)(uint32_t ui32Base, \
1662  uint32_t ui32IntFlags))ROM_SHAMD5TABLE[14])
1663 #define ROM_SHAMD5Reset \
1664  ((void (*)(uint32_t ui32Base))ROM_SHAMD5TABLE[15])
1665 #define ROM_SHAMD5ResultRead \
1666  ((void (*)(uint32_t ui32Base, \
1667  uint32_t *pui32Dest))ROM_SHAMD5TABLE[16])
1668 
1669 //*****************************************************************************
1670 //
1671 // Macros for calling ROM functions in the SMBus API.
1672 //
1673 //*****************************************************************************
1674 #define ROM_SMBusMasterIntProcess \
1675  ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[0])
1676 #define ROM_SMBusARPDisable \
1677  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[1])
1678 #define ROM_SMBusARPEnable \
1679  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[2])
1680 #define ROM_SMBusARPUDIDPacketDecode \
1681  ((void (*)(tSMBusUDID *pUDID, \
1682  uint8_t *pui8Address, \
1683  uint8_t *pui8Data))ROM_SMBUSTABLE[3])
1684 #define ROM_SMBusARPUDIDPacketEncode \
1685  ((void (*)(tSMBusUDID *pUDID, \
1686  uint8_t ui8Address, \
1687  uint8_t *pui8Data))ROM_SMBUSTABLE[4])
1688 #define ROM_SMBusMasterARPAssignAddress \
1689  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1690  uint8_t *pui8Data))ROM_SMBUSTABLE[5])
1691 #define ROM_SMBusMasterARPGetUDIDDir \
1692  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1693  uint8_t ui8TargetAddress, \
1694  uint8_t *pui8Data))ROM_SMBUSTABLE[6])
1695 #define ROM_SMBusMasterARPGetUDIDGen \
1696  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1697  uint8_t *pui8Data))ROM_SMBUSTABLE[7])
1698 #define ROM_SMBusMasterARPNotifyMaster \
1699  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1700  uint8_t *pui8Data))ROM_SMBUSTABLE[8])
1701 #define ROM_SMBusMasterARPPrepareToARP \
1702  ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[9])
1703 #define ROM_SMBusMasterARPResetDeviceDir \
1704  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1705  uint8_t ui8TargetAddress))ROM_SMBUSTABLE[10])
1706 #define ROM_SMBusMasterARPResetDeviceGen \
1707  ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[11])
1708 #define ROM_SMBusMasterBlockProcessCall \
1709  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1710  uint8_t ui8TargetAddress, \
1711  uint8_t ui8Command, \
1712  uint8_t *pui8TxData, \
1713  uint8_t ui8TxSize, \
1714  uint8_t *pui8RxData))ROM_SMBUSTABLE[12])
1715 #define ROM_SMBusMasterBlockRead \
1716  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1717  uint8_t ui8TargetAddress, \
1718  uint8_t ui8Command, \
1719  uint8_t *pui8Data))ROM_SMBUSTABLE[13])
1720 #define ROM_SMBusMasterBlockWrite \
1721  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1722  uint8_t ui8TargetAddress, \
1723  uint8_t ui8Command, \
1724  uint8_t *pui8Data, \
1725  uint8_t ui8Size))ROM_SMBUSTABLE[14])
1726 #define ROM_SMBusMasterByteReceive \
1727  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1728  uint8_t ui8TargetAddress, \
1729  uint8_t *pui8Data))ROM_SMBUSTABLE[15])
1730 #define ROM_SMBusMasterByteSend \
1731  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1732  uint8_t ui8TargetAddress, \
1733  uint8_t ui8Data))ROM_SMBUSTABLE[16])
1734 #define ROM_SMBusMasterByteWordRead \
1735  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1736  uint8_t ui8TargetAddress, \
1737  uint8_t ui8Command, \
1738  uint8_t *pui8Data, \
1739  uint8_t ui8Size))ROM_SMBUSTABLE[17])
1740 #define ROM_SMBusMasterByteWordWrite \
1741  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1742  uint8_t ui8TargetAddress, \
1743  uint8_t ui8Command, \
1744  uint8_t *pui8Data, \
1745  uint8_t ui8Size))ROM_SMBUSTABLE[18])
1746 #define ROM_SMBusMasterHostNotify \
1747  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1748  uint8_t ui8OwnSlaveAddress, \
1749  uint8_t *pui8Data))ROM_SMBUSTABLE[19])
1750 #define ROM_SMBusMasterI2CRead \
1751  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1752  uint8_t ui8TargetAddress, \
1753  uint8_t *pui8Data, \
1754  uint8_t ui8Size))ROM_SMBUSTABLE[20])
1755 #define ROM_SMBusMasterI2CWrite \
1756  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1757  uint8_t ui8TargetAddress, \
1758  uint8_t *pui8Data, \
1759  uint8_t ui8Size))ROM_SMBUSTABLE[21])
1760 #define ROM_SMBusMasterI2CWriteRead \
1761  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1762  uint8_t ui8TargetAddress, \
1763  uint8_t *pui8TxData, \
1764  uint8_t ui8TxSize, \
1765  uint8_t *pui8RxData, \
1766  uint8_t ui8RxSize))ROM_SMBUSTABLE[22])
1767 #define ROM_SMBusMasterInit \
1768  ((void (*)(tSMBus *psSMBus, \
1769  uint32_t ui32I2CBase, \
1770  uint32_t ui32SMBusClock))ROM_SMBUSTABLE[23])
1771 #define ROM_SMBusMasterIntEnable \
1772  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[24])
1773 #define ROM_SMBusMasterProcessCall \
1774  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1775  uint8_t ui8TargetAddress, \
1776  uint8_t ui8Command, \
1777  uint8_t *pui8TxData, \
1778  uint8_t *pui8RxData))ROM_SMBUSTABLE[25])
1779 #define ROM_SMBusMasterQuickCommand \
1780  ((tSMBusStatus (*)(tSMBus *psSMBus, \
1781  uint8_t ui8TargetAddress, \
1782  bool bData))ROM_SMBUSTABLE[26])
1783 #define ROM_SMBusPECDisable \
1784  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[27])
1785 #define ROM_SMBusPECEnable \
1786  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[28])
1787 #define ROM_SMBusRxPacketSizeGet \
1788  ((uint8_t (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[29])
1789 #define ROM_SMBusSlaveACKSend \
1790  ((void (*)(tSMBus *psSMBus, \
1791  bool bACK))ROM_SMBUSTABLE[30])
1792 #define ROM_SMBusSlaveAddressSet \
1793  ((void (*)(tSMBus *psSMBus, \
1794  uint8_t ui8AddressNum, \
1795  uint8_t ui8SlaveAddress))ROM_SMBUSTABLE[31])
1796 #define ROM_SMBusSlaveARPFlagARGet \
1797  ((bool (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[32])
1798 #define ROM_SMBusSlaveARPFlagARSet \
1799  ((void (*)(tSMBus *psSMBus, \
1800  bool bValue))ROM_SMBUSTABLE[33])
1801 #define ROM_SMBusSlaveARPFlagAVGet \
1802  ((bool (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[34])
1803 #define ROM_SMBusSlaveARPFlagAVSet \
1804  ((void (*)(tSMBus *psSMBus, \
1805  bool bValue))ROM_SMBUSTABLE[35])
1806 #define ROM_SMBusSlaveBlockTransferDisable \
1807  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[36])
1808 #define ROM_SMBusSlaveBlockTransferEnable \
1809  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[37])
1810 #define ROM_SMBusSlaveCommandGet \
1811  ((uint8_t (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[38])
1812 #define ROM_SMBusSlaveI2CDisable \
1813  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[39])
1814 #define ROM_SMBusSlaveI2CEnable \
1815  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[40])
1816 #define ROM_SMBusSlaveInit \
1817  ((void (*)(tSMBus *psSMBus, \
1818  uint32_t ui32I2CBase))ROM_SMBUSTABLE[41])
1819 #define ROM_SMBusSlaveIntAddressGet \
1820  ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[42])
1821 #define ROM_SMBusSlaveIntEnable \
1822  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[43])
1823 #define ROM_SMBusSlaveIntProcess \
1824  ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[44])
1825 #define ROM_SMBusSlaveManualACKDisable \
1826  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[45])
1827 #define ROM_SMBusSlaveManualACKEnable \
1828  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[46])
1829 #define ROM_SMBusSlaveManualACKStatusGet \
1830  ((bool (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[47])
1831 #define ROM_SMBusSlaveProcessCallDisable \
1832  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[48])
1833 #define ROM_SMBusSlaveProcessCallEnable \
1834  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[49])
1835 #define ROM_SMBusSlaveRxBufferSet \
1836  ((void (*)(tSMBus *psSMBus, \
1837  uint8_t *pui8Data, \
1838  uint8_t ui8Size))ROM_SMBUSTABLE[50])
1839 #define ROM_SMBusSlaveTransferInit \
1840  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[51])
1841 #define ROM_SMBusSlaveTxBufferSet \
1842  ((void (*)(tSMBus *psSMBus, \
1843  uint8_t *pui8Data, \
1844  uint8_t ui8Size))ROM_SMBUSTABLE[52])
1845 #define ROM_SMBusSlaveUDIDSet \
1846  ((void (*)(tSMBus *psSMBus, \
1847  tSMBusUDID *pUDID))ROM_SMBUSTABLE[53])
1848 #define ROM_SMBusStatusGet \
1849  ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[54])
1850 #define ROM_SMBusSlaveDataSend \
1851  ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[55])
1852 #define ROM_SMBusFIFOEnable \
1853  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[56])
1854 #define ROM_SMBusFIFODisable \
1855  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[57])
1856 #define ROM_SMBusDMAEnable \
1857  ((void (*)(tSMBus *psSMBus, \
1858  uint8_t ui8TxChannel, \
1859  uint8_t ui8RxChannel))ROM_SMBUSTABLE[58])
1860 #define ROM_SMBusDMADisable \
1861  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[59])
1862 
1863 //*****************************************************************************
1864 //
1865 // Macros for calling ROM functions in the SPIFlash API.
1866 //
1867 //*****************************************************************************
1868 #define ROM_SPIFlashIntHandler \
1869  ((uint32_t (*)(tSPIFlashState *pState))ROM_SPIFLASHTABLE[0])
1870 #define ROM_SPIFlashInit \
1871  ((void (*)(uint32_t ui32Base, \
1872  uint32_t ui32Clock, \
1873  uint32_t ui32BitRate))ROM_SPIFLASHTABLE[1])
1874 #define ROM_SPIFlashWriteStatus \
1875  ((void (*)(uint32_t ui32Base, \
1876  uint8_t ui8Status))ROM_SPIFLASHTABLE[2])
1877 #define ROM_SPIFlashPageProgram \
1878  ((void (*)(uint32_t ui32Base, \
1879  uint32_t ui32Addr, \
1880  const uint8_t *pui8Data, \
1881  uint32_t ui32Count))ROM_SPIFLASHTABLE[3])
1882 #define ROM_SPIFlashPageProgramNonBlocking \
1883  ((void (*)(tSPIFlashState *pState, \
1884  uint32_t ui32Base, \
1885  uint32_t ui32Addr, \
1886  const uint8_t *pui8Data, \
1887  uint32_t ui32Count, \
1888  bool bUseDMA, \
1889  uint32_t ui32TxChannel))ROM_SPIFLASHTABLE[4])
1890 #define ROM_SPIFlashRead \
1891  ((void (*)(uint32_t ui32Base, \
1892  uint32_t ui32Addr, \
1893  uint8_t *pui8Data, \
1894  uint32_t ui32Count))ROM_SPIFLASHTABLE[5])
1895 #define ROM_SPIFlashReadNonBlocking \
1896  ((void (*)(tSPIFlashState *pState, \
1897  uint32_t ui32Base, \
1898  uint32_t ui32Addr, \
1899  uint8_t *pui8Data, \
1900  uint32_t ui32Count, \
1901  bool bUseDMA, \
1902  uint32_t ui32TxChannel, \
1903  uint32_t ui32RxChannel))ROM_SPIFLASHTABLE[6])
1904 #define ROM_SPIFlashWriteDisable \
1905  ((void (*)(uint32_t ui32Base))ROM_SPIFLASHTABLE[7])
1906 #define ROM_SPIFlashReadStatus \
1907  ((uint8_t (*)(uint32_t ui32Base))ROM_SPIFLASHTABLE[8])
1908 #define ROM_SPIFlashWriteEnable \
1909  ((void (*)(uint32_t ui32Base))ROM_SPIFLASHTABLE[9])
1910 #define ROM_SPIFlashFastRead \
1911  ((void (*)(uint32_t ui32Base, \
1912  uint32_t ui32Addr, \
1913  uint8_t *pui8Data, \
1914  uint32_t ui32Count))ROM_SPIFLASHTABLE[10])
1915 #define ROM_SPIFlashFastReadNonBlocking \
1916  ((void (*)(tSPIFlashState *pState, \
1917  uint32_t ui32Base, \
1918  uint32_t ui32Addr, \
1919  uint8_t *pui8Data, \
1920  uint32_t ui32Count, \
1921  bool bUseDMA, \
1922  uint32_t ui32TxChannel, \
1923  uint32_t ui32RxChannel))ROM_SPIFLASHTABLE[11])
1924 #define ROM_SPIFlashSectorErase \
1925  ((void (*)(uint32_t ui32Base, \
1926  uint32_t ui32Addr))ROM_SPIFLASHTABLE[12])
1927 #define ROM_SPIFlashDualRead \
1928  ((void (*)(uint32_t ui32Base, \
1929  uint32_t ui32Addr, \
1930  uint8_t *pui8Data, \
1931  uint32_t ui32Count))ROM_SPIFLASHTABLE[13])
1932 #define ROM_SPIFlashDualReadNonBlocking \
1933  ((void (*)(tSPIFlashState *pState, \
1934  uint32_t ui32Base, \
1935  uint32_t ui32Addr, \
1936  uint8_t *pui8Data, \
1937  uint32_t ui32Count, \
1938  bool bUseDMA, \
1939  uint32_t ui32TxChannel, \
1940  uint32_t ui32RxChannel))ROM_SPIFLASHTABLE[14])
1941 #define ROM_SPIFlashBlockErase32 \
1942  ((void (*)(uint32_t ui32Base, \
1943  uint32_t ui32Addr))ROM_SPIFLASHTABLE[15])
1944 #define ROM_SPIFlashQuadRead \
1945  ((void (*)(uint32_t ui32Base, \
1946  uint32_t ui32Addr, \
1947  uint8_t *pui8Data, \
1948  uint32_t ui32Count))ROM_SPIFLASHTABLE[16])
1949 #define ROM_SPIFlashQuadReadNonBlocking \
1950  ((void (*)(tSPIFlashState *pState, \
1951  uint32_t ui32Base, \
1952  uint32_t ui32Addr, \
1953  uint8_t *pui8Data, \
1954  uint32_t ui32Count, \
1955  bool bUseDMA, \
1956  uint32_t ui32TxChannel, \
1957  uint32_t ui32RxChannel))ROM_SPIFLASHTABLE[17])
1958 #define ROM_SPIFlashReadID \
1959  ((void (*)(uint32_t ui32Base, \
1960  uint8_t *pui8ManufacturerID, \
1961  uint16_t *pui16DeviceID))ROM_SPIFLASHTABLE[18])
1962 #define ROM_SPIFlashChipErase \
1963  ((void (*)(uint32_t ui32Base))ROM_SPIFLASHTABLE[19])
1964 #define ROM_SPIFlashBlockErase64 \
1965  ((void (*)(uint32_t ui32Base, \
1966  uint32_t ui32Addr))ROM_SPIFLASHTABLE[20])
1967 
1968 //*****************************************************************************
1969 //
1970 // Macros for calling ROM functions in the SSI API.
1971 //
1972 //*****************************************************************************
1973 #define ROM_SSIDataPut \
1974  ((void (*)(uint32_t ui32Base, \
1975  uint32_t ui32Data))ROM_SSITABLE[0])
1976 #define ROM_SSIConfigSetExpClk \
1977  ((void (*)(uint32_t ui32Base, \
1978  uint32_t ui32SSIClk, \
1979  uint32_t ui32Protocol, \
1980  uint32_t ui32Mode, \
1981  uint32_t ui32BitRate, \
1982  uint32_t ui32DataWidth))ROM_SSITABLE[1])
1983 #define ROM_SSIEnable \
1984  ((void (*)(uint32_t ui32Base))ROM_SSITABLE[2])
1985 #define ROM_SSIDisable \
1986  ((void (*)(uint32_t ui32Base))ROM_SSITABLE[3])
1987 #define ROM_SSIIntEnable \
1988  ((void (*)(uint32_t ui32Base, \
1989  uint32_t ui32IntFlags))ROM_SSITABLE[4])
1990 #define ROM_SSIIntDisable \
1991  ((void (*)(uint32_t ui32Base, \
1992  uint32_t ui32IntFlags))ROM_SSITABLE[5])
1993 #define ROM_SSIIntStatus \
1994  ((uint32_t (*)(uint32_t ui32Base, \
1995  bool bMasked))ROM_SSITABLE[6])
1996 #define ROM_SSIIntClear \
1997  ((void (*)(uint32_t ui32Base, \
1998  uint32_t ui32IntFlags))ROM_SSITABLE[7])
1999 #define ROM_SSIDataPutNonBlocking \
2000  ((int32_t (*)(uint32_t ui32Base, \
2001  uint32_t ui32Data))ROM_SSITABLE[8])
2002 #define ROM_SSIDataGet \
2003  ((void (*)(uint32_t ui32Base, \
2004  uint32_t *pui32Data))ROM_SSITABLE[9])
2005 #define ROM_SSIDataGetNonBlocking \
2006  ((int32_t (*)(uint32_t ui32Base, \
2007  uint32_t *pui32Data))ROM_SSITABLE[10])
2008 #define ROM_UpdateSSI \
2009  ((void (*)(void))ROM_SSITABLE[11])
2010 #define ROM_SSIDMAEnable \
2011  ((void (*)(uint32_t ui32Base, \
2012  uint32_t ui32DMAFlags))ROM_SSITABLE[12])
2013 #define ROM_SSIDMADisable \
2014  ((void (*)(uint32_t ui32Base, \
2015  uint32_t ui32DMAFlags))ROM_SSITABLE[13])
2016 #define ROM_SSIBusy \
2017  ((bool (*)(uint32_t ui32Base))ROM_SSITABLE[14])
2018 #define ROM_SSIClockSourceGet \
2019  ((uint32_t (*)(uint32_t ui32Base))ROM_SSITABLE[15])
2020 #define ROM_SSIClockSourceSet \
2021  ((void (*)(uint32_t ui32Base, \
2022  uint32_t ui32Source))ROM_SSITABLE[16])
2023 #define ROM_SSIAdvModeSet \
2024  ((void (*)(uint32_t ui32Base, \
2025  uint32_t ui32Mode))ROM_SSITABLE[17])
2026 #define ROM_SSIAdvDataPutFrameEnd \
2027  ((void (*)(uint32_t ui32Base, \
2028  uint32_t ui32Data))ROM_SSITABLE[18])
2029 #define ROM_SSIAdvDataPutFrameEndNonBlocking \
2030  ((int32_t (*)(uint32_t ui32Base, \
2031  uint32_t ui32Data))ROM_SSITABLE[19])
2032 #define ROM_SSIAdvFrameHoldEnable \
2033  ((void (*)(uint32_t ui32Base))ROM_SSITABLE[20])
2034 #define ROM_SSIAdvFrameHoldDisable \
2035  ((void (*)(uint32_t ui32Base))ROM_SSITABLE[21])
2036 
2037 //*****************************************************************************
2038 //
2039 // Macros for calling ROM functions in the SysCtl API.
2040 //
2041 //*****************************************************************************
2042 #define ROM_SysCtlSleep \
2043  ((void (*)(void))ROM_SYSCTLTABLE[0])
2044 #define ROM_SysCtlSRAMSizeGet \
2045  ((uint32_t (*)(void))ROM_SYSCTLTABLE[1])
2046 #define ROM_SysCtlFlashSizeGet \
2047  ((uint32_t (*)(void))ROM_SYSCTLTABLE[2])
2048 #define ROM_SysCtlPeripheralPresent \
2049  ((bool (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[4])
2050 #define ROM_SysCtlPeripheralReset \
2051  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[5])
2052 #define ROM_SysCtlPeripheralEnable \
2053  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[6])
2054 #define ROM_SysCtlPeripheralDisable \
2055  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[7])
2056 #define ROM_SysCtlPeripheralSleepEnable \
2057  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[8])
2058 #define ROM_SysCtlPeripheralSleepDisable \
2059  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[9])
2060 #define ROM_SysCtlPeripheralDeepSleepEnable \
2061  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[10])
2062 #define ROM_SysCtlPeripheralDeepSleepDisable \
2063  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[11])
2064 #define ROM_SysCtlPeripheralClockGating \
2065  ((void (*)(bool bEnable))ROM_SYSCTLTABLE[12])
2066 #define ROM_SysCtlIntEnable \
2067  ((void (*)(uint32_t ui32Ints))ROM_SYSCTLTABLE[13])
2068 #define ROM_SysCtlIntDisable \
2069  ((void (*)(uint32_t ui32Ints))ROM_SYSCTLTABLE[14])
2070 #define ROM_SysCtlIntClear \
2071  ((void (*)(uint32_t ui32Ints))ROM_SYSCTLTABLE[15])
2072 #define ROM_SysCtlIntStatus \
2073  ((uint32_t (*)(bool bMasked))ROM_SYSCTLTABLE[16])
2074 #define ROM_SysCtlReset \
2075  ((void (*)(void))ROM_SYSCTLTABLE[19])
2076 #define ROM_SysCtlDeepSleep \
2077  ((void (*)(void))ROM_SYSCTLTABLE[20])
2078 #define ROM_SysCtlResetCauseGet \
2079  ((uint32_t (*)(void))ROM_SYSCTLTABLE[21])
2080 #define ROM_SysCtlResetCauseClear \
2081  ((void (*)(uint32_t ui32Causes))ROM_SYSCTLTABLE[22])
2082 #define ROM_SysCtlDelay \
2083  ((void (*)(uint32_t ui32Count))ROM_SYSCTLTABLE[34])
2084 #define ROM_SysCtlPeripheralReady \
2085  ((bool (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[35])
2086 #define ROM_SysCtlPeripheralPowerOn \
2087  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[36])
2088 #define ROM_SysCtlPeripheralPowerOff \
2089  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[37])
2090 #define ROM_SysCtlMOSCConfigSet \
2091  ((void (*)(uint32_t ui32Config))ROM_SYSCTLTABLE[44])
2092 #define ROM_SysCtlPIOSCCalibrate \
2093  ((uint32_t (*)(uint32_t ui32Type))ROM_SYSCTLTABLE[45])
2094 #define ROM_SysCtlDeepSleepClockConfigSet \
2095  ((void (*)(uint32_t ui32Div, \
2096  uint32_t ui32Config))ROM_SYSCTLTABLE[47])
2097 #define ROM_SysCtlResetBehaviorSet \
2098  ((void (*)(uint32_t ui32Behavior))ROM_SYSCTLTABLE[51])
2099 #define ROM_SysCtlResetBehaviorGet \
2100  ((uint32_t (*)(void))ROM_SYSCTLTABLE[52])
2101 #define ROM_SysCtlFlashSectorSizeGet \
2102  ((uint32_t (*)(void))ROM_SYSCTLTABLE[54])
2103 #define ROM_SysCtlVoltageEventConfig \
2104  ((void (*)(uint32_t ui32Config))ROM_SYSCTLTABLE[55])
2105 #define ROM_SysCtlVoltageEventStatus \
2106  ((uint32_t (*)(void))ROM_SYSCTLTABLE[56])
2107 #define ROM_SysCtlVoltageEventClear \
2108  ((void (*)(uint32_t ui32Status))ROM_SYSCTLTABLE[57])
2109 #define ROM_SysCtlNMIStatus \
2110  ((uint32_t (*)(void))ROM_SYSCTLTABLE[58])
2111 #define ROM_SysCtlNMIClear \
2112  ((void (*)(uint32_t ui32Status))ROM_SYSCTLTABLE[59])
2113 #define ROM_SysCtlClockOutConfig \
2114  ((void (*)(uint32_t ui32Config, \
2115  uint32_t ui32Div))ROM_SYSCTLTABLE[60])
2116 #define ROM_SysCtlAltClkConfig \
2117  ((void (*)(uint32_t ui32Config))ROM_SYSCTLTABLE[61])
2118 
2119 //*****************************************************************************
2120 //
2121 // Macros for calling ROM functions in the SysExc API.
2122 //
2123 //*****************************************************************************
2124 #define ROM_SysExcIntStatus \
2125  ((uint32_t (*)(bool bMasked))ROM_SYSEXCTABLE[0])
2126 #define ROM_SysExcIntClear \
2127  ((void (*)(uint32_t ui32IntFlags))ROM_SYSEXCTABLE[1])
2128 #define ROM_SysExcIntDisable \
2129  ((void (*)(uint32_t ui32IntFlags))ROM_SYSEXCTABLE[2])
2130 #define ROM_SysExcIntEnable \
2131  ((void (*)(uint32_t ui32IntFlags))ROM_SYSEXCTABLE[3])
2132 
2133 //*****************************************************************************
2134 //
2135 // Macros for calling ROM functions in the SysTick API.
2136 //
2137 //*****************************************************************************
2138 #define ROM_SysTickValueGet \
2139  ((uint32_t (*)(void))ROM_SYSTICKTABLE[0])
2140 #define ROM_SysTickEnable \
2141  ((void (*)(void))ROM_SYSTICKTABLE[1])
2142 #define ROM_SysTickDisable \
2143  ((void (*)(void))ROM_SYSTICKTABLE[2])
2144 #define ROM_SysTickIntEnable \
2145  ((void (*)(void))ROM_SYSTICKTABLE[3])
2146 #define ROM_SysTickIntDisable \
2147  ((void (*)(void))ROM_SYSTICKTABLE[4])
2148 #define ROM_SysTickPeriodSet \
2149  ((void (*)(uint32_t ui32Period))ROM_SYSTICKTABLE[5])
2150 #define ROM_SysTickPeriodGet \
2151  ((uint32_t (*)(void))ROM_SYSTICKTABLE[6])
2152 
2153 //*****************************************************************************
2154 //
2155 // Macros for calling ROM functions in the Timer API.
2156 //
2157 //*****************************************************************************
2158 #define ROM_TimerIntClear \
2159  ((void (*)(uint32_t ui32Base, \
2160  uint32_t ui32IntFlags))ROM_TIMERTABLE[0])
2161 #define ROM_TimerEnable \
2162  ((void (*)(uint32_t ui32Base, \
2163  uint32_t ui32Timer))ROM_TIMERTABLE[1])
2164 #define ROM_TimerDisable \
2165  ((void (*)(uint32_t ui32Base, \
2166  uint32_t ui32Timer))ROM_TIMERTABLE[2])
2167 #define ROM_TimerConfigure \
2168  ((void (*)(uint32_t ui32Base, \
2169  uint32_t ui32Config))ROM_TIMERTABLE[3])
2170 #define ROM_TimerControlLevel \
2171  ((void (*)(uint32_t ui32Base, \
2172  uint32_t ui32Timer, \
2173  bool bInvert))ROM_TIMERTABLE[4])
2174 #define ROM_TimerControlEvent \
2175  ((void (*)(uint32_t ui32Base, \
2176  uint32_t ui32Timer, \
2177  uint32_t ui32Event))ROM_TIMERTABLE[6])
2178 #define ROM_TimerControlStall \
2179  ((void (*)(uint32_t ui32Base, \
2180  uint32_t ui32Timer, \
2181  bool bStall))ROM_TIMERTABLE[7])
2182 #define ROM_TimerRTCEnable \
2183  ((void (*)(uint32_t ui32Base))ROM_TIMERTABLE[8])
2184 #define ROM_TimerRTCDisable \
2185  ((void (*)(uint32_t ui32Base))ROM_TIMERTABLE[9])
2186 #define ROM_TimerPrescaleSet \
2187  ((void (*)(uint32_t ui32Base, \
2188  uint32_t ui32Timer, \
2189  uint32_t ui32Value))ROM_TIMERTABLE[10])
2190 #define ROM_TimerPrescaleGet \
2191  ((uint32_t (*)(uint32_t ui32Base, \
2192  uint32_t ui32Timer))ROM_TIMERTABLE[11])
2193 #define ROM_TimerPrescaleMatchSet \
2194  ((void (*)(uint32_t ui32Base, \
2195  uint32_t ui32Timer, \
2196  uint32_t ui32Value))ROM_TIMERTABLE[12])
2197 #define ROM_TimerPrescaleMatchGet \
2198  ((uint32_t (*)(uint32_t ui32Base, \
2199  uint32_t ui32Timer))ROM_TIMERTABLE[13])
2200 #define ROM_TimerLoadSet \
2201  ((void (*)(uint32_t ui32Base, \
2202  uint32_t ui32Timer, \
2203  uint32_t ui32Value))ROM_TIMERTABLE[14])
2204 #define ROM_TimerLoadGet \
2205  ((uint32_t (*)(uint32_t ui32Base, \
2206  uint32_t ui32Timer))ROM_TIMERTABLE[15])
2207 #define ROM_TimerValueGet \
2208  ((uint32_t (*)(uint32_t ui32Base, \
2209  uint32_t ui32Timer))ROM_TIMERTABLE[16])
2210 #define ROM_TimerMatchSet \
2211  ((void (*)(uint32_t ui32Base, \
2212  uint32_t ui32Timer, \
2213  uint32_t ui32Value))ROM_TIMERTABLE[17])
2214 #define ROM_TimerMatchGet \
2215  ((uint32_t (*)(uint32_t ui32Base, \
2216  uint32_t ui32Timer))ROM_TIMERTABLE[18])
2217 #define ROM_TimerIntEnable \
2218  ((void (*)(uint32_t ui32Base, \
2219  uint32_t ui32IntFlags))ROM_TIMERTABLE[19])
2220 #define ROM_TimerIntDisable \
2221  ((void (*)(uint32_t ui32Base, \
2222  uint32_t ui32IntFlags))ROM_TIMERTABLE[20])
2223 #define ROM_TimerIntStatus \
2224  ((uint32_t (*)(uint32_t ui32Base, \
2225  bool bMasked))ROM_TIMERTABLE[21])
2226 #define ROM_TimerControlWaitOnTrigger \
2227  ((void (*)(uint32_t ui32Base, \
2228  uint32_t ui32Timer, \
2229  bool bWait))ROM_TIMERTABLE[22])
2230 #define ROM_TimerClockSourceGet \
2231  ((uint32_t (*)(uint32_t ui32Base))ROM_TIMERTABLE[28])
2232 #define ROM_TimerClockSourceSet \
2233  ((void (*)(uint32_t ui32Base, \
2234  uint32_t ui32Source))ROM_TIMERTABLE[29])
2235 #define ROM_TimerADCEventGet \
2236  ((uint32_t (*)(uint32_t ui32Base))ROM_TIMERTABLE[30])
2237 #define ROM_TimerADCEventSet \
2238  ((void (*)(uint32_t ui32Base, \
2239  uint32_t ui32ADCEvent))ROM_TIMERTABLE[31])
2240 #define ROM_TimerDMAEventGet \
2241  ((uint32_t (*)(uint32_t ui32Base))ROM_TIMERTABLE[32])
2242 #define ROM_TimerDMAEventSet \
2243  ((void (*)(uint32_t ui32Base, \
2244  uint32_t ui32DMAEvent))ROM_TIMERTABLE[33])
2245 #define ROM_TimerSynchronize \
2246  ((void (*)(uint32_t ui32Base, \
2247  uint32_t ui32Timers))ROM_TIMERTABLE[34])
2248 
2249 //*****************************************************************************
2250 //
2251 // Macros for calling ROM functions in the UART API.
2252 //
2253 //*****************************************************************************
2254 #define ROM_UARTCharPut \
2255  ((void (*)(uint32_t ui32Base, \
2256  unsigned char ucData))ROM_UARTTABLE[0])
2257 #define ROM_UARTParityModeSet \
2258  ((void (*)(uint32_t ui32Base, \
2259  uint32_t ui32Parity))ROM_UARTTABLE[1])
2260 #define ROM_UARTParityModeGet \
2261  ((uint32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[2])
2262 #define ROM_UARTFIFOLevelSet \
2263  ((void (*)(uint32_t ui32Base, \
2264  uint32_t ui32TxLevel, \
2265  uint32_t ui32RxLevel))ROM_UARTTABLE[3])
2266 #define ROM_UARTFIFOLevelGet \
2267  ((void (*)(uint32_t ui32Base, \
2268  uint32_t *pui32TxLevel, \
2269  uint32_t *pui32RxLevel))ROM_UARTTABLE[4])
2270 #define ROM_UARTConfigSetExpClk \
2271  ((void (*)(uint32_t ui32Base, \
2272  uint32_t ui32UARTClk, \
2273  uint32_t ui32Baud, \
2274  uint32_t ui32Config))ROM_UARTTABLE[5])
2275 #define ROM_UARTConfigGetExpClk \
2276  ((void (*)(uint32_t ui32Base, \
2277  uint32_t ui32UARTClk, \
2278  uint32_t *pui32Baud, \
2279  uint32_t *pui32Config))ROM_UARTTABLE[6])
2280 #define ROM_UARTEnable \
2281  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[7])
2282 #define ROM_UARTDisable \
2283  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[8])
2284 #define ROM_UARTEnableSIR \
2285  ((void (*)(uint32_t ui32Base, \
2286  bool bLowPower))ROM_UARTTABLE[9])
2287 #define ROM_UARTDisableSIR \
2288  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[10])
2289 #define ROM_UARTCharsAvail \
2290  ((bool (*)(uint32_t ui32Base))ROM_UARTTABLE[11])
2291 #define ROM_UARTSpaceAvail \
2292  ((bool (*)(uint32_t ui32Base))ROM_UARTTABLE[12])
2293 #define ROM_UARTCharGetNonBlocking \
2294  ((int32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[13])
2295 #define ROM_UARTCharGet \
2296  ((int32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[14])
2297 #define ROM_UARTCharPutNonBlocking \
2298  ((bool (*)(uint32_t ui32Base, \
2299  unsigned char ucData))ROM_UARTTABLE[15])
2300 #define ROM_UARTBreakCtl \
2301  ((void (*)(uint32_t ui32Base, \
2302  bool bBreakState))ROM_UARTTABLE[16])
2303 #define ROM_UARTIntEnable \
2304  ((void (*)(uint32_t ui32Base, \
2305  uint32_t ui32IntFlags))ROM_UARTTABLE[17])
2306 #define ROM_UARTIntDisable \
2307  ((void (*)(uint32_t ui32Base, \
2308  uint32_t ui32IntFlags))ROM_UARTTABLE[18])
2309 #define ROM_UARTIntStatus \
2310  ((uint32_t (*)(uint32_t ui32Base, \
2311  bool bMasked))ROM_UARTTABLE[19])
2312 #define ROM_UARTIntClear \
2313  ((void (*)(uint32_t ui32Base, \
2314  uint32_t ui32IntFlags))ROM_UARTTABLE[20])
2315 #define ROM_UpdateUART \
2316  ((void (*)(void))ROM_UARTTABLE[21])
2317 #define ROM_UARTDMAEnable \
2318  ((void (*)(uint32_t ui32Base, \
2319  uint32_t ui32DMAFlags))ROM_UARTTABLE[22])
2320 #define ROM_UARTDMADisable \
2321  ((void (*)(uint32_t ui32Base, \
2322  uint32_t ui32DMAFlags))ROM_UARTTABLE[23])
2323 #define ROM_UARTFIFOEnable \
2324  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[24])
2325 #define ROM_UARTFIFODisable \
2326  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[25])
2327 #define ROM_UARTBusy \
2328  ((bool (*)(uint32_t ui32Base))ROM_UARTTABLE[26])
2329 #define ROM_UARTTxIntModeSet \
2330  ((void (*)(uint32_t ui32Base, \
2331  uint32_t ui32Mode))ROM_UARTTABLE[27])
2332 #define ROM_UARTTxIntModeGet \
2333  ((uint32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[28])
2334 #define ROM_UARTRxErrorGet \
2335  ((uint32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[29])
2336 #define ROM_UARTRxErrorClear \
2337  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[30])
2338 #define ROM_UARTClockSourceSet \
2339  ((void (*)(uint32_t ui32Base, \
2340  uint32_t ui32Source))ROM_UARTTABLE[31])
2341 #define ROM_UARTClockSourceGet \
2342  ((uint32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[32])
2343 #define ROM_UART9BitEnable \
2344  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[33])
2345 #define ROM_UART9BitDisable \
2346  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[34])
2347 #define ROM_UART9BitAddrSet \
2348  ((void (*)(uint32_t ui32Base, \
2349  uint8_t ui8Addr, \
2350  uint8_t ui8Mask))ROM_UARTTABLE[35])
2351 #define ROM_UART9BitAddrSend \
2352  ((void (*)(uint32_t ui32Base, \
2353  uint8_t ui8Addr))ROM_UARTTABLE[36])
2354 #define ROM_UARTSmartCardDisable \
2355  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[37])
2356 #define ROM_UARTSmartCardEnable \
2357  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[38])
2358 #define ROM_UARTModemControlClear \
2359  ((void (*)(uint32_t ui32Base, \
2360  uint32_t ui32Control))ROM_UARTTABLE[39])
2361 #define ROM_UARTModemControlGet \
2362  ((uint32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[40])
2363 #define ROM_UARTModemControlSet \
2364  ((void (*)(uint32_t ui32Base, \
2365  uint32_t ui32Control))ROM_UARTTABLE[41])
2366 #define ROM_UARTModemStatusGet \
2367  ((uint32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[42])
2368 #define ROM_UARTFlowControlGet \
2369  ((uint32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[43])
2370 #define ROM_UARTFlowControlSet \
2371  ((void (*)(uint32_t ui32Base, \
2372  uint32_t ui32Mode))ROM_UARTTABLE[44])
2373 
2374 //*****************************************************************************
2375 //
2376 // Macros for calling ROM functions in the uDMA API.
2377 //
2378 //*****************************************************************************
2379 #define ROM_uDMAChannelTransferSet \
2380  ((void (*)(uint32_t ui32ChannelStructIndex, \
2381  uint32_t ui32Mode, \
2382  void *pvSrcAddr, \
2383  void *pvDstAddr, \
2384  uint32_t ui32TransferSize))ROM_UDMATABLE[0])
2385 #define ROM_uDMAEnable \
2386  ((void (*)(void))ROM_UDMATABLE[1])
2387 #define ROM_uDMADisable \
2388  ((void (*)(void))ROM_UDMATABLE[2])
2389 #define ROM_uDMAErrorStatusGet \
2390  ((uint32_t (*)(void))ROM_UDMATABLE[3])
2391 #define ROM_uDMAErrorStatusClear \
2392  ((void (*)(void))ROM_UDMATABLE[4])
2393 #define ROM_uDMAChannelEnable \
2394  ((void (*)(uint32_t ui32ChannelNum))ROM_UDMATABLE[5])
2395 #define ROM_uDMAChannelDisable \
2396  ((void (*)(uint32_t ui32ChannelNum))ROM_UDMATABLE[6])
2397 #define ROM_uDMAChannelIsEnabled \
2398  ((bool (*)(uint32_t ui32ChannelNum))ROM_UDMATABLE[7])
2399 #define ROM_uDMAControlBaseSet \
2400  ((void (*)(void *pControlTable))ROM_UDMATABLE[8])
2401 #define ROM_uDMAControlBaseGet \
2402  ((void * (*)(void))ROM_UDMATABLE[9])
2403 #define ROM_uDMAChannelRequest \
2404  ((void (*)(uint32_t ui32ChannelNum))ROM_UDMATABLE[10])
2405 #define ROM_uDMAChannelAttributeEnable \
2406  ((void (*)(uint32_t ui32ChannelNum, \
2407  uint32_t ui32Attr))ROM_UDMATABLE[11])
2408 #define ROM_uDMAChannelAttributeDisable \
2409  ((void (*)(uint32_t ui32ChannelNum, \
2410  uint32_t ui32Attr))ROM_UDMATABLE[12])
2411 #define ROM_uDMAChannelAttributeGet \
2412  ((uint32_t (*)(uint32_t ui32ChannelNum))ROM_UDMATABLE[13])
2413 #define ROM_uDMAChannelControlSet \
2414  ((void (*)(uint32_t ui32ChannelStructIndex, \
2415  uint32_t ui32Control))ROM_UDMATABLE[14])
2416 #define ROM_uDMAChannelSizeGet \
2417  ((uint32_t (*)(uint32_t ui32ChannelStructIndex))ROM_UDMATABLE[15])
2418 #define ROM_uDMAChannelModeGet \
2419  ((uint32_t (*)(uint32_t ui32ChannelStructIndex))ROM_UDMATABLE[16])
2420 #define ROM_uDMAControlAlternateBaseGet \
2421  ((void * (*)(void))ROM_UDMATABLE[21])
2422 #define ROM_uDMAChannelScatterGatherSet \
2423  ((void (*)(uint32_t ui32ChannelNum, \
2424  uint32_t ui32TaskCount, \
2425  void *pvTaskList, \
2426  uint32_t ui32IsPeriphSG))ROM_UDMATABLE[22])
2427 #define ROM_uDMAChannelAssign \
2428  ((void (*)(uint32_t ui32Mapping))ROM_UDMATABLE[23])
2429 
2430 //*****************************************************************************
2431 //
2432 // Macros for calling ROM functions in the USB API.
2433 //
2434 //*****************************************************************************
2435 #define ROM_USBDevAddrGet \
2436  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[1])
2437 #define ROM_USBDevAddrSet \
2438  ((void (*)(uint32_t ui32Base, \
2439  uint32_t ui32Address))ROM_USBTABLE[2])
2440 #define ROM_USBDevConnect \
2441  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[3])
2442 #define ROM_USBDevDisconnect \
2443  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[4])
2444 #define ROM_USBDevEndpointConfigSet \
2445  ((void (*)(uint32_t ui32Base, \
2446  uint32_t ui32Endpoint, \
2447  uint32_t ui32MaxPacketSize, \
2448  uint32_t ui32Flags))ROM_USBTABLE[5])
2449 #define ROM_USBDevEndpointDataAck \
2450  ((void (*)(uint32_t ui32Base, \
2451  uint32_t ui32Endpoint, \
2452  bool bIsLastPacket))ROM_USBTABLE[6])
2453 #define ROM_USBDevEndpointStall \
2454  ((void (*)(uint32_t ui32Base, \
2455  uint32_t ui32Endpoint, \
2456  uint32_t ui32Flags))ROM_USBTABLE[7])
2457 #define ROM_USBDevEndpointStallClear \
2458  ((void (*)(uint32_t ui32Base, \
2459  uint32_t ui32Endpoint, \
2460  uint32_t ui32Flags))ROM_USBTABLE[8])
2461 #define ROM_USBDevEndpointStatusClear \
2462  ((void (*)(uint32_t ui32Base, \
2463  uint32_t ui32Endpoint, \
2464  uint32_t ui32Flags))ROM_USBTABLE[9])
2465 #define ROM_USBEndpointDataGet \
2466  ((int32_t (*)(uint32_t ui32Base, \
2467  uint32_t ui32Endpoint, \
2468  uint8_t *pui8Data, \
2469  uint32_t *pui32Size))ROM_USBTABLE[10])
2470 #define ROM_USBEndpointDataPut \
2471  ((int32_t (*)(uint32_t ui32Base, \
2472  uint32_t ui32Endpoint, \
2473  uint8_t *pui8Data, \
2474  uint32_t ui32Size))ROM_USBTABLE[11])
2475 #define ROM_USBEndpointDataSend \
2476  ((int32_t (*)(uint32_t ui32Base, \
2477  uint32_t ui32Endpoint, \
2478  uint32_t ui32TransType))ROM_USBTABLE[12])
2479 #define ROM_USBEndpointDataToggleClear \
2480  ((void (*)(uint32_t ui32Base, \
2481  uint32_t ui32Endpoint, \
2482  uint32_t ui32Flags))ROM_USBTABLE[13])
2483 #define ROM_USBEndpointStatus \
2484  ((uint32_t (*)(uint32_t ui32Base, \
2485  uint32_t ui32Endpoint))ROM_USBTABLE[14])
2486 #define ROM_USBFIFOAddrGet \
2487  ((uint32_t (*)(uint32_t ui32Base, \
2488  uint32_t ui32Endpoint))ROM_USBTABLE[15])
2489 #define ROM_USBFIFOConfigGet \
2490  ((void (*)(uint32_t ui32Base, \
2491  uint32_t ui32Endpoint, \
2492  uint32_t *pui32FIFOAddress, \
2493  uint32_t *pui32FIFOSize, \
2494  uint32_t ui32Flags))ROM_USBTABLE[16])
2495 #define ROM_USBFIFOConfigSet \
2496  ((void (*)(uint32_t ui32Base, \
2497  uint32_t ui32Endpoint, \
2498  uint32_t ui32FIFOAddress, \
2499  uint32_t ui32FIFOSize, \
2500  uint32_t ui32Flags))ROM_USBTABLE[17])
2501 #define ROM_USBFIFOFlush \
2502  ((void (*)(uint32_t ui32Base, \
2503  uint32_t ui32Endpoint, \
2504  uint32_t ui32Flags))ROM_USBTABLE[18])
2505 #define ROM_USBFrameNumberGet \
2506  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[19])
2507 #define ROM_USBHostAddrGet \
2508  ((uint32_t (*)(uint32_t ui32Base, \
2509  uint32_t ui32Endpoint, \
2510  uint32_t ui32Flags))ROM_USBTABLE[20])
2511 #define ROM_USBHostAddrSet \
2512  ((void (*)(uint32_t ui32Base, \
2513  uint32_t ui32Endpoint, \
2514  uint32_t ui32Addr, \
2515  uint32_t ui32Flags))ROM_USBTABLE[21])
2516 #define ROM_USBHostEndpointConfig \
2517  ((void (*)(uint32_t ui32Base, \
2518  uint32_t ui32Endpoint, \
2519  uint32_t ui32MaxPacketSize, \
2520  uint32_t ui32NAKPollInterval, \
2521  uint32_t ui32TargetEndpoint, \
2522  uint32_t ui32Flags))ROM_USBTABLE[22])
2523 #define ROM_USBHostEndpointDataAck \
2524  ((void (*)(uint32_t ui32Base, \
2525  uint32_t ui32Endpoint))ROM_USBTABLE[23])
2526 #define ROM_USBHostEndpointDataToggle \
2527  ((void (*)(uint32_t ui32Base, \
2528  uint32_t ui32Endpoint, \
2529  bool bDataToggle, \
2530  uint32_t ui32Flags))ROM_USBTABLE[24])
2531 #define ROM_USBHostEndpointStatusClear \
2532  ((void (*)(uint32_t ui32Base, \
2533  uint32_t ui32Endpoint, \
2534  uint32_t ui32Flags))ROM_USBTABLE[25])
2535 #define ROM_USBHostHubAddrGet \
2536  ((uint32_t (*)(uint32_t ui32Base, \
2537  uint32_t ui32Endpoint, \
2538  uint32_t ui32Flags))ROM_USBTABLE[26])
2539 #define ROM_USBHostHubAddrSet \
2540  ((void (*)(uint32_t ui32Base, \
2541  uint32_t ui32Endpoint, \
2542  uint32_t ui32Addr, \
2543  uint32_t ui32Flags))ROM_USBTABLE[27])
2544 #define ROM_USBHostPwrDisable \
2545  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[28])
2546 #define ROM_USBHostPwrEnable \
2547  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[29])
2548 #define ROM_USBHostPwrConfig \
2549  ((void (*)(uint32_t ui32Base, \
2550  uint32_t ui32Flags))ROM_USBTABLE[30])
2551 #define ROM_USBHostPwrFaultDisable \
2552  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[31])
2553 #define ROM_USBHostPwrFaultEnable \
2554  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[32])
2555 #define ROM_USBHostRequestIN \
2556  ((void (*)(uint32_t ui32Base, \
2557  uint32_t ui32Endpoint))ROM_USBTABLE[33])
2558 #define ROM_USBHostRequestStatus \
2559  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[34])
2560 #define ROM_USBHostReset \
2561  ((void (*)(uint32_t ui32Base, \
2562  bool bStart))ROM_USBTABLE[35])
2563 #define ROM_USBHostResume \
2564  ((void (*)(uint32_t ui32Base, \
2565  bool bStart))ROM_USBTABLE[36])
2566 #define ROM_USBHostSpeedGet \
2567  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[37])
2568 #define ROM_USBHostSuspend \
2569  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[38])
2570 #define ROM_USBDevEndpointConfigGet \
2571  ((void (*)(uint32_t ui32Base, \
2572  uint32_t ui32Endpoint, \
2573  uint32_t *pui32MaxPacketSize, \
2574  uint32_t *pui32Flags))ROM_USBTABLE[41])
2575 #define ROM_USBEndpointDMAEnable \
2576  ((void (*)(uint32_t ui32Base, \
2577  uint32_t ui32Endpoint, \
2578  uint32_t ui32Flags))ROM_USBTABLE[42])
2579 #define ROM_USBEndpointDMADisable \
2580  ((void (*)(uint32_t ui32Base, \
2581  uint32_t ui32Endpoint, \
2582  uint32_t ui32Flags))ROM_USBTABLE[43])
2583 #define ROM_USBEndpointDataAvail \
2584  ((uint32_t (*)(uint32_t ui32Base, \
2585  uint32_t ui32Endpoint))ROM_USBTABLE[44])
2586 #define ROM_USBModeGet \
2587  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[46])
2588 #define ROM_USBIntDisableControl \
2589  ((void (*)(uint32_t ui32Base, \
2590  uint32_t ui32IntFlags))ROM_USBTABLE[48])
2591 #define ROM_USBIntEnableControl \
2592  ((void (*)(uint32_t ui32Base, \
2593  uint32_t ui32IntFlags))ROM_USBTABLE[49])
2594 #define ROM_USBIntStatusControl \
2595  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[50])
2596 #define ROM_USBIntDisableEndpoint \
2597  ((void (*)(uint32_t ui32Base, \
2598  uint32_t ui32IntFlags))ROM_USBTABLE[51])
2599 #define ROM_USBIntEnableEndpoint \
2600  ((void (*)(uint32_t ui32Base, \
2601  uint32_t ui32IntFlags))ROM_USBTABLE[52])
2602 #define ROM_USBIntStatusEndpoint \
2603  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[53])
2604 #define ROM_USBHostMode \
2605  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[54])
2606 #define ROM_USBDevMode \
2607  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[55])
2608 #define ROM_USBPHYPowerOff \
2609  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[56])
2610 #define ROM_USBPHYPowerOn \
2611  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[57])
2612 #define ROM_UpdateUSB \
2613  ((void (*)(uint8_t *pui8DescriptorInfo))ROM_USBTABLE[58])
2614 #define ROM_USBOTGMode \
2615  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[59])
2616 #define ROM_USBHostRequestINClear \
2617  ((void (*)(uint32_t ui32Base, \
2618  uint32_t ui32Endpoint))ROM_USBTABLE[60])
2619 #define ROM_USBNumEndpointsGet \
2620  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[61])
2621 #define ROM_USBClockDisable \
2622  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[62])
2623 #define ROM_USBClockEnable \
2624  ((void (*)(uint32_t ui32Base, \
2625  uint32_t ui32Div, \
2626  uint32_t ui32Flags))ROM_USBTABLE[63])
2627 #define ROM_USBDevLPMConfig \
2628  ((void (*)(uint32_t ui32Base, \
2629  uint32_t ui32Config))ROM_USBTABLE[65])
2630 #define ROM_USBDevLPMDisable \
2631  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[66])
2632 #define ROM_USBDevLPMEnable \
2633  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[67])
2634 #define ROM_USBDevLPMRemoteWake \
2635  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[68])
2636 #define ROM_USBDevSpeedGet \
2637  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[69])
2638 #define ROM_USBDMAChannelAddressGet \
2639  ((void * (*)(uint32_t ui32Base, \
2640  uint32_t ui32Channel))ROM_USBTABLE[70])
2641 #define ROM_USBDMAChannelAddressSet \
2642  ((void (*)(uint32_t ui32Base, \
2643  uint32_t ui32Channel, \
2644  void *pvAddress))ROM_USBTABLE[71])
2645 #define ROM_USBDMAChannelConfigSet \
2646  ((void (*)(uint32_t ui32Base, \
2647  uint32_t ui32Channel, \
2648  uint32_t ui32Endpoint, \
2649  uint32_t ui32Config))ROM_USBTABLE[72])
2650 #define ROM_USBDMAChannelDisable \
2651  ((void (*)(uint32_t ui32Base, \
2652  uint32_t ui32Channel))ROM_USBTABLE[73])
2653 #define ROM_USBDMAChannelEnable \
2654  ((void (*)(uint32_t ui32Base, \
2655  uint32_t ui32Channel))ROM_USBTABLE[74])
2656 #define ROM_USBDMAChannelIntDisable \
2657  ((void (*)(uint32_t ui32Base, \
2658  uint32_t ui32Channel))ROM_USBTABLE[75])
2659 #define ROM_USBDMAChannelIntEnable \
2660  ((void (*)(uint32_t ui32Base, \
2661  uint32_t ui32Channel))ROM_USBTABLE[76])
2662 #define ROM_USBDMAChannelCountGet \
2663  ((uint32_t (*)(uint32_t ui32Base, \
2664  uint32_t ui32Channel))ROM_USBTABLE[77])
2665 #define ROM_USBDMAChannelCountSet \
2666  ((void (*)(uint32_t ui32Base, \
2667  uint32_t ui32Count, \
2668  uint32_t ui32Channel))ROM_USBTABLE[78])
2669 #define ROM_USBDMAChannelIntStatus \
2670  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[79])
2671 #define ROM_USBDMAChannelStatus \
2672  ((uint32_t (*)(uint32_t ui32Base, \
2673  uint32_t ui32Channel))ROM_USBTABLE[80])
2674 #define ROM_USBDMAChannelStatusClear \
2675  ((void (*)(uint32_t ui32Base, \
2676  uint32_t ui32Channel, \
2677  uint32_t ui32Status))ROM_USBTABLE[81])
2678 #define ROM_USBHighSpeed \
2679  ((void (*)(uint32_t ui32Base, \
2680  bool bEnable))ROM_USBTABLE[82])
2681 #define ROM_USBHostEndpointPing \
2682  ((void (*)(uint32_t ui32Base, \
2683  uint32_t ui32Endpoint, \
2684  bool bEnable))ROM_USBTABLE[83])
2685 #define ROM_USBHostEndpointSpeed \
2686  ((void (*)(uint32_t ui32Base, \
2687  uint32_t ui32Endpoint, \
2688  uint32_t ui32Flags))ROM_USBTABLE[84])
2689 #define ROM_USBHostLPMConfig \
2690  ((void (*)(uint32_t ui32Base, \
2691  uint32_t ui32ResumeTime, \
2692  uint32_t ui32Config))ROM_USBTABLE[85])
2693 #define ROM_USBHostLPMResume \
2694  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[86])
2695 #define ROM_USBHostLPMSend \
2696  ((void (*)(uint32_t ui32Base, \
2697  uint32_t ui32Address, \
2698  uint32_t uiEndpoint))ROM_USBTABLE[87])
2699 #define ROM_USBLPMIntDisable \
2700  ((void (*)(uint32_t ui32Base, \
2701  uint32_t ui32Ints))ROM_USBTABLE[88])
2702 #define ROM_USBLPMIntEnable \
2703  ((void (*)(uint32_t ui32Base, \
2704  uint32_t ui32Ints))ROM_USBTABLE[89])
2705 #define ROM_USBLPMIntStatus \
2706  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[90])
2707 #define ROM_USBLPMLinkStateGet \
2708  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[91])
2709 #define ROM_USBEndpointPacketCountSet \
2710  ((void (*)(uint32_t ui32Base, \
2711  uint32_t ui32Endpoint, \
2712  uint32_t ui32Count))ROM_USBTABLE[92])
2713 #define ROM_USBULPIConfig \
2714  ((void (*)(uint32_t ui32Base, \
2715  uint32_t ui32Config))ROM_USBTABLE[93])
2716 #define ROM_USBULPIDisable \
2717  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[94])
2718 #define ROM_USBULPIEnable \
2719  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[95])
2720 #define ROM_USBULPIRegRead \
2721  ((uint8_t (*)(uint32_t ui32Base, \
2722  uint8_t ui8Reg))ROM_USBTABLE[96])
2723 #define ROM_USBULPIRegWrite \
2724  ((void (*)(uint32_t ui32Base, \
2725  uint8_t ui8Reg, \
2726  uint8_t ui8Data))ROM_USBTABLE[97])
2727 #define ROM_USBOTGSessionRequest \
2728  ((void (*)(uint32_t ui32Base, \
2729  bool bStart))ROM_USBTABLE[98])
2730 #define ROM_USBDMANumChannels \
2731  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[99])
2732 #define ROM_USBEndpointDMAConfigSet \
2733  ((void (*)(uint32_t ui32Base, \
2734  uint32_t ui32Endpoint, \
2735  uint32_t ui32Config))ROM_USBTABLE[100])
2736 #define ROM_USBLPMRemoteWakeEnabled \
2737  ((bool (*)(uint32_t ui32Base))ROM_USBTABLE[102])
2738 #define ROM_USBModeConfig \
2739  ((void (*)(uint32_t ui32Base, \
2740  uint32_t ui32Mode))ROM_USBTABLE[103])
2741 
2742 //*****************************************************************************
2743 //
2744 // Macros for calling ROM functions in the Watchdog API.
2745 //
2746 //*****************************************************************************
2747 #define ROM_WatchdogIntClear \
2748  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[0])
2749 #define ROM_WatchdogRunning \
2750  ((bool (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[1])
2751 #define ROM_WatchdogEnable \
2752  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[2])
2753 #define ROM_WatchdogResetEnable \
2754  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[3])
2755 #define ROM_WatchdogResetDisable \
2756  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[4])
2757 #define ROM_WatchdogLock \
2758  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[5])
2759 #define ROM_WatchdogUnlock \
2760  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[6])
2761 #define ROM_WatchdogLockState \
2762  ((bool (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[7])
2763 #define ROM_WatchdogReloadSet \
2764  ((void (*)(uint32_t ui32Base, \
2765  uint32_t ui32LoadVal))ROM_WATCHDOGTABLE[8])
2766 #define ROM_WatchdogReloadGet \
2767  ((uint32_t (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[9])
2768 #define ROM_WatchdogValueGet \
2769  ((uint32_t (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[10])
2770 #define ROM_WatchdogIntEnable \
2771  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[11])
2772 #define ROM_WatchdogIntStatus \
2773  ((uint32_t (*)(uint32_t ui32Base, \
2774  bool bMasked))ROM_WATCHDOGTABLE[12])
2775 #define ROM_WatchdogStallEnable \
2776  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[13])
2777 #define ROM_WatchdogStallDisable \
2778  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[14])
2779 #define ROM_WatchdogIntTypeSet \
2780  ((void (*)(uint32_t ui32Base, \
2781  uint32_t ui32Type))ROM_WATCHDOGTABLE[15])
2782 
2783 //*****************************************************************************
2784 //
2785 // Macros for calling ROM functions in the Software API.
2786 //
2787 //*****************************************************************************
2788 #define ROM_Crc16Array \
2789  ((uint16_t (*)(uint32_t ui32WordLen, \
2790  const uint32_t *pui32Data))ROM_SOFTWARETABLE[1])
2791 #define ROM_Crc16Array3 \
2792  ((void (*)(uint32_t ui32WordLen, \
2793  const uint32_t *pui32Data, \
2794  uint16_t *pui16Crc3))ROM_SOFTWARETABLE[2])
2795 #define ROM_Crc16 \
2796  ((uint16_t (*)(uint16_t ui16Crc, \
2797  const uint8_t *pui8Data, \
2798  uint32_t ui32Count))ROM_SOFTWARETABLE[3])
2799 #define ROM_Crc8CCITT \
2800  ((uint8_t (*)(uint8_t ui8Crc, \
2801  const uint8_t *pui8Data, \
2802  uint32_t ui32Count))ROM_SOFTWARETABLE[4])
2803 #define ROM_Crc32 \
2804  ((uint32_t (*)(uint32_t ui32Crc, \
2805  const uint8_t *pui8Data, \
2806  uint32_t ui32Count))ROM_SOFTWARETABLE[5])
2807 #define ROM_pvAESTable \
2808  ((void *)&(ROM_SOFTWARETABLE[7]))
2809 
2810 #endif // __DRIVERLIB_ROM_H__
Copyright 2018, Texas Instruments Incorporated