OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [Common/] [drivers/] [LuminaryMicro/] [rom.h] - Blame information for rev 610

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 610 jeremybenn
//*****************************************************************************
2
//
3
// rom.h - Macros to facilitate calling functions in the ROM.
4
//
5
// Copyright (c) 2007-2008 Luminary Micro, Inc.  All rights reserved.
6
// 
7
// Software License Agreement
8
// 
9
// Luminary Micro, Inc. (LMI) is supplying this software for use solely and
10
// exclusively on LMI's microcontroller products.
11
// 
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.
18
// 
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.
24
// 
25
// This is part of revision 2523 of the Stellaris Peripheral Driver Library.
26
//
27
//*****************************************************************************
28
 
29
#ifndef __ROM_H__
30
#define __ROM_H__
31
 
32
//*****************************************************************************
33
//
34
// Pointers to the main API tables.
35
//
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]))
53
 
54
//*****************************************************************************
55
//
56
// Macros for calling ROM functions in the ADC API.
57
//
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])
64
#endif
65
#if defined(TARGET_IS_DUSTDEVIL_RA0)
66
#define ROM_ADCIntDisable                                                     \
67
        ((void (*)(unsigned long ulBase,                                      \
68
                   unsigned long ulSequenceNum))ROM_ADCTABLE[1])
69
#endif
70
#if defined(TARGET_IS_DUSTDEVIL_RA0)
71
#define ROM_ADCIntEnable                                                      \
72
        ((void (*)(unsigned long ulBase,                                      \
73
                   unsigned long ulSequenceNum))ROM_ADCTABLE[2])
74
#endif
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])
80
#endif
81
#if defined(TARGET_IS_DUSTDEVIL_RA0)
82
#define ROM_ADCIntClear                                                       \
83
        ((void (*)(unsigned long ulBase,                                      \
84
                   unsigned long ulSequenceNum))ROM_ADCTABLE[4])
85
#endif
86
#if defined(TARGET_IS_DUSTDEVIL_RA0)
87
#define ROM_ADCSequenceEnable                                                 \
88
        ((void (*)(unsigned long ulBase,                                      \
89
                   unsigned long ulSequenceNum))ROM_ADCTABLE[5])
90
#endif
91
#if defined(TARGET_IS_DUSTDEVIL_RA0)
92
#define ROM_ADCSequenceDisable                                                \
93
        ((void (*)(unsigned long ulBase,                                      \
94
                   unsigned long ulSequenceNum))ROM_ADCTABLE[6])
95
#endif
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])
102
#endif
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])
109
#endif
110
#if defined(TARGET_IS_DUSTDEVIL_RA0)
111
#define ROM_ADCSequenceOverflow                                               \
112
        ((long (*)(unsigned long ulBase,                                      \
113
                   unsigned long ulSequenceNum))ROM_ADCTABLE[9])
114
#endif
115
#if defined(TARGET_IS_DUSTDEVIL_RA0)
116
#define ROM_ADCSequenceOverflowClear                                          \
117
        ((void (*)(unsigned long ulBase,                                      \
118
                   unsigned long ulSequenceNum))ROM_ADCTABLE[10])
119
#endif
120
#if defined(TARGET_IS_DUSTDEVIL_RA0)
121
#define ROM_ADCSequenceUnderflow                                              \
122
        ((long (*)(unsigned long ulBase,                                      \
123
                   unsigned long ulSequenceNum))ROM_ADCTABLE[11])
124
#endif
125
#if defined(TARGET_IS_DUSTDEVIL_RA0)
126
#define ROM_ADCSequenceUnderflowClear                                         \
127
        ((void (*)(unsigned long ulBase,                                      \
128
                   unsigned long ulSequenceNum))ROM_ADCTABLE[12])
129
#endif
130
#if defined(TARGET_IS_DUSTDEVIL_RA0)
131
#define ROM_ADCProcessorTrigger                                               \
132
        ((void (*)(unsigned long ulBase,                                      \
133
                   unsigned long ulSequenceNum))ROM_ADCTABLE[13])
134
#endif
135
#if defined(TARGET_IS_DUSTDEVIL_RA0)
136
#define ROM_ADCHardwareOversampleConfigure                                    \
137
        ((void (*)(unsigned long ulBase,                                      \
138
                   unsigned long ulFactor))ROM_ADCTABLE[14])
139
#endif
140
 
141
//*****************************************************************************
142
//
143
// Macros for calling ROM functions in the Comparator API.
144
//
145
//*****************************************************************************
146
#if defined(TARGET_IS_DUSTDEVIL_RA0)
147
#define ROM_ComparatorIntClear                                                \
148
        ((void (*)(unsigned long ulBase,                                      \
149
                   unsigned long ulComp))ROM_COMPARATORTABLE[0])
150
#endif
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])
156
#endif
157
#if defined(TARGET_IS_DUSTDEVIL_RA0)
158
#define ROM_ComparatorRefSet                                                  \
159
        ((void (*)(unsigned long ulBase,                                      \
160
                   unsigned long ulRef))ROM_COMPARATORTABLE[2])
161
#endif
162
#if defined(TARGET_IS_DUSTDEVIL_RA0)
163
#define ROM_ComparatorValueGet                                                \
164
        ((tBoolean (*)(unsigned long ulBase,                                  \
165
                       unsigned long ulComp))ROM_COMPARATORTABLE[3])
166
#endif
167
#if defined(TARGET_IS_DUSTDEVIL_RA0)
168
#define ROM_ComparatorIntEnable                                               \
169
        ((void (*)(unsigned long ulBase,                                      \
170
                   unsigned long ulComp))ROM_COMPARATORTABLE[4])
171
#endif
172
#if defined(TARGET_IS_DUSTDEVIL_RA0)
173
#define ROM_ComparatorIntDisable                                              \
174
        ((void (*)(unsigned long ulBase,                                      \
175
                   unsigned long ulComp))ROM_COMPARATORTABLE[5])
176
#endif
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])
182
#endif
183
 
184
//*****************************************************************************
185
//
186
// Macros for calling ROM functions in the Flash API.
187
//
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])
194
#endif
195
#if defined(TARGET_IS_DUSTDEVIL_RA0)
196
#define ROM_FlashUsecGet                                                      \
197
        ((unsigned long (*)(void))ROM_FLASHTABLE[1])
198
#endif
199
#if defined(TARGET_IS_DUSTDEVIL_RA0)
200
#define ROM_FlashUsecSet                                                      \
201
        ((void (*)(unsigned long ulClocks))ROM_FLASHTABLE[2])
202
#endif
203
#if defined(TARGET_IS_DUSTDEVIL_RA0)
204
#define ROM_FlashErase                                                        \
205
        ((long (*)(unsigned long ulAddress))ROM_FLASHTABLE[3])
206
#endif
207
#if defined(TARGET_IS_DUSTDEVIL_RA0)
208
#define ROM_FlashProtectGet                                                   \
209
        ((tFlashProtection (*)(unsigned long ulAddress))ROM_FLASHTABLE[4])
210
#endif
211
#if defined(TARGET_IS_DUSTDEVIL_RA0)
212
#define ROM_FlashProtectSet                                                   \
213
        ((long (*)(unsigned long ulAddress,                                   \
214
                   tFlashProtection eProtect))ROM_FLASHTABLE[5])
215
#endif
216
#if defined(TARGET_IS_DUSTDEVIL_RA0)
217
#define ROM_FlashProtectSave                                                  \
218
        ((long (*)(void))ROM_FLASHTABLE[6])
219
#endif
220
#if defined(TARGET_IS_DUSTDEVIL_RA0)
221
#define ROM_FlashUserGet                                                      \
222
        ((long (*)(unsigned long *pulUser0,                                   \
223
                   unsigned long *pulUser1))ROM_FLASHTABLE[7])
224
#endif
225
#if defined(TARGET_IS_DUSTDEVIL_RA0)
226
#define ROM_FlashUserSet                                                      \
227
        ((long (*)(unsigned long ulUser0,                                     \
228
                   unsigned long ulUser1))ROM_FLASHTABLE[8])
229
#endif
230
#if defined(TARGET_IS_DUSTDEVIL_RA0)
231
#define ROM_FlashUserSave                                                     \
232
        ((long (*)(void))ROM_FLASHTABLE[9])
233
#endif
234
#if defined(TARGET_IS_DUSTDEVIL_RA0)
235
#define ROM_FlashIntEnable                                                    \
236
        ((void (*)(unsigned long ulIntFlags))ROM_FLASHTABLE[10])
237
#endif
238
#if defined(TARGET_IS_DUSTDEVIL_RA0)
239
#define ROM_FlashIntDisable                                                   \
240
        ((void (*)(unsigned long ulIntFlags))ROM_FLASHTABLE[11])
241
#endif
242
#if defined(TARGET_IS_DUSTDEVIL_RA0)
243
#define ROM_FlashIntGetStatus                                                 \
244
        ((unsigned long (*)(tBoolean bMasked))ROM_FLASHTABLE[12])
245
#endif
246
#if defined(TARGET_IS_DUSTDEVIL_RA0)
247
#define ROM_FlashIntClear                                                     \
248
        ((void (*)(unsigned long ulIntFlags))ROM_FLASHTABLE[13])
249
#endif
250
 
251
//*****************************************************************************
252
//
253
// Macros for calling ROM functions in the GPIO API.
254
//
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])
261
#endif
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])
267
#endif
268
#if defined(TARGET_IS_DUSTDEVIL_RA0)
269
#define ROM_GPIODirModeGet                                                    \
270
        ((unsigned long (*)(unsigned long ulPort,                             \
271
                            unsigned char ucPin))ROM_GPIOTABLE[2])
272
#endif
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])
278
#endif
279
#if defined(TARGET_IS_DUSTDEVIL_RA0)
280
#define ROM_GPIOIntTypeGet                                                    \
281
        ((unsigned long (*)(unsigned long ulPort,                             \
282
                            unsigned char ucPin))ROM_GPIOTABLE[4])
283
#endif
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])
290
#endif
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])
297
#endif
298
#if defined(TARGET_IS_DUSTDEVIL_RA0)
299
#define ROM_GPIOPinIntEnable                                                  \
300
        ((void (*)(unsigned long ulPort,                                      \
301
                   unsigned char ucPins))ROM_GPIOTABLE[7])
302
#endif
303
#if defined(TARGET_IS_DUSTDEVIL_RA0)
304
#define ROM_GPIOPinIntDisable                                                 \
305
        ((void (*)(unsigned long ulPort,                                      \
306
                   unsigned char ucPins))ROM_GPIOTABLE[8])
307
#endif
308
#if defined(TARGET_IS_DUSTDEVIL_RA0)
309
#define ROM_GPIOPinIntStatus                                                  \
310
        ((long (*)(unsigned long ulPort,                                      \
311
                   tBoolean bMasked))ROM_GPIOTABLE[9])
312
#endif
313
#if defined(TARGET_IS_DUSTDEVIL_RA0)
314
#define ROM_GPIOPinIntClear                                                   \
315
        ((void (*)(unsigned long ulPort,                                      \
316
                   unsigned char ucPins))ROM_GPIOTABLE[10])
317
#endif
318
#if defined(TARGET_IS_DUSTDEVIL_RA0)
319
#define ROM_GPIOPinRead                                                       \
320
        ((long (*)(unsigned long ulPort,                                      \
321
                   unsigned char ucPins))ROM_GPIOTABLE[11])
322
#endif
323
#if defined(TARGET_IS_DUSTDEVIL_RA0)
324
#define ROM_GPIOPinTypeCAN                                                    \
325
        ((void (*)(unsigned long ulPort,                                      \
326
                   unsigned char ucPins))ROM_GPIOTABLE[12])
327
#endif
328
#if defined(TARGET_IS_DUSTDEVIL_RA0)
329
#define ROM_GPIOPinTypeComparator                                             \
330
        ((void (*)(unsigned long ulPort,                                      \
331
                   unsigned char ucPins))ROM_GPIOTABLE[13])
332
#endif
333
#if defined(TARGET_IS_DUSTDEVIL_RA0)
334
#define ROM_GPIOPinTypeGPIOInput                                              \
335
        ((void (*)(unsigned long ulPort,                                      \
336
                   unsigned char ucPins))ROM_GPIOTABLE[14])
337
#endif
338
#if defined(TARGET_IS_DUSTDEVIL_RA0)
339
#define ROM_GPIOPinTypeGPIOOutput                                             \
340
        ((void (*)(unsigned long ulPort,                                      \
341
                   unsigned char ucPins))ROM_GPIOTABLE[15])
342
#endif
343
#if defined(TARGET_IS_DUSTDEVIL_RA0)
344
#define ROM_GPIOPinTypeI2C                                                    \
345
        ((void (*)(unsigned long ulPort,                                      \
346
                   unsigned char ucPins))ROM_GPIOTABLE[16])
347
#endif
348
#if defined(TARGET_IS_DUSTDEVIL_RA0)
349
#define ROM_GPIOPinTypePWM                                                    \
350
        ((void (*)(unsigned long ulPort,                                      \
351
                   unsigned char ucPins))ROM_GPIOTABLE[17])
352
#endif
353
#if defined(TARGET_IS_DUSTDEVIL_RA0)
354
#define ROM_GPIOPinTypeQEI                                                    \
355
        ((void (*)(unsigned long ulPort,                                      \
356
                   unsigned char ucPins))ROM_GPIOTABLE[18])
357
#endif
358
#if defined(TARGET_IS_DUSTDEVIL_RA0)
359
#define ROM_GPIOPinTypeSSI                                                    \
360
        ((void (*)(unsigned long ulPort,                                      \
361
                   unsigned char ucPins))ROM_GPIOTABLE[19])
362
#endif
363
#if defined(TARGET_IS_DUSTDEVIL_RA0)
364
#define ROM_GPIOPinTypeTimer                                                  \
365
        ((void (*)(unsigned long ulPort,                                      \
366
                   unsigned char ucPins))ROM_GPIOTABLE[20])
367
#endif
368
#if defined(TARGET_IS_DUSTDEVIL_RA0)
369
#define ROM_GPIOPinTypeUART                                                   \
370
        ((void (*)(unsigned long ulPort,                                      \
371
                   unsigned char ucPins))ROM_GPIOTABLE[21])
372
#endif
373
#if defined(TARGET_IS_DUSTDEVIL_RA0)
374
#define ROM_GPIOPinTypeGPIOOutputOD                                           \
375
        ((void (*)(unsigned long ulPort,                                      \
376
                   unsigned char ucPins))ROM_GPIOTABLE[22])
377
#endif
378
 
379
//*****************************************************************************
380
//
381
// Macros for calling ROM functions in the I2C API.
382
//
383
//*****************************************************************************
384
#if defined(TARGET_IS_DUSTDEVIL_RA0)
385
#define ROM_I2CMasterDataPut                                                  \
386
        ((void (*)(unsigned long ulBase,                                      \
387
                   unsigned char ucData))ROM_I2CTABLE[0])
388
#endif
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])
394
#endif
395
#if defined(TARGET_IS_DUSTDEVIL_RA0)
396
#define ROM_I2CSlaveInit                                                      \
397
        ((void (*)(unsigned long ulBase,                                      \
398
                   unsigned char ucSlaveAddr))ROM_I2CTABLE[2])
399
#endif
400
#if defined(TARGET_IS_DUSTDEVIL_RA0)
401
#define ROM_I2CMasterEnable                                                   \
402
        ((void (*)(unsigned long ulBase))ROM_I2CTABLE[3])
403
#endif
404
#if defined(TARGET_IS_DUSTDEVIL_RA0)
405
#define ROM_I2CSlaveEnable                                                    \
406
        ((void (*)(unsigned long ulBase))ROM_I2CTABLE[4])
407
#endif
408
#if defined(TARGET_IS_DUSTDEVIL_RA0)
409
#define ROM_I2CMasterDisable                                                  \
410
        ((void (*)(unsigned long ulBase))ROM_I2CTABLE[5])
411
#endif
412
#if defined(TARGET_IS_DUSTDEVIL_RA0)
413
#define ROM_I2CSlaveDisable                                                   \
414
        ((void (*)(unsigned long ulBase))ROM_I2CTABLE[6])
415
#endif
416
#if defined(TARGET_IS_DUSTDEVIL_RA0)
417
#define ROM_I2CMasterIntEnable                                                \
418
        ((void (*)(unsigned long ulBase))ROM_I2CTABLE[7])
419
#endif
420
#if defined(TARGET_IS_DUSTDEVIL_RA0)
421
#define ROM_I2CSlaveIntEnable                                                 \
422
        ((void (*)(unsigned long ulBase))ROM_I2CTABLE[8])
423
#endif
424
#if defined(TARGET_IS_DUSTDEVIL_RA0)
425
#define ROM_I2CMasterIntDisable                                               \
426
        ((void (*)(unsigned long ulBase))ROM_I2CTABLE[9])
427
#endif
428
#if defined(TARGET_IS_DUSTDEVIL_RA0)
429
#define ROM_I2CSlaveIntDisable                                                \
430
        ((void (*)(unsigned long ulBase))ROM_I2CTABLE[10])
431
#endif
432
#if defined(TARGET_IS_DUSTDEVIL_RA0)
433
#define ROM_I2CMasterIntStatus                                                \
434
        ((tBoolean (*)(unsigned long ulBase,                                  \
435
                       tBoolean bMasked))ROM_I2CTABLE[11])
436
#endif
437
#if defined(TARGET_IS_DUSTDEVIL_RA0)
438
#define ROM_I2CSlaveIntStatus                                                 \
439
        ((tBoolean (*)(unsigned long ulBase,                                  \
440
                       tBoolean bMasked))ROM_I2CTABLE[12])
441
#endif
442
#if defined(TARGET_IS_DUSTDEVIL_RA0)
443
#define ROM_I2CMasterIntClear                                                 \
444
        ((void (*)(unsigned long ulBase))ROM_I2CTABLE[13])
445
#endif
446
#if defined(TARGET_IS_DUSTDEVIL_RA0)
447
#define ROM_I2CSlaveIntClear                                                  \
448
        ((void (*)(unsigned long ulBase))ROM_I2CTABLE[14])
449
#endif
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])
455
#endif
456
#if defined(TARGET_IS_DUSTDEVIL_RA0)
457
#define ROM_I2CMasterBusy                                                     \
458
        ((tBoolean (*)(unsigned long ulBase))ROM_I2CTABLE[16])
459
#endif
460
#if defined(TARGET_IS_DUSTDEVIL_RA0)
461
#define ROM_I2CMasterBusBusy                                                  \
462
        ((tBoolean (*)(unsigned long ulBase))ROM_I2CTABLE[17])
463
#endif
464
#if defined(TARGET_IS_DUSTDEVIL_RA0)
465
#define ROM_I2CMasterControl                                                  \
466
        ((void (*)(unsigned long ulBase,                                      \
467
                   unsigned long ulCmd))ROM_I2CTABLE[18])
468
#endif
469
#if defined(TARGET_IS_DUSTDEVIL_RA0)
470
#define ROM_I2CMasterErr                                                      \
471
        ((unsigned long (*)(unsigned long ulBase))ROM_I2CTABLE[19])
472
#endif
473
#if defined(TARGET_IS_DUSTDEVIL_RA0)
474
#define ROM_I2CMasterDataGet                                                  \
475
        ((unsigned long (*)(unsigned long ulBase))ROM_I2CTABLE[20])
476
#endif
477
#if defined(TARGET_IS_DUSTDEVIL_RA0)
478
#define ROM_I2CSlaveStatus                                                    \
479
        ((unsigned long (*)(unsigned long ulBase))ROM_I2CTABLE[21])
480
#endif
481
#if defined(TARGET_IS_DUSTDEVIL_RA0)
482
#define ROM_I2CSlaveDataPut                                                   \
483
        ((void (*)(unsigned long ulBase,                                      \
484
                   unsigned char ucData))ROM_I2CTABLE[22])
485
#endif
486
#if defined(TARGET_IS_DUSTDEVIL_RA0)
487
#define ROM_I2CSlaveDataGet                                                   \
488
        ((unsigned long (*)(unsigned long ulBase))ROM_I2CTABLE[23])
489
#endif
490
#if defined(TARGET_IS_DUSTDEVIL_RA0)
491
#define ROM_UpdateI2C                                                         \
492
        ((void (*)(void))ROM_I2CTABLE[24])
493
#endif
494
 
495
//*****************************************************************************
496
//
497
// Macros for calling ROM functions in the Interrupt API.
498
//
499
//*****************************************************************************
500
#if defined(TARGET_IS_DUSTDEVIL_RA0)
501
#define ROM_IntEnable                                                         \
502
        ((void (*)(unsigned long ulInterrupt))ROM_INTERRUPTTABLE[0])
503
#endif
504
#if defined(TARGET_IS_DUSTDEVIL_RA0)
505
#define ROM_IntDisable                                                        \
506
        ((void (*)(unsigned long ulInterrupt))ROM_INTERRUPTTABLE[3])
507
#endif
508
#if defined(TARGET_IS_DUSTDEVIL_RA0)
509
#define ROM_IntPriorityGroupingSet                                            \
510
        ((void (*)(unsigned long ulBits))ROM_INTERRUPTTABLE[4])
511
#endif
512
#if defined(TARGET_IS_DUSTDEVIL_RA0)
513
#define ROM_IntPriorityGroupingGet                                            \
514
        ((unsigned long (*)(void))ROM_INTERRUPTTABLE[5])
515
#endif
516
#if defined(TARGET_IS_DUSTDEVIL_RA0)
517
#define ROM_IntPrioritySet                                                    \
518
        ((void (*)(unsigned long ulInterrupt,                                 \
519
                   unsigned char ucPriority))ROM_INTERRUPTTABLE[6])
520
#endif
521
#if defined(TARGET_IS_DUSTDEVIL_RA0)
522
#define ROM_IntPriorityGet                                                    \
523
        ((long (*)(unsigned long ulInterrupt))ROM_INTERRUPTTABLE[7])
524
#endif
525
 
526
//*****************************************************************************
527
//
528
// Macros for calling ROM functions in the PWM API.
529
//
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])
536
#endif
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])
542
#endif
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])
548
#endif
549
#if defined(TARGET_IS_DUSTDEVIL_RA0)
550
#define ROM_PWMGenPeriodGet                                                   \
551
        ((unsigned long (*)(unsigned long ulBase,                             \
552
                            unsigned long ulGen))ROM_PWMTABLE[3])
553
#endif
554
#if defined(TARGET_IS_DUSTDEVIL_RA0)
555
#define ROM_PWMGenEnable                                                      \
556
        ((void (*)(unsigned long ulBase,                                      \
557
                   unsigned long ulGen))ROM_PWMTABLE[4])
558
#endif
559
#if defined(TARGET_IS_DUSTDEVIL_RA0)
560
#define ROM_PWMGenDisable                                                     \
561
        ((void (*)(unsigned long ulBase,                                      \
562
                   unsigned long ulGen))ROM_PWMTABLE[5])
563
#endif
564
#if defined(TARGET_IS_DUSTDEVIL_RA0)
565
#define ROM_PWMPulseWidthGet                                                  \
566
        ((unsigned long (*)(unsigned long ulBase,                             \
567
                            unsigned long ulPWMOut))ROM_PWMTABLE[6])
568
#endif
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])
575
#endif
576
#if defined(TARGET_IS_DUSTDEVIL_RA0)
577
#define ROM_PWMDeadBandDisable                                                \
578
        ((void (*)(unsigned long ulBase,                                      \
579
                   unsigned long ulGen))ROM_PWMTABLE[8])
580
#endif
581
#if defined(TARGET_IS_DUSTDEVIL_RA0)
582
#define ROM_PWMSyncUpdate                                                     \
583
        ((void (*)(unsigned long ulBase,                                      \
584
                   unsigned long ulGenBits))ROM_PWMTABLE[9])
585
#endif
586
#if defined(TARGET_IS_DUSTDEVIL_RA0)
587
#define ROM_PWMSyncTimeBase                                                   \
588
        ((void (*)(unsigned long ulBase,                                      \
589
                   unsigned long ulGenBits))ROM_PWMTABLE[10])
590
#endif
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])
596
#endif
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])
602
#endif
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])
608
#endif
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])
614
#endif
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])
620
#endif
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])
626
#endif
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])
632
#endif
633
#if defined(TARGET_IS_DUSTDEVIL_RA0)
634
#define ROM_PWMIntEnable                                                      \
635
        ((void (*)(unsigned long ulBase,                                      \
636
                   unsigned long ulGenFault))ROM_PWMTABLE[18])
637
#endif
638
#if defined(TARGET_IS_DUSTDEVIL_RA0)
639
#define ROM_PWMIntDisable                                                     \
640
        ((void (*)(unsigned long ulBase,                                      \
641
                   unsigned long ulGenFault))ROM_PWMTABLE[19])
642
#endif
643
#if defined(TARGET_IS_DUSTDEVIL_RA0)
644
#define ROM_PWMFaultIntClear                                                  \
645
        ((void (*)(unsigned long ulBase))ROM_PWMTABLE[20])
646
#endif
647
#if defined(TARGET_IS_DUSTDEVIL_RA0)
648
#define ROM_PWMIntStatus                                                      \
649
        ((unsigned long (*)(unsigned long ulBase,                             \
650
                            tBoolean bMasked))ROM_PWMTABLE[21])
651
#endif
652
 
653
//*****************************************************************************
654
//
655
// Macros for calling ROM functions in the QEI API.
656
//
657
//*****************************************************************************
658
#if defined(TARGET_IS_DUSTDEVIL_RA0)
659
#define ROM_QEIPositionGet                                                    \
660
        ((unsigned long (*)(unsigned long ulBase))ROM_QEITABLE[0])
661
#endif
662
#if defined(TARGET_IS_DUSTDEVIL_RA0)
663
#define ROM_QEIEnable                                                         \
664
        ((void (*)(unsigned long ulBase))ROM_QEITABLE[1])
665
#endif
666
#if defined(TARGET_IS_DUSTDEVIL_RA0)
667
#define ROM_QEIDisable                                                        \
668
        ((void (*)(unsigned long ulBase))ROM_QEITABLE[2])
669
#endif
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])
675
#endif
676
#if defined(TARGET_IS_DUSTDEVIL_RA0)
677
#define ROM_QEIPositionSet                                                    \
678
        ((void (*)(unsigned long ulBase,                                      \
679
                   unsigned long ulPosition))ROM_QEITABLE[4])
680
#endif
681
#if defined(TARGET_IS_DUSTDEVIL_RA0)
682
#define ROM_QEIDirectionGet                                                   \
683
        ((long (*)(unsigned long ulBase))ROM_QEITABLE[5])
684
#endif
685
#if defined(TARGET_IS_DUSTDEVIL_RA0)
686
#define ROM_QEIErrorGet                                                       \
687
        ((tBoolean (*)(unsigned long ulBase))ROM_QEITABLE[6])
688
#endif
689
#if defined(TARGET_IS_DUSTDEVIL_RA0)
690
#define ROM_QEIVelocityEnable                                                 \
691
        ((void (*)(unsigned long ulBase))ROM_QEITABLE[7])
692
#endif
693
#if defined(TARGET_IS_DUSTDEVIL_RA0)
694
#define ROM_QEIVelocityDisable                                                \
695
        ((void (*)(unsigned long ulBase))ROM_QEITABLE[8])
696
#endif
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])
702
#endif
703
#if defined(TARGET_IS_DUSTDEVIL_RA0)
704
#define ROM_QEIVelocityGet                                                    \
705
        ((unsigned long (*)(unsigned long ulBase))ROM_QEITABLE[10])
706
#endif
707
#if defined(TARGET_IS_DUSTDEVIL_RA0)
708
#define ROM_QEIIntEnable                                                      \
709
        ((void (*)(unsigned long ulBase,                                      \
710
                   unsigned long ulIntFlags))ROM_QEITABLE[11])
711
#endif
712
#if defined(TARGET_IS_DUSTDEVIL_RA0)
713
#define ROM_QEIIntDisable                                                     \
714
        ((void (*)(unsigned long ulBase,                                      \
715
                   unsigned long ulIntFlags))ROM_QEITABLE[12])
716
#endif
717
#if defined(TARGET_IS_DUSTDEVIL_RA0)
718
#define ROM_QEIIntStatus                                                      \
719
        ((unsigned long (*)(unsigned long ulBase,                             \
720
                            tBoolean bMasked))ROM_QEITABLE[13])
721
#endif
722
#if defined(TARGET_IS_DUSTDEVIL_RA0)
723
#define ROM_QEIIntClear                                                       \
724
        ((void (*)(unsigned long ulBase,                                      \
725
                   unsigned long ulIntFlags))ROM_QEITABLE[14])
726
#endif
727
 
728
//*****************************************************************************
729
//
730
// Macros for calling ROM functions in the SSI API.
731
//
732
//*****************************************************************************
733
#if defined(TARGET_IS_DUSTDEVIL_RA0)
734
#define ROM_SSIDataPut                                                        \
735
        ((void (*)(unsigned long ulBase,                                      \
736
                   unsigned long ulData))ROM_SSITABLE[0])
737
#endif
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])
746
#endif
747
#if defined(TARGET_IS_DUSTDEVIL_RA0)
748
#define ROM_SSIEnable                                                         \
749
        ((void (*)(unsigned long ulBase))ROM_SSITABLE[2])
750
#endif
751
#if defined(TARGET_IS_DUSTDEVIL_RA0)
752
#define ROM_SSIDisable                                                        \
753
        ((void (*)(unsigned long ulBase))ROM_SSITABLE[3])
754
#endif
755
#if defined(TARGET_IS_DUSTDEVIL_RA0)
756
#define ROM_SSIIntEnable                                                      \
757
        ((void (*)(unsigned long ulBase,                                      \
758
                   unsigned long ulIntFlags))ROM_SSITABLE[4])
759
#endif
760
#if defined(TARGET_IS_DUSTDEVIL_RA0)
761
#define ROM_SSIIntDisable                                                     \
762
        ((void (*)(unsigned long ulBase,                                      \
763
                   unsigned long ulIntFlags))ROM_SSITABLE[5])
764
#endif
765
#if defined(TARGET_IS_DUSTDEVIL_RA0)
766
#define ROM_SSIIntStatus                                                      \
767
        ((unsigned long (*)(unsigned long ulBase,                             \
768
                            tBoolean bMasked))ROM_SSITABLE[6])
769
#endif
770
#if defined(TARGET_IS_DUSTDEVIL_RA0)
771
#define ROM_SSIIntClear                                                       \
772
        ((void (*)(unsigned long ulBase,                                      \
773
                   unsigned long ulIntFlags))ROM_SSITABLE[7])
774
#endif
775
#if defined(TARGET_IS_DUSTDEVIL_RA0)
776
#define ROM_SSIDataPutNonBlocking                                             \
777
        ((long (*)(unsigned long ulBase,                                      \
778
                   unsigned long ulData))ROM_SSITABLE[8])
779
#endif
780
#if defined(TARGET_IS_DUSTDEVIL_RA0)
781
#define ROM_SSIDataGet                                                        \
782
        ((void (*)(unsigned long ulBase,                                      \
783
                   unsigned long *pulData))ROM_SSITABLE[9])
784
#endif
785
#if defined(TARGET_IS_DUSTDEVIL_RA0)
786
#define ROM_SSIDataGetNonBlocking                                             \
787
        ((long (*)(unsigned long ulBase,                                      \
788
                   unsigned long *pulData))ROM_SSITABLE[10])
789
#endif
790
#if defined(TARGET_IS_DUSTDEVIL_RA0)
791
#define ROM_UpdateSSI                                                         \
792
        ((void (*)(void))ROM_SSITABLE[11])
793
#endif
794
 
795
//*****************************************************************************
796
//
797
// Macros for calling ROM functions in the SysCtl API.
798
//
799
//*****************************************************************************
800
#if defined(TARGET_IS_DUSTDEVIL_RA0)
801
#define ROM_SysCtlSleep                                                       \
802
        ((void (*)(void))ROM_SYSCTLTABLE[0])
803
#endif
804
#if defined(TARGET_IS_DUSTDEVIL_RA0)
805
#define ROM_SysCtlSRAMSizeGet                                                 \
806
        ((unsigned long (*)(void))ROM_SYSCTLTABLE[1])
807
#endif
808
#if defined(TARGET_IS_DUSTDEVIL_RA0)
809
#define ROM_SysCtlFlashSizeGet                                                \
810
        ((unsigned long (*)(void))ROM_SYSCTLTABLE[2])
811
#endif
812
#if defined(TARGET_IS_DUSTDEVIL_RA0)
813
#define ROM_SysCtlPinPresent                                                  \
814
        ((tBoolean (*)(unsigned long ulPin))ROM_SYSCTLTABLE[3])
815
#endif
816
#if defined(TARGET_IS_DUSTDEVIL_RA0)
817
#define ROM_SysCtlPeripheralPresent                                           \
818
        ((tBoolean (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[4])
819
#endif
820
#if defined(TARGET_IS_DUSTDEVIL_RA0)
821
#define ROM_SysCtlPeripheralReset                                             \
822
        ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[5])
823
#endif
824
#if defined(TARGET_IS_DUSTDEVIL_RA0)
825
#define ROM_SysCtlPeripheralEnable                                            \
826
        ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[6])
827
#endif
828
#if defined(TARGET_IS_DUSTDEVIL_RA0)
829
#define ROM_SysCtlPeripheralDisable                                           \
830
        ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[7])
831
#endif
832
#if defined(TARGET_IS_DUSTDEVIL_RA0)
833
#define ROM_SysCtlPeripheralSleepEnable                                       \
834
        ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[8])
835
#endif
836
#if defined(TARGET_IS_DUSTDEVIL_RA0)
837
#define ROM_SysCtlPeripheralSleepDisable                                      \
838
        ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[9])
839
#endif
840
#if defined(TARGET_IS_DUSTDEVIL_RA0)
841
#define ROM_SysCtlPeripheralDeepSleepEnable                                   \
842
        ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[10])
843
#endif
844
#if defined(TARGET_IS_DUSTDEVIL_RA0)
845
#define ROM_SysCtlPeripheralDeepSleepDisable                                  \
846
        ((void (*)(unsigned long ulPeripheral))ROM_SYSCTLTABLE[11])
847
#endif
848
#if defined(TARGET_IS_DUSTDEVIL_RA0)
849
#define ROM_SysCtlPeripheralClockGating                                       \
850
        ((void (*)(tBoolean bEnable))ROM_SYSCTLTABLE[12])
851
#endif
852
#if defined(TARGET_IS_DUSTDEVIL_RA0)
853
#define ROM_SysCtlIntEnable                                                   \
854
        ((void (*)(unsigned long ulInts))ROM_SYSCTLTABLE[13])
855
#endif
856
#if defined(TARGET_IS_DUSTDEVIL_RA0)
857
#define ROM_SysCtlIntDisable                                                  \
858
        ((void (*)(unsigned long ulInts))ROM_SYSCTLTABLE[14])
859
#endif
860
#if defined(TARGET_IS_DUSTDEVIL_RA0)
861
#define ROM_SysCtlIntClear                                                    \
862
        ((void (*)(unsigned long ulInts))ROM_SYSCTLTABLE[15])
863
#endif
864
#if defined(TARGET_IS_DUSTDEVIL_RA0)
865
#define ROM_SysCtlIntStatus                                                   \
866
        ((unsigned long (*)(tBoolean bMasked))ROM_SYSCTLTABLE[16])
867
#endif
868
#if defined(TARGET_IS_DUSTDEVIL_RA0)
869
#define ROM_SysCtlLDOSet                                                      \
870
        ((void (*)(unsigned long ulVoltage))ROM_SYSCTLTABLE[17])
871
#endif
872
#if defined(TARGET_IS_DUSTDEVIL_RA0)
873
#define ROM_SysCtlLDOGet                                                      \
874
        ((unsigned long (*)(void))ROM_SYSCTLTABLE[18])
875
#endif
876
#if defined(TARGET_IS_DUSTDEVIL_RA0)
877
#define ROM_SysCtlReset                                                       \
878
        ((void (*)(void))ROM_SYSCTLTABLE[19])
879
#endif
880
#if defined(TARGET_IS_DUSTDEVIL_RA0)
881
#define ROM_SysCtlDeepSleep                                                   \
882
        ((void (*)(void))ROM_SYSCTLTABLE[20])
883
#endif
884
#if defined(TARGET_IS_DUSTDEVIL_RA0)
885
#define ROM_SysCtlResetCauseGet                                               \
886
        ((unsigned long (*)(void))ROM_SYSCTLTABLE[21])
887
#endif
888
#if defined(TARGET_IS_DUSTDEVIL_RA0)
889
#define ROM_SysCtlResetCauseClear                                             \
890
        ((void (*)(unsigned long ulCauses))ROM_SYSCTLTABLE[22])
891
#endif
892
#if defined(TARGET_IS_DUSTDEVIL_RA0)
893
#define ROM_SysCtlClockSet                                                    \
894
        ((void (*)(unsigned long ulConfig))ROM_SYSCTLTABLE[23])
895
#endif
896
#if defined(TARGET_IS_DUSTDEVIL_RA0)
897
#define ROM_SysCtlClockGet                                                    \
898
        ((unsigned long (*)(void))ROM_SYSCTLTABLE[24])
899
#endif
900
#if defined(TARGET_IS_DUSTDEVIL_RA0)
901
#define ROM_SysCtlPWMClockSet                                                 \
902
        ((void (*)(unsigned long ulConfig))ROM_SYSCTLTABLE[25])
903
#endif
904
#if defined(TARGET_IS_DUSTDEVIL_RA0)
905
#define ROM_SysCtlPWMClockGet                                                 \
906
        ((unsigned long (*)(void))ROM_SYSCTLTABLE[26])
907
#endif
908
#if defined(TARGET_IS_DUSTDEVIL_RA0)
909
#define ROM_SysCtlADCSpeedSet                                                 \
910
        ((void (*)(unsigned long ulSpeed))ROM_SYSCTLTABLE[27])
911
#endif
912
#if defined(TARGET_IS_DUSTDEVIL_RA0)
913
#define ROM_SysCtlADCSpeedGet                                                 \
914
        ((unsigned long (*)(void))ROM_SYSCTLTABLE[28])
915
#endif
916
#if defined(TARGET_IS_DUSTDEVIL_RA0)
917
#define ROM_SysCtlGPIOAHBEnable                                               \
918
        ((void (*)(unsigned long ulGPIOPeripheral))ROM_SYSCTLTABLE[29])
919
#endif
920
#if defined(TARGET_IS_DUSTDEVIL_RA0)
921
#define ROM_SysCtlGPIOAHBDisable                                              \
922
        ((void (*)(unsigned long ulGPIOPeripheral))ROM_SYSCTLTABLE[30])
923
#endif
924
 
925
//*****************************************************************************
926
//
927
// Macros for calling ROM functions in the SysTick API.
928
//
929
//*****************************************************************************
930
#if defined(TARGET_IS_DUSTDEVIL_RA0)
931
#define ROM_SysTickValueGet                                                   \
932
        ((unsigned long (*)(void))ROM_SYSTICKTABLE[0])
933
#endif
934
#if defined(TARGET_IS_DUSTDEVIL_RA0)
935
#define ROM_SysTickEnable                                                     \
936
        ((void (*)(void))ROM_SYSTICKTABLE[1])
937
#endif
938
#if defined(TARGET_IS_DUSTDEVIL_RA0)
939
#define ROM_SysTickDisable                                                    \
940
        ((void (*)(void))ROM_SYSTICKTABLE[2])
941
#endif
942
#if defined(TARGET_IS_DUSTDEVIL_RA0)
943
#define ROM_SysTickIntEnable                                                  \
944
        ((void (*)(void))ROM_SYSTICKTABLE[3])
945
#endif
946
#if defined(TARGET_IS_DUSTDEVIL_RA0)
947
#define ROM_SysTickIntDisable                                                 \
948
        ((void (*)(void))ROM_SYSTICKTABLE[4])
949
#endif
950
#if defined(TARGET_IS_DUSTDEVIL_RA0)
951
#define ROM_SysTickPeriodSet                                                  \
952
        ((void (*)(unsigned long ulPeriod))ROM_SYSTICKTABLE[5])
953
#endif
954
#if defined(TARGET_IS_DUSTDEVIL_RA0)
955
#define ROM_SysTickPeriodGet                                                  \
956
        ((unsigned long (*)(void))ROM_SYSTICKTABLE[6])
957
#endif
958
 
959
//*****************************************************************************
960
//
961
// Macros for calling ROM functions in the Timer API.
962
//
963
//*****************************************************************************
964
#if defined(TARGET_IS_DUSTDEVIL_RA0)
965
#define ROM_TimerIntClear                                                     \
966
        ((void (*)(unsigned long ulBase,                                      \
967
                   unsigned long ulIntFlags))ROM_TIMERTABLE[0])
968
#endif
969
#if defined(TARGET_IS_DUSTDEVIL_RA0)
970
#define ROM_TimerEnable                                                       \
971
        ((void (*)(unsigned long ulBase,                                      \
972
                   unsigned long ulTimer))ROM_TIMERTABLE[1])
973
#endif
974
#if defined(TARGET_IS_DUSTDEVIL_RA0)
975
#define ROM_TimerDisable                                                      \
976
        ((void (*)(unsigned long ulBase,                                      \
977
                   unsigned long ulTimer))ROM_TIMERTABLE[2])
978
#endif
979
#if defined(TARGET_IS_DUSTDEVIL_RA0)
980
#define ROM_TimerConfigure                                                    \
981
        ((void (*)(unsigned long ulBase,                                      \
982
                   unsigned long ulConfig))ROM_TIMERTABLE[3])
983
#endif
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])
989
#endif
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])
995
#endif
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])
1001
#endif
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])
1007
#endif
1008
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1009
#define ROM_TimerRTCEnable                                                    \
1010
        ((void (*)(unsigned long ulBase))ROM_TIMERTABLE[8])
1011
#endif
1012
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1013
#define ROM_TimerRTCDisable                                                   \
1014
        ((void (*)(unsigned long ulBase))ROM_TIMERTABLE[9])
1015
#endif
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])
1021
#endif
1022
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1023
#define ROM_TimerPrescaleGet                                                  \
1024
        ((unsigned long (*)(unsigned long ulBase,                             \
1025
                            unsigned long ulTimer))ROM_TIMERTABLE[11])
1026
#endif
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])
1032
#endif
1033
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1034
#define ROM_TimerLoadGet                                                      \
1035
        ((unsigned long (*)(unsigned long ulBase,                             \
1036
                            unsigned long ulTimer))ROM_TIMERTABLE[15])
1037
#endif
1038
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1039
#define ROM_TimerValueGet                                                     \
1040
        ((unsigned long (*)(unsigned long ulBase,                             \
1041
                            unsigned long ulTimer))ROM_TIMERTABLE[16])
1042
#endif
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])
1048
#endif
1049
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1050
#define ROM_TimerMatchGet                                                     \
1051
        ((unsigned long (*)(unsigned long ulBase,                             \
1052
                            unsigned long ulTimer))ROM_TIMERTABLE[18])
1053
#endif
1054
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1055
#define ROM_TimerIntEnable                                                    \
1056
        ((void (*)(unsigned long ulBase,                                      \
1057
                   unsigned long ulIntFlags))ROM_TIMERTABLE[19])
1058
#endif
1059
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1060
#define ROM_TimerIntDisable                                                   \
1061
        ((void (*)(unsigned long ulBase,                                      \
1062
                   unsigned long ulIntFlags))ROM_TIMERTABLE[20])
1063
#endif
1064
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1065
#define ROM_TimerIntStatus                                                    \
1066
        ((unsigned long (*)(unsigned long ulBase,                             \
1067
                            tBoolean bMasked))ROM_TIMERTABLE[21])
1068
#endif
1069
 
1070
//*****************************************************************************
1071
//
1072
// Macros for calling ROM functions in the UART API.
1073
//
1074
//*****************************************************************************
1075
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1076
#define ROM_UARTCharPut                                                       \
1077
        ((void (*)(unsigned long ulBase,                                      \
1078
                   unsigned char ucData))ROM_UARTTABLE[0])
1079
#endif
1080
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1081
#define ROM_UARTParityModeSet                                                 \
1082
        ((void (*)(unsigned long ulBase,                                      \
1083
                   unsigned long ulParity))ROM_UARTTABLE[1])
1084
#endif
1085
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1086
#define ROM_UARTParityModeGet                                                 \
1087
        ((unsigned long (*)(unsigned long ulBase))ROM_UARTTABLE[2])
1088
#endif
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])
1094
#endif
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])
1100
#endif
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])
1107
#endif
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])
1114
#endif
1115
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1116
#define ROM_UARTEnable                                                        \
1117
        ((void (*)(unsigned long ulBase))ROM_UARTTABLE[7])
1118
#endif
1119
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1120
#define ROM_UARTDisable                                                       \
1121
        ((void (*)(unsigned long ulBase))ROM_UARTTABLE[8])
1122
#endif
1123
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1124
#define ROM_UARTEnableSIR                                                     \
1125
        ((void (*)(unsigned long ulBase,                                      \
1126
                   tBoolean bLowPower))ROM_UARTTABLE[9])
1127
#endif
1128
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1129
#define ROM_UARTDisableSIR                                                    \
1130
        ((void (*)(unsigned long ulBase))ROM_UARTTABLE[10])
1131
#endif
1132
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1133
#define ROM_UARTCharsAvail                                                    \
1134
        ((tBoolean (*)(unsigned long ulBase))ROM_UARTTABLE[11])
1135
#endif
1136
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1137
#define ROM_UARTSpaceAvail                                                    \
1138
        ((tBoolean (*)(unsigned long ulBase))ROM_UARTTABLE[12])
1139
#endif
1140
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1141
#define ROM_UARTCharGetNonBlocking                                            \
1142
        ((long (*)(unsigned long ulBase))ROM_UARTTABLE[13])
1143
#endif
1144
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1145
#define ROM_UARTCharGet                                                       \
1146
        ((long (*)(unsigned long ulBase))ROM_UARTTABLE[14])
1147
#endif
1148
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1149
#define ROM_UARTCharPutNonBlocking                                            \
1150
        ((tBoolean (*)(unsigned long ulBase,                                  \
1151
                       unsigned char ucData))ROM_UARTTABLE[15])
1152
#endif
1153
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1154
#define ROM_UARTBreakCtl                                                      \
1155
        ((void (*)(unsigned long ulBase,                                      \
1156
                   tBoolean bBreakState))ROM_UARTTABLE[16])
1157
#endif
1158
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1159
#define ROM_UARTIntEnable                                                     \
1160
        ((void (*)(unsigned long ulBase,                                      \
1161
                   unsigned long ulIntFlags))ROM_UARTTABLE[17])
1162
#endif
1163
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1164
#define ROM_UARTIntDisable                                                    \
1165
        ((void (*)(unsigned long ulBase,                                      \
1166
                   unsigned long ulIntFlags))ROM_UARTTABLE[18])
1167
#endif
1168
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1169
#define ROM_UARTIntStatus                                                     \
1170
        ((unsigned long (*)(unsigned long ulBase,                             \
1171
                            tBoolean bMasked))ROM_UARTTABLE[19])
1172
#endif
1173
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1174
#define ROM_UARTIntClear                                                      \
1175
        ((void (*)(unsigned long ulBase,                                      \
1176
                   unsigned long ulIntFlags))ROM_UARTTABLE[20])
1177
#endif
1178
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1179
#define ROM_UpdateUART                                                        \
1180
        ((void (*)(void))ROM_UARTTABLE[21])
1181
#endif
1182
 
1183
//*****************************************************************************
1184
//
1185
// Macros for calling ROM functions in the Watchdog API.
1186
//
1187
//*****************************************************************************
1188
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1189
#define ROM_WatchdogIntClear                                                  \
1190
        ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[0])
1191
#endif
1192
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1193
#define ROM_WatchdogRunning                                                   \
1194
        ((tBoolean (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[1])
1195
#endif
1196
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1197
#define ROM_WatchdogEnable                                                    \
1198
        ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[2])
1199
#endif
1200
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1201
#define ROM_WatchdogResetEnable                                               \
1202
        ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[3])
1203
#endif
1204
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1205
#define ROM_WatchdogResetDisable                                              \
1206
        ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[4])
1207
#endif
1208
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1209
#define ROM_WatchdogLock                                                      \
1210
        ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[5])
1211
#endif
1212
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1213
#define ROM_WatchdogUnlock                                                    \
1214
        ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[6])
1215
#endif
1216
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1217
#define ROM_WatchdogLockState                                                 \
1218
        ((tBoolean (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[7])
1219
#endif
1220
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1221
#define ROM_WatchdogReloadSet                                                 \
1222
        ((void (*)(unsigned long ulBase,                                      \
1223
                   unsigned long ulLoadVal))ROM_WATCHDOGTABLE[8])
1224
#endif
1225
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1226
#define ROM_WatchdogReloadGet                                                 \
1227
        ((unsigned long (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[9])
1228
#endif
1229
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1230
#define ROM_WatchdogValueGet                                                  \
1231
        ((unsigned long (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[10])
1232
#endif
1233
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1234
#define ROM_WatchdogIntEnable                                                 \
1235
        ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[11])
1236
#endif
1237
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1238
#define ROM_WatchdogIntStatus                                                 \
1239
        ((unsigned long (*)(unsigned long ulBase,                             \
1240
                            tBoolean bMasked))ROM_WATCHDOGTABLE[12])
1241
#endif
1242
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1243
#define ROM_WatchdogStallEnable                                               \
1244
        ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[13])
1245
#endif
1246
#if defined(TARGET_IS_DUSTDEVIL_RA0)
1247
#define ROM_WatchdogStallDisable                                              \
1248
        ((void (*)(unsigned long ulBase))ROM_WATCHDOGTABLE[14])
1249
#endif
1250
 
1251
#endif // __ROM_H__

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.