Tiva Driver Lib
rom.h
1 //*****************************************************************************
2 //
3 // rom.h - Macros to facilitate calling functions in the ROM.
4 //
5 // Copyright (c) 2007-2013 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 // This is part of revision 1.1 of the Tiva Peripheral Driver Library.
37 //
38 //*****************************************************************************
39 
40 #ifndef __DRIVERLIB_ROM_H__
41 #define __DRIVERLIB_ROM_H__
42 
43 //*****************************************************************************
44 //
45 // Pointers to the main API tables.
46 //
47 //*****************************************************************************
48 #define ROM_APITABLE ((uint32_t *)0x01000010)
49 #define ROM_VERSION (ROM_APITABLE[0])
50 #define ROM_UARTTABLE ((uint32_t *)(ROM_APITABLE[1]))
51 #define ROM_SSITABLE ((uint32_t *)(ROM_APITABLE[2]))
52 #define ROM_I2CTABLE ((uint32_t *)(ROM_APITABLE[3]))
53 #define ROM_GPIOTABLE ((uint32_t *)(ROM_APITABLE[4]))
54 #define ROM_ADCTABLE ((uint32_t *)(ROM_APITABLE[5]))
55 #define ROM_COMPARATORTABLE ((uint32_t *)(ROM_APITABLE[6]))
56 #define ROM_FLASHTABLE ((uint32_t *)(ROM_APITABLE[7]))
57 #define ROM_PWMTABLE ((uint32_t *)(ROM_APITABLE[8]))
58 #define ROM_QEITABLE ((uint32_t *)(ROM_APITABLE[9]))
59 #define ROM_SYSTICKTABLE ((uint32_t *)(ROM_APITABLE[10]))
60 #define ROM_TIMERTABLE ((uint32_t *)(ROM_APITABLE[11]))
61 #define ROM_WATCHDOGTABLE ((uint32_t *)(ROM_APITABLE[12]))
62 #define ROM_SYSCTLTABLE ((uint32_t *)(ROM_APITABLE[13]))
63 #define ROM_INTERRUPTTABLE ((uint32_t *)(ROM_APITABLE[14]))
64 #define ROM_USBTABLE ((uint32_t *)(ROM_APITABLE[16]))
65 #define ROM_UDMATABLE ((uint32_t *)(ROM_APITABLE[17]))
66 #define ROM_CANTABLE ((uint32_t *)(ROM_APITABLE[18]))
67 #define ROM_HIBERNATETABLE ((uint32_t *)(ROM_APITABLE[19]))
68 #define ROM_MPUTABLE ((uint32_t *)(ROM_APITABLE[20]))
69 #define ROM_SOFTWARETABLE ((uint32_t *)(ROM_APITABLE[21]))
70 #define ROM_EEPROMTABLE ((uint32_t *)(ROM_APITABLE[24]))
71 #define ROM_FANTABLE ((uint32_t *)(ROM_APITABLE[25]))
72 #define ROM_FPUTABLE ((uint32_t *)(ROM_APITABLE[26]))
73 #define ROM_LPCTABLE ((uint32_t *)(ROM_APITABLE[27]))
74 #define ROM_PECITABLE ((uint32_t *)(ROM_APITABLE[28]))
75 #define ROM_SMBUSTABLE ((uint32_t *)(ROM_APITABLE[29]))
76 #define ROM_SYSEXCTABLE ((uint32_t *)(ROM_APITABLE[30]))
77 
78 //*****************************************************************************
79 //
80 // Macros for calling ROM functions in the ADC API.
81 //
82 //*****************************************************************************
83 #if defined(TARGET_IS_BLIZZARD_RA1) || \
84  defined(TARGET_IS_BLIZZARD_RA3) || \
85  defined(TARGET_IS_BLIZZARD_RB1)
86 #define ROM_ADCSequenceDataGet \
87  ((int32_t (*)(uint32_t ui32Base, \
88  uint32_t ui32SequenceNum, \
89  uint32_t *pui32Buffer))ROM_ADCTABLE[0])
90 #endif
91 #if defined(TARGET_IS_BLIZZARD_RA1) || \
92  defined(TARGET_IS_BLIZZARD_RA3) || \
93  defined(TARGET_IS_BLIZZARD_RB1)
94 #define ROM_ADCIntDisable \
95  ((void (*)(uint32_t ui32Base, \
96  uint32_t ui32SequenceNum))ROM_ADCTABLE[1])
97 #endif
98 #if defined(TARGET_IS_BLIZZARD_RA1) || \
99  defined(TARGET_IS_BLIZZARD_RA3) || \
100  defined(TARGET_IS_BLIZZARD_RB1)
101 #define ROM_ADCIntEnable \
102  ((void (*)(uint32_t ui32Base, \
103  uint32_t ui32SequenceNum))ROM_ADCTABLE[2])
104 #endif
105 #if defined(TARGET_IS_BLIZZARD_RA1) || \
106  defined(TARGET_IS_BLIZZARD_RA3) || \
107  defined(TARGET_IS_BLIZZARD_RB1)
108 #define ROM_ADCIntStatus \
109  ((uint32_t (*)(uint32_t ui32Base, \
110  uint32_t ui32SequenceNum, \
111  bool bMasked))ROM_ADCTABLE[3])
112 #endif
113 #if defined(TARGET_IS_BLIZZARD_RA1) || \
114  defined(TARGET_IS_BLIZZARD_RA3) || \
115  defined(TARGET_IS_BLIZZARD_RB1)
116 #define ROM_ADCIntClear \
117  ((void (*)(uint32_t ui32Base, \
118  uint32_t ui32SequenceNum))ROM_ADCTABLE[4])
119 #endif
120 #if defined(TARGET_IS_BLIZZARD_RA1) || \
121  defined(TARGET_IS_BLIZZARD_RA3) || \
122  defined(TARGET_IS_BLIZZARD_RB1)
123 #define ROM_ADCSequenceEnable \
124  ((void (*)(uint32_t ui32Base, \
125  uint32_t ui32SequenceNum))ROM_ADCTABLE[5])
126 #endif
127 #if defined(TARGET_IS_BLIZZARD_RA1) || \
128  defined(TARGET_IS_BLIZZARD_RA3) || \
129  defined(TARGET_IS_BLIZZARD_RB1)
130 #define ROM_ADCSequenceDisable \
131  ((void (*)(uint32_t ui32Base, \
132  uint32_t ui32SequenceNum))ROM_ADCTABLE[6])
133 #endif
134 #if defined(TARGET_IS_BLIZZARD_RA1) || \
135  defined(TARGET_IS_BLIZZARD_RA3) || \
136  defined(TARGET_IS_BLIZZARD_RB1)
137 #define ROM_ADCSequenceConfigure \
138  ((void (*)(uint32_t ui32Base, \
139  uint32_t ui32SequenceNum, \
140  uint32_t ui32Trigger, \
141  uint32_t ui32Priority))ROM_ADCTABLE[7])
142 #endif
143 #if defined(TARGET_IS_BLIZZARD_RA1) || \
144  defined(TARGET_IS_BLIZZARD_RA3) || \
145  defined(TARGET_IS_BLIZZARD_RB1)
146 #define ROM_ADCSequenceStepConfigure \
147  ((void (*)(uint32_t ui32Base, \
148  uint32_t ui32SequenceNum, \
149  uint32_t ui32Step, \
150  uint32_t ui32Config))ROM_ADCTABLE[8])
151 #endif
152 #if defined(TARGET_IS_BLIZZARD_RA1) || \
153  defined(TARGET_IS_BLIZZARD_RA3) || \
154  defined(TARGET_IS_BLIZZARD_RB1)
155 #define ROM_ADCSequenceOverflow \
156  ((int32_t (*)(uint32_t ui32Base, \
157  uint32_t ui32SequenceNum))ROM_ADCTABLE[9])
158 #endif
159 #if defined(TARGET_IS_BLIZZARD_RA1) || \
160  defined(TARGET_IS_BLIZZARD_RA3) || \
161  defined(TARGET_IS_BLIZZARD_RB1)
162 #define ROM_ADCSequenceOverflowClear \
163  ((void (*)(uint32_t ui32Base, \
164  uint32_t ui32SequenceNum))ROM_ADCTABLE[10])
165 #endif
166 #if defined(TARGET_IS_BLIZZARD_RA1) || \
167  defined(TARGET_IS_BLIZZARD_RA3) || \
168  defined(TARGET_IS_BLIZZARD_RB1)
169 #define ROM_ADCSequenceUnderflow \
170  ((int32_t (*)(uint32_t ui32Base, \
171  uint32_t ui32SequenceNum))ROM_ADCTABLE[11])
172 #endif
173 #if defined(TARGET_IS_BLIZZARD_RA1) || \
174  defined(TARGET_IS_BLIZZARD_RA3) || \
175  defined(TARGET_IS_BLIZZARD_RB1)
176 #define ROM_ADCSequenceUnderflowClear \
177  ((void (*)(uint32_t ui32Base, \
178  uint32_t ui32SequenceNum))ROM_ADCTABLE[12])
179 #endif
180 #if defined(TARGET_IS_BLIZZARD_RA1) || \
181  defined(TARGET_IS_BLIZZARD_RA3) || \
182  defined(TARGET_IS_BLIZZARD_RB1)
183 #define ROM_ADCProcessorTrigger \
184  ((void (*)(uint32_t ui32Base, \
185  uint32_t ui32SequenceNum))ROM_ADCTABLE[13])
186 #endif
187 #if defined(TARGET_IS_BLIZZARD_RA1) || \
188  defined(TARGET_IS_BLIZZARD_RA3) || \
189  defined(TARGET_IS_BLIZZARD_RB1)
190 #define ROM_ADCHardwareOversampleConfigure \
191  ((void (*)(uint32_t ui32Base, \
192  uint32_t ui32Factor))ROM_ADCTABLE[14])
193 #endif
194 #if defined(TARGET_IS_BLIZZARD_RA1) || \
195  defined(TARGET_IS_BLIZZARD_RA3) || \
196  defined(TARGET_IS_BLIZZARD_RB1)
197 #define ROM_ADCComparatorConfigure \
198  ((void (*)(uint32_t ui32Base, \
199  uint32_t ui32Comp, \
200  uint32_t ui32Config))ROM_ADCTABLE[15])
201 #endif
202 #if defined(TARGET_IS_BLIZZARD_RA1) || \
203  defined(TARGET_IS_BLIZZARD_RA3) || \
204  defined(TARGET_IS_BLIZZARD_RB1)
205 #define ROM_ADCComparatorRegionSet \
206  ((void (*)(uint32_t ui32Base, \
207  uint32_t ui32Comp, \
208  uint32_t ui32LowRef, \
209  uint32_t ui32HighRef))ROM_ADCTABLE[16])
210 #endif
211 #if defined(TARGET_IS_BLIZZARD_RA1) || \
212  defined(TARGET_IS_BLIZZARD_RA3) || \
213  defined(TARGET_IS_BLIZZARD_RB1)
214 #define ROM_ADCComparatorReset \
215  ((void (*)(uint32_t ui32Base, \
216  uint32_t ui32Comp, \
217  bool bTrigger, \
218  bool bInterrupt))ROM_ADCTABLE[17])
219 #endif
220 #if defined(TARGET_IS_BLIZZARD_RA1) || \
221  defined(TARGET_IS_BLIZZARD_RA3) || \
222  defined(TARGET_IS_BLIZZARD_RB1)
223 #define ROM_ADCComparatorIntDisable \
224  ((void (*)(uint32_t ui32Base, \
225  uint32_t ui32SequenceNum))ROM_ADCTABLE[18])
226 #endif
227 #if defined(TARGET_IS_BLIZZARD_RA1) || \
228  defined(TARGET_IS_BLIZZARD_RA3) || \
229  defined(TARGET_IS_BLIZZARD_RB1)
230 #define ROM_ADCComparatorIntEnable \
231  ((void (*)(uint32_t ui32Base, \
232  uint32_t ui32SequenceNum))ROM_ADCTABLE[19])
233 #endif
234 #if defined(TARGET_IS_BLIZZARD_RA1) || \
235  defined(TARGET_IS_BLIZZARD_RA3) || \
236  defined(TARGET_IS_BLIZZARD_RB1)
237 #define ROM_ADCComparatorIntStatus \
238  ((uint32_t (*)(uint32_t ui32Base))ROM_ADCTABLE[20])
239 #endif
240 #if defined(TARGET_IS_BLIZZARD_RA1) || \
241  defined(TARGET_IS_BLIZZARD_RA3) || \
242  defined(TARGET_IS_BLIZZARD_RB1)
243 #define ROM_ADCComparatorIntClear \
244  ((void (*)(uint32_t ui32Base, \
245  uint32_t ui32Status))ROM_ADCTABLE[21])
246 #endif
247 #if defined(TARGET_IS_BLIZZARD_RA1) || \
248  defined(TARGET_IS_BLIZZARD_RA3) || \
249  defined(TARGET_IS_BLIZZARD_RB1)
250 #define ROM_ADCReferenceSet \
251  ((void (*)(uint32_t ui32Base, \
252  uint32_t ui32Ref))ROM_ADCTABLE[22])
253 #endif
254 #if defined(TARGET_IS_BLIZZARD_RA1) || \
255  defined(TARGET_IS_BLIZZARD_RA3) || \
256  defined(TARGET_IS_BLIZZARD_RB1)
257 #define ROM_ADCReferenceGet \
258  ((uint32_t (*)(uint32_t ui32Base))ROM_ADCTABLE[23])
259 #endif
260 #if defined(TARGET_IS_BLIZZARD_RA1) || \
261  defined(TARGET_IS_BLIZZARD_RA3) || \
262  defined(TARGET_IS_BLIZZARD_RB1)
263 #define ROM_ADCPhaseDelaySet \
264  ((void (*)(uint32_t ui32Base, \
265  uint32_t ui32Phase))ROM_ADCTABLE[24])
266 #endif
267 #if defined(TARGET_IS_BLIZZARD_RA1) || \
268  defined(TARGET_IS_BLIZZARD_RA3) || \
269  defined(TARGET_IS_BLIZZARD_RB1)
270 #define ROM_ADCPhaseDelayGet \
271  ((uint32_t (*)(uint32_t ui32Base))ROM_ADCTABLE[25])
272 #endif
273 
274 //*****************************************************************************
275 //
276 // Macros for calling ROM functions in the CAN API.
277 //
278 //*****************************************************************************
279 #if defined(TARGET_IS_BLIZZARD_RA1) || \
280  defined(TARGET_IS_BLIZZARD_RA3) || \
281  defined(TARGET_IS_BLIZZARD_RB1)
282 #define ROM_CANIntClear \
283  ((void (*)(uint32_t ui32Base, \
284  uint32_t ui32IntClr))ROM_CANTABLE[0])
285 #endif
286 #if defined(TARGET_IS_BLIZZARD_RA1) || \
287  defined(TARGET_IS_BLIZZARD_RA3) || \
288  defined(TARGET_IS_BLIZZARD_RB1)
289 #define ROM_CANInit \
290  ((void (*)(uint32_t ui32Base))ROM_CANTABLE[1])
291 #endif
292 #if defined(TARGET_IS_BLIZZARD_RA1) || \
293  defined(TARGET_IS_BLIZZARD_RA3) || \
294  defined(TARGET_IS_BLIZZARD_RB1)
295 #define ROM_CANEnable \
296  ((void (*)(uint32_t ui32Base))ROM_CANTABLE[2])
297 #endif
298 #if defined(TARGET_IS_BLIZZARD_RA1) || \
299  defined(TARGET_IS_BLIZZARD_RA3) || \
300  defined(TARGET_IS_BLIZZARD_RB1)
301 #define ROM_CANDisable \
302  ((void (*)(uint32_t ui32Base))ROM_CANTABLE[3])
303 #endif
304 #if defined(TARGET_IS_BLIZZARD_RA1) || \
305  defined(TARGET_IS_BLIZZARD_RA3) || \
306  defined(TARGET_IS_BLIZZARD_RB1)
307 #define ROM_CANBitTimingSet \
308  ((void (*)(uint32_t ui32Base, \
309  tCANBitClkParms *psClkParms))ROM_CANTABLE[4])
310 #endif
311 #if defined(TARGET_IS_BLIZZARD_RA1) || \
312  defined(TARGET_IS_BLIZZARD_RA3) || \
313  defined(TARGET_IS_BLIZZARD_RB1)
314 #define ROM_CANBitTimingGet \
315  ((void (*)(uint32_t ui32Base, \
316  tCANBitClkParms *psClkParms))ROM_CANTABLE[5])
317 #endif
318 #if defined(TARGET_IS_BLIZZARD_RA1) || \
319  defined(TARGET_IS_BLIZZARD_RA3) || \
320  defined(TARGET_IS_BLIZZARD_RB1)
321 #define ROM_CANMessageSet \
322  ((void (*)(uint32_t ui32Base, \
323  uint32_t ui32ObjID, \
324  tCANMsgObject *psMsgObject, \
325  tMsgObjType eMsgType))ROM_CANTABLE[6])
326 #endif
327 #if defined(TARGET_IS_BLIZZARD_RA1) || \
328  defined(TARGET_IS_BLIZZARD_RA3) || \
329  defined(TARGET_IS_BLIZZARD_RB1)
330 #define ROM_CANMessageGet \
331  ((void (*)(uint32_t ui32Base, \
332  uint32_t ui32ObjID, \
333  tCANMsgObject *psMsgObject, \
334  bool bClrPendingInt))ROM_CANTABLE[7])
335 #endif
336 #if defined(TARGET_IS_BLIZZARD_RA1) || \
337  defined(TARGET_IS_BLIZZARD_RA3) || \
338  defined(TARGET_IS_BLIZZARD_RB1)
339 #define ROM_CANStatusGet \
340  ((uint32_t (*)(uint32_t ui32Base, \
341  tCANStsReg eStatusReg))ROM_CANTABLE[8])
342 #endif
343 #if defined(TARGET_IS_BLIZZARD_RA1) || \
344  defined(TARGET_IS_BLIZZARD_RA3) || \
345  defined(TARGET_IS_BLIZZARD_RB1)
346 #define ROM_CANMessageClear \
347  ((void (*)(uint32_t ui32Base, \
348  uint32_t ui32ObjID))ROM_CANTABLE[9])
349 #endif
350 #if defined(TARGET_IS_BLIZZARD_RA1) || \
351  defined(TARGET_IS_BLIZZARD_RA3) || \
352  defined(TARGET_IS_BLIZZARD_RB1)
353 #define ROM_CANIntEnable \
354  ((void (*)(uint32_t ui32Base, \
355  uint32_t ui32IntFlags))ROM_CANTABLE[10])
356 #endif
357 #if defined(TARGET_IS_BLIZZARD_RA1) || \
358  defined(TARGET_IS_BLIZZARD_RA3) || \
359  defined(TARGET_IS_BLIZZARD_RB1)
360 #define ROM_CANIntDisable \
361  ((void (*)(uint32_t ui32Base, \
362  uint32_t ui32IntFlags))ROM_CANTABLE[11])
363 #endif
364 #if defined(TARGET_IS_BLIZZARD_RA1) || \
365  defined(TARGET_IS_BLIZZARD_RA3) || \
366  defined(TARGET_IS_BLIZZARD_RB1)
367 #define ROM_CANIntStatus \
368  ((uint32_t (*)(uint32_t ui32Base, \
369  tCANIntStsReg eIntStsReg))ROM_CANTABLE[12])
370 #endif
371 #if defined(TARGET_IS_BLIZZARD_RA1) || \
372  defined(TARGET_IS_BLIZZARD_RA3) || \
373  defined(TARGET_IS_BLIZZARD_RB1)
374 #define ROM_CANRetryGet \
375  ((bool (*)(uint32_t ui32Base))ROM_CANTABLE[13])
376 #endif
377 #if defined(TARGET_IS_BLIZZARD_RA1) || \
378  defined(TARGET_IS_BLIZZARD_RA3) || \
379  defined(TARGET_IS_BLIZZARD_RB1)
380 #define ROM_CANRetrySet \
381  ((void (*)(uint32_t ui32Base, \
382  bool bAutoRetry))ROM_CANTABLE[14])
383 #endif
384 #if defined(TARGET_IS_BLIZZARD_RA1) || \
385  defined(TARGET_IS_BLIZZARD_RA3) || \
386  defined(TARGET_IS_BLIZZARD_RB1)
387 #define ROM_CANErrCntrGet \
388  ((bool (*)(uint32_t ui32Base, \
389  uint32_t *pui32RxCount, \
390  uint32_t *pui32TxCount))ROM_CANTABLE[15])
391 #endif
392 #if defined(TARGET_IS_BLIZZARD_RA1) || \
393  defined(TARGET_IS_BLIZZARD_RA3) || \
394  defined(TARGET_IS_BLIZZARD_RB1)
395 #define ROM_CANBitRateSet \
396  ((uint32_t (*)(uint32_t ui32Base, \
397  uint32_t ui32SourceClock, \
398  uint32_t ui32BitRate))ROM_CANTABLE[16])
399 #endif
400 
401 //*****************************************************************************
402 //
403 // Macros for calling ROM functions in the Comparator API.
404 //
405 //*****************************************************************************
406 #if defined(TARGET_IS_BLIZZARD_RA1) || \
407  defined(TARGET_IS_BLIZZARD_RA3) || \
408  defined(TARGET_IS_BLIZZARD_RB1)
409 #define ROM_ComparatorIntClear \
410  ((void (*)(uint32_t ui32Base, \
411  uint32_t ui32Comp))ROM_COMPARATORTABLE[0])
412 #endif
413 #if defined(TARGET_IS_BLIZZARD_RA1) || \
414  defined(TARGET_IS_BLIZZARD_RA3) || \
415  defined(TARGET_IS_BLIZZARD_RB1)
416 #define ROM_ComparatorConfigure \
417  ((void (*)(uint32_t ui32Base, \
418  uint32_t ui32Comp, \
419  uint32_t ui32Config))ROM_COMPARATORTABLE[1])
420 #endif
421 #if defined(TARGET_IS_BLIZZARD_RA1) || \
422  defined(TARGET_IS_BLIZZARD_RA3) || \
423  defined(TARGET_IS_BLIZZARD_RB1)
424 #define ROM_ComparatorRefSet \
425  ((void (*)(uint32_t ui32Base, \
426  uint32_t ui32Ref))ROM_COMPARATORTABLE[2])
427 #endif
428 #if defined(TARGET_IS_BLIZZARD_RA1) || \
429  defined(TARGET_IS_BLIZZARD_RA3) || \
430  defined(TARGET_IS_BLIZZARD_RB1)
431 #define ROM_ComparatorValueGet \
432  ((bool (*)(uint32_t ui32Base, \
433  uint32_t ui32Comp))ROM_COMPARATORTABLE[3])
434 #endif
435 #if defined(TARGET_IS_BLIZZARD_RA1) || \
436  defined(TARGET_IS_BLIZZARD_RA3) || \
437  defined(TARGET_IS_BLIZZARD_RB1)
438 #define ROM_ComparatorIntEnable \
439  ((void (*)(uint32_t ui32Base, \
440  uint32_t ui32Comp))ROM_COMPARATORTABLE[4])
441 #endif
442 #if defined(TARGET_IS_BLIZZARD_RA1) || \
443  defined(TARGET_IS_BLIZZARD_RA3) || \
444  defined(TARGET_IS_BLIZZARD_RB1)
445 #define ROM_ComparatorIntDisable \
446  ((void (*)(uint32_t ui32Base, \
447  uint32_t ui32Comp))ROM_COMPARATORTABLE[5])
448 #endif
449 #if defined(TARGET_IS_BLIZZARD_RA1) || \
450  defined(TARGET_IS_BLIZZARD_RA3) || \
451  defined(TARGET_IS_BLIZZARD_RB1)
452 #define ROM_ComparatorIntStatus \
453  ((bool (*)(uint32_t ui32Base, \
454  uint32_t ui32Comp, \
455  bool bMasked))ROM_COMPARATORTABLE[6])
456 #endif
457 
458 //*****************************************************************************
459 //
460 // Macros for calling ROM functions in the EEPROM API.
461 //
462 //*****************************************************************************
463 #if defined(TARGET_IS_BLIZZARD_RA3) || \
464  defined(TARGET_IS_BLIZZARD_RB1)
465 #define ROM_EEPROMRead \
466  ((void (*)(uint32_t *pui32Data, \
467  uint32_t ui32Address, \
468  uint32_t ui32Count))ROM_EEPROMTABLE[0])
469 #endif
470 #if defined(TARGET_IS_BLIZZARD_RA3) || \
471  defined(TARGET_IS_BLIZZARD_RB1)
472 #define ROM_EEPROMBlockCountGet \
473  ((uint32_t (*)(void))ROM_EEPROMTABLE[1])
474 #endif
475 #if defined(TARGET_IS_BLIZZARD_RA3) || \
476  defined(TARGET_IS_BLIZZARD_RB1)
477 #define ROM_EEPROMBlockHide \
478  ((void (*)(uint32_t ui32Block))ROM_EEPROMTABLE[2])
479 #endif
480 #if defined(TARGET_IS_BLIZZARD_RA3) || \
481  defined(TARGET_IS_BLIZZARD_RB1)
482 #define ROM_EEPROMBlockLock \
483  ((uint32_t (*)(uint32_t ui32Block))ROM_EEPROMTABLE[3])
484 #endif
485 #if defined(TARGET_IS_BLIZZARD_RA3) || \
486  defined(TARGET_IS_BLIZZARD_RB1)
487 #define ROM_EEPROMBlockPasswordSet \
488  ((uint32_t (*)(uint32_t ui32Block, \
489  uint32_t *pui32Password, \
490  uint32_t ui32Count))ROM_EEPROMTABLE[4])
491 #endif
492 #if defined(TARGET_IS_BLIZZARD_RA3) || \
493  defined(TARGET_IS_BLIZZARD_RB1)
494 #define ROM_EEPROMBlockProtectGet \
495  ((uint32_t (*)(uint32_t ui32Block))ROM_EEPROMTABLE[5])
496 #endif
497 #if defined(TARGET_IS_BLIZZARD_RA3) || \
498  defined(TARGET_IS_BLIZZARD_RB1)
499 #define ROM_EEPROMBlockProtectSet \
500  ((uint32_t (*)(uint32_t ui32Block, \
501  uint32_t ui32Protect))ROM_EEPROMTABLE[6])
502 #endif
503 #if defined(TARGET_IS_BLIZZARD_RA3) || \
504  defined(TARGET_IS_BLIZZARD_RB1)
505 #define ROM_EEPROMBlockUnlock \
506  ((uint32_t (*)(uint32_t ui32Block, \
507  uint32_t *pui32Password, \
508  uint32_t ui32Count))ROM_EEPROMTABLE[7])
509 #endif
510 #if defined(TARGET_IS_BLIZZARD_RA3) || \
511  defined(TARGET_IS_BLIZZARD_RB1)
512 #define ROM_EEPROMIntClear \
513  ((void (*)(uint32_t ui32IntFlags))ROM_EEPROMTABLE[8])
514 #endif
515 #if defined(TARGET_IS_BLIZZARD_RA3) || \
516  defined(TARGET_IS_BLIZZARD_RB1)
517 #define ROM_EEPROMIntDisable \
518  ((void (*)(uint32_t ui32IntFlags))ROM_EEPROMTABLE[9])
519 #endif
520 #if defined(TARGET_IS_BLIZZARD_RA3) || \
521  defined(TARGET_IS_BLIZZARD_RB1)
522 #define ROM_EEPROMIntEnable \
523  ((void (*)(uint32_t ui32IntFlags))ROM_EEPROMTABLE[10])
524 #endif
525 #if defined(TARGET_IS_BLIZZARD_RA3) || \
526  defined(TARGET_IS_BLIZZARD_RB1)
527 #define ROM_EEPROMIntStatus \
528  ((uint32_t (*)(bool bMasked))ROM_EEPROMTABLE[11])
529 #endif
530 #if defined(TARGET_IS_BLIZZARD_RA3) || \
531  defined(TARGET_IS_BLIZZARD_RB1)
532 #define ROM_EEPROMMassErase \
533  ((uint32_t (*)(void))ROM_EEPROMTABLE[12])
534 #endif
535 #if defined(TARGET_IS_BLIZZARD_RA3) || \
536  defined(TARGET_IS_BLIZZARD_RB1)
537 #define ROM_EEPROMProgram \
538  ((uint32_t (*)(uint32_t *pui32Data, \
539  uint32_t ui32Address, \
540  uint32_t ui32Count))ROM_EEPROMTABLE[13])
541 #endif
542 #if defined(TARGET_IS_BLIZZARD_RA3) || \
543  defined(TARGET_IS_BLIZZARD_RB1)
544 #define ROM_EEPROMProgramNonBlocking \
545  ((uint32_t (*)(uint32_t ui32Data, \
546  uint32_t ui32Address))ROM_EEPROMTABLE[14])
547 #endif
548 #if defined(TARGET_IS_BLIZZARD_RA3) || \
549  defined(TARGET_IS_BLIZZARD_RB1)
550 #define ROM_EEPROMSizeGet \
551  ((uint32_t (*)(void))ROM_EEPROMTABLE[15])
552 #endif
553 #if defined(TARGET_IS_BLIZZARD_RA3) || \
554  defined(TARGET_IS_BLIZZARD_RB1)
555 #define ROM_EEPROMStatusGet \
556  ((uint32_t (*)(void))ROM_EEPROMTABLE[16])
557 #endif
558 #if defined(TARGET_IS_BLIZZARD_RA3) || \
559  defined(TARGET_IS_BLIZZARD_RB1)
560 #define ROM_EEPROMInit \
561  ((uint32_t (*)(void))ROM_EEPROMTABLE[17])
562 #endif
563 
564 //*****************************************************************************
565 //
566 // Macros for calling ROM functions in the Fan API.
567 //
568 //*****************************************************************************
569 #if defined(TARGET_IS_BLIZZARD_RA1) || \
570  defined(TARGET_IS_BLIZZARD_RA3) || \
571  defined(TARGET_IS_BLIZZARD_RB1)
572 #define ROM_FanIntClear \
573  ((void (*)(uint32_t ui32Base, \
574  uint32_t ui32Flags))ROM_FANTABLE[0])
575 #endif
576 #if defined(TARGET_IS_BLIZZARD_RA1) || \
577  defined(TARGET_IS_BLIZZARD_RA3) || \
578  defined(TARGET_IS_BLIZZARD_RB1)
579 #define ROM_FanChannelConfigAuto \
580  ((void (*)(uint32_t ui32Base, \
581  uint32_t ui32Channel, \
582  uint32_t ui32Config))ROM_FANTABLE[1])
583 #endif
584 #if defined(TARGET_IS_BLIZZARD_RA1) || \
585  defined(TARGET_IS_BLIZZARD_RA3) || \
586  defined(TARGET_IS_BLIZZARD_RB1)
587 #define ROM_FanChannelConfigManual \
588  ((void (*)(uint32_t ui32Base, \
589  uint32_t ui32Channel, \
590  uint32_t ui32Config))ROM_FANTABLE[2])
591 #endif
592 #if defined(TARGET_IS_BLIZZARD_RA1) || \
593  defined(TARGET_IS_BLIZZARD_RA3) || \
594  defined(TARGET_IS_BLIZZARD_RB1)
595 #define ROM_FanChannelDisable \
596  ((void (*)(uint32_t ui32Base, \
597  uint32_t ui32Channel))ROM_FANTABLE[3])
598 #endif
599 #if defined(TARGET_IS_BLIZZARD_RA1) || \
600  defined(TARGET_IS_BLIZZARD_RA3) || \
601  defined(TARGET_IS_BLIZZARD_RB1)
602 #define ROM_FanChannelDutyGet \
603  ((uint32_t (*)(uint32_t ui32Base, \
604  uint32_t ui32Channel))ROM_FANTABLE[4])
605 #endif
606 #if defined(TARGET_IS_BLIZZARD_RA1) || \
607  defined(TARGET_IS_BLIZZARD_RA3) || \
608  defined(TARGET_IS_BLIZZARD_RB1)
609 #define ROM_FanChannelDutySet \
610  ((void (*)(uint32_t ui32Base, \
611  uint32_t ui32Channel, \
612  uint32_t ui32Duty))ROM_FANTABLE[5])
613 #endif
614 #if defined(TARGET_IS_BLIZZARD_RA1) || \
615  defined(TARGET_IS_BLIZZARD_RA3) || \
616  defined(TARGET_IS_BLIZZARD_RB1)
617 #define ROM_FanChannelEnable \
618  ((void (*)(uint32_t ui32Base, \
619  uint32_t ui32Channel))ROM_FANTABLE[6])
620 #endif
621 #if defined(TARGET_IS_BLIZZARD_RA1) || \
622  defined(TARGET_IS_BLIZZARD_RA3) || \
623  defined(TARGET_IS_BLIZZARD_RB1)
624 #define ROM_FanChannelRPMGet \
625  ((uint32_t (*)(uint32_t ui32Base, \
626  uint32_t ui32Channel))ROM_FANTABLE[7])
627 #endif
628 #if defined(TARGET_IS_BLIZZARD_RA1) || \
629  defined(TARGET_IS_BLIZZARD_RA3) || \
630  defined(TARGET_IS_BLIZZARD_RB1)
631 #define ROM_FanChannelRPMSet \
632  ((void (*)(uint32_t ui32Base, \
633  uint32_t ui32Channel, \
634  uint32_t ui32RPM))ROM_FANTABLE[8])
635 #endif
636 #if defined(TARGET_IS_BLIZZARD_RA1) || \
637  defined(TARGET_IS_BLIZZARD_RA3) || \
638  defined(TARGET_IS_BLIZZARD_RB1)
639 #define ROM_FanChannelStatus \
640  ((uint32_t (*)(uint32_t ui32Base, \
641  uint32_t ui32Channel))ROM_FANTABLE[9])
642 #endif
643 #if defined(TARGET_IS_BLIZZARD_RA1) || \
644  defined(TARGET_IS_BLIZZARD_RA3) || \
645  defined(TARGET_IS_BLIZZARD_RB1)
646 #define ROM_FanChannelsGet \
647  ((uint32_t (*)(uint32_t ui32Base))ROM_FANTABLE[10])
648 #endif
649 #if defined(TARGET_IS_BLIZZARD_RA1) || \
650  defined(TARGET_IS_BLIZZARD_RA3) || \
651  defined(TARGET_IS_BLIZZARD_RB1)
652 #define ROM_FanIntDisable \
653  ((void (*)(uint32_t ui32Base, \
654  uint32_t ui32Flags))ROM_FANTABLE[11])
655 #endif
656 #if defined(TARGET_IS_BLIZZARD_RA1) || \
657  defined(TARGET_IS_BLIZZARD_RA3) || \
658  defined(TARGET_IS_BLIZZARD_RB1)
659 #define ROM_FanIntEnable \
660  ((void (*)(uint32_t ui32Base, \
661  uint32_t ui32Flags))ROM_FANTABLE[12])
662 #endif
663 #if defined(TARGET_IS_BLIZZARD_RA1) || \
664  defined(TARGET_IS_BLIZZARD_RA3) || \
665  defined(TARGET_IS_BLIZZARD_RB1)
666 #define ROM_FanIntStatus \
667  ((uint32_t (*)(uint32_t ui32Base, \
668  bool bMasked))ROM_FANTABLE[13])
669 #endif
670 
671 //*****************************************************************************
672 //
673 // Macros for calling ROM functions in the Flash API.
674 //
675 //*****************************************************************************
676 #if defined(TARGET_IS_BLIZZARD_RA1) || \
677  defined(TARGET_IS_BLIZZARD_RA3) || \
678  defined(TARGET_IS_BLIZZARD_RB1)
679 #define ROM_FlashProgram \
680  ((int32_t (*)(uint32_t *pui32Data, \
681  uint32_t ui32Address, \
682  uint32_t ui32Count))ROM_FLASHTABLE[0])
683 #endif
684 #if defined(TARGET_IS_BLIZZARD_RA1) || \
685  defined(TARGET_IS_BLIZZARD_RA3) || \
686  defined(TARGET_IS_BLIZZARD_RB1)
687 #define ROM_FlashErase \
688  ((int32_t (*)(uint32_t ui32Address))ROM_FLASHTABLE[3])
689 #endif
690 #if defined(TARGET_IS_BLIZZARD_RA1) || \
691  defined(TARGET_IS_BLIZZARD_RA3) || \
692  defined(TARGET_IS_BLIZZARD_RB1)
693 #define ROM_FlashProtectGet \
694  ((tFlashProtection (*)(uint32_t ui32Address))ROM_FLASHTABLE[4])
695 #endif
696 #if defined(TARGET_IS_BLIZZARD_RA1) || \
697  defined(TARGET_IS_BLIZZARD_RA3) || \
698  defined(TARGET_IS_BLIZZARD_RB1)
699 #define ROM_FlashProtectSet \
700  ((int32_t (*)(uint32_t ui32Address, \
701  tFlashProtection eProtect))ROM_FLASHTABLE[5])
702 #endif
703 #if defined(TARGET_IS_BLIZZARD_RA1) || \
704  defined(TARGET_IS_BLIZZARD_RA3) || \
705  defined(TARGET_IS_BLIZZARD_RB1)
706 #define ROM_FlashProtectSave \
707  ((int32_t (*)(void))ROM_FLASHTABLE[6])
708 #endif
709 #if defined(TARGET_IS_BLIZZARD_RA1) || \
710  defined(TARGET_IS_BLIZZARD_RA3) || \
711  defined(TARGET_IS_BLIZZARD_RB1)
712 #define ROM_FlashUserGet \
713  ((int32_t (*)(uint32_t *pui32User0, \
714  uint32_t *pui32User1))ROM_FLASHTABLE[7])
715 #endif
716 #if defined(TARGET_IS_BLIZZARD_RA1) || \
717  defined(TARGET_IS_BLIZZARD_RA3) || \
718  defined(TARGET_IS_BLIZZARD_RB1)
719 #define ROM_FlashUserSet \
720  ((int32_t (*)(uint32_t ui32User0, \
721  uint32_t ui32User1))ROM_FLASHTABLE[8])
722 #endif
723 #if defined(TARGET_IS_BLIZZARD_RA1) || \
724  defined(TARGET_IS_BLIZZARD_RA3) || \
725  defined(TARGET_IS_BLIZZARD_RB1)
726 #define ROM_FlashUserSave \
727  ((int32_t (*)(void))ROM_FLASHTABLE[9])
728 #endif
729 #if defined(TARGET_IS_BLIZZARD_RA1) || \
730  defined(TARGET_IS_BLIZZARD_RA3) || \
731  defined(TARGET_IS_BLIZZARD_RB1)
732 #define ROM_FlashIntEnable \
733  ((void (*)(uint32_t ui32IntFlags))ROM_FLASHTABLE[10])
734 #endif
735 #if defined(TARGET_IS_BLIZZARD_RA1) || \
736  defined(TARGET_IS_BLIZZARD_RA3) || \
737  defined(TARGET_IS_BLIZZARD_RB1)
738 #define ROM_FlashIntDisable \
739  ((void (*)(uint32_t ui32IntFlags))ROM_FLASHTABLE[11])
740 #endif
741 #if defined(TARGET_IS_BLIZZARD_RA1) || \
742  defined(TARGET_IS_BLIZZARD_RA3) || \
743  defined(TARGET_IS_BLIZZARD_RB1)
744 #define ROM_FlashIntStatus \
745  ((uint32_t (*)(bool bMasked))ROM_FLASHTABLE[12])
746 #endif
747 #if defined(TARGET_IS_BLIZZARD_RA1) || \
748  defined(TARGET_IS_BLIZZARD_RA3) || \
749  defined(TARGET_IS_BLIZZARD_RB1)
750 #define ROM_FlashIntClear \
751  ((void (*)(uint32_t ui32IntFlags))ROM_FLASHTABLE[13])
752 #endif
753 
754 //*****************************************************************************
755 //
756 // Macros for calling ROM functions in the FPU API.
757 //
758 //*****************************************************************************
759 #if defined(TARGET_IS_BLIZZARD_RA1) || \
760  defined(TARGET_IS_BLIZZARD_RA3) || \
761  defined(TARGET_IS_BLIZZARD_RB1)
762 #define ROM_FPUEnable \
763  ((void (*)(void))ROM_FPUTABLE[0])
764 #endif
765 #if defined(TARGET_IS_BLIZZARD_RA1) || \
766  defined(TARGET_IS_BLIZZARD_RA3) || \
767  defined(TARGET_IS_BLIZZARD_RB1)
768 #define ROM_FPUDisable \
769  ((void (*)(void))ROM_FPUTABLE[1])
770 #endif
771 #if defined(TARGET_IS_BLIZZARD_RA1) || \
772  defined(TARGET_IS_BLIZZARD_RA3) || \
773  defined(TARGET_IS_BLIZZARD_RB1)
774 #define ROM_FPUFlushToZeroModeSet \
775  ((void (*)(uint32_t ui32Mode))ROM_FPUTABLE[2])
776 #endif
777 #if defined(TARGET_IS_BLIZZARD_RA1) || \
778  defined(TARGET_IS_BLIZZARD_RA3) || \
779  defined(TARGET_IS_BLIZZARD_RB1)
780 #define ROM_FPUHalfPrecisionModeSet \
781  ((void (*)(uint32_t ui32Mode))ROM_FPUTABLE[3])
782 #endif
783 #if defined(TARGET_IS_BLIZZARD_RA1) || \
784  defined(TARGET_IS_BLIZZARD_RA3) || \
785  defined(TARGET_IS_BLIZZARD_RB1)
786 #define ROM_FPULazyStackingEnable \
787  ((void (*)(void))ROM_FPUTABLE[4])
788 #endif
789 #if defined(TARGET_IS_BLIZZARD_RA1) || \
790  defined(TARGET_IS_BLIZZARD_RA3) || \
791  defined(TARGET_IS_BLIZZARD_RB1)
792 #define ROM_FPUNaNModeSet \
793  ((void (*)(uint32_t ui32Mode))ROM_FPUTABLE[5])
794 #endif
795 #if defined(TARGET_IS_BLIZZARD_RA1) || \
796  defined(TARGET_IS_BLIZZARD_RA3) || \
797  defined(TARGET_IS_BLIZZARD_RB1)
798 #define ROM_FPURoundingModeSet \
799  ((void (*)(uint32_t ui32Mode))ROM_FPUTABLE[6])
800 #endif
801 #if defined(TARGET_IS_BLIZZARD_RA1) || \
802  defined(TARGET_IS_BLIZZARD_RA3) || \
803  defined(TARGET_IS_BLIZZARD_RB1)
804 #define ROM_FPUStackingDisable \
805  ((void (*)(void))ROM_FPUTABLE[7])
806 #endif
807 #if defined(TARGET_IS_BLIZZARD_RA1) || \
808  defined(TARGET_IS_BLIZZARD_RA3) || \
809  defined(TARGET_IS_BLIZZARD_RB1)
810 #define ROM_FPUStackingEnable \
811  ((void (*)(void))ROM_FPUTABLE[8])
812 #endif
813 
814 //*****************************************************************************
815 //
816 // Macros for calling ROM functions in the GPIO API.
817 //
818 //*****************************************************************************
819 #if defined(TARGET_IS_BLIZZARD_RA1) || \
820  defined(TARGET_IS_BLIZZARD_RA3) || \
821  defined(TARGET_IS_BLIZZARD_RB1)
822 #define ROM_GPIOPinWrite \
823  ((void (*)(uint32_t ui32Port, \
824  uint8_t ui8Pins, \
825  uint8_t ui8Val))ROM_GPIOTABLE[0])
826 #endif
827 #if defined(TARGET_IS_BLIZZARD_RA1) || \
828  defined(TARGET_IS_BLIZZARD_RA3) || \
829  defined(TARGET_IS_BLIZZARD_RB1)
830 #define ROM_GPIODirModeSet \
831  ((void (*)(uint32_t ui32Port, \
832  uint8_t ui8Pins, \
833  uint32_t ui32PinIO))ROM_GPIOTABLE[1])
834 #endif
835 #if defined(TARGET_IS_BLIZZARD_RA1) || \
836  defined(TARGET_IS_BLIZZARD_RA3) || \
837  defined(TARGET_IS_BLIZZARD_RB1)
838 #define ROM_GPIODirModeGet \
839  ((uint32_t (*)(uint32_t ui32Port, \
840  uint8_t ui8Pin))ROM_GPIOTABLE[2])
841 #endif
842 #if defined(TARGET_IS_BLIZZARD_RA1) || \
843  defined(TARGET_IS_BLIZZARD_RA3) || \
844  defined(TARGET_IS_BLIZZARD_RB1)
845 #define ROM_GPIOIntTypeSet \
846  ((void (*)(uint32_t ui32Port, \
847  uint8_t ui8Pins, \
848  uint32_t ui32IntType))ROM_GPIOTABLE[3])
849 #endif
850 #if defined(TARGET_IS_BLIZZARD_RA1) || \
851  defined(TARGET_IS_BLIZZARD_RA3) || \
852  defined(TARGET_IS_BLIZZARD_RB1)
853 #define ROM_GPIOIntTypeGet \
854  ((uint32_t (*)(uint32_t ui32Port, \
855  uint8_t ui8Pin))ROM_GPIOTABLE[4])
856 #endif
857 #if defined(TARGET_IS_BLIZZARD_RA1) || \
858  defined(TARGET_IS_BLIZZARD_RA3) || \
859  defined(TARGET_IS_BLIZZARD_RB1)
860 #define ROM_GPIOPadConfigSet \
861  ((void (*)(uint32_t ui32Port, \
862  uint8_t ui8Pins, \
863  uint32_t ui32Strength, \
864  uint32_t ui32PadType))ROM_GPIOTABLE[5])
865 #endif
866 #if defined(TARGET_IS_BLIZZARD_RA1) || \
867  defined(TARGET_IS_BLIZZARD_RA3) || \
868  defined(TARGET_IS_BLIZZARD_RB1)
869 #define ROM_GPIOPadConfigGet \
870  ((void (*)(uint32_t ui32Port, \
871  uint8_t ui8Pin, \
872  uint32_t *pui32Strength, \
873  uint32_t *pui32PadType))ROM_GPIOTABLE[6])
874 #endif
875 #if defined(TARGET_IS_BLIZZARD_RA1) || \
876  defined(TARGET_IS_BLIZZARD_RA3) || \
877  defined(TARGET_IS_BLIZZARD_RB1)
878 #define ROM_GPIOPinRead \
879  ((int32_t (*)(uint32_t ui32Port, \
880  uint8_t ui8Pins))ROM_GPIOTABLE[11])
881 #endif
882 #if defined(TARGET_IS_BLIZZARD_RA1) || \
883  defined(TARGET_IS_BLIZZARD_RA3) || \
884  defined(TARGET_IS_BLIZZARD_RB1)
885 #define ROM_GPIOPinTypeCAN \
886  ((void (*)(uint32_t ui32Port, \
887  uint8_t ui8Pins))ROM_GPIOTABLE[12])
888 #endif
889 #if defined(TARGET_IS_BLIZZARD_RA1) || \
890  defined(TARGET_IS_BLIZZARD_RA3) || \
891  defined(TARGET_IS_BLIZZARD_RB1)
892 #define ROM_GPIOPinTypeComparator \
893  ((void (*)(uint32_t ui32Port, \
894  uint8_t ui8Pins))ROM_GPIOTABLE[13])
895 #endif
896 #if defined(TARGET_IS_BLIZZARD_RA1) || \
897  defined(TARGET_IS_BLIZZARD_RA3) || \
898  defined(TARGET_IS_BLIZZARD_RB1)
899 #define ROM_GPIOPinTypeGPIOInput \
900  ((void (*)(uint32_t ui32Port, \
901  uint8_t ui8Pins))ROM_GPIOTABLE[14])
902 #endif
903 #if defined(TARGET_IS_BLIZZARD_RA1) || \
904  defined(TARGET_IS_BLIZZARD_RA3) || \
905  defined(TARGET_IS_BLIZZARD_RB1)
906 #define ROM_GPIOPinTypeGPIOOutput \
907  ((void (*)(uint32_t ui32Port, \
908  uint8_t ui8Pins))ROM_GPIOTABLE[15])
909 #endif
910 #if defined(TARGET_IS_BLIZZARD_RA1) || \
911  defined(TARGET_IS_BLIZZARD_RA3) || \
912  defined(TARGET_IS_BLIZZARD_RB1)
913 #define ROM_GPIOPinTypeI2C \
914  ((void (*)(uint32_t ui32Port, \
915  uint8_t ui8Pins))ROM_GPIOTABLE[16])
916 #endif
917 #if defined(TARGET_IS_BLIZZARD_RA1) || \
918  defined(TARGET_IS_BLIZZARD_RA3) || \
919  defined(TARGET_IS_BLIZZARD_RB1)
920 #define ROM_GPIOPinTypePWM \
921  ((void (*)(uint32_t ui32Port, \
922  uint8_t ui8Pins))ROM_GPIOTABLE[17])
923 #endif
924 #if defined(TARGET_IS_BLIZZARD_RA1) || \
925  defined(TARGET_IS_BLIZZARD_RA3) || \
926  defined(TARGET_IS_BLIZZARD_RB1)
927 #define ROM_GPIOPinTypeQEI \
928  ((void (*)(uint32_t ui32Port, \
929  uint8_t ui8Pins))ROM_GPIOTABLE[18])
930 #endif
931 #if defined(TARGET_IS_BLIZZARD_RA1) || \
932  defined(TARGET_IS_BLIZZARD_RA3) || \
933  defined(TARGET_IS_BLIZZARD_RB1)
934 #define ROM_GPIOPinTypeSSI \
935  ((void (*)(uint32_t ui32Port, \
936  uint8_t ui8Pins))ROM_GPIOTABLE[19])
937 #endif
938 #if defined(TARGET_IS_BLIZZARD_RA1) || \
939  defined(TARGET_IS_BLIZZARD_RA3) || \
940  defined(TARGET_IS_BLIZZARD_RB1)
941 #define ROM_GPIOPinTypeTimer \
942  ((void (*)(uint32_t ui32Port, \
943  uint8_t ui8Pins))ROM_GPIOTABLE[20])
944 #endif
945 #if defined(TARGET_IS_BLIZZARD_RA1) || \
946  defined(TARGET_IS_BLIZZARD_RA3) || \
947  defined(TARGET_IS_BLIZZARD_RB1)
948 #define ROM_GPIOPinTypeUART \
949  ((void (*)(uint32_t ui32Port, \
950  uint8_t ui8Pins))ROM_GPIOTABLE[21])
951 #endif
952 #if defined(TARGET_IS_BLIZZARD_RA1) || \
953  defined(TARGET_IS_BLIZZARD_RA3) || \
954  defined(TARGET_IS_BLIZZARD_RB1)
955 #define ROM_GPIOPinTypeGPIOOutputOD \
956  ((void (*)(uint32_t ui32Port, \
957  uint8_t ui8Pins))ROM_GPIOTABLE[22])
958 #endif
959 #if defined(TARGET_IS_BLIZZARD_RA1) || \
960  defined(TARGET_IS_BLIZZARD_RA3) || \
961  defined(TARGET_IS_BLIZZARD_RB1)
962 #define ROM_GPIOPinTypeADC \
963  ((void (*)(uint32_t ui32Port, \
964  uint8_t ui8Pins))ROM_GPIOTABLE[23])
965 #endif
966 #if defined(TARGET_IS_BLIZZARD_RA1) || \
967  defined(TARGET_IS_BLIZZARD_RA3) || \
968  defined(TARGET_IS_BLIZZARD_RB1)
969 #define ROM_GPIOPinTypeUSBDigital \
970  ((void (*)(uint32_t ui32Port, \
971  uint8_t ui8Pins))ROM_GPIOTABLE[24])
972 #endif
973 #if defined(TARGET_IS_BLIZZARD_RA1) || \
974  defined(TARGET_IS_BLIZZARD_RA3) || \
975  defined(TARGET_IS_BLIZZARD_RB1)
976 #define ROM_GPIOPinConfigure \
977  ((void (*)(uint32_t ui32PinConfig))ROM_GPIOTABLE[26])
978 #endif
979 #if defined(TARGET_IS_BLIZZARD_RA1) || \
980  defined(TARGET_IS_BLIZZARD_RA3) || \
981  defined(TARGET_IS_BLIZZARD_RB1)
982 #define ROM_GPIOPinTypeUSBAnalog \
983  ((void (*)(uint32_t ui32Port, \
984  uint8_t ui8Pins))ROM_GPIOTABLE[28])
985 #endif
986 #if defined(TARGET_IS_BLIZZARD_RA1) || \
987  defined(TARGET_IS_BLIZZARD_RA3) || \
988  defined(TARGET_IS_BLIZZARD_RB1)
989 #define ROM_GPIODMATriggerEnable \
990  ((void (*)(uint32_t ui32Port, \
991  uint8_t ui8Pins))ROM_GPIOTABLE[31])
992 #endif
993 #if defined(TARGET_IS_BLIZZARD_RA1) || \
994  defined(TARGET_IS_BLIZZARD_RA3) || \
995  defined(TARGET_IS_BLIZZARD_RB1)
996 #define ROM_GPIODMATriggerDisable \
997  ((void (*)(uint32_t ui32Port, \
998  uint8_t ui8Pins))ROM_GPIOTABLE[32])
999 #endif
1000 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1001  defined(TARGET_IS_BLIZZARD_RA3) || \
1002  defined(TARGET_IS_BLIZZARD_RB1)
1003 #define ROM_GPIOADCTriggerEnable \
1004  ((void (*)(uint32_t ui32Port, \
1005  uint8_t ui8Pins))ROM_GPIOTABLE[33])
1006 #endif
1007 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1008  defined(TARGET_IS_BLIZZARD_RA3) || \
1009  defined(TARGET_IS_BLIZZARD_RB1)
1010 #define ROM_GPIOADCTriggerDisable \
1011  ((void (*)(uint32_t ui32Port, \
1012  uint8_t ui8Pins))ROM_GPIOTABLE[34])
1013 #endif
1014 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1015  defined(TARGET_IS_BLIZZARD_RA3) || \
1016  defined(TARGET_IS_BLIZZARD_RB1)
1017 #define ROM_GPIOPinTypeFan \
1018  ((void (*)(uint32_t ui32Port, \
1019  uint8_t ui8Pins))ROM_GPIOTABLE[35])
1020 #endif
1021 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1022  defined(TARGET_IS_BLIZZARD_RA3) || \
1023  defined(TARGET_IS_BLIZZARD_RB1)
1024 #define ROM_GPIOPinTypeLPC \
1025  ((void (*)(uint32_t ui32Port, \
1026  uint8_t ui8Pins))ROM_GPIOTABLE[36])
1027 #endif
1028 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1029  defined(TARGET_IS_BLIZZARD_RA3) || \
1030  defined(TARGET_IS_BLIZZARD_RB1)
1031 #define ROM_GPIOPinTypePECIRx \
1032  ((void (*)(uint32_t ui32Port, \
1033  uint8_t ui8Pins))ROM_GPIOTABLE[37])
1034 #endif
1035 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1036  defined(TARGET_IS_BLIZZARD_RA3) || \
1037  defined(TARGET_IS_BLIZZARD_RB1)
1038 #define ROM_GPIOPinTypePECITx \
1039  ((void (*)(uint32_t ui32Port, \
1040  uint8_t ui8Pins))ROM_GPIOTABLE[38])
1041 #endif
1042 #if defined(TARGET_IS_BLIZZARD_RA3) || \
1043  defined(TARGET_IS_BLIZZARD_RB1)
1044 #define ROM_GPIOPinTypeI2CSCL \
1045  ((void (*)(uint32_t ui32Port, \
1046  uint8_t ui8Pins))ROM_GPIOTABLE[39])
1047 #endif
1048 
1049 //*****************************************************************************
1050 //
1051 // Macros for calling ROM functions in the Hibernate API.
1052 //
1053 //*****************************************************************************
1054 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1055  defined(TARGET_IS_BLIZZARD_RA3) || \
1056  defined(TARGET_IS_BLIZZARD_RB1)
1057 #define ROM_HibernateIntClear \
1058  ((void (*)(uint32_t ui32IntFlags))ROM_HIBERNATETABLE[0])
1059 #endif
1060 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1061  defined(TARGET_IS_BLIZZARD_RA3) || \
1062  defined(TARGET_IS_BLIZZARD_RB1)
1063 #define ROM_HibernateEnableExpClk \
1064  ((void (*)(uint32_t ui32HibClk))ROM_HIBERNATETABLE[1])
1065 #endif
1066 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1067  defined(TARGET_IS_BLIZZARD_RA3) || \
1068  defined(TARGET_IS_BLIZZARD_RB1)
1069 #define ROM_HibernateDisable \
1070  ((void (*)(void))ROM_HIBERNATETABLE[2])
1071 #endif
1072 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1073  defined(TARGET_IS_BLIZZARD_RA3) || \
1074  defined(TARGET_IS_BLIZZARD_RB1)
1075 #define ROM_HibernateRTCEnable \
1076  ((void (*)(void))ROM_HIBERNATETABLE[4])
1077 #endif
1078 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1079  defined(TARGET_IS_BLIZZARD_RA3) || \
1080  defined(TARGET_IS_BLIZZARD_RB1)
1081 #define ROM_HibernateRTCDisable \
1082  ((void (*)(void))ROM_HIBERNATETABLE[5])
1083 #endif
1084 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1085  defined(TARGET_IS_BLIZZARD_RA3) || \
1086  defined(TARGET_IS_BLIZZARD_RB1)
1087 #define ROM_HibernateWakeSet \
1088  ((void (*)(uint32_t ui32WakeFlags))ROM_HIBERNATETABLE[6])
1089 #endif
1090 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1091  defined(TARGET_IS_BLIZZARD_RA3) || \
1092  defined(TARGET_IS_BLIZZARD_RB1)
1093 #define ROM_HibernateWakeGet \
1094  ((uint32_t (*)(void))ROM_HIBERNATETABLE[7])
1095 #endif
1096 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1097  defined(TARGET_IS_BLIZZARD_RA3) || \
1098  defined(TARGET_IS_BLIZZARD_RB1)
1099 #define ROM_HibernateLowBatSet \
1100  ((void (*)(uint32_t ui32LowBatFlags))ROM_HIBERNATETABLE[8])
1101 #endif
1102 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1103  defined(TARGET_IS_BLIZZARD_RA3) || \
1104  defined(TARGET_IS_BLIZZARD_RB1)
1105 #define ROM_HibernateLowBatGet \
1106  ((uint32_t (*)(void))ROM_HIBERNATETABLE[9])
1107 #endif
1108 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1109  defined(TARGET_IS_BLIZZARD_RA3) || \
1110  defined(TARGET_IS_BLIZZARD_RB1)
1111 #define ROM_HibernateRTCSet \
1112  ((void (*)(uint32_t ui32RTCValue))ROM_HIBERNATETABLE[10])
1113 #endif
1114 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1115  defined(TARGET_IS_BLIZZARD_RA3) || \
1116  defined(TARGET_IS_BLIZZARD_RB1)
1117 #define ROM_HibernateRTCGet \
1118  ((uint32_t (*)(void))ROM_HIBERNATETABLE[11])
1119 #endif
1120 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1121  defined(TARGET_IS_BLIZZARD_RA3) || \
1122  defined(TARGET_IS_BLIZZARD_RB1)
1123 #define ROM_HibernateRTCTrimSet \
1124  ((void (*)(uint32_t ui32Trim))ROM_HIBERNATETABLE[16])
1125 #endif
1126 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1127  defined(TARGET_IS_BLIZZARD_RA3) || \
1128  defined(TARGET_IS_BLIZZARD_RB1)
1129 #define ROM_HibernateRTCTrimGet \
1130  ((uint32_t (*)(void))ROM_HIBERNATETABLE[17])
1131 #endif
1132 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1133  defined(TARGET_IS_BLIZZARD_RA3) || \
1134  defined(TARGET_IS_BLIZZARD_RB1)
1135 #define ROM_HibernateDataSet \
1136  ((void (*)(uint32_t *pui32Data, \
1137  uint32_t ui32Count))ROM_HIBERNATETABLE[18])
1138 #endif
1139 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1140  defined(TARGET_IS_BLIZZARD_RA3) || \
1141  defined(TARGET_IS_BLIZZARD_RB1)
1142 #define ROM_HibernateDataGet \
1143  ((void (*)(uint32_t *pui32Data, \
1144  uint32_t ui32Count))ROM_HIBERNATETABLE[19])
1145 #endif
1146 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1147  defined(TARGET_IS_BLIZZARD_RA3) || \
1148  defined(TARGET_IS_BLIZZARD_RB1)
1149 #define ROM_HibernateRequest \
1150  ((void (*)(void))ROM_HIBERNATETABLE[20])
1151 #endif
1152 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1153  defined(TARGET_IS_BLIZZARD_RA3) || \
1154  defined(TARGET_IS_BLIZZARD_RB1)
1155 #define ROM_HibernateIntEnable \
1156  ((void (*)(uint32_t ui32IntFlags))ROM_HIBERNATETABLE[21])
1157 #endif
1158 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1159  defined(TARGET_IS_BLIZZARD_RA3) || \
1160  defined(TARGET_IS_BLIZZARD_RB1)
1161 #define ROM_HibernateIntDisable \
1162  ((void (*)(uint32_t ui32IntFlags))ROM_HIBERNATETABLE[22])
1163 #endif
1164 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1165  defined(TARGET_IS_BLIZZARD_RA3) || \
1166  defined(TARGET_IS_BLIZZARD_RB1)
1167 #define ROM_HibernateIntStatus \
1168  ((uint32_t (*)(bool bMasked))ROM_HIBERNATETABLE[23])
1169 #endif
1170 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1171  defined(TARGET_IS_BLIZZARD_RA3) || \
1172  defined(TARGET_IS_BLIZZARD_RB1)
1173 #define ROM_HibernateIsActive \
1174  ((uint32_t (*)(void))ROM_HIBERNATETABLE[24])
1175 #endif
1176 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1177  defined(TARGET_IS_BLIZZARD_RA3) || \
1178  defined(TARGET_IS_BLIZZARD_RB1)
1179 #define ROM_HibernateRTCSSGet \
1180  ((uint32_t (*)(void))ROM_HIBERNATETABLE[27])
1181 #endif
1182 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1183  defined(TARGET_IS_BLIZZARD_RA3) || \
1184  defined(TARGET_IS_BLIZZARD_RB1)
1185 #define ROM_HibernateClockConfig \
1186  ((void (*)(uint32_t ui32Config))ROM_HIBERNATETABLE[28])
1187 #endif
1188 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1189  defined(TARGET_IS_BLIZZARD_RA3) || \
1190  defined(TARGET_IS_BLIZZARD_RB1)
1191 #define ROM_HibernateBatCheckStart \
1192  ((void (*)(void))ROM_HIBERNATETABLE[29])
1193 #endif
1194 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1195  defined(TARGET_IS_BLIZZARD_RA3) || \
1196  defined(TARGET_IS_BLIZZARD_RB1)
1197 #define ROM_HibernateBatCheckDone \
1198  ((uint32_t (*)(void))ROM_HIBERNATETABLE[30])
1199 #endif
1200 
1201 //*****************************************************************************
1202 //
1203 // Macros for calling ROM functions in the I2C API.
1204 //
1205 //*****************************************************************************
1206 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1207  defined(TARGET_IS_BLIZZARD_RA3) || \
1208  defined(TARGET_IS_BLIZZARD_RB1)
1209 #define ROM_I2CMasterDataPut \
1210  ((void (*)(uint32_t ui32Base, \
1211  uint8_t ui8Data))ROM_I2CTABLE[0])
1212 #endif
1213 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1214  defined(TARGET_IS_BLIZZARD_RA3) || \
1215  defined(TARGET_IS_BLIZZARD_RB1)
1216 #define ROM_I2CMasterInitExpClk \
1217  ((void (*)(uint32_t ui32Base, \
1218  uint32_t ui32I2CClk, \
1219  bool bFast))ROM_I2CTABLE[1])
1220 #endif
1221 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1222  defined(TARGET_IS_BLIZZARD_RA3) || \
1223  defined(TARGET_IS_BLIZZARD_RB1)
1224 #define ROM_I2CMasterEnable \
1225  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[3])
1226 #endif
1227 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1228  defined(TARGET_IS_BLIZZARD_RA3) || \
1229  defined(TARGET_IS_BLIZZARD_RB1)
1230 #define ROM_I2CMasterDisable \
1231  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[5])
1232 #endif
1233 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1234  defined(TARGET_IS_BLIZZARD_RA3) || \
1235  defined(TARGET_IS_BLIZZARD_RB1)
1236 #define ROM_I2CMasterIntEnable \
1237  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[7])
1238 #endif
1239 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1240  defined(TARGET_IS_BLIZZARD_RA3) || \
1241  defined(TARGET_IS_BLIZZARD_RB1)
1242 #define ROM_I2CMasterIntDisable \
1243  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[9])
1244 #endif
1245 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1246  defined(TARGET_IS_BLIZZARD_RA3) || \
1247  defined(TARGET_IS_BLIZZARD_RB1)
1248 #define ROM_I2CMasterIntStatus \
1249  ((bool (*)(uint32_t ui32Base, \
1250  bool bMasked))ROM_I2CTABLE[11])
1251 #endif
1252 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1253  defined(TARGET_IS_BLIZZARD_RA3) || \
1254  defined(TARGET_IS_BLIZZARD_RB1)
1255 #define ROM_I2CMasterIntClear \
1256  ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[13])
1257 #endif
1258 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1259  defined(TARGET_IS_BLIZZARD_RA3) || \
1260  defined(TARGET_IS_BLIZZARD_RB1)
1261 #define ROM_I2CMasterSlaveAddrSet \
1262  ((void (*)(uint32_t ui32Base, \
1263  uint8_t ui8SlaveAddr, \
1264  bool bReceive))ROM_I2CTABLE[15])
1265 #endif
1266 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1267  defined(TARGET_IS_BLIZZARD_RA3) || \
1268  defined(TARGET_IS_BLIZZARD_RB1)
1269 #define ROM_I2CMasterBusy \
1270  ((bool (*)(uint32_t ui32Base))ROM_I2CTABLE[16])
1271 #endif
1272 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1273  defined(TARGET_IS_BLIZZARD_RA3) || \
1274  defined(TARGET_IS_BLIZZARD_RB1)
1275 #define ROM_I2CMasterBusBusy \
1276  ((bool (*)(uint32_t ui32Base))ROM_I2CTABLE[17])
1277 #endif
1278 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1279  defined(TARGET_IS_BLIZZARD_RA3) || \
1280  defined(TARGET_IS_BLIZZARD_RB1)
1281 #define ROM_I2CMasterControl \
1282  ((void (*)(uint32_t ui32Base, \
1283  uint32_t ui32Cmd))ROM_I2CTABLE[18])
1284 #endif
1285 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1286  defined(TARGET_IS_BLIZZARD_RA3) || \
1287  defined(TARGET_IS_BLIZZARD_RB1)
1288 #define ROM_I2CMasterErr \
1289  ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[19])
1290 #endif
1291 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1292  defined(TARGET_IS_BLIZZARD_RA3) || \
1293  defined(TARGET_IS_BLIZZARD_RB1)
1294 #define ROM_I2CMasterDataGet \
1295  ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[20])
1296 #endif
1297 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1298  defined(TARGET_IS_BLIZZARD_RA3) || \
1299  defined(TARGET_IS_BLIZZARD_RB1)
1300 #define ROM_UpdateI2C \
1301  ((void (*)(void))ROM_I2CTABLE[24])
1302 #endif
1303 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1304  defined(TARGET_IS_BLIZZARD_RA3) || \
1305  defined(TARGET_IS_BLIZZARD_RB1)
1306 #define ROM_I2CMasterIntEnableEx \
1307  ((void (*)(uint32_t ui32Base, \
1308  uint32_t ui32IntFlags))ROM_I2CTABLE[29])
1309 #endif
1310 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1311  defined(TARGET_IS_BLIZZARD_RA3) || \
1312  defined(TARGET_IS_BLIZZARD_RB1)
1313 #define ROM_I2CMasterIntDisableEx \
1314  ((void (*)(uint32_t ui32Base, \
1315  uint32_t ui32IntFlags))ROM_I2CTABLE[30])
1316 #endif
1317 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1318  defined(TARGET_IS_BLIZZARD_RA3) || \
1319  defined(TARGET_IS_BLIZZARD_RB1)
1320 #define ROM_I2CMasterIntStatusEx \
1321  ((uint32_t (*)(uint32_t ui32Base, \
1322  bool bMasked))ROM_I2CTABLE[31])
1323 #endif
1324 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1325  defined(TARGET_IS_BLIZZARD_RA3) || \
1326  defined(TARGET_IS_BLIZZARD_RB1)
1327 #define ROM_I2CMasterIntClearEx \
1328  ((void (*)(uint32_t ui32Base, \
1329  uint32_t ui32IntFlags))ROM_I2CTABLE[32])
1330 #endif
1331 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1332  defined(TARGET_IS_BLIZZARD_RA3) || \
1333  defined(TARGET_IS_BLIZZARD_RB1)
1334 #define ROM_I2CMasterTimeoutSet \
1335  ((void (*)(uint32_t ui32Base, \
1336  uint32_t ui32Value))ROM_I2CTABLE[33])
1337 #endif
1338 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1339  defined(TARGET_IS_BLIZZARD_RA3) || \
1340  defined(TARGET_IS_BLIZZARD_RB1)
1341 #define ROM_I2CMasterLineStateGet \
1342  ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[38])
1343 #endif
1344 
1345 //*****************************************************************************
1346 //
1347 // Macros for calling ROM functions in the Interrupt API.
1348 //
1349 //*****************************************************************************
1350 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1351  defined(TARGET_IS_BLIZZARD_RA3) || \
1352  defined(TARGET_IS_BLIZZARD_RB1)
1353 #define ROM_IntEnable \
1354  ((void (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[0])
1355 #endif
1356 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1357  defined(TARGET_IS_BLIZZARD_RA3) || \
1358  defined(TARGET_IS_BLIZZARD_RB1)
1359 #define ROM_IntMasterEnable \
1360  ((bool (*)(void))ROM_INTERRUPTTABLE[1])
1361 #endif
1362 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1363  defined(TARGET_IS_BLIZZARD_RA3) || \
1364  defined(TARGET_IS_BLIZZARD_RB1)
1365 #define ROM_IntMasterDisable \
1366  ((bool (*)(void))ROM_INTERRUPTTABLE[2])
1367 #endif
1368 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1369  defined(TARGET_IS_BLIZZARD_RA3) || \
1370  defined(TARGET_IS_BLIZZARD_RB1)
1371 #define ROM_IntDisable \
1372  ((void (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[3])
1373 #endif
1374 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1375  defined(TARGET_IS_BLIZZARD_RA3) || \
1376  defined(TARGET_IS_BLIZZARD_RB1)
1377 #define ROM_IntPriorityGroupingSet \
1378  ((void (*)(uint32_t ui32Bits))ROM_INTERRUPTTABLE[4])
1379 #endif
1380 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1381  defined(TARGET_IS_BLIZZARD_RA3) || \
1382  defined(TARGET_IS_BLIZZARD_RB1)
1383 #define ROM_IntPriorityGroupingGet \
1384  ((uint32_t (*)(void))ROM_INTERRUPTTABLE[5])
1385 #endif
1386 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1387  defined(TARGET_IS_BLIZZARD_RA3) || \
1388  defined(TARGET_IS_BLIZZARD_RB1)
1389 #define ROM_IntPrioritySet \
1390  ((void (*)(uint32_t ui32Interrupt, \
1391  uint8_t ui8Priority))ROM_INTERRUPTTABLE[6])
1392 #endif
1393 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1394  defined(TARGET_IS_BLIZZARD_RA3) || \
1395  defined(TARGET_IS_BLIZZARD_RB1)
1396 #define ROM_IntPriorityGet \
1397  ((int32_t (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[7])
1398 #endif
1399 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1400  defined(TARGET_IS_BLIZZARD_RA3) || \
1401  defined(TARGET_IS_BLIZZARD_RB1)
1402 #define ROM_IntPendSet \
1403  ((void (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[8])
1404 #endif
1405 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1406  defined(TARGET_IS_BLIZZARD_RA3) || \
1407  defined(TARGET_IS_BLIZZARD_RB1)
1408 #define ROM_IntPendClear \
1409  ((void (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[9])
1410 #endif
1411 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1412  defined(TARGET_IS_BLIZZARD_RA3) || \
1413  defined(TARGET_IS_BLIZZARD_RB1)
1414 #define ROM_IntPriorityMaskSet \
1415  ((void (*)(uint32_t ui32PriorityMask))ROM_INTERRUPTTABLE[10])
1416 #endif
1417 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1418  defined(TARGET_IS_BLIZZARD_RA3) || \
1419  defined(TARGET_IS_BLIZZARD_RB1)
1420 #define ROM_IntPriorityMaskGet \
1421  ((uint32_t (*)(void))ROM_INTERRUPTTABLE[11])
1422 #endif
1423 #if defined(TARGET_IS_BLIZZARD_RB1)
1424 #define ROM_IntIsEnabled \
1425  ((uint32_t (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[12])
1426 #endif
1427 
1428 //*****************************************************************************
1429 //
1430 // Macros for calling ROM functions in the LPC API.
1431 //
1432 //*****************************************************************************
1433 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1434  defined(TARGET_IS_BLIZZARD_RA3) || \
1435  defined(TARGET_IS_BLIZZARD_RB1)
1436 #define ROM_LPCIntClear \
1437  ((void (*)(uint32_t ui32Base, \
1438  uint32_t ui32IntFlags))ROM_LPCTABLE[0])
1439 #endif
1440 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1441  defined(TARGET_IS_BLIZZARD_RA3) || \
1442  defined(TARGET_IS_BLIZZARD_RB1)
1443 #define ROM_LPCByteRead \
1444  ((uint8_t (*)(uint32_t ui32Base, \
1445  uint32_t ui32Offset))ROM_LPCTABLE[1])
1446 #endif
1447 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1448  defined(TARGET_IS_BLIZZARD_RA3) || \
1449  defined(TARGET_IS_BLIZZARD_RB1)
1450 #define ROM_LPCByteWrite \
1451  ((void (*)(uint32_t ui32Base, \
1452  uint32_t ui32Offset, \
1453  uint8_t ui8Data))ROM_LPCTABLE[2])
1454 #endif
1455 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1456  defined(TARGET_IS_BLIZZARD_RA3) || \
1457  defined(TARGET_IS_BLIZZARD_RB1)
1458 #define ROM_LPCChannelConfigCOMxSet \
1459  ((void (*)(uint32_t ui32Base, \
1460  uint32_t ui32Channel, \
1461  uint32_t ui32Config, \
1462  uint32_t ui32Address, \
1463  uint32_t ui32Offset, \
1464  uint32_t ui32COMxMode))ROM_LPCTABLE[3])
1465 #endif
1466 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1467  defined(TARGET_IS_BLIZZARD_RA3) || \
1468  defined(TARGET_IS_BLIZZARD_RB1)
1469 #define ROM_LPCChannelConfigGet \
1470  ((uint32_t (*)(uint32_t ui32Base, \
1471  uint32_t ui32Channel, \
1472  uint32_t *pui32Address, \
1473  uint32_t *pui32Offset, \
1474  uint32_t *pui32COMxMode))ROM_LPCTABLE[4])
1475 #endif
1476 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1477  defined(TARGET_IS_BLIZZARD_RA3) || \
1478  defined(TARGET_IS_BLIZZARD_RB1)
1479 #define ROM_LPCChannelConfigEPSet \
1480  ((void (*)(uint32_t ui32Base, \
1481  uint32_t ui32Channel, \
1482  uint32_t ui32Config, \
1483  uint32_t ui32Address, \
1484  uint32_t ui32Offset))ROM_LPCTABLE[5])
1485 #endif
1486 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1487  defined(TARGET_IS_BLIZZARD_RA3) || \
1488  defined(TARGET_IS_BLIZZARD_RB1)
1489 #define ROM_LPCChannelConfigMBSet \
1490  ((void (*)(uint32_t ui32Base, \
1491  uint32_t ui32Channel, \
1492  uint32_t ui32Config, \
1493  uint32_t ui32Address, \
1494  uint32_t ui32Offset))ROM_LPCTABLE[6])
1495 #endif
1496 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1497  defined(TARGET_IS_BLIZZARD_RA3) || \
1498  defined(TARGET_IS_BLIZZARD_RB1)
1499 #define ROM_LPCChannelDMAConfigGet \
1500  ((uint32_t (*)(uint32_t ui32Base))ROM_LPCTABLE[7])
1501 #endif
1502 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1503  defined(TARGET_IS_BLIZZARD_RA3) || \
1504  defined(TARGET_IS_BLIZZARD_RB1)
1505 #define ROM_LPCChannelDMAConfigSet \
1506  ((void (*)(uint32_t ui32Base, \
1507  uint32_t ui32Config, \
1508  uint32_t ui32Mask))ROM_LPCTABLE[8])
1509 #endif
1510 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1511  defined(TARGET_IS_BLIZZARD_RA3) || \
1512  defined(TARGET_IS_BLIZZARD_RB1)
1513 #define ROM_LPCChannelDisable \
1514  ((void (*)(uint32_t ui32Base, \
1515  uint32_t ui32Channel))ROM_LPCTABLE[9])
1516 #endif
1517 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1518  defined(TARGET_IS_BLIZZARD_RA3) || \
1519  defined(TARGET_IS_BLIZZARD_RB1)
1520 #define ROM_LPCChannelEnable \
1521  ((void (*)(uint32_t ui32Base, \
1522  uint32_t ui32Channel))ROM_LPCTABLE[10])
1523 #endif
1524 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1525  defined(TARGET_IS_BLIZZARD_RA3) || \
1526  defined(TARGET_IS_BLIZZARD_RB1)
1527 #define ROM_LPCChannelStatusClear \
1528  ((void (*)(uint32_t ui32Base, \
1529  uint32_t ui32Channel, \
1530  uint32_t ui32Status))ROM_LPCTABLE[11])
1531 #endif
1532 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1533  defined(TARGET_IS_BLIZZARD_RA3) || \
1534  defined(TARGET_IS_BLIZZARD_RB1)
1535 #define ROM_LPCChannelStatusGet \
1536  ((uint32_t (*)(uint32_t ui32Base, \
1537  uint32_t ui32Channel))ROM_LPCTABLE[12])
1538 #endif
1539 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1540  defined(TARGET_IS_BLIZZARD_RA3) || \
1541  defined(TARGET_IS_BLIZZARD_RB1)
1542 #define ROM_LPCChannelStatusSet \
1543  ((void (*)(uint32_t ui32Base, \
1544  uint32_t ui32Channel, \
1545  uint32_t ui32Status))ROM_LPCTABLE[13])
1546 #endif
1547 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1548  defined(TARGET_IS_BLIZZARD_RA3) || \
1549  defined(TARGET_IS_BLIZZARD_RB1)
1550 #define ROM_LPCCOMxIntClear \
1551  ((void (*)(uint32_t ui32Base, \
1552  uint32_t ui32IntFlags))ROM_LPCTABLE[14])
1553 #endif
1554 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1555  defined(TARGET_IS_BLIZZARD_RA3) || \
1556  defined(TARGET_IS_BLIZZARD_RB1)
1557 #define ROM_LPCCOMxIntDisable \
1558  ((void (*)(uint32_t ui32Base, \
1559  uint32_t ui32IntFlags))ROM_LPCTABLE[15])
1560 #endif
1561 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1562  defined(TARGET_IS_BLIZZARD_RA3) || \
1563  defined(TARGET_IS_BLIZZARD_RB1)
1564 #define ROM_LPCCOMxIntEnable \
1565  ((void (*)(uint32_t ui32Base, \
1566  uint32_t ui32IntFlags))ROM_LPCTABLE[16])
1567 #endif
1568 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1569  defined(TARGET_IS_BLIZZARD_RA3) || \
1570  defined(TARGET_IS_BLIZZARD_RB1)
1571 #define ROM_LPCCOMxIntStatus \
1572  ((uint32_t (*)(uint32_t ui32Base, \
1573  bool bMasked))ROM_LPCTABLE[17])
1574 #endif
1575 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1576  defined(TARGET_IS_BLIZZARD_RA3) || \
1577  defined(TARGET_IS_BLIZZARD_RB1)
1578 #define ROM_LPCConfigGet \
1579  ((uint32_t (*)(uint32_t ui32Base))ROM_LPCTABLE[18])
1580 #endif
1581 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1582  defined(TARGET_IS_BLIZZARD_RA3) || \
1583  defined(TARGET_IS_BLIZZARD_RB1)
1584 #define ROM_LPCConfigSet \
1585  ((void (*)(uint32_t ui32Base, \
1586  uint32_t ui32Config))ROM_LPCTABLE[19])
1587 #endif
1588 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1589  defined(TARGET_IS_BLIZZARD_RA3) || \
1590  defined(TARGET_IS_BLIZZARD_RB1)
1591 #define ROM_LPCHalfWordRead \
1592  ((uint16_t (*)(uint32_t ui32Base, \
1593  uint32_t ui32Offset))ROM_LPCTABLE[20])
1594 #endif
1595 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1596  defined(TARGET_IS_BLIZZARD_RA3) || \
1597  defined(TARGET_IS_BLIZZARD_RB1)
1598 #define ROM_LPCHalfWordWrite \
1599  ((void (*)(uint32_t ui32Base, \
1600  uint32_t ui32Offset, \
1601  uint16_t ui16Data))ROM_LPCTABLE[21])
1602 #endif
1603 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1604  defined(TARGET_IS_BLIZZARD_RA3) || \
1605  defined(TARGET_IS_BLIZZARD_RB1)
1606 #define ROM_LPCIRQClear \
1607  ((void (*)(uint32_t ui32Base, \
1608  uint32_t ui32IRQ))ROM_LPCTABLE[22])
1609 #endif
1610 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1611  defined(TARGET_IS_BLIZZARD_RA3) || \
1612  defined(TARGET_IS_BLIZZARD_RB1)
1613 #define ROM_LPCIRQConfig \
1614  ((void (*)(uint32_t ui32Base, \
1615  bool bIRQPulse, \
1616  bool bIRQOnChange))ROM_LPCTABLE[23])
1617 #endif
1618 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1619  defined(TARGET_IS_BLIZZARD_RA3) || \
1620  defined(TARGET_IS_BLIZZARD_RB1)
1621 #define ROM_LPCIRQGet \
1622  ((uint32_t (*)(uint32_t ui32Base))ROM_LPCTABLE[24])
1623 #endif
1624 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1625  defined(TARGET_IS_BLIZZARD_RA3) || \
1626  defined(TARGET_IS_BLIZZARD_RB1)
1627 #define ROM_LPCIRQSend \
1628  ((void (*)(uint32_t ui32Base))ROM_LPCTABLE[25])
1629 #endif
1630 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1631  defined(TARGET_IS_BLIZZARD_RA3) || \
1632  defined(TARGET_IS_BLIZZARD_RB1)
1633 #define ROM_LPCIRQSet \
1634  ((void (*)(uint32_t ui32Base, \
1635  uint32_t ui32IRQ))ROM_LPCTABLE[26])
1636 #endif
1637 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1638  defined(TARGET_IS_BLIZZARD_RA3) || \
1639  defined(TARGET_IS_BLIZZARD_RB1)
1640 #define ROM_LPCIntDisable \
1641  ((void (*)(uint32_t ui32Base, \
1642  uint32_t ui32IntFlags))ROM_LPCTABLE[27])
1643 #endif
1644 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1645  defined(TARGET_IS_BLIZZARD_RA3) || \
1646  defined(TARGET_IS_BLIZZARD_RB1)
1647 #define ROM_LPCIntEnable \
1648  ((void (*)(uint32_t ui32Base, \
1649  uint32_t ui32IntFlags))ROM_LPCTABLE[28])
1650 #endif
1651 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1652  defined(TARGET_IS_BLIZZARD_RA3) || \
1653  defined(TARGET_IS_BLIZZARD_RB1)
1654 #define ROM_LPCIntStatus \
1655  ((uint32_t (*)(uint32_t ui32Base, \
1656  bool bMasked))ROM_LPCTABLE[29])
1657 #endif
1658 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1659  defined(TARGET_IS_BLIZZARD_RA3) || \
1660  defined(TARGET_IS_BLIZZARD_RB1)
1661 #define ROM_LPCSCIAssert \
1662  ((void (*)(uint32_t ui32Base, \
1663  uint32_t ui32Count))ROM_LPCTABLE[30])
1664 #endif
1665 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1666  defined(TARGET_IS_BLIZZARD_RA3) || \
1667  defined(TARGET_IS_BLIZZARD_RB1)
1668 #define ROM_LPCStatusGet \
1669  ((uint32_t (*)(uint32_t ui32Base, \
1670  uint32_t *pui32Count, \
1671  uint32_t *pui32PoolSize))ROM_LPCTABLE[31])
1672 #endif
1673 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1674  defined(TARGET_IS_BLIZZARD_RA3) || \
1675  defined(TARGET_IS_BLIZZARD_RB1)
1676 #define ROM_LPCWordRead \
1677  ((uint32_t (*)(uint32_t ui32Base, \
1678  uint32_t ui32Offset))ROM_LPCTABLE[32])
1679 #endif
1680 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1681  defined(TARGET_IS_BLIZZARD_RA3) || \
1682  defined(TARGET_IS_BLIZZARD_RB1)
1683 #define ROM_LPCWordWrite \
1684  ((void (*)(uint32_t ui32Base, \
1685  uint32_t ui32Offset, \
1686  uint32_t ui32Data))ROM_LPCTABLE[33])
1687 #endif
1688 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1689  defined(TARGET_IS_BLIZZARD_RA3) || \
1690  defined(TARGET_IS_BLIZZARD_RB1)
1691 #define ROM_LPCChannelPoolAddressGet \
1692  ((uint32_t (*)(uint32_t ui32Base, \
1693  uint32_t ui32Channel))ROM_LPCTABLE[34])
1694 #endif
1695 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1696  defined(TARGET_IS_BLIZZARD_RA3) || \
1697  defined(TARGET_IS_BLIZZARD_RB1)
1698 #define ROM_LPCStatusBlockAddressGet \
1699  ((uint32_t (*)(uint32_t ui32Base))ROM_LPCTABLE[35])
1700 #endif
1701 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1702  defined(TARGET_IS_BLIZZARD_RA3) || \
1703  defined(TARGET_IS_BLIZZARD_RB1)
1704 #define ROM_LPCStatusBlockAddressSet \
1705  ((void (*)(uint32_t ui32Base, \
1706  uint32_t ui32Address, \
1707  bool bEnabled))ROM_LPCTABLE[36])
1708 #endif
1709 
1710 //*****************************************************************************
1711 //
1712 // Macros for calling ROM functions in the MPU API.
1713 //
1714 //*****************************************************************************
1715 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1716  defined(TARGET_IS_BLIZZARD_RA3) || \
1717  defined(TARGET_IS_BLIZZARD_RB1)
1718 #define ROM_MPUEnable \
1719  ((void (*)(uint32_t ui32MPUConfig))ROM_MPUTABLE[0])
1720 #endif
1721 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1722  defined(TARGET_IS_BLIZZARD_RA3) || \
1723  defined(TARGET_IS_BLIZZARD_RB1)
1724 #define ROM_MPUDisable \
1725  ((void (*)(void))ROM_MPUTABLE[1])
1726 #endif
1727 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1728  defined(TARGET_IS_BLIZZARD_RA3) || \
1729  defined(TARGET_IS_BLIZZARD_RB1)
1730 #define ROM_MPURegionCountGet \
1731  ((uint32_t (*)(void))ROM_MPUTABLE[2])
1732 #endif
1733 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1734  defined(TARGET_IS_BLIZZARD_RA3) || \
1735  defined(TARGET_IS_BLIZZARD_RB1)
1736 #define ROM_MPURegionEnable \
1737  ((void (*)(uint32_t ui32Region))ROM_MPUTABLE[3])
1738 #endif
1739 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1740  defined(TARGET_IS_BLIZZARD_RA3) || \
1741  defined(TARGET_IS_BLIZZARD_RB1)
1742 #define ROM_MPURegionDisable \
1743  ((void (*)(uint32_t ui32Region))ROM_MPUTABLE[4])
1744 #endif
1745 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1746  defined(TARGET_IS_BLIZZARD_RA3) || \
1747  defined(TARGET_IS_BLIZZARD_RB1)
1748 #define ROM_MPURegionSet \
1749  ((void (*)(uint32_t ui32Region, \
1750  uint32_t ui32Addr, \
1751  uint32_t ui32Flags))ROM_MPUTABLE[5])
1752 #endif
1753 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1754  defined(TARGET_IS_BLIZZARD_RA3) || \
1755  defined(TARGET_IS_BLIZZARD_RB1)
1756 #define ROM_MPURegionGet \
1757  ((void (*)(uint32_t ui32Region, \
1758  uint32_t *pui32Addr, \
1759  uint32_t *pui32Flags))ROM_MPUTABLE[6])
1760 #endif
1761 
1762 //*****************************************************************************
1763 //
1764 // Macros for calling ROM functions in the PECI API.
1765 //
1766 //*****************************************************************************
1767 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1768  defined(TARGET_IS_BLIZZARD_RA3) || \
1769  defined(TARGET_IS_BLIZZARD_RB1)
1770 #define ROM_PECIIntClear \
1771  ((void (*)(uint32_t ui32Base, \
1772  uint32_t ui32IntFlags))ROM_PECITABLE[0])
1773 #endif
1774 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1775  defined(TARGET_IS_BLIZZARD_RA3) || \
1776  defined(TARGET_IS_BLIZZARD_RB1)
1777 #define ROM_PECIAdvCmdSend \
1778  ((void (*)(uint32_t ui32Base, \
1779  uint8_t ui8Cmd, \
1780  uint8_t ui8HidRe, \
1781  uint8_t ui8Domain, \
1782  uint8_t ui8Proi8Add, \
1783  uint32_t ui32Arg, \
1784  uint8_t ui8Size, \
1785  uint32_t ui32Data0, \
1786  uint32_t ui32Data1))ROM_PECITABLE[1])
1787 #endif
1788 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1789  defined(TARGET_IS_BLIZZARD_RA3) || \
1790  defined(TARGET_IS_BLIZZARD_RB1)
1791 #define ROM_PECIAdvCmdSendNonBlocking \
1792  ((uint32_t (*)(uint32_t ui32Base, \
1793  uint8_t ui8Cmd, \
1794  uint8_t ui8HidRe, \
1795  uint8_t ui8Domain, \
1796  uint8_t ui8Proi8Add, \
1797  uint32_t ui32Arg, \
1798  uint8_t ui8Size, \
1799  uint32_t ui32Data0, \
1800  uint32_t ui32Data1))ROM_PECITABLE[2])
1801 #endif
1802 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1803  defined(TARGET_IS_BLIZZARD_RA3) || \
1804  defined(TARGET_IS_BLIZZARD_RB1)
1805 #define ROM_PECIAdvCmdStatusGet \
1806  ((uint32_t (*)(uint32_t ui32Base, \
1807  uint32_t *pui32Data0, \
1808  uint32_t *pui32Data1))ROM_PECITABLE[3])
1809 #endif
1810 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1811  defined(TARGET_IS_BLIZZARD_RA3) || \
1812  defined(TARGET_IS_BLIZZARD_RB1)
1813 #define ROM_PECIConfigGet \
1814  ((void (*)(uint32_t ui32Base, \
1815  uint32_t ui32PECIClk, \
1816  uint32_t *pui32Baud, \
1817  uint32_t *pui32Poll, \
1818  uint32_t *pui32Offset, \
1819  uint32_t *pui32Retry))ROM_PECITABLE[4])
1820 #endif
1821 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1822  defined(TARGET_IS_BLIZZARD_RA3) || \
1823  defined(TARGET_IS_BLIZZARD_RB1)
1824 #define ROM_PECIConfigSet \
1825  ((void (*)(uint32_t ui32Base, \
1826  uint32_t ui32PECIClk, \
1827  uint32_t ui32Baud, \
1828  uint32_t ui32Poll, \
1829  uint32_t ui32Offset, \
1830  uint32_t ui32Retry))ROM_PECITABLE[5])
1831 #endif
1832 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1833  defined(TARGET_IS_BLIZZARD_RA3) || \
1834  defined(TARGET_IS_BLIZZARD_RB1)
1835 #define ROM_PECIDomainMaxReadClear \
1836  ((void (*)(uint32_t ui32Base, \
1837  uint32_t ui32Domain))ROM_PECITABLE[6])
1838 #endif
1839 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1840  defined(TARGET_IS_BLIZZARD_RA3) || \
1841  defined(TARGET_IS_BLIZZARD_RB1)
1842 #define ROM_PECIDomainValueClear \
1843  ((void (*)(uint32_t ui32Base, \
1844  uint32_t ui32Domain))ROM_PECITABLE[7])
1845 #endif
1846 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1847  defined(TARGET_IS_BLIZZARD_RA3) || \
1848  defined(TARGET_IS_BLIZZARD_RB1)
1849 #define ROM_PECIDomainConfigGet \
1850  ((void (*)(uint32_t ui32Base, \
1851  uint32_t ui32Domain, \
1852  uint32_t *pui32High, \
1853  uint32_t *pui32Low))ROM_PECITABLE[8])
1854 #endif
1855 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1856  defined(TARGET_IS_BLIZZARD_RA3) || \
1857  defined(TARGET_IS_BLIZZARD_RB1)
1858 #define ROM_PECIDomainConfigSet \
1859  ((void (*)(uint32_t ui32Base, \
1860  uint32_t ui32Domain, \
1861  uint32_t ui32High, \
1862  uint32_t ui32Low))ROM_PECITABLE[9])
1863 #endif
1864 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1865  defined(TARGET_IS_BLIZZARD_RA3) || \
1866  defined(TARGET_IS_BLIZZARD_RB1)
1867 #define ROM_PECIDomainDisable \
1868  ((void (*)(uint32_t ui32Base, \
1869  uint32_t ui32Domain))ROM_PECITABLE[10])
1870 #endif
1871 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1872  defined(TARGET_IS_BLIZZARD_RA3) || \
1873  defined(TARGET_IS_BLIZZARD_RB1)
1874 #define ROM_PECIDomainEnable \
1875  ((void (*)(uint32_t ui32Base, \
1876  uint32_t ui32Domain))ROM_PECITABLE[11])
1877 #endif
1878 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1879  defined(TARGET_IS_BLIZZARD_RA3) || \
1880  defined(TARGET_IS_BLIZZARD_RB1)
1881 #define ROM_PECIDomainMaxReadGet \
1882  ((uint32_t (*)(uint32_t ui32Base, \
1883  uint32_t ui32Domain))ROM_PECITABLE[12])
1884 #endif
1885 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1886  defined(TARGET_IS_BLIZZARD_RA3) || \
1887  defined(TARGET_IS_BLIZZARD_RB1)
1888 #define ROM_PECIDomainValueGet \
1889  ((uint32_t (*)(uint32_t ui32Base, \
1890  uint32_t ui32Domain))ROM_PECITABLE[13])
1891 #endif
1892 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1893  defined(TARGET_IS_BLIZZARD_RA3) || \
1894  defined(TARGET_IS_BLIZZARD_RB1)
1895 #define ROM_PECIIntDisable \
1896  ((void (*)(uint32_t ui32Base, \
1897  uint32_t ui32IntFlags))ROM_PECITABLE[14])
1898 #endif
1899 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1900  defined(TARGET_IS_BLIZZARD_RA3) || \
1901  defined(TARGET_IS_BLIZZARD_RB1)
1902 #define ROM_PECIIntEnable \
1903  ((void (*)(uint32_t ui32Base, \
1904  uint32_t ui32IntFlags, \
1905  uint32_t ui32IntMode))ROM_PECITABLE[15])
1906 #endif
1907 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1908  defined(TARGET_IS_BLIZZARD_RA3) || \
1909  defined(TARGET_IS_BLIZZARD_RB1)
1910 #define ROM_PECIIntStatus \
1911  ((uint32_t (*)(uint32_t ui32Base, \
1912  bool bMasked))ROM_PECITABLE[16])
1913 #endif
1914 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1915  defined(TARGET_IS_BLIZZARD_RA3) || \
1916  defined(TARGET_IS_BLIZZARD_RB1)
1917 #define ROM_PECIBypassEnable \
1918  ((void (*)(uint32_t ui32Base))ROM_PECITABLE[17])
1919 #endif
1920 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1921  defined(TARGET_IS_BLIZZARD_RA3) || \
1922  defined(TARGET_IS_BLIZZARD_RB1)
1923 #define ROM_PECIBypassDisable \
1924  ((void (*)(uint32_t ui32Base))ROM_PECITABLE[18])
1925 #endif
1926 
1927 //*****************************************************************************
1928 //
1929 // Macros for calling ROM functions in the PWM API.
1930 //
1931 //*****************************************************************************
1932 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1933  defined(TARGET_IS_BLIZZARD_RA3) || \
1934  defined(TARGET_IS_BLIZZARD_RB1)
1935 #define ROM_PWMPulseWidthSet \
1936  ((void (*)(uint32_t ui32Base, \
1937  uint32_t ui32PWMOut, \
1938  uint32_t ui32Width))ROM_PWMTABLE[0])
1939 #endif
1940 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1941  defined(TARGET_IS_BLIZZARD_RA3) || \
1942  defined(TARGET_IS_BLIZZARD_RB1)
1943 #define ROM_PWMGenConfigure \
1944  ((void (*)(uint32_t ui32Base, \
1945  uint32_t ui32Gen, \
1946  uint32_t ui32Config))ROM_PWMTABLE[1])
1947 #endif
1948 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1949  defined(TARGET_IS_BLIZZARD_RA3) || \
1950  defined(TARGET_IS_BLIZZARD_RB1)
1951 #define ROM_PWMGenPeriodSet \
1952  ((void (*)(uint32_t ui32Base, \
1953  uint32_t ui32Gen, \
1954  uint32_t ui32Period))ROM_PWMTABLE[2])
1955 #endif
1956 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1957  defined(TARGET_IS_BLIZZARD_RA3) || \
1958  defined(TARGET_IS_BLIZZARD_RB1)
1959 #define ROM_PWMGenPeriodGet \
1960  ((uint32_t (*)(uint32_t ui32Base, \
1961  uint32_t ui32Gen))ROM_PWMTABLE[3])
1962 #endif
1963 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1964  defined(TARGET_IS_BLIZZARD_RA3) || \
1965  defined(TARGET_IS_BLIZZARD_RB1)
1966 #define ROM_PWMGenEnable \
1967  ((void (*)(uint32_t ui32Base, \
1968  uint32_t ui32Gen))ROM_PWMTABLE[4])
1969 #endif
1970 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1971  defined(TARGET_IS_BLIZZARD_RA3) || \
1972  defined(TARGET_IS_BLIZZARD_RB1)
1973 #define ROM_PWMGenDisable \
1974  ((void (*)(uint32_t ui32Base, \
1975  uint32_t ui32Gen))ROM_PWMTABLE[5])
1976 #endif
1977 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1978  defined(TARGET_IS_BLIZZARD_RA3) || \
1979  defined(TARGET_IS_BLIZZARD_RB1)
1980 #define ROM_PWMPulseWidthGet \
1981  ((uint32_t (*)(uint32_t ui32Base, \
1982  uint32_t ui32PWMOut))ROM_PWMTABLE[6])
1983 #endif
1984 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1985  defined(TARGET_IS_BLIZZARD_RA3) || \
1986  defined(TARGET_IS_BLIZZARD_RB1)
1987 #define ROM_PWMDeadBandEnable \
1988  ((void (*)(uint32_t ui32Base, \
1989  uint32_t ui32Gen, \
1990  uint16_t ui16Rise, \
1991  uint16_t ui16Fall))ROM_PWMTABLE[7])
1992 #endif
1993 #if defined(TARGET_IS_BLIZZARD_RA1) || \
1994  defined(TARGET_IS_BLIZZARD_RA3) || \
1995  defined(TARGET_IS_BLIZZARD_RB1)
1996 #define ROM_PWMDeadBandDisable \
1997  ((void (*)(uint32_t ui32Base, \
1998  uint32_t ui32Gen))ROM_PWMTABLE[8])
1999 #endif
2000 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2001  defined(TARGET_IS_BLIZZARD_RA3) || \
2002  defined(TARGET_IS_BLIZZARD_RB1)
2003 #define ROM_PWMSyncUpdate \
2004  ((void (*)(uint32_t ui32Base, \
2005  uint32_t ui32GenBits))ROM_PWMTABLE[9])
2006 #endif
2007 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2008  defined(TARGET_IS_BLIZZARD_RA3) || \
2009  defined(TARGET_IS_BLIZZARD_RB1)
2010 #define ROM_PWMSyncTimeBase \
2011  ((void (*)(uint32_t ui32Base, \
2012  uint32_t ui32GenBits))ROM_PWMTABLE[10])
2013 #endif
2014 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2015  defined(TARGET_IS_BLIZZARD_RA3) || \
2016  defined(TARGET_IS_BLIZZARD_RB1)
2017 #define ROM_PWMOutputState \
2018  ((void (*)(uint32_t ui32Base, \
2019  uint32_t ui32PWMOutBits, \
2020  bool bEnable))ROM_PWMTABLE[11])
2021 #endif
2022 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2023  defined(TARGET_IS_BLIZZARD_RA3) || \
2024  defined(TARGET_IS_BLIZZARD_RB1)
2025 #define ROM_PWMOutputInvert \
2026  ((void (*)(uint32_t ui32Base, \
2027  uint32_t ui32PWMOutBits, \
2028  bool bInvert))ROM_PWMTABLE[12])
2029 #endif
2030 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2031  defined(TARGET_IS_BLIZZARD_RA3) || \
2032  defined(TARGET_IS_BLIZZARD_RB1)
2033 #define ROM_PWMOutputFault \
2034  ((void (*)(uint32_t ui32Base, \
2035  uint32_t ui32PWMOutBits, \
2036  bool bFaultSuppress))ROM_PWMTABLE[13])
2037 #endif
2038 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2039  defined(TARGET_IS_BLIZZARD_RA3) || \
2040  defined(TARGET_IS_BLIZZARD_RB1)
2041 #define ROM_PWMGenIntTrigEnable \
2042  ((void (*)(uint32_t ui32Base, \
2043  uint32_t ui32Gen, \
2044  uint32_t ui32IntTrig))ROM_PWMTABLE[14])
2045 #endif
2046 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2047  defined(TARGET_IS_BLIZZARD_RA3) || \
2048  defined(TARGET_IS_BLIZZARD_RB1)
2049 #define ROM_PWMGenIntTrigDisable \
2050  ((void (*)(uint32_t ui32Base, \
2051  uint32_t ui32Gen, \
2052  uint32_t ui32IntTrig))ROM_PWMTABLE[15])
2053 #endif
2054 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2055  defined(TARGET_IS_BLIZZARD_RA3) || \
2056  defined(TARGET_IS_BLIZZARD_RB1)
2057 #define ROM_PWMGenIntStatus \
2058  ((uint32_t (*)(uint32_t ui32Base, \
2059  uint32_t ui32Gen, \
2060  bool bMasked))ROM_PWMTABLE[16])
2061 #endif
2062 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2063  defined(TARGET_IS_BLIZZARD_RA3) || \
2064  defined(TARGET_IS_BLIZZARD_RB1)
2065 #define ROM_PWMGenIntClear \
2066  ((void (*)(uint32_t ui32Base, \
2067  uint32_t ui32Gen, \
2068  uint32_t ui32Ints))ROM_PWMTABLE[17])
2069 #endif
2070 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2071  defined(TARGET_IS_BLIZZARD_RA3) || \
2072  defined(TARGET_IS_BLIZZARD_RB1)
2073 #define ROM_PWMIntEnable \
2074  ((void (*)(uint32_t ui32Base, \
2075  uint32_t ui32GenFault))ROM_PWMTABLE[18])
2076 #endif
2077 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2078  defined(TARGET_IS_BLIZZARD_RA3) || \
2079  defined(TARGET_IS_BLIZZARD_RB1)
2080 #define ROM_PWMIntDisable \
2081  ((void (*)(uint32_t ui32Base, \
2082  uint32_t ui32GenFault))ROM_PWMTABLE[19])
2083 #endif
2084 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2085  defined(TARGET_IS_BLIZZARD_RA3) || \
2086  defined(TARGET_IS_BLIZZARD_RB1)
2087 #define ROM_PWMFaultIntClear \
2088  ((void (*)(uint32_t ui32Base))ROM_PWMTABLE[20])
2089 #endif
2090 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2091  defined(TARGET_IS_BLIZZARD_RA3) || \
2092  defined(TARGET_IS_BLIZZARD_RB1)
2093 #define ROM_PWMIntStatus \
2094  ((uint32_t (*)(uint32_t ui32Base, \
2095  bool bMasked))ROM_PWMTABLE[21])
2096 #endif
2097 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2098  defined(TARGET_IS_BLIZZARD_RA3) || \
2099  defined(TARGET_IS_BLIZZARD_RB1)
2100 #define ROM_PWMOutputFaultLevel \
2101  ((void (*)(uint32_t ui32Base, \
2102  uint32_t ui32PWMOutBits, \
2103  bool bDriveHigh))ROM_PWMTABLE[22])
2104 #endif
2105 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2106  defined(TARGET_IS_BLIZZARD_RA3) || \
2107  defined(TARGET_IS_BLIZZARD_RB1)
2108 #define ROM_PWMFaultIntClearExt \
2109  ((void (*)(uint32_t ui32Base, \
2110  uint32_t ui32FaultInts))ROM_PWMTABLE[23])
2111 #endif
2112 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2113  defined(TARGET_IS_BLIZZARD_RA3) || \
2114  defined(TARGET_IS_BLIZZARD_RB1)
2115 #define ROM_PWMGenFaultConfigure \
2116  ((void (*)(uint32_t ui32Base, \
2117  uint32_t ui32Gen, \
2118  uint32_t ui32MinFaultPeriod, \
2119  uint32_t ui32FaultSenses))ROM_PWMTABLE[24])
2120 #endif
2121 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2122  defined(TARGET_IS_BLIZZARD_RA3) || \
2123  defined(TARGET_IS_BLIZZARD_RB1)
2124 #define ROM_PWMGenFaultTriggerSet \
2125  ((void (*)(uint32_t ui32Base, \
2126  uint32_t ui32Gen, \
2127  uint32_t ui32Group, \
2128  uint32_t ui32FaultTriggers))ROM_PWMTABLE[25])
2129 #endif
2130 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2131  defined(TARGET_IS_BLIZZARD_RA3) || \
2132  defined(TARGET_IS_BLIZZARD_RB1)
2133 #define ROM_PWMGenFaultTriggerGet \
2134  ((uint32_t (*)(uint32_t ui32Base, \
2135  uint32_t ui32Gen, \
2136  uint32_t ui32Group))ROM_PWMTABLE[26])
2137 #endif
2138 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2139  defined(TARGET_IS_BLIZZARD_RA3) || \
2140  defined(TARGET_IS_BLIZZARD_RB1)
2141 #define ROM_PWMGenFaultStatus \
2142  ((uint32_t (*)(uint32_t ui32Base, \
2143  uint32_t ui32Gen, \
2144  uint32_t ui32Group))ROM_PWMTABLE[27])
2145 #endif
2146 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2147  defined(TARGET_IS_BLIZZARD_RA3) || \
2148  defined(TARGET_IS_BLIZZARD_RB1)
2149 #define ROM_PWMGenFaultClear \
2150  ((void (*)(uint32_t ui32Base, \
2151  uint32_t ui32Gen, \
2152  uint32_t ui32Group, \
2153  uint32_t ui32FaultTriggers))ROM_PWMTABLE[28])
2154 #endif
2155 
2156 //*****************************************************************************
2157 //
2158 // Macros for calling ROM functions in the QEI API.
2159 //
2160 //*****************************************************************************
2161 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2162  defined(TARGET_IS_BLIZZARD_RA3) || \
2163  defined(TARGET_IS_BLIZZARD_RB1)
2164 #define ROM_QEIPositionGet \
2165  ((uint32_t (*)(uint32_t ui32Base))ROM_QEITABLE[0])
2166 #endif
2167 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2168  defined(TARGET_IS_BLIZZARD_RA3) || \
2169  defined(TARGET_IS_BLIZZARD_RB1)
2170 #define ROM_QEIEnable \
2171  ((void (*)(uint32_t ui32Base))ROM_QEITABLE[1])
2172 #endif
2173 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2174  defined(TARGET_IS_BLIZZARD_RA3) || \
2175  defined(TARGET_IS_BLIZZARD_RB1)
2176 #define ROM_QEIDisable \
2177  ((void (*)(uint32_t ui32Base))ROM_QEITABLE[2])
2178 #endif
2179 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2180  defined(TARGET_IS_BLIZZARD_RA3) || \
2181  defined(TARGET_IS_BLIZZARD_RB1)
2182 #define ROM_QEIConfigure \
2183  ((void (*)(uint32_t ui32Base, \
2184  uint32_t ui32Config, \
2185  uint32_t ui32MaxPosition))ROM_QEITABLE[3])
2186 #endif
2187 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2188  defined(TARGET_IS_BLIZZARD_RA3) || \
2189  defined(TARGET_IS_BLIZZARD_RB1)
2190 #define ROM_QEIPositionSet \
2191  ((void (*)(uint32_t ui32Base, \
2192  uint32_t ui32Position))ROM_QEITABLE[4])
2193 #endif
2194 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2195  defined(TARGET_IS_BLIZZARD_RA3) || \
2196  defined(TARGET_IS_BLIZZARD_RB1)
2197 #define ROM_QEIDirectionGet \
2198  ((int32_t (*)(uint32_t ui32Base))ROM_QEITABLE[5])
2199 #endif
2200 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2201  defined(TARGET_IS_BLIZZARD_RA3) || \
2202  defined(TARGET_IS_BLIZZARD_RB1)
2203 #define ROM_QEIErrorGet \
2204  ((bool (*)(uint32_t ui32Base))ROM_QEITABLE[6])
2205 #endif
2206 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2207  defined(TARGET_IS_BLIZZARD_RA3) || \
2208  defined(TARGET_IS_BLIZZARD_RB1)
2209 #define ROM_QEIVelocityEnable \
2210  ((void (*)(uint32_t ui32Base))ROM_QEITABLE[7])
2211 #endif
2212 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2213  defined(TARGET_IS_BLIZZARD_RA3) || \
2214  defined(TARGET_IS_BLIZZARD_RB1)
2215 #define ROM_QEIVelocityDisable \
2216  ((void (*)(uint32_t ui32Base))ROM_QEITABLE[8])
2217 #endif
2218 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2219  defined(TARGET_IS_BLIZZARD_RA3) || \
2220  defined(TARGET_IS_BLIZZARD_RB1)
2221 #define ROM_QEIVelocityConfigure \
2222  ((void (*)(uint32_t ui32Base, \
2223  uint32_t ui32PreDiv, \
2224  uint32_t ui32Period))ROM_QEITABLE[9])
2225 #endif
2226 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2227  defined(TARGET_IS_BLIZZARD_RA3) || \
2228  defined(TARGET_IS_BLIZZARD_RB1)
2229 #define ROM_QEIVelocityGet \
2230  ((uint32_t (*)(uint32_t ui32Base))ROM_QEITABLE[10])
2231 #endif
2232 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2233  defined(TARGET_IS_BLIZZARD_RA3) || \
2234  defined(TARGET_IS_BLIZZARD_RB1)
2235 #define ROM_QEIIntEnable \
2236  ((void (*)(uint32_t ui32Base, \
2237  uint32_t ui32IntFlags))ROM_QEITABLE[11])
2238 #endif
2239 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2240  defined(TARGET_IS_BLIZZARD_RA3) || \
2241  defined(TARGET_IS_BLIZZARD_RB1)
2242 #define ROM_QEIIntDisable \
2243  ((void (*)(uint32_t ui32Base, \
2244  uint32_t ui32IntFlags))ROM_QEITABLE[12])
2245 #endif
2246 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2247  defined(TARGET_IS_BLIZZARD_RA3) || \
2248  defined(TARGET_IS_BLIZZARD_RB1)
2249 #define ROM_QEIIntStatus \
2250  ((uint32_t (*)(uint32_t ui32Base, \
2251  bool bMasked))ROM_QEITABLE[13])
2252 #endif
2253 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2254  defined(TARGET_IS_BLIZZARD_RA3) || \
2255  defined(TARGET_IS_BLIZZARD_RB1)
2256 #define ROM_QEIIntClear \
2257  ((void (*)(uint32_t ui32Base, \
2258  uint32_t ui32IntFlags))ROM_QEITABLE[14])
2259 #endif
2260 
2261 //*****************************************************************************
2262 //
2263 // Macros for calling ROM functions in the SMBus API.
2264 //
2265 //*****************************************************************************
2266 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2267  defined(TARGET_IS_BLIZZARD_RA3) || \
2268  defined(TARGET_IS_BLIZZARD_RB1)
2269 #define ROM_SMBusMasterIntProcess \
2270  ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[0])
2271 #endif
2272 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2273  defined(TARGET_IS_BLIZZARD_RA3) || \
2274  defined(TARGET_IS_BLIZZARD_RB1)
2275 #define ROM_SMBusARPDisable \
2276  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[1])
2277 #endif
2278 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2279  defined(TARGET_IS_BLIZZARD_RA3) || \
2280  defined(TARGET_IS_BLIZZARD_RB1)
2281 #define ROM_SMBusARPEnable \
2282  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[2])
2283 #endif
2284 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2285  defined(TARGET_IS_BLIZZARD_RA3) || \
2286  defined(TARGET_IS_BLIZZARD_RB1)
2287 #define ROM_SMBusARPUDIDPacketDecode \
2288  ((void (*)(tSMBusUDID *pUDID, \
2289  uint8_t *pui8Address, \
2290  uint8_t *pui8Data))ROM_SMBUSTABLE[3])
2291 #endif
2292 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2293  defined(TARGET_IS_BLIZZARD_RA3) || \
2294  defined(TARGET_IS_BLIZZARD_RB1)
2295 #define ROM_SMBusARPUDIDPacketEncode \
2296  ((void (*)(tSMBusUDID *pUDID, \
2297  uint8_t ui8Address, \
2298  uint8_t *pui8Data))ROM_SMBUSTABLE[4])
2299 #endif
2300 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2301  defined(TARGET_IS_BLIZZARD_RA3) || \
2302  defined(TARGET_IS_BLIZZARD_RB1)
2303 #define ROM_SMBusMasterARPAssignAddress \
2304  ((tSMBusStatus (*)(tSMBus *psSMBus, \
2305  uint8_t *pui8Data))ROM_SMBUSTABLE[5])
2306 #endif
2307 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2308  defined(TARGET_IS_BLIZZARD_RA3) || \
2309  defined(TARGET_IS_BLIZZARD_RB1)
2310 #define ROM_SMBusMasterARPGetUDIDDir \
2311  ((tSMBusStatus (*)(tSMBus *psSMBus, \
2312  uint8_t ui8TargetAddress, \
2313  uint8_t *pui8Data))ROM_SMBUSTABLE[6])
2314 #endif
2315 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2316  defined(TARGET_IS_BLIZZARD_RA3) || \
2317  defined(TARGET_IS_BLIZZARD_RB1)
2318 #define ROM_SMBusMasterARPGetUDIDGen \
2319  ((tSMBusStatus (*)(tSMBus *psSMBus, \
2320  uint8_t *pui8Data))ROM_SMBUSTABLE[7])
2321 #endif
2322 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2323  defined(TARGET_IS_BLIZZARD_RA3) || \
2324  defined(TARGET_IS_BLIZZARD_RB1)
2325 #define ROM_SMBusMasterARPNotifyMaster \
2326  ((tSMBusStatus (*)(tSMBus *psSMBus, \
2327  uint8_t *pui8Data))ROM_SMBUSTABLE[8])
2328 #endif
2329 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2330  defined(TARGET_IS_BLIZZARD_RA3) || \
2331  defined(TARGET_IS_BLIZZARD_RB1)
2332 #define ROM_SMBusMasterARPPrepareToARP \
2333  ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[9])
2334 #endif
2335 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2336  defined(TARGET_IS_BLIZZARD_RA3) || \
2337  defined(TARGET_IS_BLIZZARD_RB1)
2338 #define ROM_SMBusMasterARPResetDeviceDir \
2339  ((tSMBusStatus (*)(tSMBus *psSMBus, \
2340  uint8_t ui8TargetAddress))ROM_SMBUSTABLE[10])
2341 #endif
2342 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2343  defined(TARGET_IS_BLIZZARD_RA3) || \
2344  defined(TARGET_IS_BLIZZARD_RB1)
2345 #define ROM_SMBusMasterARPResetDeviceGen \
2346  ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[11])
2347 #endif
2348 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2349  defined(TARGET_IS_BLIZZARD_RA3) || \
2350  defined(TARGET_IS_BLIZZARD_RB1)
2351 #define ROM_SMBusMasterBlockProcessCall \
2352  ((tSMBusStatus (*)(tSMBus *psSMBus, \
2353  uint8_t ui8TargetAddress, \
2354  uint8_t ui8Command, \
2355  uint8_t *pui8TxData, \
2356  uint8_t ui8TxSize, \
2357  uint8_t *pui8RxData))ROM_SMBUSTABLE[12])
2358 #endif
2359 #if defined(TARGET_IS_BLIZZARD_RA3) || \
2360  defined(TARGET_IS_BLIZZARD_RB1)
2361 #define ROM_SMBusMasterBlockRead \
2362  ((tSMBusStatus (*)(tSMBus *psSMBus, \
2363  uint8_t ui8TargetAddress, \
2364  uint8_t ui8Command, \
2365  uint8_t *pui8Data))ROM_SMBUSTABLE[13])
2366 #endif
2367 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2368  defined(TARGET_IS_BLIZZARD_RA3) || \
2369  defined(TARGET_IS_BLIZZARD_RB1)
2370 #define ROM_SMBusMasterBlockWrite \
2371  ((tSMBusStatus (*)(tSMBus *psSMBus, \
2372  uint8_t ui8TargetAddress, \
2373  uint8_t ui8Command, \
2374  uint8_t *pui8Data, \
2375  uint8_t ui8Size))ROM_SMBUSTABLE[14])
2376 #endif
2377 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2378  defined(TARGET_IS_BLIZZARD_RA3) || \
2379  defined(TARGET_IS_BLIZZARD_RB1)
2380 #define ROM_SMBusMasterByteReceive \
2381  ((tSMBusStatus (*)(tSMBus *psSMBus, \
2382  uint8_t ui8TargetAddress, \
2383  uint8_t *pui8Data))ROM_SMBUSTABLE[15])
2384 #endif
2385 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2386  defined(TARGET_IS_BLIZZARD_RA3) || \
2387  defined(TARGET_IS_BLIZZARD_RB1)
2388 #define ROM_SMBusMasterByteSend \
2389  ((tSMBusStatus (*)(tSMBus *psSMBus, \
2390  uint8_t ui8TargetAddress, \
2391  uint8_t ui8Data))ROM_SMBUSTABLE[16])
2392 #endif
2393 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2394  defined(TARGET_IS_BLIZZARD_RA3) || \
2395  defined(TARGET_IS_BLIZZARD_RB1)
2396 #define ROM_SMBusMasterByteWordRead \
2397  ((tSMBusStatus (*)(tSMBus *psSMBus, \
2398  uint8_t ui8TargetAddress, \
2399  uint8_t ui8Command, \
2400  uint8_t *pui8Data, \
2401  uint8_t ui8Size))ROM_SMBUSTABLE[17])
2402 #endif
2403 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2404  defined(TARGET_IS_BLIZZARD_RA3) || \
2405  defined(TARGET_IS_BLIZZARD_RB1)
2406 #define ROM_SMBusMasterByteWordWrite \
2407  ((tSMBusStatus (*)(tSMBus *psSMBus, \
2408  uint8_t ui8TargetAddress, \
2409  uint8_t ui8Command, \
2410  uint8_t *pui8Data, \
2411  uint8_t ui8Size))ROM_SMBUSTABLE[18])
2412 #endif
2413 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2414  defined(TARGET_IS_BLIZZARD_RA3) || \
2415  defined(TARGET_IS_BLIZZARD_RB1)
2416 #define ROM_SMBusMasterHostNotify \
2417  ((tSMBusStatus (*)(tSMBus *psSMBus, \
2418  uint8_t ui8OwnSlaveAddress, \
2419  uint8_t *pui8Data))ROM_SMBUSTABLE[19])
2420 #endif
2421 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2422  defined(TARGET_IS_BLIZZARD_RA3) || \
2423  defined(TARGET_IS_BLIZZARD_RB1)
2424 #define ROM_SMBusMasterI2CRead \
2425  ((tSMBusStatus (*)(tSMBus *psSMBus, \
2426  uint8_t ui8TargetAddress, \
2427  uint8_t *pui8Data, \
2428  uint8_t ui8Size))ROM_SMBUSTABLE[20])
2429 #endif
2430 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2431  defined(TARGET_IS_BLIZZARD_RA3) || \
2432  defined(TARGET_IS_BLIZZARD_RB1)
2433 #define ROM_SMBusMasterI2CWrite \
2434  ((tSMBusStatus (*)(tSMBus *psSMBus, \
2435  uint8_t ui8TargetAddress, \
2436  uint8_t *pui8Data, \
2437  uint8_t ui8Size))ROM_SMBUSTABLE[21])
2438 #endif
2439 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2440  defined(TARGET_IS_BLIZZARD_RA3) || \
2441  defined(TARGET_IS_BLIZZARD_RB1)
2442 #define ROM_SMBusMasterI2CWriteRead \
2443  ((tSMBusStatus (*)(tSMBus *psSMBus, \
2444  uint8_t ui8TargetAddress, \
2445  uint8_t *pui8TxData, \
2446  uint8_t ui8TxSize, \
2447  uint8_t *pui8RxData, \
2448  uint8_t ui8RxSize))ROM_SMBUSTABLE[22])
2449 #endif
2450 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2451  defined(TARGET_IS_BLIZZARD_RA3) || \
2452  defined(TARGET_IS_BLIZZARD_RB1)
2453 #define ROM_SMBusMasterInit \
2454  ((void (*)(tSMBus *psSMBus, \
2455  uint32_t ui32I2CBase, \
2456  uint32_t ui32SMBusClock))ROM_SMBUSTABLE[23])
2457 #endif
2458 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2459  defined(TARGET_IS_BLIZZARD_RA3) || \
2460  defined(TARGET_IS_BLIZZARD_RB1)
2461 #define ROM_SMBusMasterIntEnable \
2462  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[24])
2463 #endif
2464 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2465  defined(TARGET_IS_BLIZZARD_RA3) || \
2466  defined(TARGET_IS_BLIZZARD_RB1)
2467 #define ROM_SMBusMasterProcessCall \
2468  ((tSMBusStatus (*)(tSMBus *psSMBus, \
2469  uint8_t ui8TargetAddress, \
2470  uint8_t ui8Command, \
2471  uint8_t *pui8TxData, \
2472  uint8_t *pui8RxData))ROM_SMBUSTABLE[25])
2473 #endif
2474 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2475  defined(TARGET_IS_BLIZZARD_RA3) || \
2476  defined(TARGET_IS_BLIZZARD_RB1)
2477 #define ROM_SMBusMasterQuickCommand \
2478  ((tSMBusStatus (*)(tSMBus *psSMBus, \
2479  uint8_t ui8TargetAddress, \
2480  bool bData))ROM_SMBUSTABLE[26])
2481 #endif
2482 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2483  defined(TARGET_IS_BLIZZARD_RA3) || \
2484  defined(TARGET_IS_BLIZZARD_RB1)
2485 #define ROM_SMBusPECDisable \
2486  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[27])
2487 #endif
2488 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2489  defined(TARGET_IS_BLIZZARD_RA3) || \
2490  defined(TARGET_IS_BLIZZARD_RB1)
2491 #define ROM_SMBusPECEnable \
2492  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[28])
2493 #endif
2494 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2495  defined(TARGET_IS_BLIZZARD_RA3) || \
2496  defined(TARGET_IS_BLIZZARD_RB1)
2497 #define ROM_SMBusRxPacketSizeGet \
2498  ((uint8_t (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[29])
2499 #endif
2500 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2501  defined(TARGET_IS_BLIZZARD_RA3) || \
2502  defined(TARGET_IS_BLIZZARD_RB1)
2503 #define ROM_SMBusSlaveACKSend \
2504  ((void (*)(tSMBus *psSMBus, \
2505  bool bACK))ROM_SMBUSTABLE[30])
2506 #endif
2507 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2508  defined(TARGET_IS_BLIZZARD_RA3) || \
2509  defined(TARGET_IS_BLIZZARD_RB1)
2510 #define ROM_SMBusSlaveAddressSet \
2511  ((void (*)(tSMBus *psSMBus, \
2512  uint8_t ui8AddressNum, \
2513  uint8_t ui8SlaveAddress))ROM_SMBUSTABLE[31])
2514 #endif
2515 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2516  defined(TARGET_IS_BLIZZARD_RA3) || \
2517  defined(TARGET_IS_BLIZZARD_RB1)
2518 #define ROM_SMBusSlaveARPFlagARGet \
2519  ((bool (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[32])
2520 #endif
2521 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2522  defined(TARGET_IS_BLIZZARD_RA3) || \
2523  defined(TARGET_IS_BLIZZARD_RB1)
2524 #define ROM_SMBusSlaveARPFlagARSet \
2525  ((void (*)(tSMBus *psSMBus, \
2526  bool bValue))ROM_SMBUSTABLE[33])
2527 #endif
2528 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2529  defined(TARGET_IS_BLIZZARD_RA3) || \
2530  defined(TARGET_IS_BLIZZARD_RB1)
2531 #define ROM_SMBusSlaveARPFlagAVGet \
2532  ((bool (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[34])
2533 #endif
2534 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2535  defined(TARGET_IS_BLIZZARD_RA3) || \
2536  defined(TARGET_IS_BLIZZARD_RB1)
2537 #define ROM_SMBusSlaveARPFlagAVSet \
2538  ((void (*)(tSMBus *psSMBus, \
2539  bool bValue))ROM_SMBUSTABLE[35])
2540 #endif
2541 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2542  defined(TARGET_IS_BLIZZARD_RA3) || \
2543  defined(TARGET_IS_BLIZZARD_RB1)
2544 #define ROM_SMBusSlaveBlockTransferDisable \
2545  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[36])
2546 #endif
2547 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2548  defined(TARGET_IS_BLIZZARD_RA3) || \
2549  defined(TARGET_IS_BLIZZARD_RB1)
2550 #define ROM_SMBusSlaveBlockTransferEnable \
2551  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[37])
2552 #endif
2553 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2554  defined(TARGET_IS_BLIZZARD_RA3) || \
2555  defined(TARGET_IS_BLIZZARD_RB1)
2556 #define ROM_SMBusSlaveCommandGet \
2557  ((uint8_t (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[38])
2558 #endif
2559 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2560  defined(TARGET_IS_BLIZZARD_RA3) || \
2561  defined(TARGET_IS_BLIZZARD_RB1)
2562 #define ROM_SMBusSlaveI2CDisable \
2563  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[39])
2564 #endif
2565 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2566  defined(TARGET_IS_BLIZZARD_RA3) || \
2567  defined(TARGET_IS_BLIZZARD_RB1)
2568 #define ROM_SMBusSlaveI2CEnable \
2569  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[40])
2570 #endif
2571 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2572  defined(TARGET_IS_BLIZZARD_RA3) || \
2573  defined(TARGET_IS_BLIZZARD_RB1)
2574 #define ROM_SMBusSlaveInit \
2575  ((void (*)(tSMBus *psSMBus, \
2576  uint32_t ui32I2CBase))ROM_SMBUSTABLE[41])
2577 #endif
2578 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2579  defined(TARGET_IS_BLIZZARD_RA3) || \
2580  defined(TARGET_IS_BLIZZARD_RB1)
2581 #define ROM_SMBusSlaveIntAddressGet \
2582  ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[42])
2583 #endif
2584 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2585  defined(TARGET_IS_BLIZZARD_RA3) || \
2586  defined(TARGET_IS_BLIZZARD_RB1)
2587 #define ROM_SMBusSlaveIntEnable \
2588  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[43])
2589 #endif
2590 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2591  defined(TARGET_IS_BLIZZARD_RA3) || \
2592  defined(TARGET_IS_BLIZZARD_RB1)
2593 #define ROM_SMBusSlaveIntProcess \
2594  ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[44])
2595 #endif
2596 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2597  defined(TARGET_IS_BLIZZARD_RA3) || \
2598  defined(TARGET_IS_BLIZZARD_RB1)
2599 #define ROM_SMBusSlaveManualACKDisable \
2600  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[45])
2601 #endif
2602 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2603  defined(TARGET_IS_BLIZZARD_RA3) || \
2604  defined(TARGET_IS_BLIZZARD_RB1)
2605 #define ROM_SMBusSlaveManualACKEnable \
2606  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[46])
2607 #endif
2608 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2609  defined(TARGET_IS_BLIZZARD_RA3) || \
2610  defined(TARGET_IS_BLIZZARD_RB1)
2611 #define ROM_SMBusSlaveManualACKStatusGet \
2612  ((bool (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[47])
2613 #endif
2614 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2615  defined(TARGET_IS_BLIZZARD_RA3) || \
2616  defined(TARGET_IS_BLIZZARD_RB1)
2617 #define ROM_SMBusSlaveProcessCallDisable \
2618  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[48])
2619 #endif
2620 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2621  defined(TARGET_IS_BLIZZARD_RA3) || \
2622  defined(TARGET_IS_BLIZZARD_RB1)
2623 #define ROM_SMBusSlaveProcessCallEnable \
2624  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[49])
2625 #endif
2626 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2627  defined(TARGET_IS_BLIZZARD_RA3) || \
2628  defined(TARGET_IS_BLIZZARD_RB1)
2629 #define ROM_SMBusSlaveRxBufferSet \
2630  ((void (*)(tSMBus *psSMBus, \
2631  uint8_t *pui8Data, \
2632  uint8_t ui8Size))ROM_SMBUSTABLE[50])
2633 #endif
2634 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2635  defined(TARGET_IS_BLIZZARD_RA3) || \
2636  defined(TARGET_IS_BLIZZARD_RB1)
2637 #define ROM_SMBusSlaveTransferInit \
2638  ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[51])
2639 #endif
2640 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2641  defined(TARGET_IS_BLIZZARD_RA3) || \
2642  defined(TARGET_IS_BLIZZARD_RB1)
2643 #define ROM_SMBusSlaveTxBufferSet \
2644  ((void (*)(tSMBus *psSMBus, \
2645  uint8_t *pui8Data, \
2646  uint8_t ui8Size))ROM_SMBUSTABLE[52])
2647 #endif
2648 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2649  defined(TARGET_IS_BLIZZARD_RA3) || \
2650  defined(TARGET_IS_BLIZZARD_RB1)
2651 #define ROM_SMBusSlaveUDIDSet \
2652  ((void (*)(tSMBus *psSMBus, \
2653  tSMBusUDID *pUDID))ROM_SMBUSTABLE[53])
2654 #endif
2655 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2656  defined(TARGET_IS_BLIZZARD_RA3) || \
2657  defined(TARGET_IS_BLIZZARD_RB1)
2658 #define ROM_SMBusStatusGet \
2659  ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[54])
2660 #endif
2661 #if defined(TARGET_IS_BLIZZARD_RA3) || \
2662  defined(TARGET_IS_BLIZZARD_RB1)
2663 #define ROM_SMBusSlaveDataSend \
2664  ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[55])
2665 #endif
2666 
2667 //*****************************************************************************
2668 //
2669 // Macros for calling ROM functions in the SSI API.
2670 //
2671 //*****************************************************************************
2672 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2673  defined(TARGET_IS_BLIZZARD_RA3) || \
2674  defined(TARGET_IS_BLIZZARD_RB1)
2675 #define ROM_SSIDataPut \
2676  ((void (*)(uint32_t ui32Base, \
2677  uint32_t ui32Data))ROM_SSITABLE[0])
2678 #endif
2679 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2680  defined(TARGET_IS_BLIZZARD_RA3) || \
2681  defined(TARGET_IS_BLIZZARD_RB1)
2682 #define ROM_SSIConfigSetExpClk \
2683  ((void (*)(uint32_t ui32Base, \
2684  uint32_t ui32SSIClk, \
2685  uint32_t ui32Protocol, \
2686  uint32_t ui32Mode, \
2687  uint32_t ui32BitRate, \
2688  uint32_t ui32DataWidth))ROM_SSITABLE[1])
2689 #endif
2690 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2691  defined(TARGET_IS_BLIZZARD_RA3) || \
2692  defined(TARGET_IS_BLIZZARD_RB1)
2693 #define ROM_SSIEnable \
2694  ((void (*)(uint32_t ui32Base))ROM_SSITABLE[2])
2695 #endif
2696 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2697  defined(TARGET_IS_BLIZZARD_RA3) || \
2698  defined(TARGET_IS_BLIZZARD_RB1)
2699 #define ROM_SSIDisable \
2700  ((void (*)(uint32_t ui32Base))ROM_SSITABLE[3])
2701 #endif
2702 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2703  defined(TARGET_IS_BLIZZARD_RA3) || \
2704  defined(TARGET_IS_BLIZZARD_RB1)
2705 #define ROM_SSIIntEnable \
2706  ((void (*)(uint32_t ui32Base, \
2707  uint32_t ui32IntFlags))ROM_SSITABLE[4])
2708 #endif
2709 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2710  defined(TARGET_IS_BLIZZARD_RA3) || \
2711  defined(TARGET_IS_BLIZZARD_RB1)
2712 #define ROM_SSIIntDisable \
2713  ((void (*)(uint32_t ui32Base, \
2714  uint32_t ui32IntFlags))ROM_SSITABLE[5])
2715 #endif
2716 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2717  defined(TARGET_IS_BLIZZARD_RA3) || \
2718  defined(TARGET_IS_BLIZZARD_RB1)
2719 #define ROM_SSIIntStatus \
2720  ((uint32_t (*)(uint32_t ui32Base, \
2721  bool bMasked))ROM_SSITABLE[6])
2722 #endif
2723 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2724  defined(TARGET_IS_BLIZZARD_RA3) || \
2725  defined(TARGET_IS_BLIZZARD_RB1)
2726 #define ROM_SSIIntClear \
2727  ((void (*)(uint32_t ui32Base, \
2728  uint32_t ui32IntFlags))ROM_SSITABLE[7])
2729 #endif
2730 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2731  defined(TARGET_IS_BLIZZARD_RA3) || \
2732  defined(TARGET_IS_BLIZZARD_RB1)
2733 #define ROM_SSIDataPutNonBlocking \
2734  ((int32_t (*)(uint32_t ui32Base, \
2735  uint32_t ui32Data))ROM_SSITABLE[8])
2736 #endif
2737 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2738  defined(TARGET_IS_BLIZZARD_RA3) || \
2739  defined(TARGET_IS_BLIZZARD_RB1)
2740 #define ROM_SSIDataGet \
2741  ((void (*)(uint32_t ui32Base, \
2742  uint32_t *pui32Data))ROM_SSITABLE[9])
2743 #endif
2744 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2745  defined(TARGET_IS_BLIZZARD_RA3) || \
2746  defined(TARGET_IS_BLIZZARD_RB1)
2747 #define ROM_SSIDataGetNonBlocking \
2748  ((int32_t (*)(uint32_t ui32Base, \
2749  uint32_t *pui32Data))ROM_SSITABLE[10])
2750 #endif
2751 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2752  defined(TARGET_IS_BLIZZARD_RA3) || \
2753  defined(TARGET_IS_BLIZZARD_RB1)
2754 #define ROM_UpdateSSI \
2755  ((void (*)(void))ROM_SSITABLE[11])
2756 #endif
2757 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2758  defined(TARGET_IS_BLIZZARD_RA3) || \
2759  defined(TARGET_IS_BLIZZARD_RB1)
2760 #define ROM_SSIDMAEnable \
2761  ((void (*)(uint32_t ui32Base, \
2762  uint32_t ui32DMAFlags))ROM_SSITABLE[12])
2763 #endif
2764 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2765  defined(TARGET_IS_BLIZZARD_RA3) || \
2766  defined(TARGET_IS_BLIZZARD_RB1)
2767 #define ROM_SSIDMADisable \
2768  ((void (*)(uint32_t ui32Base, \
2769  uint32_t ui32DMAFlags))ROM_SSITABLE[13])
2770 #endif
2771 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2772  defined(TARGET_IS_BLIZZARD_RA3) || \
2773  defined(TARGET_IS_BLIZZARD_RB1)
2774 #define ROM_SSIBusy \
2775  ((bool (*)(uint32_t ui32Base))ROM_SSITABLE[14])
2776 #endif
2777 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2778  defined(TARGET_IS_BLIZZARD_RA3) || \
2779  defined(TARGET_IS_BLIZZARD_RB1)
2780 #define ROM_SSIClockSourceGet \
2781  ((uint32_t (*)(uint32_t ui32Base))ROM_SSITABLE[15])
2782 #endif
2783 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2784  defined(TARGET_IS_BLIZZARD_RA3) || \
2785  defined(TARGET_IS_BLIZZARD_RB1)
2786 #define ROM_SSIClockSourceSet \
2787  ((void (*)(uint32_t ui32Base, \
2788  uint32_t ui32Source))ROM_SSITABLE[16])
2789 #endif
2790 
2791 //*****************************************************************************
2792 //
2793 // Macros for calling ROM functions in the SysCtl API.
2794 //
2795 //*****************************************************************************
2796 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2797  defined(TARGET_IS_BLIZZARD_RA3) || \
2798  defined(TARGET_IS_BLIZZARD_RB1)
2799 #define ROM_SysCtlSleep \
2800  ((void (*)(void))ROM_SYSCTLTABLE[0])
2801 #endif
2802 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2803  defined(TARGET_IS_BLIZZARD_RA3) || \
2804  defined(TARGET_IS_BLIZZARD_RB1)
2805 #define ROM_SysCtlSRAMSizeGet \
2806  ((uint32_t (*)(void))ROM_SYSCTLTABLE[1])
2807 #endif
2808 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2809  defined(TARGET_IS_BLIZZARD_RA3) || \
2810  defined(TARGET_IS_BLIZZARD_RB1)
2811 #define ROM_SysCtlFlashSizeGet \
2812  ((uint32_t (*)(void))ROM_SYSCTLTABLE[2])
2813 #endif
2814 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2815  defined(TARGET_IS_BLIZZARD_RA3) || \
2816  defined(TARGET_IS_BLIZZARD_RB1)
2817 #define ROM_SysCtlPeripheralPresent \
2818  ((bool (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[4])
2819 #endif
2820 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2821  defined(TARGET_IS_BLIZZARD_RA3) || \
2822  defined(TARGET_IS_BLIZZARD_RB1)
2823 #define ROM_SysCtlPeripheralReset \
2824  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[5])
2825 #endif
2826 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2827  defined(TARGET_IS_BLIZZARD_RA3) || \
2828  defined(TARGET_IS_BLIZZARD_RB1)
2829 #define ROM_SysCtlPeripheralEnable \
2830  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[6])
2831 #endif
2832 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2833  defined(TARGET_IS_BLIZZARD_RA3) || \
2834  defined(TARGET_IS_BLIZZARD_RB1)
2835 #define ROM_SysCtlPeripheralDisable \
2836  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[7])
2837 #endif
2838 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2839  defined(TARGET_IS_BLIZZARD_RA3) || \
2840  defined(TARGET_IS_BLIZZARD_RB1)
2841 #define ROM_SysCtlPeripheralSleepEnable \
2842  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[8])
2843 #endif
2844 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2845  defined(TARGET_IS_BLIZZARD_RA3) || \
2846  defined(TARGET_IS_BLIZZARD_RB1)
2847 #define ROM_SysCtlPeripheralSleepDisable \
2848  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[9])
2849 #endif
2850 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2851  defined(TARGET_IS_BLIZZARD_RA3) || \
2852  defined(TARGET_IS_BLIZZARD_RB1)
2853 #define ROM_SysCtlPeripheralDeepSleepEnable \
2854  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[10])
2855 #endif
2856 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2857  defined(TARGET_IS_BLIZZARD_RA3) || \
2858  defined(TARGET_IS_BLIZZARD_RB1)
2859 #define ROM_SysCtlPeripheralDeepSleepDisable \
2860  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[11])
2861 #endif
2862 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2863  defined(TARGET_IS_BLIZZARD_RA3) || \
2864  defined(TARGET_IS_BLIZZARD_RB1)
2865 #define ROM_SysCtlPeripheralClockGating \
2866  ((void (*)(bool bEnable))ROM_SYSCTLTABLE[12])
2867 #endif
2868 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2869  defined(TARGET_IS_BLIZZARD_RA3) || \
2870  defined(TARGET_IS_BLIZZARD_RB1)
2871 #define ROM_SysCtlIntEnable \
2872  ((void (*)(uint32_t ui32Ints))ROM_SYSCTLTABLE[13])
2873 #endif
2874 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2875  defined(TARGET_IS_BLIZZARD_RA3) || \
2876  defined(TARGET_IS_BLIZZARD_RB1)
2877 #define ROM_SysCtlIntDisable \
2878  ((void (*)(uint32_t ui32Ints))ROM_SYSCTLTABLE[14])
2879 #endif
2880 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2881  defined(TARGET_IS_BLIZZARD_RA3) || \
2882  defined(TARGET_IS_BLIZZARD_RB1)
2883 #define ROM_SysCtlIntClear \
2884  ((void (*)(uint32_t ui32Ints))ROM_SYSCTLTABLE[15])
2885 #endif
2886 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2887  defined(TARGET_IS_BLIZZARD_RA3) || \
2888  defined(TARGET_IS_BLIZZARD_RB1)
2889 #define ROM_SysCtlIntStatus \
2890  ((uint32_t (*)(bool bMasked))ROM_SYSCTLTABLE[16])
2891 #endif
2892 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2893  defined(TARGET_IS_BLIZZARD_RA3) || \
2894  defined(TARGET_IS_BLIZZARD_RB1)
2895 #define ROM_SysCtlReset \
2896  ((void (*)(void))ROM_SYSCTLTABLE[19])
2897 #endif
2898 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2899  defined(TARGET_IS_BLIZZARD_RA3) || \
2900  defined(TARGET_IS_BLIZZARD_RB1)
2901 #define ROM_SysCtlDeepSleep \
2902  ((void (*)(void))ROM_SYSCTLTABLE[20])
2903 #endif
2904 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2905  defined(TARGET_IS_BLIZZARD_RA3) || \
2906  defined(TARGET_IS_BLIZZARD_RB1)
2907 #define ROM_SysCtlResetCauseGet \
2908  ((uint32_t (*)(void))ROM_SYSCTLTABLE[21])
2909 #endif
2910 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2911  defined(TARGET_IS_BLIZZARD_RA3) || \
2912  defined(TARGET_IS_BLIZZARD_RB1)
2913 #define ROM_SysCtlResetCauseClear \
2914  ((void (*)(uint32_t ui32Causes))ROM_SYSCTLTABLE[22])
2915 #endif
2916 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2917  defined(TARGET_IS_BLIZZARD_RA3) || \
2918  defined(TARGET_IS_BLIZZARD_RB1)
2919 #define ROM_SysCtlClockSet \
2920  ((void (*)(uint32_t ui32Config))ROM_SYSCTLTABLE[23])
2921 #endif
2922 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2923  defined(TARGET_IS_BLIZZARD_RA3) || \
2924  defined(TARGET_IS_BLIZZARD_RB1)
2925 #define ROM_SysCtlClockGet \
2926  ((uint32_t (*)(void))ROM_SYSCTLTABLE[24])
2927 #endif
2928 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2929  defined(TARGET_IS_BLIZZARD_RA3) || \
2930  defined(TARGET_IS_BLIZZARD_RB1)
2931 #define ROM_SysCtlPWMClockSet \
2932  ((void (*)(uint32_t ui32Config))ROM_SYSCTLTABLE[25])
2933 #endif
2934 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2935  defined(TARGET_IS_BLIZZARD_RA3) || \
2936  defined(TARGET_IS_BLIZZARD_RB1)
2937 #define ROM_SysCtlPWMClockGet \
2938  ((uint32_t (*)(void))ROM_SYSCTLTABLE[26])
2939 #endif
2940 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2941  defined(TARGET_IS_BLIZZARD_RA3) || \
2942  defined(TARGET_IS_BLIZZARD_RB1)
2943 #define ROM_SysCtlADCSpeedSet \
2944  ((void (*)(uint32_t ui32Speed))ROM_SYSCTLTABLE[27])
2945 #endif
2946 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2947  defined(TARGET_IS_BLIZZARD_RA3) || \
2948  defined(TARGET_IS_BLIZZARD_RB1)
2949 #define ROM_SysCtlADCSpeedGet \
2950  ((uint32_t (*)(void))ROM_SYSCTLTABLE[28])
2951 #endif
2952 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2953  defined(TARGET_IS_BLIZZARD_RA3) || \
2954  defined(TARGET_IS_BLIZZARD_RB1)
2955 #define ROM_SysCtlUSBPLLEnable \
2956  ((void (*)(void))ROM_SYSCTLTABLE[31])
2957 #endif
2958 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2959  defined(TARGET_IS_BLIZZARD_RA3) || \
2960  defined(TARGET_IS_BLIZZARD_RB1)
2961 #define ROM_SysCtlUSBPLLDisable \
2962  ((void (*)(void))ROM_SYSCTLTABLE[32])
2963 #endif
2964 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2965  defined(TARGET_IS_BLIZZARD_RA3) || \
2966  defined(TARGET_IS_BLIZZARD_RB1)
2967 #define ROM_SysCtlDelay \
2968  ((void (*)(uint32_t ui32Count))ROM_SYSCTLTABLE[34])
2969 #endif
2970 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2971  defined(TARGET_IS_BLIZZARD_RA3) || \
2972  defined(TARGET_IS_BLIZZARD_RB1)
2973 #define ROM_SysCtlPeripheralReady \
2974  ((bool (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[35])
2975 #endif
2976 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2977  defined(TARGET_IS_BLIZZARD_RA3) || \
2978  defined(TARGET_IS_BLIZZARD_RB1)
2979 #define ROM_SysCtlPeripheralPowerOn \
2980  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[36])
2981 #endif
2982 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2983  defined(TARGET_IS_BLIZZARD_RA3) || \
2984  defined(TARGET_IS_BLIZZARD_RB1)
2985 #define ROM_SysCtlPeripheralPowerOff \
2986  ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[37])
2987 #endif
2988 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2989  defined(TARGET_IS_BLIZZARD_RA3) || \
2990  defined(TARGET_IS_BLIZZARD_RB1)
2991 #define ROM_SysCtlMOSCConfigSet \
2992  ((void (*)(uint32_t ui32Config))ROM_SYSCTLTABLE[44])
2993 #endif
2994 #if defined(TARGET_IS_BLIZZARD_RA1) || \
2995  defined(TARGET_IS_BLIZZARD_RA3) || \
2996  defined(TARGET_IS_BLIZZARD_RB1)
2997 #define ROM_SysCtlPIOSCCalibrate \
2998  ((uint32_t (*)(uint32_t ui32Type))ROM_SYSCTLTABLE[45])
2999 #endif
3000 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3001  defined(TARGET_IS_BLIZZARD_RA3) || \
3002  defined(TARGET_IS_BLIZZARD_RB1)
3003 #define ROM_SysCtlDeepSleepClockSet \
3004  ((void (*)(uint32_t ui32Config))ROM_SYSCTLTABLE[46])
3005 #endif
3006 
3007 //*****************************************************************************
3008 //
3009 // Macros for calling ROM functions in the SysExc API.
3010 //
3011 //*****************************************************************************
3012 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3013  defined(TARGET_IS_BLIZZARD_RA3) || \
3014  defined(TARGET_IS_BLIZZARD_RB1)
3015 #define ROM_SysExcIntStatus \
3016  ((uint32_t (*)(bool bMasked))ROM_SYSEXCTABLE[0])
3017 #endif
3018 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3019  defined(TARGET_IS_BLIZZARD_RA3) || \
3020  defined(TARGET_IS_BLIZZARD_RB1)
3021 #define ROM_SysExcIntClear \
3022  ((void (*)(uint32_t ui32IntFlags))ROM_SYSEXCTABLE[1])
3023 #endif
3024 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3025  defined(TARGET_IS_BLIZZARD_RA3) || \
3026  defined(TARGET_IS_BLIZZARD_RB1)
3027 #define ROM_SysExcIntDisable \
3028  ((void (*)(uint32_t ui32IntFlags))ROM_SYSEXCTABLE[2])
3029 #endif
3030 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3031  defined(TARGET_IS_BLIZZARD_RA3) || \
3032  defined(TARGET_IS_BLIZZARD_RB1)
3033 #define ROM_SysExcIntEnable \
3034  ((void (*)(uint32_t ui32IntFlags))ROM_SYSEXCTABLE[3])
3035 #endif
3036 
3037 //*****************************************************************************
3038 //
3039 // Macros for calling ROM functions in the SysTick API.
3040 //
3041 //*****************************************************************************
3042 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3043  defined(TARGET_IS_BLIZZARD_RA3) || \
3044  defined(TARGET_IS_BLIZZARD_RB1)
3045 #define ROM_SysTickValueGet \
3046  ((uint32_t (*)(void))ROM_SYSTICKTABLE[0])
3047 #endif
3048 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3049  defined(TARGET_IS_BLIZZARD_RA3) || \
3050  defined(TARGET_IS_BLIZZARD_RB1)
3051 #define ROM_SysTickEnable \
3052  ((void (*)(void))ROM_SYSTICKTABLE[1])
3053 #endif
3054 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3055  defined(TARGET_IS_BLIZZARD_RA3) || \
3056  defined(TARGET_IS_BLIZZARD_RB1)
3057 #define ROM_SysTickDisable \
3058  ((void (*)(void))ROM_SYSTICKTABLE[2])
3059 #endif
3060 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3061  defined(TARGET_IS_BLIZZARD_RA3) || \
3062  defined(TARGET_IS_BLIZZARD_RB1)
3063 #define ROM_SysTickIntEnable \
3064  ((void (*)(void))ROM_SYSTICKTABLE[3])
3065 #endif
3066 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3067  defined(TARGET_IS_BLIZZARD_RA3) || \
3068  defined(TARGET_IS_BLIZZARD_RB1)
3069 #define ROM_SysTickIntDisable \
3070  ((void (*)(void))ROM_SYSTICKTABLE[4])
3071 #endif
3072 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3073  defined(TARGET_IS_BLIZZARD_RA3) || \
3074  defined(TARGET_IS_BLIZZARD_RB1)
3075 #define ROM_SysTickPeriodSet \
3076  ((void (*)(uint32_t ui32Period))ROM_SYSTICKTABLE[5])
3077 #endif
3078 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3079  defined(TARGET_IS_BLIZZARD_RA3) || \
3080  defined(TARGET_IS_BLIZZARD_RB1)
3081 #define ROM_SysTickPeriodGet \
3082  ((uint32_t (*)(void))ROM_SYSTICKTABLE[6])
3083 #endif
3084 
3085 //*****************************************************************************
3086 //
3087 // Macros for calling ROM functions in the Timer API.
3088 //
3089 //*****************************************************************************
3090 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3091  defined(TARGET_IS_BLIZZARD_RA3) || \
3092  defined(TARGET_IS_BLIZZARD_RB1)
3093 #define ROM_TimerIntClear \
3094  ((void (*)(uint32_t ui32Base, \
3095  uint32_t ui32IntFlags))ROM_TIMERTABLE[0])
3096 #endif
3097 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3098  defined(TARGET_IS_BLIZZARD_RA3) || \
3099  defined(TARGET_IS_BLIZZARD_RB1)
3100 #define ROM_TimerEnable \
3101  ((void (*)(uint32_t ui32Base, \
3102  uint32_t ui32Timer))ROM_TIMERTABLE[1])
3103 #endif
3104 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3105  defined(TARGET_IS_BLIZZARD_RA3) || \
3106  defined(TARGET_IS_BLIZZARD_RB1)
3107 #define ROM_TimerDisable \
3108  ((void (*)(uint32_t ui32Base, \
3109  uint32_t ui32Timer))ROM_TIMERTABLE[2])
3110 #endif
3111 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3112  defined(TARGET_IS_BLIZZARD_RA3) || \
3113  defined(TARGET_IS_BLIZZARD_RB1)
3114 #define ROM_TimerConfigure \
3115  ((void (*)(uint32_t ui32Base, \
3116  uint32_t ui32Config))ROM_TIMERTABLE[3])
3117 #endif
3118 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3119  defined(TARGET_IS_BLIZZARD_RA3) || \
3120  defined(TARGET_IS_BLIZZARD_RB1)
3121 #define ROM_TimerControlLevel \
3122  ((void (*)(uint32_t ui32Base, \
3123  uint32_t ui32Timer, \
3124  bool bInvert))ROM_TIMERTABLE[4])
3125 #endif
3126 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3127  defined(TARGET_IS_BLIZZARD_RA3) || \
3128  defined(TARGET_IS_BLIZZARD_RB1)
3129 #define ROM_TimerControlTrigger \
3130  ((void (*)(uint32_t ui32Base, \
3131  uint32_t ui32Timer, \
3132  bool bEnable))ROM_TIMERTABLE[5])
3133 #endif
3134 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3135  defined(TARGET_IS_BLIZZARD_RA3) || \
3136  defined(TARGET_IS_BLIZZARD_RB1)
3137 #define ROM_TimerControlEvent \
3138  ((void (*)(uint32_t ui32Base, \
3139  uint32_t ui32Timer, \
3140  uint32_t ui32Event))ROM_TIMERTABLE[6])
3141 #endif
3142 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3143  defined(TARGET_IS_BLIZZARD_RA3) || \
3144  defined(TARGET_IS_BLIZZARD_RB1)
3145 #define ROM_TimerControlStall \
3146  ((void (*)(uint32_t ui32Base, \
3147  uint32_t ui32Timer, \
3148  bool bStall))ROM_TIMERTABLE[7])
3149 #endif
3150 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3151  defined(TARGET_IS_BLIZZARD_RA3) || \
3152  defined(TARGET_IS_BLIZZARD_RB1)
3153 #define ROM_TimerRTCEnable \
3154  ((void (*)(uint32_t ui32Base))ROM_TIMERTABLE[8])
3155 #endif
3156 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3157  defined(TARGET_IS_BLIZZARD_RA3) || \
3158  defined(TARGET_IS_BLIZZARD_RB1)
3159 #define ROM_TimerRTCDisable \
3160  ((void (*)(uint32_t ui32Base))ROM_TIMERTABLE[9])
3161 #endif
3162 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3163  defined(TARGET_IS_BLIZZARD_RA3) || \
3164  defined(TARGET_IS_BLIZZARD_RB1)
3165 #define ROM_TimerPrescaleSet \
3166  ((void (*)(uint32_t ui32Base, \
3167  uint32_t ui32Timer, \
3168  uint32_t ui32Value))ROM_TIMERTABLE[10])
3169 #endif
3170 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3171  defined(TARGET_IS_BLIZZARD_RA3) || \
3172  defined(TARGET_IS_BLIZZARD_RB1)
3173 #define ROM_TimerPrescaleGet \
3174  ((uint32_t (*)(uint32_t ui32Base, \
3175  uint32_t ui32Timer))ROM_TIMERTABLE[11])
3176 #endif
3177 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3178  defined(TARGET_IS_BLIZZARD_RA3) || \
3179  defined(TARGET_IS_BLIZZARD_RB1)
3180 #define ROM_TimerPrescaleMatchSet \
3181  ((void (*)(uint32_t ui32Base, \
3182  uint32_t ui32Timer, \
3183  uint32_t ui32Value))ROM_TIMERTABLE[12])
3184 #endif
3185 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3186  defined(TARGET_IS_BLIZZARD_RA3) || \
3187  defined(TARGET_IS_BLIZZARD_RB1)
3188 #define ROM_TimerPrescaleMatchGet \
3189  ((uint32_t (*)(uint32_t ui32Base, \
3190  uint32_t ui32Timer))ROM_TIMERTABLE[13])
3191 #endif
3192 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3193  defined(TARGET_IS_BLIZZARD_RA3) || \
3194  defined(TARGET_IS_BLIZZARD_RB1)
3195 #define ROM_TimerLoadSet \
3196  ((void (*)(uint32_t ui32Base, \
3197  uint32_t ui32Timer, \
3198  uint32_t ui32Value))ROM_TIMERTABLE[14])
3199 #endif
3200 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3201  defined(TARGET_IS_BLIZZARD_RA3) || \
3202  defined(TARGET_IS_BLIZZARD_RB1)
3203 #define ROM_TimerLoadGet \
3204  ((uint32_t (*)(uint32_t ui32Base, \
3205  uint32_t ui32Timer))ROM_TIMERTABLE[15])
3206 #endif
3207 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3208  defined(TARGET_IS_BLIZZARD_RA3) || \
3209  defined(TARGET_IS_BLIZZARD_RB1)
3210 #define ROM_TimerValueGet \
3211  ((uint32_t (*)(uint32_t ui32Base, \
3212  uint32_t ui32Timer))ROM_TIMERTABLE[16])
3213 #endif
3214 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3215  defined(TARGET_IS_BLIZZARD_RA3) || \
3216  defined(TARGET_IS_BLIZZARD_RB1)
3217 #define ROM_TimerMatchSet \
3218  ((void (*)(uint32_t ui32Base, \
3219  uint32_t ui32Timer, \
3220  uint32_t ui32Value))ROM_TIMERTABLE[17])
3221 #endif
3222 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3223  defined(TARGET_IS_BLIZZARD_RA3) || \
3224  defined(TARGET_IS_BLIZZARD_RB1)
3225 #define ROM_TimerMatchGet \
3226  ((uint32_t (*)(uint32_t ui32Base, \
3227  uint32_t ui32Timer))ROM_TIMERTABLE[18])
3228 #endif
3229 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3230  defined(TARGET_IS_BLIZZARD_RA3) || \
3231  defined(TARGET_IS_BLIZZARD_RB1)
3232 #define ROM_TimerIntEnable \
3233  ((void (*)(uint32_t ui32Base, \
3234  uint32_t ui32IntFlags))ROM_TIMERTABLE[19])
3235 #endif
3236 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3237  defined(TARGET_IS_BLIZZARD_RA3) || \
3238  defined(TARGET_IS_BLIZZARD_RB1)
3239 #define ROM_TimerIntDisable \
3240  ((void (*)(uint32_t ui32Base, \
3241  uint32_t ui32IntFlags))ROM_TIMERTABLE[20])
3242 #endif
3243 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3244  defined(TARGET_IS_BLIZZARD_RA3) || \
3245  defined(TARGET_IS_BLIZZARD_RB1)
3246 #define ROM_TimerIntStatus \
3247  ((uint32_t (*)(uint32_t ui32Base, \
3248  bool bMasked))ROM_TIMERTABLE[21])
3249 #endif
3250 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3251  defined(TARGET_IS_BLIZZARD_RA3) || \
3252  defined(TARGET_IS_BLIZZARD_RB1)
3253 #define ROM_TimerControlWaitOnTrigger \
3254  ((void (*)(uint32_t ui32Base, \
3255  uint32_t ui32Timer, \
3256  bool bWait))ROM_TIMERTABLE[22])
3257 #endif
3258 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3259  defined(TARGET_IS_BLIZZARD_RA3) || \
3260  defined(TARGET_IS_BLIZZARD_RB1)
3261 #define ROM_TimerLoadSet64 \
3262  ((void (*)(uint32_t ui32Base, \
3263  uint64_t ui64Value))ROM_TIMERTABLE[23])
3264 #endif
3265 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3266  defined(TARGET_IS_BLIZZARD_RA3) || \
3267  defined(TARGET_IS_BLIZZARD_RB1)
3268 #define ROM_TimerLoadGet64 \
3269  ((uint64_t (*)(uint32_t ui32Base))ROM_TIMERTABLE[24])
3270 #endif
3271 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3272  defined(TARGET_IS_BLIZZARD_RA3) || \
3273  defined(TARGET_IS_BLIZZARD_RB1)
3274 #define ROM_TimerValueGet64 \
3275  ((uint64_t (*)(uint32_t ui32Base))ROM_TIMERTABLE[25])
3276 #endif
3277 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3278  defined(TARGET_IS_BLIZZARD_RA3) || \
3279  defined(TARGET_IS_BLIZZARD_RB1)
3280 #define ROM_TimerMatchSet64 \
3281  ((void (*)(uint32_t ui32Base, \
3282  uint64_t ui64Value))ROM_TIMERTABLE[26])
3283 #endif
3284 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3285  defined(TARGET_IS_BLIZZARD_RA3) || \
3286  defined(TARGET_IS_BLIZZARD_RB1)
3287 #define ROM_TimerMatchGet64 \
3288  ((uint64_t (*)(uint32_t ui32Base))ROM_TIMERTABLE[27])
3289 #endif
3290 
3291 //*****************************************************************************
3292 //
3293 // Macros for calling ROM functions in the UART API.
3294 //
3295 //*****************************************************************************
3296 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3297  defined(TARGET_IS_BLIZZARD_RA3) || \
3298  defined(TARGET_IS_BLIZZARD_RB1)
3299 #define ROM_UARTCharPut \
3300  ((void (*)(uint32_t ui32Base, \
3301  unsigned char ucData))ROM_UARTTABLE[0])
3302 #endif
3303 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3304  defined(TARGET_IS_BLIZZARD_RA3) || \
3305  defined(TARGET_IS_BLIZZARD_RB1)
3306 #define ROM_UARTParityModeSet \
3307  ((void (*)(uint32_t ui32Base, \
3308  uint32_t ui32Parity))ROM_UARTTABLE[1])
3309 #endif
3310 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3311  defined(TARGET_IS_BLIZZARD_RA3) || \
3312  defined(TARGET_IS_BLIZZARD_RB1)
3313 #define ROM_UARTParityModeGet \
3314  ((uint32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[2])
3315 #endif
3316 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3317  defined(TARGET_IS_BLIZZARD_RA3) || \
3318  defined(TARGET_IS_BLIZZARD_RB1)
3319 #define ROM_UARTFIFOLevelSet \
3320  ((void (*)(uint32_t ui32Base, \
3321  uint32_t ui32TxLevel, \
3322  uint32_t ui32RxLevel))ROM_UARTTABLE[3])
3323 #endif
3324 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3325  defined(TARGET_IS_BLIZZARD_RA3) || \
3326  defined(TARGET_IS_BLIZZARD_RB1)
3327 #define ROM_UARTFIFOLevelGet \
3328  ((void (*)(uint32_t ui32Base, \
3329  uint32_t *pui32TxLevel, \
3330  uint32_t *pui32RxLevel))ROM_UARTTABLE[4])
3331 #endif
3332 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3333  defined(TARGET_IS_BLIZZARD_RA3) || \
3334  defined(TARGET_IS_BLIZZARD_RB1)
3335 #define ROM_UARTConfigSetExpClk \
3336  ((void (*)(uint32_t ui32Base, \
3337  uint32_t ui32UARTClk, \
3338  uint32_t ui32Baud, \
3339  uint32_t ui32Config))ROM_UARTTABLE[5])
3340 #endif
3341 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3342  defined(TARGET_IS_BLIZZARD_RA3) || \
3343  defined(TARGET_IS_BLIZZARD_RB1)
3344 #define ROM_UARTConfigGetExpClk \
3345  ((void (*)(uint32_t ui32Base, \
3346  uint32_t ui32UARTClk, \
3347  uint32_t *pui32Baud, \
3348  uint32_t *pui32Config))ROM_UARTTABLE[6])
3349 #endif
3350 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3351  defined(TARGET_IS_BLIZZARD_RA3) || \
3352  defined(TARGET_IS_BLIZZARD_RB1)
3353 #define ROM_UARTEnable \
3354  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[7])
3355 #endif
3356 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3357  defined(TARGET_IS_BLIZZARD_RA3) || \
3358  defined(TARGET_IS_BLIZZARD_RB1)
3359 #define ROM_UARTDisable \
3360  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[8])
3361 #endif
3362 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3363  defined(TARGET_IS_BLIZZARD_RA3) || \
3364  defined(TARGET_IS_BLIZZARD_RB1)
3365 #define ROM_UARTEnableSIR \
3366  ((void (*)(uint32_t ui32Base, \
3367  bool bLowPower))ROM_UARTTABLE[9])
3368 #endif
3369 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3370  defined(TARGET_IS_BLIZZARD_RA3) || \
3371  defined(TARGET_IS_BLIZZARD_RB1)
3372 #define ROM_UARTDisableSIR \
3373  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[10])
3374 #endif
3375 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3376  defined(TARGET_IS_BLIZZARD_RA3) || \
3377  defined(TARGET_IS_BLIZZARD_RB1)
3378 #define ROM_UARTCharsAvail \
3379  ((bool (*)(uint32_t ui32Base))ROM_UARTTABLE[11])
3380 #endif
3381 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3382  defined(TARGET_IS_BLIZZARD_RA3) || \
3383  defined(TARGET_IS_BLIZZARD_RB1)
3384 #define ROM_UARTSpaceAvail \
3385  ((bool (*)(uint32_t ui32Base))ROM_UARTTABLE[12])
3386 #endif
3387 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3388  defined(TARGET_IS_BLIZZARD_RA3) || \
3389  defined(TARGET_IS_BLIZZARD_RB1)
3390 #define ROM_UARTCharGetNonBlocking \
3391  ((int32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[13])
3392 #endif
3393 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3394  defined(TARGET_IS_BLIZZARD_RA3) || \
3395  defined(TARGET_IS_BLIZZARD_RB1)
3396 #define ROM_UARTCharGet \
3397  ((int32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[14])
3398 #endif
3399 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3400  defined(TARGET_IS_BLIZZARD_RA3) || \
3401  defined(TARGET_IS_BLIZZARD_RB1)
3402 #define ROM_UARTCharPutNonBlocking \
3403  ((bool (*)(uint32_t ui32Base, \
3404  unsigned char ucData))ROM_UARTTABLE[15])
3405 #endif
3406 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3407  defined(TARGET_IS_BLIZZARD_RA3) || \
3408  defined(TARGET_IS_BLIZZARD_RB1)
3409 #define ROM_UARTBreakCtl \
3410  ((void (*)(uint32_t ui32Base, \
3411  bool bBreakState))ROM_UARTTABLE[16])
3412 #endif
3413 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3414  defined(TARGET_IS_BLIZZARD_RA3) || \
3415  defined(TARGET_IS_BLIZZARD_RB1)
3416 #define ROM_UARTIntEnable \
3417  ((void (*)(uint32_t ui32Base, \
3418  uint32_t ui32IntFlags))ROM_UARTTABLE[17])
3419 #endif
3420 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3421  defined(TARGET_IS_BLIZZARD_RA3) || \
3422  defined(TARGET_IS_BLIZZARD_RB1)
3423 #define ROM_UARTIntDisable \
3424  ((void (*)(uint32_t ui32Base, \
3425  uint32_t ui32IntFlags))ROM_UARTTABLE[18])
3426 #endif
3427 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3428  defined(TARGET_IS_BLIZZARD_RA3) || \
3429  defined(TARGET_IS_BLIZZARD_RB1)
3430 #define ROM_UARTIntStatus \
3431  ((uint32_t (*)(uint32_t ui32Base, \
3432  bool bMasked))ROM_UARTTABLE[19])
3433 #endif
3434 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3435  defined(TARGET_IS_BLIZZARD_RA3) || \
3436  defined(TARGET_IS_BLIZZARD_RB1)
3437 #define ROM_UARTIntClear \
3438  ((void (*)(uint32_t ui32Base, \
3439  uint32_t ui32IntFlags))ROM_UARTTABLE[20])
3440 #endif
3441 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3442  defined(TARGET_IS_BLIZZARD_RA3) || \
3443  defined(TARGET_IS_BLIZZARD_RB1)
3444 #define ROM_UpdateUART \
3445  ((void (*)(void))ROM_UARTTABLE[21])
3446 #endif
3447 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3448  defined(TARGET_IS_BLIZZARD_RA3) || \
3449  defined(TARGET_IS_BLIZZARD_RB1)
3450 #define ROM_UARTDMAEnable \
3451  ((void (*)(uint32_t ui32Base, \
3452  uint32_t ui32DMAFlags))ROM_UARTTABLE[22])
3453 #endif
3454 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3455  defined(TARGET_IS_BLIZZARD_RA3) || \
3456  defined(TARGET_IS_BLIZZARD_RB1)
3457 #define ROM_UARTDMADisable \
3458  ((void (*)(uint32_t ui32Base, \
3459  uint32_t ui32DMAFlags))ROM_UARTTABLE[23])
3460 #endif
3461 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3462  defined(TARGET_IS_BLIZZARD_RA3) || \
3463  defined(TARGET_IS_BLIZZARD_RB1)
3464 #define ROM_UARTFIFOEnable \
3465  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[24])
3466 #endif
3467 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3468  defined(TARGET_IS_BLIZZARD_RA3) || \
3469  defined(TARGET_IS_BLIZZARD_RB1)
3470 #define ROM_UARTFIFODisable \
3471  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[25])
3472 #endif
3473 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3474  defined(TARGET_IS_BLIZZARD_RA3) || \
3475  defined(TARGET_IS_BLIZZARD_RB1)
3476 #define ROM_UARTBusy \
3477  ((bool (*)(uint32_t ui32Base))ROM_UARTTABLE[26])
3478 #endif
3479 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3480  defined(TARGET_IS_BLIZZARD_RA3) || \
3481  defined(TARGET_IS_BLIZZARD_RB1)
3482 #define ROM_UARTTxIntModeSet \
3483  ((void (*)(uint32_t ui32Base, \
3484  uint32_t ui32Mode))ROM_UARTTABLE[27])
3485 #endif
3486 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3487  defined(TARGET_IS_BLIZZARD_RA3) || \
3488  defined(TARGET_IS_BLIZZARD_RB1)
3489 #define ROM_UARTTxIntModeGet \
3490  ((uint32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[28])
3491 #endif
3492 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3493  defined(TARGET_IS_BLIZZARD_RA3) || \
3494  defined(TARGET_IS_BLIZZARD_RB1)
3495 #define ROM_UARTRxErrorGet \
3496  ((uint32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[29])
3497 #endif
3498 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3499  defined(TARGET_IS_BLIZZARD_RA3) || \
3500  defined(TARGET_IS_BLIZZARD_RB1)
3501 #define ROM_UARTRxErrorClear \
3502  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[30])
3503 #endif
3504 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3505  defined(TARGET_IS_BLIZZARD_RA3) || \
3506  defined(TARGET_IS_BLIZZARD_RB1)
3507 #define ROM_UARTClockSourceSet \
3508  ((void (*)(uint32_t ui32Base, \
3509  uint32_t ui32Source))ROM_UARTTABLE[31])
3510 #endif
3511 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3512  defined(TARGET_IS_BLIZZARD_RA3) || \
3513  defined(TARGET_IS_BLIZZARD_RB1)
3514 #define ROM_UARTClockSourceGet \
3515  ((uint32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[32])
3516 #endif
3517 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3518  defined(TARGET_IS_BLIZZARD_RA3) || \
3519  defined(TARGET_IS_BLIZZARD_RB1)
3520 #define ROM_UART9BitEnable \
3521  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[33])
3522 #endif
3523 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3524  defined(TARGET_IS_BLIZZARD_RA3) || \
3525  defined(TARGET_IS_BLIZZARD_RB1)
3526 #define ROM_UART9BitDisable \
3527  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[34])
3528 #endif
3529 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3530  defined(TARGET_IS_BLIZZARD_RA3) || \
3531  defined(TARGET_IS_BLIZZARD_RB1)
3532 #define ROM_UART9BitAddrSet \
3533  ((void (*)(uint32_t ui32Base, \
3534  uint8_t ui8Addr, \
3535  uint8_t ui8Mask))ROM_UARTTABLE[35])
3536 #endif
3537 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3538  defined(TARGET_IS_BLIZZARD_RA3) || \
3539  defined(TARGET_IS_BLIZZARD_RB1)
3540 #define ROM_UART9BitAddrSend \
3541  ((void (*)(uint32_t ui32Base, \
3542  uint8_t ui8Addr))ROM_UARTTABLE[36])
3543 #endif
3544 
3545 //*****************************************************************************
3546 //
3547 // Macros for calling ROM functions in the uDMA API.
3548 //
3549 //*****************************************************************************
3550 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3551  defined(TARGET_IS_BLIZZARD_RA3) || \
3552  defined(TARGET_IS_BLIZZARD_RB1)
3553 #define ROM_uDMAChannelTransferSet \
3554  ((void (*)(uint32_t ui32ChannelStructIndex, \
3555  uint32_t ui32Mode, \
3556  void *pvSrcAddr, \
3557  void *pvDstAddr, \
3558  uint32_t ui32TransferSize))ROM_UDMATABLE[0])
3559 #endif
3560 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3561  defined(TARGET_IS_BLIZZARD_RA3) || \
3562  defined(TARGET_IS_BLIZZARD_RB1)
3563 #define ROM_uDMAEnable \
3564  ((void (*)(void))ROM_UDMATABLE[1])
3565 #endif
3566 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3567  defined(TARGET_IS_BLIZZARD_RA3) || \
3568  defined(TARGET_IS_BLIZZARD_RB1)
3569 #define ROM_uDMADisable \
3570  ((void (*)(void))ROM_UDMATABLE[2])
3571 #endif
3572 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3573  defined(TARGET_IS_BLIZZARD_RA3) || \
3574  defined(TARGET_IS_BLIZZARD_RB1)
3575 #define ROM_uDMAErrorStatusGet \
3576  ((uint32_t (*)(void))ROM_UDMATABLE[3])
3577 #endif
3578 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3579  defined(TARGET_IS_BLIZZARD_RA3) || \
3580  defined(TARGET_IS_BLIZZARD_RB1)
3581 #define ROM_uDMAErrorStatusClear \
3582  ((void (*)(void))ROM_UDMATABLE[4])
3583 #endif
3584 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3585  defined(TARGET_IS_BLIZZARD_RA3) || \
3586  defined(TARGET_IS_BLIZZARD_RB1)
3587 #define ROM_uDMAChannelEnable \
3588  ((void (*)(uint32_t ui32ChannelNum))ROM_UDMATABLE[5])
3589 #endif
3590 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3591  defined(TARGET_IS_BLIZZARD_RA3) || \
3592  defined(TARGET_IS_BLIZZARD_RB1)
3593 #define ROM_uDMAChannelDisable \
3594  ((void (*)(uint32_t ui32ChannelNum))ROM_UDMATABLE[6])
3595 #endif
3596 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3597  defined(TARGET_IS_BLIZZARD_RA3) || \
3598  defined(TARGET_IS_BLIZZARD_RB1)
3599 #define ROM_uDMAChannelIsEnabled \
3600  ((bool (*)(uint32_t ui32ChannelNum))ROM_UDMATABLE[7])
3601 #endif
3602 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3603  defined(TARGET_IS_BLIZZARD_RA3) || \
3604  defined(TARGET_IS_BLIZZARD_RB1)
3605 #define ROM_uDMAControlBaseSet \
3606  ((void (*)(void *pControlTable))ROM_UDMATABLE[8])
3607 #endif
3608 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3609  defined(TARGET_IS_BLIZZARD_RA3) || \
3610  defined(TARGET_IS_BLIZZARD_RB1)
3611 #define ROM_uDMAControlBaseGet \
3612  ((void * (*)(void))ROM_UDMATABLE[9])
3613 #endif
3614 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3615  defined(TARGET_IS_BLIZZARD_RA3) || \
3616  defined(TARGET_IS_BLIZZARD_RB1)
3617 #define ROM_uDMAChannelRequest \
3618  ((void (*)(uint32_t ui32ChannelNum))ROM_UDMATABLE[10])
3619 #endif
3620 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3621  defined(TARGET_IS_BLIZZARD_RA3) || \
3622  defined(TARGET_IS_BLIZZARD_RB1)
3623 #define ROM_uDMAChannelAttributeEnable \
3624  ((void (*)(uint32_t ui32ChannelNum, \
3625  uint32_t ui32Attr))ROM_UDMATABLE[11])
3626 #endif
3627 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3628  defined(TARGET_IS_BLIZZARD_RA3) || \
3629  defined(TARGET_IS_BLIZZARD_RB1)
3630 #define ROM_uDMAChannelAttributeDisable \
3631  ((void (*)(uint32_t ui32ChannelNum, \
3632  uint32_t ui32Attr))ROM_UDMATABLE[12])
3633 #endif
3634 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3635  defined(TARGET_IS_BLIZZARD_RA3) || \
3636  defined(TARGET_IS_BLIZZARD_RB1)
3637 #define ROM_uDMAChannelAttributeGet \
3638  ((uint32_t (*)(uint32_t ui32ChannelNum))ROM_UDMATABLE[13])
3639 #endif
3640 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3641  defined(TARGET_IS_BLIZZARD_RA3) || \
3642  defined(TARGET_IS_BLIZZARD_RB1)
3643 #define ROM_uDMAChannelControlSet \
3644  ((void (*)(uint32_t ui32ChannelStructIndex, \
3645  uint32_t ui32Control))ROM_UDMATABLE[14])
3646 #endif
3647 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3648  defined(TARGET_IS_BLIZZARD_RA3) || \
3649  defined(TARGET_IS_BLIZZARD_RB1)
3650 #define ROM_uDMAChannelSizeGet \
3651  ((uint32_t (*)(uint32_t ui32ChannelStructIndex))ROM_UDMATABLE[15])
3652 #endif
3653 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3654  defined(TARGET_IS_BLIZZARD_RA3) || \
3655  defined(TARGET_IS_BLIZZARD_RB1)
3656 #define ROM_uDMAChannelModeGet \
3657  ((uint32_t (*)(uint32_t ui32ChannelStructIndex))ROM_UDMATABLE[16])
3658 #endif
3659 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3660  defined(TARGET_IS_BLIZZARD_RA3) || \
3661  defined(TARGET_IS_BLIZZARD_RB1)
3662 #define ROM_uDMAChannelSelectSecondary \
3663  ((void (*)(uint32_t ui32SecPeriphs))ROM_UDMATABLE[17])
3664 #endif
3665 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3666  defined(TARGET_IS_BLIZZARD_RA3) || \
3667  defined(TARGET_IS_BLIZZARD_RB1)
3668 #define ROM_uDMAChannelSelectDefault \
3669  ((void (*)(uint32_t ui32DefPeriphs))ROM_UDMATABLE[18])
3670 #endif
3671 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3672  defined(TARGET_IS_BLIZZARD_RA3) || \
3673  defined(TARGET_IS_BLIZZARD_RB1)
3674 #define ROM_uDMAIntStatus \
3675  ((uint32_t (*)(void))ROM_UDMATABLE[19])
3676 #endif
3677 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3678  defined(TARGET_IS_BLIZZARD_RA3) || \
3679  defined(TARGET_IS_BLIZZARD_RB1)
3680 #define ROM_uDMAIntClear \
3681  ((void (*)(uint32_t ui32ChanMask))ROM_UDMATABLE[20])
3682 #endif
3683 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3684  defined(TARGET_IS_BLIZZARD_RA3) || \
3685  defined(TARGET_IS_BLIZZARD_RB1)
3686 #define ROM_uDMAControlAlternateBaseGet \
3687  ((void * (*)(void))ROM_UDMATABLE[21])
3688 #endif
3689 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3690  defined(TARGET_IS_BLIZZARD_RA3) || \
3691  defined(TARGET_IS_BLIZZARD_RB1)
3692 #define ROM_uDMAChannelScatterGatherSet \
3693  ((void (*)(uint32_t ui32ChannelNum, \
3694  uint32_t ui32TaskCount, \
3695  void *pvTaskList, \
3696  uint32_t ui32IsPeriphSG))ROM_UDMATABLE[22])
3697 #endif
3698 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3699  defined(TARGET_IS_BLIZZARD_RA3) || \
3700  defined(TARGET_IS_BLIZZARD_RB1)
3701 #define ROM_uDMAChannelAssign \
3702  ((void (*)(uint32_t ui32Mapping))ROM_UDMATABLE[23])
3703 #endif
3704 
3705 //*****************************************************************************
3706 //
3707 // Macros for calling ROM functions in the USB API.
3708 //
3709 //*****************************************************************************
3710 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3711  defined(TARGET_IS_BLIZZARD_RA3) || \
3712  defined(TARGET_IS_BLIZZARD_RB1)
3713 #define ROM_USBDevAddrGet \
3714  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[1])
3715 #endif
3716 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3717  defined(TARGET_IS_BLIZZARD_RA3) || \
3718  defined(TARGET_IS_BLIZZARD_RB1)
3719 #define ROM_USBDevAddrSet \
3720  ((void (*)(uint32_t ui32Base, \
3721  uint32_t ui32Address))ROM_USBTABLE[2])
3722 #endif
3723 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3724  defined(TARGET_IS_BLIZZARD_RA3) || \
3725  defined(TARGET_IS_BLIZZARD_RB1)
3726 #define ROM_USBDevConnect \
3727  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[3])
3728 #endif
3729 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3730  defined(TARGET_IS_BLIZZARD_RA3) || \
3731  defined(TARGET_IS_BLIZZARD_RB1)
3732 #define ROM_USBDevDisconnect \
3733  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[4])
3734 #endif
3735 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3736  defined(TARGET_IS_BLIZZARD_RA3) || \
3737  defined(TARGET_IS_BLIZZARD_RB1)
3738 #define ROM_USBDevEndpointConfigSet \
3739  ((void (*)(uint32_t ui32Base, \
3740  uint32_t ui32Endpoint, \
3741  uint32_t ui32MaxPacketSize, \
3742  uint32_t ui32Flags))ROM_USBTABLE[5])
3743 #endif
3744 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3745  defined(TARGET_IS_BLIZZARD_RA3) || \
3746  defined(TARGET_IS_BLIZZARD_RB1)
3747 #define ROM_USBDevEndpointDataAck \
3748  ((void (*)(uint32_t ui32Base, \
3749  uint32_t ui32Endpoint, \
3750  bool bIsLastPacket))ROM_USBTABLE[6])
3751 #endif
3752 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3753  defined(TARGET_IS_BLIZZARD_RA3) || \
3754  defined(TARGET_IS_BLIZZARD_RB1)
3755 #define ROM_USBDevEndpointStall \
3756  ((void (*)(uint32_t ui32Base, \
3757  uint32_t ui32Endpoint, \
3758  uint32_t ui32Flags))ROM_USBTABLE[7])
3759 #endif
3760 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3761  defined(TARGET_IS_BLIZZARD_RA3) || \
3762  defined(TARGET_IS_BLIZZARD_RB1)
3763 #define ROM_USBDevEndpointStallClear \
3764  ((void (*)(uint32_t ui32Base, \
3765  uint32_t ui32Endpoint, \
3766  uint32_t ui32Flags))ROM_USBTABLE[8])
3767 #endif
3768 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3769  defined(TARGET_IS_BLIZZARD_RA3) || \
3770  defined(TARGET_IS_BLIZZARD_RB1)
3771 #define ROM_USBDevEndpointStatusClear \
3772  ((void (*)(uint32_t ui32Base, \
3773  uint32_t ui32Endpoint, \
3774  uint32_t ui32Flags))ROM_USBTABLE[9])
3775 #endif
3776 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3777  defined(TARGET_IS_BLIZZARD_RA3) || \
3778  defined(TARGET_IS_BLIZZARD_RB1)
3779 #define ROM_USBEndpointDataGet \
3780  ((int32_t (*)(uint32_t ui32Base, \
3781  uint32_t ui32Endpoint, \
3782  uint8_t *pui8Data, \
3783  uint32_t *pui32Size))ROM_USBTABLE[10])
3784 #endif
3785 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3786  defined(TARGET_IS_BLIZZARD_RA3) || \
3787  defined(TARGET_IS_BLIZZARD_RB1)
3788 #define ROM_USBEndpointDataPut \
3789  ((int32_t (*)(uint32_t ui32Base, \
3790  uint32_t ui32Endpoint, \
3791  uint8_t *pui8Data, \
3792  uint32_t ui32Size))ROM_USBTABLE[11])
3793 #endif
3794 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3795  defined(TARGET_IS_BLIZZARD_RA3) || \
3796  defined(TARGET_IS_BLIZZARD_RB1)
3797 #define ROM_USBEndpointDataSend \
3798  ((int32_t (*)(uint32_t ui32Base, \
3799  uint32_t ui32Endpoint, \
3800  uint32_t ui32TransType))ROM_USBTABLE[12])
3801 #endif
3802 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3803  defined(TARGET_IS_BLIZZARD_RA3) || \
3804  defined(TARGET_IS_BLIZZARD_RB1)
3805 #define ROM_USBEndpointDataToggleClear \
3806  ((void (*)(uint32_t ui32Base, \
3807  uint32_t ui32Endpoint, \
3808  uint32_t ui32Flags))ROM_USBTABLE[13])
3809 #endif
3810 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3811  defined(TARGET_IS_BLIZZARD_RA3) || \
3812  defined(TARGET_IS_BLIZZARD_RB1)
3813 #define ROM_USBEndpointStatus \
3814  ((uint32_t (*)(uint32_t ui32Base, \
3815  uint32_t ui32Endpoint))ROM_USBTABLE[14])
3816 #endif
3817 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3818  defined(TARGET_IS_BLIZZARD_RA3) || \
3819  defined(TARGET_IS_BLIZZARD_RB1)
3820 #define ROM_USBFIFOAddrGet \
3821  ((uint32_t (*)(uint32_t ui32Base, \
3822  uint32_t ui32Endpoint))ROM_USBTABLE[15])
3823 #endif
3824 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3825  defined(TARGET_IS_BLIZZARD_RA3) || \
3826  defined(TARGET_IS_BLIZZARD_RB1)
3827 #define ROM_USBFIFOConfigGet \
3828  ((void (*)(uint32_t ui32Base, \
3829  uint32_t ui32Endpoint, \
3830  uint32_t *pui32FIFOAddress, \
3831  uint32_t *pui32FIFOSize, \
3832  uint32_t ui32Flags))ROM_USBTABLE[16])
3833 #endif
3834 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3835  defined(TARGET_IS_BLIZZARD_RA3) || \
3836  defined(TARGET_IS_BLIZZARD_RB1)
3837 #define ROM_USBFIFOConfigSet \
3838  ((void (*)(uint32_t ui32Base, \
3839  uint32_t ui32Endpoint, \
3840  uint32_t ui32FIFOAddress, \
3841  uint32_t ui32FIFOSize, \
3842  uint32_t ui32Flags))ROM_USBTABLE[17])
3843 #endif
3844 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3845  defined(TARGET_IS_BLIZZARD_RA3) || \
3846  defined(TARGET_IS_BLIZZARD_RB1)
3847 #define ROM_USBFIFOFlush \
3848  ((void (*)(uint32_t ui32Base, \
3849  uint32_t ui32Endpoint, \
3850  uint32_t ui32Flags))ROM_USBTABLE[18])
3851 #endif
3852 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3853  defined(TARGET_IS_BLIZZARD_RA3) || \
3854  defined(TARGET_IS_BLIZZARD_RB1)
3855 #define ROM_USBFrameNumberGet \
3856  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[19])
3857 #endif
3858 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3859  defined(TARGET_IS_BLIZZARD_RA3) || \
3860  defined(TARGET_IS_BLIZZARD_RB1)
3861 #define ROM_USBHostAddrGet \
3862  ((uint32_t (*)(uint32_t ui32Base, \
3863  uint32_t ui32Endpoint, \
3864  uint32_t ui32Flags))ROM_USBTABLE[20])
3865 #endif
3866 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3867  defined(TARGET_IS_BLIZZARD_RA3) || \
3868  defined(TARGET_IS_BLIZZARD_RB1)
3869 #define ROM_USBHostAddrSet \
3870  ((void (*)(uint32_t ui32Base, \
3871  uint32_t ui32Endpoint, \
3872  uint32_t ui32Addr, \
3873  uint32_t ui32Flags))ROM_USBTABLE[21])
3874 #endif
3875 #if defined(TARGET_IS_BLIZZARD_RA3) || \
3876  defined(TARGET_IS_BLIZZARD_RB1)
3877 #define ROM_USBHostEndpointConfig \
3878  ((void (*)(uint32_t ui32Base, \
3879  uint32_t ui32Endpoint, \
3880  uint32_t ui32MaxPacketSize, \
3881  uint32_t ui32NAKPollInterval, \
3882  uint32_t ui32TargetEndpoint, \
3883  uint32_t ui32Flags))ROM_USBTABLE[22])
3884 #endif
3885 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3886  defined(TARGET_IS_BLIZZARD_RA3) || \
3887  defined(TARGET_IS_BLIZZARD_RB1)
3888 #define ROM_USBHostEndpointDataAck \
3889  ((void (*)(uint32_t ui32Base, \
3890  uint32_t ui32Endpoint))ROM_USBTABLE[23])
3891 #endif
3892 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3893  defined(TARGET_IS_BLIZZARD_RA3) || \
3894  defined(TARGET_IS_BLIZZARD_RB1)
3895 #define ROM_USBHostEndpointDataToggle \
3896  ((void (*)(uint32_t ui32Base, \
3897  uint32_t ui32Endpoint, \
3898  bool bDataToggle, \
3899  uint32_t ui32Flags))ROM_USBTABLE[24])
3900 #endif
3901 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3902  defined(TARGET_IS_BLIZZARD_RA3) || \
3903  defined(TARGET_IS_BLIZZARD_RB1)
3904 #define ROM_USBHostEndpointStatusClear \
3905  ((void (*)(uint32_t ui32Base, \
3906  uint32_t ui32Endpoint, \
3907  uint32_t ui32Flags))ROM_USBTABLE[25])
3908 #endif
3909 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3910  defined(TARGET_IS_BLIZZARD_RA3) || \
3911  defined(TARGET_IS_BLIZZARD_RB1)
3912 #define ROM_USBHostHubAddrGet \
3913  ((uint32_t (*)(uint32_t ui32Base, \
3914  uint32_t ui32Endpoint, \
3915  uint32_t ui32Flags))ROM_USBTABLE[26])
3916 #endif
3917 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3918  defined(TARGET_IS_BLIZZARD_RA3) || \
3919  defined(TARGET_IS_BLIZZARD_RB1)
3920 #define ROM_USBHostHubAddrSet \
3921  ((void (*)(uint32_t ui32Base, \
3922  uint32_t ui32Endpoint, \
3923  uint32_t ui32Addr, \
3924  uint32_t ui32Flags))ROM_USBTABLE[27])
3925 #endif
3926 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3927  defined(TARGET_IS_BLIZZARD_RA3) || \
3928  defined(TARGET_IS_BLIZZARD_RB1)
3929 #define ROM_USBHostPwrDisable \
3930  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[28])
3931 #endif
3932 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3933  defined(TARGET_IS_BLIZZARD_RA3) || \
3934  defined(TARGET_IS_BLIZZARD_RB1)
3935 #define ROM_USBHostPwrEnable \
3936  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[29])
3937 #endif
3938 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3939  defined(TARGET_IS_BLIZZARD_RA3) || \
3940  defined(TARGET_IS_BLIZZARD_RB1)
3941 #define ROM_USBHostPwrConfig \
3942  ((void (*)(uint32_t ui32Base, \
3943  uint32_t ui32Flags))ROM_USBTABLE[30])
3944 #endif
3945 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3946  defined(TARGET_IS_BLIZZARD_RA3) || \
3947  defined(TARGET_IS_BLIZZARD_RB1)
3948 #define ROM_USBHostPwrFaultDisable \
3949  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[31])
3950 #endif
3951 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3952  defined(TARGET_IS_BLIZZARD_RA3) || \
3953  defined(TARGET_IS_BLIZZARD_RB1)
3954 #define ROM_USBHostPwrFaultEnable \
3955  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[32])
3956 #endif
3957 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3958  defined(TARGET_IS_BLIZZARD_RA3) || \
3959  defined(TARGET_IS_BLIZZARD_RB1)
3960 #define ROM_USBHostRequestIN \
3961  ((void (*)(uint32_t ui32Base, \
3962  uint32_t ui32Endpoint))ROM_USBTABLE[33])
3963 #endif
3964 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3965  defined(TARGET_IS_BLIZZARD_RA3) || \
3966  defined(TARGET_IS_BLIZZARD_RB1)
3967 #define ROM_USBHostRequestStatus \
3968  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[34])
3969 #endif
3970 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3971  defined(TARGET_IS_BLIZZARD_RA3) || \
3972  defined(TARGET_IS_BLIZZARD_RB1)
3973 #define ROM_USBHostReset \
3974  ((void (*)(uint32_t ui32Base, \
3975  bool bStart))ROM_USBTABLE[35])
3976 #endif
3977 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3978  defined(TARGET_IS_BLIZZARD_RA3) || \
3979  defined(TARGET_IS_BLIZZARD_RB1)
3980 #define ROM_USBHostResume \
3981  ((void (*)(uint32_t ui32Base, \
3982  bool bStart))ROM_USBTABLE[36])
3983 #endif
3984 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3985  defined(TARGET_IS_BLIZZARD_RA3) || \
3986  defined(TARGET_IS_BLIZZARD_RB1)
3987 #define ROM_USBHostSpeedGet \
3988  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[37])
3989 #endif
3990 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3991  defined(TARGET_IS_BLIZZARD_RA3) || \
3992  defined(TARGET_IS_BLIZZARD_RB1)
3993 #define ROM_USBHostSuspend \
3994  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[38])
3995 #endif
3996 #if defined(TARGET_IS_BLIZZARD_RA1) || \
3997  defined(TARGET_IS_BLIZZARD_RA3) || \
3998  defined(TARGET_IS_BLIZZARD_RB1)
3999 #define ROM_USBDevEndpointConfigGet \
4000  ((void (*)(uint32_t ui32Base, \
4001  uint32_t ui32Endpoint, \
4002  uint32_t *pui32MaxPacketSize, \
4003  uint32_t *pui32Flags))ROM_USBTABLE[41])
4004 #endif
4005 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4006  defined(TARGET_IS_BLIZZARD_RA3) || \
4007  defined(TARGET_IS_BLIZZARD_RB1)
4008 #define ROM_USBEndpointDMAEnable \
4009  ((void (*)(uint32_t ui32Base, \
4010  uint32_t ui32Endpoint, \
4011  uint32_t ui32Flags))ROM_USBTABLE[42])
4012 #endif
4013 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4014  defined(TARGET_IS_BLIZZARD_RA3) || \
4015  defined(TARGET_IS_BLIZZARD_RB1)
4016 #define ROM_USBEndpointDMADisable \
4017  ((void (*)(uint32_t ui32Base, \
4018  uint32_t ui32Endpoint, \
4019  uint32_t ui32Flags))ROM_USBTABLE[43])
4020 #endif
4021 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4022  defined(TARGET_IS_BLIZZARD_RA3) || \
4023  defined(TARGET_IS_BLIZZARD_RB1)
4024 #define ROM_USBEndpointDataAvail \
4025  ((uint32_t (*)(uint32_t ui32Base, \
4026  uint32_t ui32Endpoint))ROM_USBTABLE[44])
4027 #endif
4028 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4029  defined(TARGET_IS_BLIZZARD_RA3) || \
4030  defined(TARGET_IS_BLIZZARD_RB1)
4031 #define ROM_USBModeGet \
4032  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[46])
4033 #endif
4034 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4035  defined(TARGET_IS_BLIZZARD_RA3) || \
4036  defined(TARGET_IS_BLIZZARD_RB1)
4037 #define ROM_USBEndpointDMAChannel \
4038  ((void (*)(uint32_t ui32Base, \
4039  uint32_t ui32Endpoint, \
4040  uint32_t ui32Channel))ROM_USBTABLE[47])
4041 #endif
4042 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4043  defined(TARGET_IS_BLIZZARD_RA3) || \
4044  defined(TARGET_IS_BLIZZARD_RB1)
4045 #define ROM_USBIntDisableControl \
4046  ((void (*)(uint32_t ui32Base, \
4047  uint32_t ui32IntFlags))ROM_USBTABLE[48])
4048 #endif
4049 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4050  defined(TARGET_IS_BLIZZARD_RA3) || \
4051  defined(TARGET_IS_BLIZZARD_RB1)
4052 #define ROM_USBIntEnableControl \
4053  ((void (*)(uint32_t ui32Base, \
4054  uint32_t ui32IntFlags))ROM_USBTABLE[49])
4055 #endif
4056 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4057  defined(TARGET_IS_BLIZZARD_RA3) || \
4058  defined(TARGET_IS_BLIZZARD_RB1)
4059 #define ROM_USBIntStatusControl \
4060  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[50])
4061 #endif
4062 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4063  defined(TARGET_IS_BLIZZARD_RA3) || \
4064  defined(TARGET_IS_BLIZZARD_RB1)
4065 #define ROM_USBIntDisableEndpoint \
4066  ((void (*)(uint32_t ui32Base, \
4067  uint32_t ui32IntFlags))ROM_USBTABLE[51])
4068 #endif
4069 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4070  defined(TARGET_IS_BLIZZARD_RA3) || \
4071  defined(TARGET_IS_BLIZZARD_RB1)
4072 #define ROM_USBIntEnableEndpoint \
4073  ((void (*)(uint32_t ui32Base, \
4074  uint32_t ui32IntFlags))ROM_USBTABLE[52])
4075 #endif
4076 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4077  defined(TARGET_IS_BLIZZARD_RA3) || \
4078  defined(TARGET_IS_BLIZZARD_RB1)
4079 #define ROM_USBIntStatusEndpoint \
4080  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[53])
4081 #endif
4082 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4083  defined(TARGET_IS_BLIZZARD_RA3) || \
4084  defined(TARGET_IS_BLIZZARD_RB1)
4085 #define ROM_USBHostMode \
4086  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[54])
4087 #endif
4088 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4089  defined(TARGET_IS_BLIZZARD_RA3) || \
4090  defined(TARGET_IS_BLIZZARD_RB1)
4091 #define ROM_USBDevMode \
4092  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[55])
4093 #endif
4094 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4095  defined(TARGET_IS_BLIZZARD_RA3) || \
4096  defined(TARGET_IS_BLIZZARD_RB1)
4097 #define ROM_USBPHYPowerOff \
4098  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[56])
4099 #endif
4100 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4101  defined(TARGET_IS_BLIZZARD_RA3) || \
4102  defined(TARGET_IS_BLIZZARD_RB1)
4103 #define ROM_USBPHYPowerOn \
4104  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[57])
4105 #endif
4106 #if defined(TARGET_IS_BLIZZARD_RA3) || \
4107  defined(TARGET_IS_BLIZZARD_RB1)
4108 #define ROM_UpdateUSB \
4109  ((void (*)(uint8_t *pui8DescriptorInfo))ROM_USBTABLE[58])
4110 #endif
4111 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4112  defined(TARGET_IS_BLIZZARD_RA3) || \
4113  defined(TARGET_IS_BLIZZARD_RB1)
4114 #define ROM_USBOTGMode \
4115  ((void (*)(uint32_t ui32Base))ROM_USBTABLE[59])
4116 #endif
4117 #if defined(TARGET_IS_BLIZZARD_RB1)
4118 #define ROM_USBHostRequestINClear \
4119  ((void (*)(uint32_t ui32Base, \
4120  uint32_t ui32Endpoint))ROM_USBTABLE[60])
4121 #endif
4122 #if defined(TARGET_IS_BLIZZARD_RB1)
4123 #define ROM_USBNumEndpointsGet \
4124  ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[61])
4125 #endif
4126 
4127 //*****************************************************************************
4128 //
4129 // Macros for calling ROM functions in the Watchdog API.
4130 //
4131 //*****************************************************************************
4132 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4133  defined(TARGET_IS_BLIZZARD_RA3) || \
4134  defined(TARGET_IS_BLIZZARD_RB1)
4135 #define ROM_WatchdogIntClear \
4136  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[0])
4137 #endif
4138 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4139  defined(TARGET_IS_BLIZZARD_RA3) || \
4140  defined(TARGET_IS_BLIZZARD_RB1)
4141 #define ROM_WatchdogRunning \
4142  ((bool (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[1])
4143 #endif
4144 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4145  defined(TARGET_IS_BLIZZARD_RA3) || \
4146  defined(TARGET_IS_BLIZZARD_RB1)
4147 #define ROM_WatchdogEnable \
4148  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[2])
4149 #endif
4150 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4151  defined(TARGET_IS_BLIZZARD_RA3) || \
4152  defined(TARGET_IS_BLIZZARD_RB1)
4153 #define ROM_WatchdogResetEnable \
4154  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[3])
4155 #endif
4156 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4157  defined(TARGET_IS_BLIZZARD_RA3) || \
4158  defined(TARGET_IS_BLIZZARD_RB1)
4159 #define ROM_WatchdogResetDisable \
4160  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[4])
4161 #endif
4162 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4163  defined(TARGET_IS_BLIZZARD_RA3) || \
4164  defined(TARGET_IS_BLIZZARD_RB1)
4165 #define ROM_WatchdogLock \
4166  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[5])
4167 #endif
4168 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4169  defined(TARGET_IS_BLIZZARD_RA3) || \
4170  defined(TARGET_IS_BLIZZARD_RB1)
4171 #define ROM_WatchdogUnlock \
4172  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[6])
4173 #endif
4174 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4175  defined(TARGET_IS_BLIZZARD_RA3) || \
4176  defined(TARGET_IS_BLIZZARD_RB1)
4177 #define ROM_WatchdogLockState \
4178  ((bool (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[7])
4179 #endif
4180 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4181  defined(TARGET_IS_BLIZZARD_RA3) || \
4182  defined(TARGET_IS_BLIZZARD_RB1)
4183 #define ROM_WatchdogReloadSet \
4184  ((void (*)(uint32_t ui32Base, \
4185  uint32_t ui32LoadVal))ROM_WATCHDOGTABLE[8])
4186 #endif
4187 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4188  defined(TARGET_IS_BLIZZARD_RA3) || \
4189  defined(TARGET_IS_BLIZZARD_RB1)
4190 #define ROM_WatchdogReloadGet \
4191  ((uint32_t (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[9])
4192 #endif
4193 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4194  defined(TARGET_IS_BLIZZARD_RA3) || \
4195  defined(TARGET_IS_BLIZZARD_RB1)
4196 #define ROM_WatchdogValueGet \
4197  ((uint32_t (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[10])
4198 #endif
4199 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4200  defined(TARGET_IS_BLIZZARD_RA3) || \
4201  defined(TARGET_IS_BLIZZARD_RB1)
4202 #define ROM_WatchdogIntEnable \
4203  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[11])
4204 #endif
4205 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4206  defined(TARGET_IS_BLIZZARD_RA3) || \
4207  defined(TARGET_IS_BLIZZARD_RB1)
4208 #define ROM_WatchdogIntStatus \
4209  ((uint32_t (*)(uint32_t ui32Base, \
4210  bool bMasked))ROM_WATCHDOGTABLE[12])
4211 #endif
4212 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4213  defined(TARGET_IS_BLIZZARD_RA3) || \
4214  defined(TARGET_IS_BLIZZARD_RB1)
4215 #define ROM_WatchdogStallEnable \
4216  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[13])
4217 #endif
4218 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4219  defined(TARGET_IS_BLIZZARD_RA3) || \
4220  defined(TARGET_IS_BLIZZARD_RB1)
4221 #define ROM_WatchdogStallDisable \
4222  ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[14])
4223 #endif
4224 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4225  defined(TARGET_IS_BLIZZARD_RA3) || \
4226  defined(TARGET_IS_BLIZZARD_RB1)
4227 #define ROM_WatchdogIntTypeSet \
4228  ((void (*)(uint32_t ui32Base, \
4229  uint32_t ui32Type))ROM_WATCHDOGTABLE[15])
4230 #endif
4231 
4232 //*****************************************************************************
4233 //
4234 // Macros for calling ROM functions in the Software API.
4235 //
4236 //*****************************************************************************
4237 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4238  defined(TARGET_IS_BLIZZARD_RA3) || \
4239  defined(TARGET_IS_BLIZZARD_RB1)
4240 #define ROM_Crc16Array \
4241  ((uint16_t (*)(uint32_t ui32WordLen, \
4242  const uint32_t *pui32Data))ROM_SOFTWARETABLE[1])
4243 #endif
4244 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4245  defined(TARGET_IS_BLIZZARD_RA3) || \
4246  defined(TARGET_IS_BLIZZARD_RB1)
4247 #define ROM_Crc16Array3 \
4248  ((void (*)(uint32_t ui32WordLen, \
4249  const uint32_t *pui32Data, \
4250  uint16_t *pui16Crc3))ROM_SOFTWARETABLE[2])
4251 #endif
4252 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4253  defined(TARGET_IS_BLIZZARD_RA3) || \
4254  defined(TARGET_IS_BLIZZARD_RB1)
4255 #define ROM_Crc16 \
4256  ((uint16_t (*)(uint16_t ui16Crc, \
4257  const uint8_t *pui8Data, \
4258  uint32_t ui32Count))ROM_SOFTWARETABLE[3])
4259 #endif
4260 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4261  defined(TARGET_IS_BLIZZARD_RA3) || \
4262  defined(TARGET_IS_BLIZZARD_RB1)
4263 #define ROM_Crc8CCITT \
4264  ((uint8_t (*)(uint8_t ui8Crc, \
4265  const uint8_t *pui8Data, \
4266  uint32_t ui32Count))ROM_SOFTWARETABLE[4])
4267 #endif
4268 #if defined(TARGET_IS_BLIZZARD_RA1) || \
4269  defined(TARGET_IS_BLIZZARD_RA3) || \
4270  defined(TARGET_IS_BLIZZARD_RB1)
4271 #define ROM_pvAESTable \
4272  ((void *)&(ROM_SOFTWARETABLE[7]))
4273 #endif
4274 
4275 #endif // __DRIVERLIB_ROM_H__