1 //*****************************************************************************
3 // rom.h - Macros to facilitate calling functions in the ROM.
5 // Copyright (c) 2007-2008 Luminary Micro, Inc. All rights reserved.
7 // Software License Agreement
9 // Luminary Micro, Inc. (LMI) is supplying this software for use solely and
10 // exclusively on LMI's microcontroller products.
12 // The software is owned by LMI and/or its suppliers, and is protected under
13 // applicable copyright laws. All rights are reserved. You may not combine
14 // this software with "viral" open-source software in order to form a larger
15 // program. Any use in violation of the foregoing restrictions may subject
16 // the user to criminal sanctions under applicable laws, as well as to civil
17 // liability for the breach of the terms and conditions of this license.
19 // THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
20 // OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
21 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
22 // LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
23 // CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
25 // This is part of revision 2523 of the Stellaris Peripheral Driver Library.
27 //*****************************************************************************
32 //*****************************************************************************
34 // Pointers to the main API tables.
36 //*****************************************************************************
37 #define ROM_APITABLE ((unsigned long *)0x01000010)
38 #define ROM_VERSION (ROM_APITABLE[0])
39 #define ROM_UARTTABLE ((unsigned long *)(ROM_APITABLE[1]))
40 #define ROM_SSITABLE ((unsigned long *)(ROM_APITABLE[2]))
41 #define ROM_I2CTABLE ((unsigned long *)(ROM_APITABLE[3]))
42 #define ROM_GPIOTABLE ((unsigned long *)(ROM_APITABLE[4]))
43 #define ROM_ADCTABLE ((unsigned long *)(ROM_APITABLE[5]))
44 #define ROM_COMPARATORTABLE ((unsigned long *)(ROM_APITABLE[6]))
45 #define ROM_FLASHTABLE ((unsigned long *)(ROM_APITABLE[7]))
46 #define ROM_PWMTABLE ((unsigned long *)(ROM_APITABLE[8]))
47 #define ROM_QEITABLE ((unsigned long *)(ROM_APITABLE[9]))
48 #define ROM_SYSTICKTABLE ((unsigned long *)(ROM_APITABLE[10]))
49 #define ROM_TIMERTABLE ((unsigned long *)(ROM_APITABLE[11]))
50 #define ROM_WATCHDOGTABLE ((unsigned long *)(ROM_APITABLE[12]))
51 #define ROM_SYSCTLTABLE ((unsigned long *)(ROM_APITABLE[13]))
52 #define ROM_INTERRUPTTABLE ((unsigned long *)(ROM_APITABLE[14]))
54 //*****************************************************************************
56 // Macros for calling ROM functions in the ADC API.
58 //*****************************************************************************
59 #if defined(TARGET_IS_DUSTDEVIL_RA0)
60 #define ROM_ADCSequenceDataGet \
61 ((long (*)(unsigned long ulBase, \
62 unsigned long ulSequenceNum, \
63 unsigned long *pulBuffer))ROM_ADCTABLE[0])
65 #if defined(TARGET_IS_DUSTDEVIL_RA0)
66 #define ROM_ADCIntDisable \
67 ((void (*)(unsigned long ulBase, \
68 unsigned long ulSequenceNum))ROM_ADCTABLE[1])
70 #if defined(TARGET_IS_DUSTDEVIL_RA0)
71 #define ROM_ADCIntEnable \
72 ((void (*)(unsigned long ulBase, \
73 unsigned long ulSequenceNum))ROM_ADCTABLE[2])
75 #if defined(TARGET_IS_DUSTDEVIL_RA0)
76 #define ROM_ADCIntStatus \
77 ((unsigned long (*)(unsigned long ulBase, \
78 unsigned long ulSequenceNum, \
79 tBoolean bMasked))ROM_ADCTABLE[3])
81 #if defined(TARGET_IS_DUSTDEVIL_RA0)
82 #define ROM_ADCIntClear \
83 ((void (*)(unsigned long ulBase, \
84 unsigned long ulSequenceNum))ROM_ADCTABLE[4])
86 #if defined(TARGET_IS_DUSTDEVIL_RA0)
87 #define ROM_ADCSequenceEnable \
88 ((void (*)(unsigned long ulBase, \
89 unsigned long ulSequenceNum))ROM_ADCTABLE[5])
91 #if defined(TARGET_IS_DUSTDEVIL_RA0)
92 #define ROM_ADCSequenceDisable \
93 ((void (*)(unsigned long ulBase, \
94 unsigned long ulSequenceNum))ROM_ADCTABLE[6])
96 #if defined(TARGET_IS_DUSTDEVIL_RA0)
97 #define ROM_ADCSequenceConfigure \
98 ((void (*)(unsigned long ulBase, \
99 unsigned long ulSequenceNum, \
100 unsigned long ulTrigger, \
101 unsigned long ulPriority))ROM_ADCTABLE[7])
103 #if defined(TARGET_IS_DUSTDEVIL_RA0)
104 #define ROM_ADCSequenceStepConfigure \
105 ((void (*)(unsigned long ulBase, \
106 unsigned long ulSequenceNum, \
107 unsigned long ulStep, \
108 unsigned long ulConfig))ROM_ADCTABLE[8])
110 #if defined(TARGET_IS_DUSTDEVIL_RA0)
111 #define ROM_ADCSequenceOverflow \
112 ((long (*)(unsigned long ulBase, \
113 unsigned long ulSequenceNum))ROM_ADCTABLE[9])
115 #if defined(TARGET_IS_DUSTDEVIL_RA0)
116 #define ROM_ADCSequenceOverflowClear \
117 ((void (*)(unsigned long ulBase, \
118 unsigned long ulSequenceNum))ROM_ADCTABLE[10])
120 #if defined(TARGET_IS_DUSTDEVIL_RA0)
121 #define ROM_ADCSequenceUnderflow \
122 ((long (*)(unsigned long ulBase, \
123 unsigned long ulSequenceNum))ROM_ADCTABLE[11])
125 #if defined(TARGET_IS_DUSTDEVIL_RA0)
126 #define ROM_ADCSequenceUnderflowClear \
127 ((void (*)(unsigned long ulBase, \
128 unsigned long ulSequenceNum))ROM_ADCTABLE[12])
130 #if defined(TARGET_IS_DUSTDEVIL_RA0)
131 #define ROM_ADCProcessorTrigger \
132 ((void (*)(unsigned long ulBase, \
133 unsigned long ulSequenceNum))ROM_ADCTABLE[13])
135 #if defined(TARGET_IS_DUSTDEVIL_RA0)
136 #define ROM_ADCHardwareOversampleConfigure \
137 ((void (*)(unsigned long ulBase, \
138 unsigned long ulFactor))ROM_ADCTABLE[14])
141 //*****************************************************************************
143 // Macros for calling ROM functions in the Comparator API.
145 //*****************************************************************************
146 #if defined(TARGET_IS_DUSTDEVIL_RA0)
147 #define ROM_ComparatorIntClear \
148 ((void (*)(unsigned long ulBase, \
149 unsigned long ulComp))ROM_COMPARATORTABLE[0])
151 #if defined(TARGET_IS_DUSTDEVIL_RA0)
152 #define ROM_ComparatorConfigure \
153 ((void (*)(unsigned long ulBase, \
154 unsigned long ulComp, \
155 unsigned long ulConfig))ROM_COMPARATORTABLE[1])
157 #if defined(TARGET_IS_DUSTDEVIL_RA0)
158 #define ROM_ComparatorRefSet \
159 ((void (*)(unsigned long ulBase, \
160 unsigned long ulRef))ROM_COMPARATORTABLE[2])
162 #if defined(TARGET_IS_DUSTDEVIL_RA0)
163 #define ROM_ComparatorValueGet \
164 ((tBoolean (*)(unsigned long ulBase, \
165 unsigned long ulComp))ROM_COMPARATORTABLE[3])
167 #if defined(TARGET_IS_DUSTDEVIL_RA0)
168 #define ROM_ComparatorIntEnable \
169 ((void (*)(unsigned long ulBase, \
170 unsigned long ulComp))ROM_COMPARATORTABLE[4])
172 #if defined(TARGET_IS_DUSTDEVIL_RA0)
173 #define ROM_ComparatorIntDisable \
174 ((void (*)(unsigned long ulBase, \
175 unsigned long ulComp))ROM_COMPARATORTABLE[5])
177 #if defined(TARGET_IS_DUSTDEVIL_RA0)
178 #define ROM_ComparatorIntStatus \
179 ((tBoolean (*)(unsigned long ulBase, \
180 unsigned long ulComp, \
181 tBoolean bMasked))ROM_COMPARATORTABLE[6])
184 //*****************************************************************************
186 // Macros for calling ROM functions in the Flash API.
188 //*****************************************************************************
189 #if defined(TARGET_IS_DUSTDEVIL_RA0)
190 #define ROM_FlashProgram \
191 ((long (*)(unsigned long *pulData, \
192 unsigned long ulAddress, \
193 unsigned long ulCount))ROM_FLASHTABLE[0])
195 #if defined(TARGET_IS_DUSTDEVIL_RA0)
196 #define ROM_FlashUsecGet \
197 ((unsigned long (*)(void))ROM_FLASHTABLE[1])
199 #if defined(TARGET_IS_DUSTDEVIL_RA0)
200 #define ROM_FlashUsecSet \
201 ((void (*)(unsigned long ulClocks))ROM_FLASHTABLE[2])
203 #if defined(TARGET_IS_DUSTDEVIL_RA0)
204 #define ROM_FlashErase \
205 ((long (*)(unsigned long ulAddress))ROM_FLASHTABLE[3])
207 #if defined(TARGET_IS_DUSTDEVIL_RA0)
208 #define ROM_FlashProtectGet \
209 ((tFlashProtection (*)(unsigned long ulAddress))ROM_FLASHTABLE[4])
211 #if defined(TARGET_IS_DUSTDEVIL_RA0)
212 #define ROM_FlashProtectSet \
213 ((long (*)(unsigned long ulAddress, \
214 tFlashProtection eProtect))ROM_FLASHTABLE[5])
216 #if defined(TARGET_IS_DUSTDEVIL_RA0)
217 #define ROM_FlashProtectSave \
218 ((long (*)(void))ROM_FLASHTABLE[6])
220 #if defined(TARGET_IS_DUSTDEVIL_RA0)
221 #define ROM_FlashUserGet \
222 ((long (*)(unsigned long *pulUser0, \
223 unsigned long *pulUser1))ROM_FLASHTABLE[7])
225 #if defined(TARGET_IS_DUSTDEVIL_RA0)
226 #define ROM_FlashUserSet \
227 ((long (*)(unsigned long ulUser0, \
228 unsigned long ulUser1))ROM_FLASHTABLE[8])
230 #if defined(TARGET_IS_DUSTDEVIL_RA0)
231 #define ROM_FlashUserSave \
232 ((long (*)(void))ROM_FLASHTABLE[9])
234 #if defined(TARGET_IS_DUSTDEVIL_RA0)
235 #define ROM_FlashIntEnable \
236 ((void (*)(unsigned long ulIntFlags))ROM_FLASHTABLE[10])
238 #if defined(TARGET_IS_DUSTDEVIL_RA0)
239 #define ROM_FlashIntDisable \
240 ((void (*)(unsigned long ulIntFlags))ROM_FLASHTABLE[11])
242 #if defined(TARGET_IS_DUSTDEVIL_RA0)
243 #define ROM_FlashIntGetStatus \
244 ((unsigned long (*)(tBoolean bMasked))ROM_FLASHTABLE[12])
246 #if defined(TARGET_IS_DUSTDEVIL_RA0)
247 #define ROM_FlashIntClear \
248 ((void (*)(unsigned long ulIntFlags))ROM_FLASHTABLE[13])
251 //*****************************************************************************
253 // Macros for calling ROM functions in the GPIO API.
255 //*****************************************************************************
256 #if defined(TARGET_IS_DUSTDEVIL_RA0)
257 #define ROM_GPIOPinWrite \
258 ((void (*)(unsigned long ulPort, \
259 unsigned char ucPins, \
260 unsigned char ucVal))ROM_GPIOTABLE[0])
262 #if defined(TARGET_IS_DUSTDEVIL_RA0)
263 #define ROM_GPIODirModeSet \
264 ((void (*)(unsigned long ulPort, \
265 unsigned char ucPins, \
266 unsigned long ulPinIO))ROM_GPIOTABLE[1])
268 #if defined(TARGET_IS_DUSTDEVIL_RA0)
269 #define ROM_GPIODirModeGet \
270 ((unsigned long (*)(unsigned long ulPort, \
271 unsigned char ucPin))ROM_GPIOTABLE[2])
273 #if defined(TARGET_IS_DUSTDEVIL_RA0)
274 #define ROM_GPIOIntTypeSet \
275 ((void (*)(unsigned long ulPort, \
276 unsigned char ucPins, \
277 unsigned long ulIntType))ROM_GPIOTABLE[3])
279 #if defined(TARGET_IS_DUSTDEVIL_RA0)
280 #define ROM_GPIOIntTypeGet \
281 ((unsigned long (*)(unsigned long ulPort, \
282 unsigned char ucPin))ROM_GPIOTABLE[4])
284 #if defined(TARGET_IS_DUSTDEVIL_RA0)
285 #define ROM_GPIOPadConfigSet \
286 ((void (*)(unsigned long ulPort, \
287 unsigned char ucPins, \
288 unsigned long ulStrength, \
289 unsigned long ulPadType))ROM_GPIOTABLE[5])
291 #if defined(TARGET_IS_DUSTDEVIL_RA0)
292 #define ROM_GPIOPadConfigGet \
293 ((void (*)(unsigned long ulPort, \
294 unsigned char ucPin, \
295 unsigned long *pulStrength, \
296 unsigned long *pulPadType))ROM_GPIOTABLE[6])
298 #if defined(TARGET_IS_DUSTDEVIL_RA0)
299 #define ROM_GPIOPinIntEnable \
300 ((void (*)(unsigned long ulPort, \
301 unsigned char ucPins))ROM_GPIOTABLE[7])
303 #if defined(TARGET_IS_DUSTDEVIL_RA0)
304 #define ROM_GPIOPinIntDisable \
305 ((void (*)(unsigned long ulPort, \
306 unsigned char ucPins))ROM_GPIOTABLE[8])
308 #if defined(TARGET_IS_DUSTDEVIL_RA0)
309 #define ROM_GPIOPinIntStatus \
310 ((long (*)(unsigned long ulPort, \
311 tBoolean bMasked))ROM_GPIOTABLE[9])
313 #if defined(TARGET_IS_DUSTDEVIL_RA0)
314 #define ROM_GPIOPinIntClear \
315 ((void (*)(unsigned long ulPort, \
316 unsigned char ucPins))ROM_GPIOTABLE[10])
318 #if defined(TARGET_IS_DUSTDEVIL_RA0)
319 #define ROM_GPIOPinRead \
320 ((long (*)(unsigned long ulPort, \
321 unsigned char ucPins))ROM_GPIOTABLE[11])
323 #if defined(TARGET_IS_DUSTDEVIL_RA0)
324 #define ROM_GPIOPinTypeCAN \
325 ((void (*)(unsigned long ulPort, \
326 unsigned char ucPins))ROM_GPIOTABLE[12])
328 #if defined(TARGET_IS_DUSTDEVIL_RA0)
329 #define ROM_GPIOPinTypeComparator \
330 ((void (*)(unsigned long ulPort, \
331 unsigned char ucPins))ROM_GPIOTABLE[13])
333 #if defined(TARGET_IS_DUSTDEVIL_RA0)
334 #define ROM_GPIOPinTypeGPIOInput \
335 ((void (*)(unsigned long ulPort, \
336 unsigned char ucPins))ROM_GPIOTABLE[14])
338 #if defined(TARGET_IS_DUSTDEVIL_RA0)
339 #define ROM_GPIOPinTypeGPIOOutput \
340 ((void (*)(unsigned long ulPort, \
341 unsigned char ucPins))ROM_GPIOTABLE[15])
343 #if defined(TARGET_IS_DUSTDEVIL_RA0)
344 #define ROM_GPIOPinTypeI2C \
345 ((void (*)(unsigned long ulPort, \
346 unsigned char ucPins))ROM_GPIOTABLE[16])
348 #if defined(TARGET_IS_DUSTDEVIL_RA0)
349 #define ROM_GPIOPinTypePWM \
350 ((void (*)(unsigned long ulPort, \
351 unsigned char ucPins))ROM_GPIOTABLE[17])
353 #if defined(TARGET_IS_DUSTDEVIL_RA0)
354 #define ROM_GPIOPinTypeQEI \
355 ((void (*)(unsigned long ulPort, \
356 unsigned char ucPins))ROM_GPIOTABLE[18])
358 #if defined(TARGET_IS_DUSTDEVIL_RA0)
359 #define ROM_GPIOPinTypeSSI \
360 ((void (*)(unsigned long ulPort, \
361 unsigned char ucPins))ROM_GPIOTABLE[19])
363 #if defined(TARGET_IS_DUSTDEVIL_RA0)
364 #define ROM_GPIOPinTypeTimer \
365 ((void (*)(unsigned long ulPort, \
366 unsigned char ucPins))ROM_GPIOTABLE[20])
368 #if defined(TARGET_IS_DUSTDEVIL_RA0)
369 #define ROM_GPIOPinTypeUART \
370 ((void (*)(unsigned long ulPort, \
371 unsigned char ucPins))ROM_GPIOTABLE[21])
373 #if defined(TARGET_IS_DUSTDEVIL_RA0)
374 #define ROM_GPIOPinTypeGPIOOutputOD \
375 ((void (*)(unsigned long ulPort, \
376 unsigned char ucPins))ROM_GPIOTABLE[22])
379 //*****************************************************************************
381 // Macros for calling ROM functions in the I2C API.
383 //*****************************************************************************
384 #if defined(TARGET_IS_DUSTDEVIL_RA0)
385 #define ROM_I2CMasterDataPut \
386 ((void (*)(unsigned long ulBase, \
387 unsigned char ucData))ROM_I2CTABLE[0])
389 #if defined(TARGET_IS_DUSTDEVIL_RA0)
390 #define ROM_I2CMasterInitExpClk \
391 ((void (*)(unsigned long ulBase, \
392 unsigned long ulI2CClk, \
393 tBoolean bFast))ROM_I2CTABLE[1])
395 #if defined(TARGET_IS_DUSTDEVIL_RA0)
396 #define ROM_I2CSlaveInit \
397 ((void (*)(unsigned long ulBase, \
398 unsigned char ucSlaveAddr))ROM_I2CTABLE[2])
400 #if defined(TARGET_IS_DUSTDEVIL_RA0)
401 #define ROM_I2CMasterEnable \
402 ((void (*)(unsigned long ulBase))ROM_I2CTABLE[3])
404 #if defined(TARGET_IS_DUSTDEVIL_RA0)
405 #define ROM_I2CSlaveEnable \
406 ((void (*)(unsigned long ulBase))ROM_I2CTABLE[4])
408 #if defined(TARGET_IS_DUSTDEVIL_RA0)
409 #define ROM_I2CMasterDisable \
410 ((void (*)(unsigned long ulBase))ROM_I2CTABLE[5])
412 #if defined(TARGET_IS_DUSTDEVIL_RA0)
413 #define ROM_I2CSlaveDisable \
414 ((void (*)(unsigned long ulBase))ROM_I2CTABLE[6])
416 #if defined(TARGET_IS_DUSTDEVIL_RA0)
417 #define ROM_I2CMasterIntEnable \
418 ((void (*)(unsigned long ulBase))ROM_I2CTABLE[7])
420 #if defined(TARGET_IS_DUSTDEVIL_RA0)
421 #define ROM_I2CSlaveIntEnable \
422 ((void (*)(unsigned long ulBase))ROM_I2CTABLE[8])
424 #if defined(TARGET_IS_DUSTDEVIL_RA0)
425 #define ROM_I2CMasterIntDisable \
426 ((void (*)(unsigned long ulBase))ROM_I2CTABLE[9])
428 #if defined(TARGET_IS_DUSTDEVIL_RA0)
429 #define ROM_I2CSlaveIntDisable \
430 ((void (*)(unsigned long ulBase))ROM_I2CTABLE[10])
432 #if defined(TARGET_IS_DUSTDEVIL_RA0)
433 #define ROM_I2CMasterIntStatus \
434 ((tBoolean (*)(unsigned long ulBase, \
435 tBoolean bMasked))ROM_I2CTABLE[11])
437 #if defined(TARGET_IS_DUSTDEVIL_RA0)
438 #define ROM_I2CSlaveIntStatus \
439 ((tBoolean (*)(unsigned long ulBase, \
440 tBoolean bMasked))ROM_I2CTABLE[12])
442 #if defined(TARGET_IS_DUSTDEVIL_RA0)
443 #define ROM_I2CMasterIntClear \
444 ((void (*)(unsigned long ulBase))ROM_I2CTABLE[13])
446 #if defined(TARGET_IS_DUSTDEVIL_RA0)
447 #define ROM_I2CSlaveIntClear \
448 ((void (*)(unsigned long ulBase))ROM_I2CTABLE[14])
450 #if defined(TARGET_IS_DUSTDEVIL_RA0)
451 #define ROM_I2CMasterSlaveAddrSet \
452 ((void (*)(unsigned long ulBase, \
453 unsigned char ucSlaveAddr, \
454 tBoolean bReceive))ROM_I2CTABLE[15])
456 #if defined(TARGET_IS_DUSTDEVIL_RA0)
457 #define ROM_I2CMasterBusy \
458 ((tBoolean (*)(unsigned long ulBase))ROM_I2CTABLE[16])
460 #if defined(TARGET_IS_DUSTDEVIL_RA0)
461 #define ROM_I2CMasterBusBusy \
462 ((tBoolean (*)(unsigned long ulBase))ROM_I2CTABLE[17])
464 #if defined(TARGET_IS_DUSTDEVIL_RA0)
465 #define ROM_I2CMasterControl \
466 ((void (*)(unsigned long ulBase, \
467 unsigned long ulCmd))ROM_I2CTABLE[18])
469 #if defined(TARGET_IS_DUSTDEVIL_RA0)
470 #define ROM_I2CMasterErr \
471 ((unsigned long (*)(unsigned long ulBase))ROM_I2CTABLE[19])
473 #if defined(TARGET_IS_DUSTDEVIL_RA0)
474 #define ROM_I2CMasterDataGet \
475 ((unsigned long (*)(unsigned long ulBase))ROM_I2CTABLE[20])
477 #if defined(TARGET_IS_DUSTDEVIL_RA0)
478 #define ROM_I2CSlaveStatus \
479 ((unsigned long (*)(unsigned long ulBase))ROM_I2CTABLE[21])
481 #if defined(TARGET_IS_DUSTDEVIL_RA0)
482 #define ROM_I2CSlaveDataPut \
483 ((void (*)(unsigned long ulBase, \
484 unsigned char ucData))ROM_I2CTABLE[22])
486 #if defined(TARGET_IS_DUSTDEVIL_RA0)
487 #define ROM_I2CSlaveDataGet \
488 ((unsigned long (*)(unsigned long ulBase))ROM_I2CTABLE[23])
490 #if defined(TARGET_IS_DUSTDEVIL_RA0)
491 #define ROM_UpdateI2C \
492 ((void (*)(void))ROM_I2CTABLE[24])
495 //*****************************************************************************
497 // Macros for calling ROM functions in the Interrupt API.
499 //*****************************************************************************
500 #if defined(TARGET_IS_DUSTDEVIL_RA0)
501 #define ROM_IntEnable \
502 ((void (*)(unsigned long ulInterrupt))ROM_INTERRUPTTABLE[0])
504 #if defined(TARGET_IS_DUSTDEVIL_RA0)
505 #define ROM_IntDisable \
506 ((void (*)(unsigned long ulInterrupt))ROM_INTERRUPTTABLE[3])
508 #if defined(TARGET_IS_DUSTDEVIL_RA0)
509 #define ROM_IntPriorityGroupingSet \
510 ((void (*)(unsigned long ulBits))ROM_INTERRUPTTABLE[4])
512 #if defined(TARGET_IS_DUSTDEVIL_RA0)
513 #define ROM_IntPriorityGroupingGet \
514 ((unsigned long (*)(void))ROM_INTERRUPTTABLE[5])
516 #if defined(TARGET_IS_DUSTDEVIL_RA0)
517 #define ROM_IntPrioritySet \
518 ((void (*)(unsigned long ulInterrupt, \
519 unsigned char ucPriority))ROM_INTERRUPTTABLE[6])
521 #if defined(TARGET_IS_DUSTDEVIL_RA0)
522 #define ROM_IntPriorityGet \
523 ((long (*)(unsigned long ulInterrupt))ROM_INTERRUPTTABLE[7])
526 //*****************************************************************************
528 // Macros for calling ROM functions in the PWM API.
530 //*****************************************************************************
531 #if defined(TARGET_IS_DUSTDEVIL_RA0)
532 #define ROM_PWMPulseWidthSet \
533 ((void (*)(unsigned long ulBase, \
534 unsigned long ulPWMOut, \
535 unsigned long ulWidth))ROM_PWMTABLE[0])
537 #if defined(TARGET_IS_DUSTDEVIL_RA0)
538 #define ROM_PWMGenConfigure \
539 ((void (*)(unsigned long ulBase, \
540 unsigned long ulGen, \
541 unsigned long ulConfig))ROM_PWMTABLE[1])
543 #if defined(TARGET_IS_DUSTDEVIL_RA0)
544 #define ROM_PWMGenPeriodSet \
545 ((void (*)(unsigned long ulBase, \
546 unsigned long ulGen, \
547 unsigned long ulPeriod))ROM_PWMTABLE[2])
549 #if defined(TARGET_IS_DUSTDEVIL_RA0)
550 #define ROM_PWMGenPeriodGet \
551 ((unsigned long (*)(unsigned long ulBase, \
552 unsigned long ulGen))ROM_PWMTABLE[3])
554 #if defined(TARGET_IS_DUSTDEVIL_RA0)
555 #define ROM_PWMGenEnable \
556 ((void (*)(unsigned long ulBase, \
557 unsigned long ulGen))ROM_PWMTABLE[4])
559 #if defined(TARGET_IS_DUSTDEVIL_RA0)
560 #define ROM_PWMGenDisable \
561 ((void (*)(unsigned long ulBase, \
562 unsigned long ulGen))ROM_PWMTABLE[5])
564 #if defined(TARGET_IS_DUSTDEVIL_RA0)
565 #define ROM_PWMPulseWidthGet \
566 ((unsigned long (*)(unsigned long ulBase, \
567 unsigned long ulPWMOut))ROM_PWMTABLE[6])
569 #if defined(TARGET_IS_DUSTDEVIL_RA0)
570 #define ROM_PWMDeadBandEnable \
571 ((void (*)(unsigned long ulBase, \
572 unsigned long ulGen, \
573 unsigned short usRise, \
574 unsigned short usFall))ROM_PWMTABLE[7])
576 #if defined(TARGET_IS_DUSTDEVIL_RA0)
577 #define ROM_PWMDeadBandDisable \
578 ((void (*)(unsigned long ulBase, \
579 unsigned long ulGen))ROM_PWMTABLE[8])
581 #if defined(TARGET_IS_DUSTDEVIL_RA0)
582 #define ROM_PWMSyncUpdate \
583 ((void (*)(unsigned long ulBase, \
584 unsigned long ulGenBits))ROM_PWMTABLE[9])
586 #if defined(TARGET_IS_DUSTDEVIL_RA0)
587 #define ROM_PWMSyncTimeBase \
588 ((void (*)(unsigned long ulBase, \
589 unsigned long ulGenBits))ROM_PWMTABLE[10])
591 #if defined(TARGET_IS_DUSTDEVIL_RA0)
592 #define ROM_PWMOutputState \
593 ((void (*)(unsigned long ulBase, \
594 unsigned long ulPWMOutBits, \
595 tBoolean bEnable))ROM_PWMTABLE[11])
597 #if defined(TARGET_IS_DUSTDEVIL_RA0)
598 #define ROM_PWMOutputInvert \
599 ((void (*)(unsigned long ulBase, \
600 unsigned long ulPWMOutBits, \
601 tBoolean bInvert))ROM_PWMTABLE[12])
603 #if defined(TARGET_IS_DUSTDEVIL_RA0)
604 #define ROM_PWMOutputFault \
605 ((void (*)(unsigned long ulBase, \
606 unsigned long ulPWMOutBits, \
607 tBoolean bFaultSuppress))ROM_PWMTABLE[13])
609 #if defined(TARGET_IS_DUSTDEVIL_RA0)
610 #define ROM_PWMGenIntTrigEnable \
611 ((void (*)(unsigned long ulBase, \
612 unsigned long ulGen, \
613 unsigned long ulIntTrig))ROM_PWMTABLE[14])
615 #if defined(TARGET_IS_DUSTDEVIL_RA0)
616 #define ROM_PWMGenIntTrigDisable \
617 ((void (*)(unsigned long ulBase, \
618 unsigned long ulGen, \
619 unsigned long ulIntTrig))ROM_PWMTABLE[15])
621 #if defined(TARGET_IS_DUSTDEVIL_RA0)
622 #define ROM_PWMGenIntStatus \
623 ((unsigned long (*)(unsigned long ulBase, \
624 unsigned long ulGen, \
625 tBoolean bMasked))ROM_PWMTABLE[16])
627 #if defined(TARGET_IS_DUSTDEVIL_RA0)
628 #define ROM_PWMGenIntClear \
629 ((void (*)(unsigned long ulBase, \
630 unsigned long ulGen, \
631 unsigned long ulInts))ROM_PWMTABLE[17])
633 #if defined(TARGET_IS_DUSTDEVIL_RA0)
634 #define ROM_PWMIntEnable \
635 ((void (*)(unsigned long ulBase, \
636 unsigned long ulGenFault))ROM_PWMTABLE[18])
638 #if defined(TARGET_IS_DUSTDEVIL_RA0)
639 #define ROM_PWMIntDisable \
640 ((void (*)(unsigned long ulBase, \
641 unsigned long ulGenFault))ROM_PWMTABLE[19])
643 #if defined(TARGET_IS_DUSTDEVIL_RA0)
644 #define ROM_PWMFaultIntClear \
645 ((void (*)(unsigned long ulBase))ROM_PWMTABLE[20])
647 #if defined(TARGET_IS_DUSTDEVIL_RA0)
648 #define ROM_PWMIntStatus \
649 ((unsigned long (*)(unsigned long ulBase, \
650 tBoolean bMasked))ROM_PWMTABLE[21])
653 //*****************************************************************************
655 // Macros for calling ROM functions in the QEI API.
657 //*****************************************************************************
658 #if defined(TARGET_IS_DUSTDEVIL_RA0)
659 #define ROM_QEIPositionGet \
660 ((unsigned long (*)(unsigned long ulBase))ROM_QEITABLE[0])
662 #if defined(TARGET_IS_DUSTDEVIL_RA0)
663 #define ROM_QEIEnable \
664 ((void (*)(unsigned long ulBase))ROM_QEITABLE[1])
666 #if defined(TARGET_IS_DUSTDEVIL_RA0)
667 #define ROM_QEIDisable \
668 ((void (*)(unsigned long ulBase))ROM_QEITABLE[2])
670 #if defined(TARGET_IS_DUSTDEVIL_RA0)
671 #define ROM_QEIConfigure \
672 ((void (*)(unsigned long ulBase, \
673 unsigned long ulConfig, \
674 unsigned long ulMaxPosition))ROM_QEITABLE[3])
676 #if defined(TARGET_IS_DUSTDEVIL_RA0)
677 #define ROM_QEIPositionSet \
678 ((void (*)(unsigned long ulBase, \
679 unsigned long ulPosition))ROM_QEITABLE[4])
681 #if defined(TARGET_IS_DUSTDEVIL_RA0)
682 #define ROM_QEIDirectionGet \
683 ((long (*)(unsigned long ulBase))ROM_QEITABLE[5])
685 #if defined(TARGET_IS_DUSTDEVIL_RA0)
686 #define ROM_QEIErrorGet \
687 ((tBoolean (*)(unsigned long ulBase))ROM_QEITABLE[6])
689 #if defined(TARGET_IS_DUSTDEVIL_RA0)
690 #define ROM_QEIVelocityEnable \
691 ((void (*)(unsigned long ulBase))ROM_QEITABLE[7])
693 #if defined(TARGET_IS_DUSTDEVIL_RA0)
694 #define ROM_QEIVelocityDisable \
695 ((void (*)(unsigned long ulBase))ROM_QEITABLE[8])
697 #if defined(TARGET_IS_DUSTDEVIL_RA0)
698 #define ROM_QEIVelocityConfigure \
699 ((void (*)(unsigned long ulBase, \
700 unsigned long ulPreDiv, \
701 unsigned long ulPeriod))ROM_QEITABLE[9])
703 #if defined(TARGET_IS_DUSTDEVIL_RA0)
704 #define ROM_QEIVelocityGet \
705 ((unsigned long (*)(unsigned long ulBase))ROM_QEITABLE[10])
707 #if defined(TARGET_IS_DUSTDEVIL_RA0)
708 #define ROM_QEIIntEnable \
709 ((void (*)(unsigned long ulBase, \
710 unsigned long ulIntFlags))ROM_QEITABLE[11])
712 #if defined(TARGET_IS_DUSTDEVIL_RA0)
713 #define ROM_QEIIntDisable \
714 ((void (*)(unsigned long ulBase, \
715 unsigned long ulIntFlags))ROM_QEITABLE[12])
717 #if defined(TARGET_IS_DUSTDEVIL_RA0)
718 #define ROM_QEIIntStatus \
719 ((unsigned long (*)(unsigned long ulBase, \
720 tBoolean bMasked))ROM_QEITABLE[13])
722 #if defined(TARGET_IS_DUSTDEVIL_RA0)
723 #define ROM_QEIIntClear \
724 ((void (*)(unsigned long ulBase, \
725 unsigned long ulIntFlags))ROM_QEITABLE[14])
728 //*****************************************************************************
730 // Macros for calling ROM functions in the SSI API.
732 //*****************************************************************************
733 #if defined(TARGET_IS_DUSTDEVIL_RA0)
734 #define ROM_SSIDataPut \
735 ((void (*)(unsigned long ulBase, \
736 unsigned long ulData))ROM_SSITABLE[0])
738 #if defined(TARGET_IS_DUSTDEVIL_RA0)
739 #define ROM_SSIConfigSetExpClk \
740 ((void (*)(unsigned long ulBase, \
741 unsigned long ulSSIClk, \
742 unsigned long ulProtocol, \
743 unsigned long ulMode, \
744 unsigned long ulBitRate, \
745 unsigned long ulDataWidth))ROM_SSITABLE[1])
747 #if defined(TARGET_IS_DUSTDEVIL_RA0)
748 #define ROM_SSIEnable \
749 ((void (*)(unsigned long ulBase))ROM_SSITABLE[2])
751 #if defined(TARGET_IS_DUSTDEVIL_RA0)
752 #define ROM_SSIDisable \
753 ((void (*)(unsigned long ulBase))ROM_SSITABLE[3])
755 #if defined(TARGET_IS_DUSTDEVIL_RA0)
756 #define ROM_SSIIntEnable \
757 ((void (*)(unsigned long ulBase, \
758 unsigned long ulIntFlags))ROM_SSITABLE[4])
760 #if defined(TARGET_IS_DUSTDEVIL_RA0)
761 #define ROM_SSIIntDisable \
762 ((void (*)(unsigned long ulBase, \
763 unsigned long ulIntFlags))ROM_SSITABLE[5])
765 #if defined(TARGET_IS_DUSTDEVIL_RA0)
766 #define ROM_SSIIntStatus \
767 ((unsigned long (*)(unsigned long ulBase, \
768 tBoolean bMasked))ROM_SSITABLE[6])
770 #if defined(TARGET_IS_DUSTDEVIL_RA0)
771 #define ROM_SSIIntClear \
772 ((void (*)(unsigned long ulBase, \
773 unsigned long ulIntFlags))ROM_SSITABLE[7])
775 #if defined(TARGET_IS_DUSTDEVIL_RA0)
776 #define ROM_SSIDataPutNonBlocking \
777 ((long (*)(unsigned long ulBase, \
778 unsigned long ulData))ROM_SSITABLE[8])
780 #if defined(TARGET_IS_DUSTDEVIL_RA0)
781 #define ROM_SSIDataGet \
782 ((void (*)(unsigned long ulBase, \
783 unsigned long *pulData))ROM_SSITABLE[9])
785 #if defined(TARGET_IS_DUSTDEVIL_RA0)
786 #define ROM_SSIDataGetNonBlocking \
787 ((long (*)(unsigned long ulBase, \
788 unsigned long *pulData))ROM_SSITABLE[10])
790 #if defined(TARGET_IS_DUSTDEVIL_RA0)
791 #define ROM_UpdateSSI \
792 ((void (*)(void))ROM_SSITABLE[11])
795 //*****************************************************************************
797 // Macros for calling ROM functions in the SysCtl API.
799 //*****************************************************************************
800 #if defined(TARGET_IS_DUSTDEVIL_RA0)
801 #define ROM_SysCtlSleep \
802 ((void (*)(void))ROM_SYSCTLTABLE[0])
804 #if defined(TARGET_IS_DUSTDEVIL_RA0)
805 #define ROM_SysCtlSRAMSizeGet \
806 ((unsigned long (*)(void))ROM_SYSCTLTABLE[1])
808 #if defined(TARGET_IS_DUSTDEVIL_RA0)
809 #define ROM_SysCtlFlashSizeGet \
810 ((unsigned long (*)(void))ROM_SYSCTLTABLE[2])
812 #if defined(TARGET_IS_DUSTDEVIL_RA0)
813 #define ROM_SysCtlPinPresent \
814 ((tBoolean (*)(unsigned long ulPin))ROM_SYSCTLTABLE[3])
816 #if defined(TARGET_IS_DUSTDEVIL_RA0)
817 #define ROM_SysCtlPeripheralPresent \
818 ((tBoolean (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[4])
820 #if defined(TARGET_IS_DUSTDEVIL_RA0)
821 #define ROM_SysCtlPeripheralReset \
822 ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[5])
824 #if defined(TARGET_IS_DUSTDEVIL_RA0)
825 #define ROM_SysCtlPeripheralEnable \
826 ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[6])
828 #if defined(TARGET_IS_DUSTDEVIL_RA0)
829 #define ROM_SysCtlPeripheralDisable \
830 ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[7])
832 #if defined(TARGET_IS_DUSTDEVIL_RA0)
833 #define ROM_SysCtlPeripheralSleepEnable \
834 ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[8])
836 #if defined(TARGET_IS_DUSTDEVIL_RA0)
837 #define ROM_SysCtlPeripheralSleepDisable \
838 ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[9])
840 #if defined(TARGET_IS_DUSTDEVIL_RA0)
841 #define ROM_SysCtlPeripheralDeepSleepEnable \
842 ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[10])
844 #if defined(TARGET_IS_DUSTDEVIL_RA0)
845 #define ROM_SysCtlPeripheralDeepSleepDisable \
846 ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[11])
848 #if defined(TARGET_IS_DUSTDEVIL_RA0)
849 #define ROM_SysCtlPeripheralClockGating \
850 ((void (*)(tBoolean bEnable))ROM_SYSCTLTABLE[12])
852 #if defined(TARGET_IS_DUSTDEVIL_RA0)
853 #define ROM_SysCtlIntEnable \
854 ((void (*)(unsigned long ulInts))ROM_SYSCTLTABLE[13])
856 #if defined(TARGET_IS_DUSTDEVIL_RA0)
857 #define ROM_SysCtlIntDisable \
858 ((void (*)(unsigned long ulInts))ROM_SYSCTLTABLE[14])
860 #if defined(TARGET_IS_DUSTDEVIL_RA0)
861 #define ROM_SysCtlIntClear \
862 ((void (*)(unsigned long ulInts))ROM_SYSCTLTABLE[15])
864 #if defined(TARGET_IS_DUSTDEVIL_RA0)
865 #define ROM_SysCtlIntStatus \
866 ((unsigned long (*)(tBoolean bMasked))ROM_SYSCTLTABLE[16])
868 #if defined(TARGET_IS_DUSTDEVIL_RA0)
869 #define ROM_SysCtlLDOSet \
870 ((void (*)(unsigned long ulVoltage))ROM_SYSCTLTABLE[17])
872 #if defined(TARGET_IS_DUSTDEVIL_RA0)
873 #define ROM_SysCtlLDOGet \
874 ((unsigned long (*)(void))ROM_SYSCTLTABLE[18])
876 #if defined(TARGET_IS_DUSTDEVIL_RA0)
877 #define ROM_SysCtlReset \
878 ((void (*)(void))ROM_SYSCTLTABLE[19])
880 #if defined(TARGET_IS_DUSTDEVIL_RA0)
881 #define ROM_SysCtlDeepSleep \
882 ((void (*)(void))ROM_SYSCTLTABLE[20])
884 #if defined(TARGET_IS_DUSTDEVIL_RA0)
885 #define ROM_SysCtlResetCauseGet \
886 ((unsigned long (*)(void))ROM_SYSCTLTABLE[21])
888 #if defined(TARGET_IS_DUSTDEVIL_RA0)
889 #define ROM_SysCtlResetCauseClear \
890 ((void (*)(unsigned long ulCauses))ROM_SYSCTLTABLE[22])
892 #if defined(TARGET_IS_DUSTDEVIL_RA0)
893 #define ROM_SysCtlClockSet \
894 ((void (*)(unsigned long ulConfig))ROM_SYSCTLTABLE[23])
896 #if defined(TARGET_IS_DUSTDEVIL_RA0)
897 #define ROM_SysCtlClockGet \
898 ((unsigned long (*)(void))ROM_SYSCTLTABLE[24])
900 #if defined(TARGET_IS_DUSTDEVIL_RA0)
901 #define ROM_SysCtlPWMClockSet \
902 ((void (*)(unsigned long ulConfig))ROM_SYSCTLTABLE[25])
904 #if defined(TARGET_IS_DUSTDEVIL_RA0)
905 #define ROM_SysCtlPWMClockGet \
906 ((unsigned long (*)(void))ROM_SYSCTLTABLE[26])
908 #if defined(TARGET_IS_DUSTDEVIL_RA0)
909 #define ROM_SysCtlADCSpeedSet \
910 ((void (*)(unsigned long ulSpeed))ROM_SYSCTLTABLE[27])
912 #if defined(TARGET_IS_DUSTDEVIL_RA0)
913 #define ROM_SysCtlADCSpeedGet \
914 ((unsigned long (*)(void))ROM_SYSCTLTABLE[28])
916 #if defined(TARGET_IS_DUSTDEVIL_RA0)
917 #define ROM_SysCtlGPIOAHBEnable \
918 ((void (*)(unsigned long ulGPIOPeripheral))ROM_SYSCTLTABLE[29])
920 #if defined(TARGET_IS_DUSTDEVIL_RA0)
921 #define ROM_SysCtlGPIOAHBDisable \
922 ((void (*)(unsigned long ulGPIOPeripheral))ROM_SYSCTLTABLE[30])
925 //*****************************************************************************
927 // Macros for calling ROM functions in the SysTick API.
929 //*****************************************************************************
930 #if defined(TARGET_IS_DUSTDEVIL_RA0)
931 #define ROM_SysTickValueGet \
932 ((unsigned long (*)(void))ROM_SYSTICKTABLE[0])
934 #if defined(TARGET_IS_DUSTDEVIL_RA0)
935 #define ROM_SysTickEnable \
936 ((void (*)(void))ROM_SYSTICKTABLE[1])
938 #if defined(TARGET_IS_DUSTDEVIL_RA0)
939 #define ROM_SysTickDisable \
940 ((void (*)(void))ROM_SYSTICKTABLE[2])
942 #if defined(TARGET_IS_DUSTDEVIL_RA0)
943 #define ROM_SysTickIntEnable \
944 ((void (*)(void))ROM_SYSTICKTABLE[3])
946 #if defined(TARGET_IS_DUSTDEVIL_RA0)
947 #define ROM_SysTickIntDisable \
948 ((void (*)(void))ROM_SYSTICKTABLE[4])
950 #if defined(TARGET_IS_DUSTDEVIL_RA0)
951 #define ROM_SysTickPeriodSet \
952 ((void (*)(unsigned long ulPeriod))ROM_SYSTICKTABLE[5])
954 #if defined(TARGET_IS_DUSTDEVIL_RA0)
955 #define ROM_SysTickPeriodGet \
956 ((unsigned long (*)(void))ROM_SYSTICKTABLE[6])
959 //*****************************************************************************
961 // Macros for calling ROM functions in the Timer API.
963 //*****************************************************************************
964 #if defined(TARGET_IS_DUSTDEVIL_RA0)
965 #define ROM_TimerIntClear \
966 ((void (*)(unsigned long ulBase, \
967 unsigned long ulIntFlags))ROM_TIMERTABLE[0])
969 #if defined(TARGET_IS_DUSTDEVIL_RA0)
970 #define ROM_TimerEnable \
971 ((void (*)(unsigned long ulBase, \
972 unsigned long ulTimer))ROM_TIMERTABLE[1])
974 #if defined(TARGET_IS_DUSTDEVIL_RA0)
975 #define ROM_TimerDisable \
976 ((void (*)(unsigned long ulBase, \
977 unsigned long ulTimer))ROM_TIMERTABLE[2])
979 #if defined(TARGET_IS_DUSTDEVIL_RA0)
980 #define ROM_TimerConfigure \
981 ((void (*)(unsigned long ulBase, \
982 unsigned long ulConfig))ROM_TIMERTABLE[3])
984 #if defined(TARGET_IS_DUSTDEVIL_RA0)
985 #define ROM_TimerControlLevel \
986 ((void (*)(unsigned long ulBase, \
987 unsigned long ulTimer, \
988 tBoolean bInvert))ROM_TIMERTABLE[4])
990 #if defined(TARGET_IS_DUSTDEVIL_RA0)
991 #define ROM_TimerControlTrigger \
992 ((void (*)(unsigned long ulBase, \
993 unsigned long ulTimer, \
994 tBoolean bEnable))ROM_TIMERTABLE[5])
996 #if defined(TARGET_IS_DUSTDEVIL_RA0)
997 #define ROM_TimerControlEvent \
998 ((void (*)(unsigned long ulBase, \
999 unsigned long ulTimer, \
1000 unsigned long ulEvent))ROM_TIMERTABLE[6])
1002 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1003 #define ROM_TimerControlStall \
1004 ((void (*)(unsigned long ulBase, \
1005 unsigned long ulTimer, \
1006 tBoolean bStall))ROM_TIMERTABLE[7])
1008 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1009 #define ROM_TimerRTCEnable \
1010 ((void (*)(unsigned long ulBase))ROM_TIMERTABLE[8])
1012 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1013 #define ROM_TimerRTCDisable \
1014 ((void (*)(unsigned long ulBase))ROM_TIMERTABLE[9])
1016 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1017 #define ROM_TimerPrescaleSet \
1018 ((void (*)(unsigned long ulBase, \
1019 unsigned long ulTimer, \
1020 unsigned long ulValue))ROM_TIMERTABLE[10])
1022 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1023 #define ROM_TimerPrescaleGet \
1024 ((unsigned long (*)(unsigned long ulBase, \
1025 unsigned long ulTimer))ROM_TIMERTABLE[11])
1027 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1028 #define ROM_TimerLoadSet \
1029 ((void (*)(unsigned long ulBase, \
1030 unsigned long ulTimer, \
1031 unsigned long ulValue))ROM_TIMERTABLE[14])
1033 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1034 #define ROM_TimerLoadGet \
1035 ((unsigned long (*)(unsigned long ulBase, \
1036 unsigned long ulTimer))ROM_TIMERTABLE[15])
1038 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1039 #define ROM_TimerValueGet \
1040 ((unsigned long (*)(unsigned long ulBase, \
1041 unsigned long ulTimer))ROM_TIMERTABLE[16])
1043 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1044 #define ROM_TimerMatchSet \
1045 ((void (*)(unsigned long ulBase, \
1046 unsigned long ulTimer, \
1047 unsigned long ulValue))ROM_TIMERTABLE[17])
1049 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1050 #define ROM_TimerMatchGet \
1051 ((unsigned long (*)(unsigned long ulBase, \
1052 unsigned long ulTimer))ROM_TIMERTABLE[18])
1054 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1055 #define ROM_TimerIntEnable \
1056 ((void (*)(unsigned long ulBase, \
1057 unsigned long ulIntFlags))ROM_TIMERTABLE[19])
1059 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1060 #define ROM_TimerIntDisable \
1061 ((void (*)(unsigned long ulBase, \
1062 unsigned long ulIntFlags))ROM_TIMERTABLE[20])
1064 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1065 #define ROM_TimerIntStatus \
1066 ((unsigned long (*)(unsigned long ulBase, \
1067 tBoolean bMasked))ROM_TIMERTABLE[21])
1070 //*****************************************************************************
1072 // Macros for calling ROM functions in the UART API.
1074 //*****************************************************************************
1075 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1076 #define ROM_UARTCharPut \
1077 ((void (*)(unsigned long ulBase, \
1078 unsigned char ucData))ROM_UARTTABLE[0])
1080 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1081 #define ROM_UARTParityModeSet \
1082 ((void (*)(unsigned long ulBase, \
1083 unsigned long ulParity))ROM_UARTTABLE[1])
1085 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1086 #define ROM_UARTParityModeGet \
1087 ((unsigned long (*)(unsigned long ulBase))ROM_UARTTABLE[2])
1089 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1090 #define ROM_UARTFIFOLevelSet \
1091 ((void (*)(unsigned long ulBase, \
1092 unsigned long ulTxLevel, \
1093 unsigned long ulRxLevel))ROM_UARTTABLE[3])
1095 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1096 #define ROM_UARTFIFOLevelGet \
1097 ((void (*)(unsigned long ulBase, \
1098 unsigned long *pulTxLevel, \
1099 unsigned long *pulRxLevel))ROM_UARTTABLE[4])
1101 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1102 #define ROM_UARTConfigSetExpClk \
1103 ((void (*)(unsigned long ulBase, \
1104 unsigned long ulUARTClk, \
1105 unsigned long ulBaud, \
1106 unsigned long ulConfig))ROM_UARTTABLE[5])
1108 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1109 #define ROM_UARTConfigGetExpClk \
1110 ((void (*)(unsigned long ulBase, \
1111 unsigned long ulUARTClk, \
1112 unsigned long *pulBaud, \
1113 unsigned long *pulConfig))ROM_UARTTABLE[6])
1115 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1116 #define ROM_UARTEnable \
1117 ((void (*)(unsigned long ulBase))ROM_UARTTABLE[7])
1119 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1120 #define ROM_UARTDisable \
1121 ((void (*)(unsigned long ulBase))ROM_UARTTABLE[8])
1123 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1124 #define ROM_UARTEnableSIR \
1125 ((void (*)(unsigned long ulBase, \
1126 tBoolean bLowPower))ROM_UARTTABLE[9])
1128 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1129 #define ROM_UARTDisableSIR \
1130 ((void (*)(unsigned long ulBase))ROM_UARTTABLE[10])
1132 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1133 #define ROM_UARTCharsAvail \
1134 ((tBoolean (*)(unsigned long ulBase))ROM_UARTTABLE[11])
1136 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1137 #define ROM_UARTSpaceAvail \
1138 ((tBoolean (*)(unsigned long ulBase))ROM_UARTTABLE[12])
1140 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1141 #define ROM_UARTCharGetNonBlocking \
1142 ((long (*)(unsigned long ulBase))ROM_UARTTABLE[13])
1144 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1145 #define ROM_UARTCharGet \
1146 ((long (*)(unsigned long ulBase))ROM_UARTTABLE[14])
1148 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1149 #define ROM_UARTCharPutNonBlocking \
1150 ((tBoolean (*)(unsigned long ulBase, \
1151 unsigned char ucData))ROM_UARTTABLE[15])
1153 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1154 #define ROM_UARTBreakCtl \
1155 ((void (*)(unsigned long ulBase, \
1156 tBoolean bBreakState))ROM_UARTTABLE[16])
1158 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1159 #define ROM_UARTIntEnable \
1160 ((void (*)(unsigned long ulBase, \
1161 unsigned long ulIntFlags))ROM_UARTTABLE[17])
1163 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1164 #define ROM_UARTIntDisable \
1165 ((void (*)(unsigned long ulBase, \
1166 unsigned long ulIntFlags))ROM_UARTTABLE[18])
1168 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1169 #define ROM_UARTIntStatus \
1170 ((unsigned long (*)(unsigned long ulBase, \
1171 tBoolean bMasked))ROM_UARTTABLE[19])
1173 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1174 #define ROM_UARTIntClear \
1175 ((void (*)(unsigned long ulBase, \
1176 unsigned long ulIntFlags))ROM_UARTTABLE[20])
1178 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1179 #define ROM_UpdateUART \
1180 ((void (*)(void))ROM_UARTTABLE[21])
1183 //*****************************************************************************
1185 // Macros for calling ROM functions in the Watchdog API.
1187 //*****************************************************************************
1188 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1189 #define ROM_WatchdogIntClear \
1190 ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[0])
1192 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1193 #define ROM_WatchdogRunning \
1194 ((tBoolean (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[1])
1196 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1197 #define ROM_WatchdogEnable \
1198 ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[2])
1200 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1201 #define ROM_WatchdogResetEnable \
1202 ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[3])
1204 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1205 #define ROM_WatchdogResetDisable \
1206 ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[4])
1208 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1209 #define ROM_WatchdogLock \
1210 ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[5])
1212 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1213 #define ROM_WatchdogUnlock \
1214 ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[6])
1216 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1217 #define ROM_WatchdogLockState \
1218 ((tBoolean (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[7])
1220 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1221 #define ROM_WatchdogReloadSet \
1222 ((void (*)(unsigned long ulBase, \
1223 unsigned long ulLoadVal))ROM_WATCHDOGTABLE[8])
1225 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1226 #define ROM_WatchdogReloadGet \
1227 ((unsigned long (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[9])
1229 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1230 #define ROM_WatchdogValueGet \
1231 ((unsigned long (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[10])
1233 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1234 #define ROM_WatchdogIntEnable \
1235 ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[11])
1237 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1238 #define ROM_WatchdogIntStatus \
1239 ((unsigned long (*)(unsigned long ulBase, \
1240 tBoolean bMasked))ROM_WATCHDOGTABLE[12])
1242 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1243 #define ROM_WatchdogStallEnable \
1244 ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[13])
1246 #if defined(TARGET_IS_DUSTDEVIL_RA0)
1247 #define ROM_WatchdogStallDisable \
1248 ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[14])