CC26xx Driver Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
rom.h
Go to the documentation of this file.
1 /******************************************************************************
2 * Filename: rom.h
3 * Revised: 2015-01-15 17:34:57 +0100 (to, 15 jan 2015)
4 * Revision: 42397
5 *
6 * Description: Prototypes for the ROM utility functions.
7 *
8 * Copyright (c) 2015, Texas Instruments Incorporated
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions are met:
13 *
14 * 1) Redistributions of source code must retain the above copyright notice,
15 * this list of conditions and the following disclaimer.
16 *
17 * 2) Redistributions in binary form must reproduce the above copyright notice,
18 * this list of conditions and the following disclaimer in the documentation
19 * and/or other materials provided with the distribution.
20 *
21 * 3) Neither the name of the ORGANIZATION nor the names of its contributors may
22 * be used to endorse or promote products derived from this software without
23 * specific prior written permission.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
29 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE.
36 *
37 ******************************************************************************/
38 
39 #ifndef __ROM_H__
40 #define __ROM_H__
41 
42 //*****************************************************************************
43 //
44 // If building with a C++ compiler, make all of the definitions in this header
45 // have a C binding.
46 //
47 //*****************************************************************************
48 #ifdef __cplusplus
49 extern "C"
50 {
51 #endif
52 
53 #include <inc/hw_types.h>
54 
55 #ifndef __HAPI_H__
56 #define __HAPI_H__
57 
58 //
59 // Start address of the ROM hard API access table (located after the ROM FW rev field)
60 //
61 #define ROM_HAPI_TABLE_ADDR 0x10000048
62 
63 //
64 // ROM Hard-API function interface types
65 //
66 typedef uint32_t (* FPTR_CRC32_T) \
67  (uint8_t* /*pui8Data*/, \
68  uint32_t /*ui32ByteCount*/, \
69  uint32_t /*ui32RepeatCount*/);
70 
71 typedef uint32_t (* FPTR_GETFLSIZE_T) \
72  (void);
73 
74 typedef uint32_t (* FPTR_GETCHIPID_T) \
75  (void);
76 
77 typedef uint32_t (* FPTR_RESERVED1_T) \
78  (uint32_t);
79 
80 typedef uint32_t (* FPTR_RESERVED2_T) \
81  (void);
82 
83 typedef uint32_t (* FPTR_RESERVED3_T) \
84  (uint8_t*, \
85  uint32_t, \
86  uint32_t);
87 
88 typedef void (* FPTR_RESETDEV_T) \
89  (void);
90 
91 typedef uint32_t (* FPTR_FLETCHER32_T) \
92  (uint16_t* /*pui16Data*/, \
93  uint16_t /*ui16WordCount*/, \
94  uint16_t /*ui16RepeatCount*/);
95 
96 typedef uint32_t (* FPTR_MINVAL_T) \
97  (uint32_t* /*ulpDataBuffer*/,\
98  uint32_t /*ui32DataCount*/);
99 
100 typedef uint32_t (* FPTR_MAXVAL_T) \
101  (uint32_t* /*pui32DataBuffer*/,\
102  uint32_t /*ui32DataCount*/);
103 
104 typedef uint32_t (* FPTR_MEANVAL_T) \
105  (uint32_t* /*pui32DataBuffer*/,\
106  uint32_t /*ui32DataCount*/);
107 
108 typedef uint32_t (* FPTR_STDDVAL_T) \
109  (uint32_t* /*pui32DataBuffer*/,\
110  uint32_t /*ui32DataCount*/);
111 
112 typedef void (* FPTR_HFSOURCESAFESWITCH_T) \
113  (void);
114 
115 typedef void (* FPTR_RESETPERIPHERAL_T) \
116  (uint32_t /*ui32Peripheral*/);
117 
118 typedef void (* FPTR_RESETDOMAIN_T) \
119  (uint32_t /*ui32Domain*/);
120 
121 typedef void (* FPTR_COMPAIN_T) \
122  (uint8_t /*ut8Signal*/);
123 
124 typedef void (* FPTR_COMPAREF_T) \
125  (uint8_t /*ut8Signal*/);
126 
127 typedef void (* FPTR_ADCCOMPBIN_T) \
128  (uint8_t /*ut8Signal*/);
129 
130 typedef void (* FPTR_COMPBREF_T) \
131  (uint8_t /*ut8Signal*/);
132 
133 extern uint32_t MemBusWrkAroundHapiProgramFlash(uint8_t *pui8DataBuffer,
134  uint32_t ui32Address,
135  uint32_t ui32Count);
136 
137 extern uint32_t MemBusWrkAroundHapiEraseSector(uint32_t ui32Address);
138 
139 //
140 // ROM Hard-API access table type
141 //
142 typedef struct
143 {
157  FPTR_RESETDOMAIN_T ResetDomain; /* Test functions */
163 } HARD_API_T;
164 
165 //
166 // Pointer to the ROM HAPI table
167 //
168 #define P_HARD_API ((HARD_API_T*) ROM_HAPI_TABLE_ADDR)
169 
170 //
171 // Add wrapper around the Hapi functions needing the "bus arbitration issue" workaround
172 //
173 extern void SafeHapiAuxAdiSelect( FPTR_VOID_UINT8_T fPtr, uint8_t ut8Signal );
174 
175 #define HapiCrc32(a,b,c) P_HARD_API->Crc32(a,b,c)
176 #define HapiGetFlashSize() P_HARD_API->FlashGetSize()
177 #define HapiGetChipId() P_HARD_API->GetChipId()
178 #define HapiSectorErase(a) MemBusWrkAroundHapiEraseSector(a)
179 #define HapiProgramFlash(a,b,c) MemBusWrkAroundHapiProgramFlash(a,b,c)
180 #define HapiResetDevice() P_HARD_API->ResetDevice()
181 #define HapiFletcher32(a,b,c) P_HARD_API->Fletcher32(a,b,c)
182 #define HapiMinValue(a,b) P_HARD_API->MinValue(a,b)
183 #define HapiMaxValue(a,b) P_HARD_API->MaxValue(a,b)
184 #define HapiMeanValue(a,b) P_HARD_API->MeanValue(a,b)
185 #define HapiStandDeviationValue(a,b) P_HARD_API->StandDeviationValue(a,b)
186 /* Test function */
187 #define HapiResetPeripheral(a) P_HARD_API->ResetPeripheral(a)
188 /* Test function */
189 #define HapiResetDomain(a) P_HARD_API->ResetDomain(a)
190 #define HapiHFSourceSafeSwitch() P_HARD_API->HFSourceSafeSwitch()
191 #define HapiSelectCompAInput(a) SafeHapiAuxAdiSelect( P_HARD_API->SelectCompAInput , a )
192 #define HapiSelectCompARef(a) SafeHapiAuxAdiSelect( P_HARD_API->SelectCompARef , a )
193 #define HapiSelectADCCompBInput(a) SafeHapiAuxAdiSelect( P_HARD_API->SelectADCCompBInput, a )
194 #define HapiSelectCompBRef(a) SafeHapiAuxAdiSelect( P_HARD_API->SelectCompBRef , a )
195 
196 //
197 // Defines for input parameter to the HapiSelectCompAInput function.
198 // The define values can not be changed!
199 //
200 #define COMPA_IN_NC 0x00
201 #define COMPA_IN_AUXIO7 0x09
202 #define COMPA_IN_AUXIO6 0x0A
203 #define COMPA_IN_AUXIO5 0x0B
204 #define COMPA_IN_AUXIO4 0x0C
205 #define COMPA_IN_AUXIO3 0x0D
206 #define COMPA_IN_AUXIO2 0x0E
207 #define COMPA_IN_AUXIO1 0x0F
208 #define COMPA_IN_AUXIO0 0x10
209 
210 //
211 // Defines for input parameter to the HapiSelectCompARef function.
212 // The define values can not be changed!
213 //
214 #define COMPA_REF_NC 0x00
215 #define COMPA_REF_VDD1P2V 0x01
216 #define COMPA_REF_VSSA 0x02
217 #define COMPA_REF_VDDA3P3V 0x03
218 #define COMPA_REF_ADCVREFP 0x04
219 #define COMPA_REF_AUXIO7 0x09
220 #define COMPA_REF_AUXIO6 0x0A
221 #define COMPA_REF_AUXIO5 0x0B
222 #define COMPA_REF_AUXIO4 0x0C
223 #define COMPA_REF_AUXIO3 0x0D
224 #define COMPA_REF_AUXIO2 0x0E
225 #define COMPA_REF_AUXIO1 0x0F
226 #define COMPA_REF_AUXIO0 0x10
227 
228 //
229 // Defines for input parameter to the HapiSelectADCCompBInput function.
230 // The define values can not be changed!
231 //
232 #define ADC_COMPB_IN_NC 0x00
233 #define ADC_COMPB_IN_VDD1P2V 0x03
234 #define ADC_COMPB_IN_VSSA 0x04
235 #define ADC_COMPB_IN_VDDA3P3V 0x05
236 #define ADC_COMPB_IN_AUXIO7 0x09
237 #define ADC_COMPB_IN_AUXIO6 0x0A
238 #define ADC_COMPB_IN_AUXIO5 0x0B
239 #define ADC_COMPB_IN_AUXIO4 0x0C
240 #define ADC_COMPB_IN_AUXIO3 0x0D
241 #define ADC_COMPB_IN_AUXIO2 0x0E
242 #define ADC_COMPB_IN_AUXIO1 0x0F
243 #define ADC_COMPB_IN_AUXIO0 0x10
244 
245 //
246 // Defines for input parameter to the HapiSelectCompBRef function.
247 // The define values can not be changed!
248 //
249 #define COMPB_REF_NC 0x00
250 #define COMPB_REF_VDD1P2V 0x01
251 #define COMPB_REF_VSSA 0x02
252 #define COMPB_REF_VDDA3P3V 0x03
253 
254 #endif // __HAPI_H_
255 
256 //*****************************************************************************
257 //
258 // Pointers to the main API tables.
259 //
260 //*****************************************************************************
261 #define ROM_APITABLE ((uint32_t *)0x10000180)
262 #define ROM_VERSION (ROM_APITABLE[0])
263 #define ROM_AON_EVENTTABLE ((uint32_t *)(ROM_APITABLE[1]))
264 #define ROM_AON_IOCTABLE ((uint32_t *)(ROM_APITABLE[2]))
265 #define ROM_AON_RTCTABLE ((uint32_t *)(ROM_APITABLE[3]))
266 #define ROM_AON_WUCTABLE ((uint32_t *)(ROM_APITABLE[4]))
267 #define ROM_AUX_CTRLTABLE ((uint32_t *)(ROM_APITABLE[5]))
268 #define ROM_AUX_TDCTABLE ((uint32_t *)(ROM_APITABLE[6]))
269 #define ROM_AUX_TIMERTABLE ((uint32_t *)(ROM_APITABLE[7]))
270 #define ROM_AUX_WUCTABLE ((uint32_t *)(ROM_APITABLE[8]))
271 #define ROM_DDITABLE ((uint32_t *)(ROM_APITABLE[9]))
272 #define ROM_FLASHTABLE ((uint32_t *)(ROM_APITABLE[10]))
273 #define ROM_I2CTABLE ((uint32_t *)(ROM_APITABLE[11]))
274 #define ROM_INTERRUPTTABLE ((uint32_t *)(ROM_APITABLE[12]))
275 #define ROM_IOCTABLE ((uint32_t *)(ROM_APITABLE[13]))
276 #define ROM_PRCMTABLE ((uint32_t *)(ROM_APITABLE[14]))
277 #define ROM_SMPHTABLE ((uint32_t *)(ROM_APITABLE[15]))
278 #define ROM_SPISTABLE ((uint32_t *)(ROM_APITABLE[16]))
279 #define ROM_SSITABLE ((uint32_t *)(ROM_APITABLE[17]))
280 #define ROM_TIMERTABLE ((uint32_t *)(ROM_APITABLE[18]))
281 #define ROM_TRNGTABLE ((uint32_t *)(ROM_APITABLE[19]))
282 #define ROM_UARTTABLE ((uint32_t *)(ROM_APITABLE[20]))
283 #define ROM_UDMATABLE ((uint32_t *)(ROM_APITABLE[21]))
284 #define ROM_VIMSTABLE ((uint32_t *)(ROM_APITABLE[22]))
285 
286 //*****************************************************************************
287 //
288 // Macros for calling ROM functions in the AON_EVENT API.
289 //
290 //*****************************************************************************
291 
292 #define ROM_AONEventMcuWakeUpSet \
293  ((void (*)(uint32_t ui32MCUWUEvent, \
294  uint32_t ui32EventSrc))ROM_AON_EVENTTABLE[0])
295 
296 #define ROM_AONEventMcuWakeUpGet \
297  ((uint32_t (*)(uint32_t ui32MCUWUEvent))ROM_AON_EVENTTABLE[1])
298 
299 #define ROM_AONEventAuxWakeUpSet \
300  ((void (*)(uint32_t ui32AUXWUEvent, \
301  uint32_t ui32EventSrc))ROM_AON_EVENTTABLE[2])
302 
303 #define ROM_AONEventAuxWakeUpGet \
304  ((uint32_t (*)(uint32_t ui32AUXWUEvent))ROM_AON_EVENTTABLE[3])
305 
306 #define ROM_AONEventMcuSet \
307  ((void (*)(uint32_t ui32MCUEvent, \
308  uint32_t ui32EventSrc))ROM_AON_EVENTTABLE[4])
309 
310 #define ROM_AONEventMcuGet \
311  ((uint32_t (*)(uint32_t ui32MCUEvent))ROM_AON_EVENTTABLE[5])
312 //*****************************************************************************
313 //
314 // Macros for calling ROM functions in the AON_IOC API.
315 //
316 //*****************************************************************************
317 
318 #define ROM_AONIOCDriveStrengthSet \
319  ((void (*)(uint32_t ui32LowDrvStr, \
320  uint32_t ui32MedDrvStr, \
321  uint32_t ui32MaxDrvStr))ROM_AON_IOCTABLE[0])
322 
323 #define ROM_AONIOCDriveStrengthGet \
324  ((uint32_t (*)(uint32_t ui32DriveLevel))ROM_AON_IOCTABLE[1])
325 //*****************************************************************************
326 //
327 // Macros for calling ROM functions in the AON_RTC API.
328 //
329 //*****************************************************************************
330 
331 #define ROM_AONRTCStatus \
332  ((uint32_t (*)(void))ROM_AON_RTCTABLE[0])
333 
334 #define ROM_AONRTCEventClear \
335  ((void (*)(uint32_t ui32Channel))ROM_AON_RTCTABLE[1])
336 
337 #define ROM_AONRTCEventGet \
338  ((bool (*)(uint32_t ui32Channel))ROM_AON_RTCTABLE[2])
339 
340 #define ROM_AONRTCModeCh1Set \
341  ((void (*)(uint32_t ui32Mode))ROM_AON_RTCTABLE[3])
342 
343 #define ROM_AONRTCModeCh1Get \
344  ((uint32_t (*)(void))ROM_AON_RTCTABLE[4])
345 
346 #define ROM_AONRTCModeCh2Set \
347  ((void (*)(uint32_t ui32Mode))ROM_AON_RTCTABLE[5])
348 
349 #define ROM_AONRTCModeCh2Get \
350  ((uint32_t (*)(void))ROM_AON_RTCTABLE[6])
351 
352 #define ROM_AONRTCChannelEnable \
353  ((void (*)(uint32_t ui32Channel))ROM_AON_RTCTABLE[7])
354 
355 #define ROM_AONRTCChannelDisable \
356  ((void (*)(uint32_t ui32Channel))ROM_AON_RTCTABLE[8])
357 
358 #define ROM_AONRTCCompareValueSet \
359  ((void (*)(uint32_t ui32Channel, \
360  uint32_t ui32CompValue))ROM_AON_RTCTABLE[9])
361 
362 #define ROM_AONRTCCompareValueGet \
363  ((uint32_t (*)(uint32_t ui32Channel))ROM_AON_RTCTABLE[10])
364 
365 //*****************************************************************************
366 //
367 // Macros for calling ROM functions in the AON_WUC API.
368 //
369 //*****************************************************************************
370 
371 #define ROM_AONWUCAuxClockConfigSet \
372  ((void (*)(uint32_t ui32ClkSrc, \
373  uint32_t ui32ClkDiv))ROM_AON_WUCTABLE[0])
374 
375 #define ROM_AONWUCAuxSRamConfig \
376  ((void (*)(uint32_t ui32Retention))ROM_AON_WUCTABLE[1])
377 
378 #define ROM_AONWUCAuxWakeupEvent \
379  ((void (*)(uint32_t ui32Mode))ROM_AON_WUCTABLE[2])
380 
381 #define ROM_AONWUCAuxReset \
382  ((void (*)(void))ROM_AON_WUCTABLE[3])
383 
384 #define ROM_AONWUCRechargeCtrlConfigSet \
385  ((void (*)(bool bAdaptEnable, \
386  uint32_t ui32AdaptRate, \
387  uint32_t ui32Period, \
388  uint32_t ui32MaxPeriod))ROM_AON_WUCTABLE[4])
389 
390 #define ROM_AONWUCOscConfig \
391  ((void (*)(uint32_t ui32Period))ROM_AON_WUCTABLE[5])
392 //*****************************************************************************
393 //
394 // Macros for calling ROM functions in the AUX_TDC API.
395 //
396 //*****************************************************************************
397 
398 #define ROM_AUXTDCConfigSet \
399  ((void (*)(uint32_t ui32Base, \
400  uint32_t ui32StartCondition, \
401  uint32_t ui32StopCondition))ROM_AUX_TDCTABLE[0])
402 
403 #define ROM_AUXTDCMeasurementDone \
404  ((uint32_t (*)(uint32_t ui32Base))ROM_AUX_TDCTABLE[1])
405 //*****************************************************************************
406 //
407 // Macros for calling ROM functions in the AUX_TIMER API.
408 //
409 //*****************************************************************************
410 
411 #define ROM_AUXTimerConfigure \
412  ((void (*)(uint32_t ui32Timer, \
413  uint32_t ui32Config))ROM_AUX_TIMERTABLE[0])
414 
415 #define ROM_AUXTimerStart \
416  ((void (*)(uint32_t ui32Timer))ROM_AUX_TIMERTABLE[1])
417 
418 #define ROM_AUXTimerStop \
419  ((void (*)(uint32_t ui32Timer))ROM_AUX_TIMERTABLE[2])
420 
421 #define ROM_AUXTimerPrescaleSet \
422  ((void (*)(uint32_t ui32Timer, \
423  uint32_t ui32PrescaleDiv))ROM_AUX_TIMERTABLE[3])
424 
425 #define ROM_AUXTimerPrescaleGet \
426  ((uint32_t (*)(uint32_t ui32Timer))ROM_AUX_TIMERTABLE[4])
427 //*****************************************************************************
428 //
429 // Macros for calling ROM functions in the AUX_WUC API.
430 //
431 //*****************************************************************************
432 
433 #define ROM_AUXWUCClockEnable \
434  ((void (*)(uint32_t ui32Clocks))ROM_AUX_WUCTABLE[0])
435 
436 #define ROM_AUXWUCClockDisable \
437  ((void (*)(uint32_t ui32Clocks))ROM_AUX_WUCTABLE[1])
438 
439 #define ROM_AUXWUCClockStatus \
440  ((uint32_t (*)(uint32_t ui32Clocks))ROM_AUX_WUCTABLE[2])
441 
442 #define ROM_AUXWUCPowerCtrl \
443  ((void (*)(uint32_t ui32PowerMode))ROM_AUX_WUCTABLE[3])
444 //*****************************************************************************
445 //
446 // Macros for calling ROM functions in the DDI API.
447 //
448 //*****************************************************************************
449 
450 
451 //*****************************************************************************
452 //
453 // Macros for calling ROM functions in the FLASH API.
454 //
455 //*****************************************************************************
456 
457 #define ROM_FlashPowerModeGet \
458  ((uint32_t (*)(void))ROM_FLASHTABLE[1])
459 
460 #define ROM_FlashProtectionSet \
461  ((void (*)(uint32_t ui32SectorAddress, \
462  uint32_t ui32ProtectMode))ROM_FLASHTABLE[2])
463 
464 #define ROM_FlashProtectionGet \
465  ((uint32_t (*)(uint32_t ui32SectorAddress))ROM_FLASHTABLE[3])
466 
467 #define ROM_FlashProtectionSave \
468  ((uint32_t (*)(uint32_t ui32SectorAddress))ROM_FLASHTABLE[4])
469 
470 #define ROM_FlashEfuseReadRow \
471  ((bool (*)(uint32_t *pui32EfuseData, \
472  uint32_t ui32RowAddress))ROM_FLASHTABLE[8])
473 
474 #define ROM_FlashDisableSectorsForWrite \
475  ((void (*)(void))ROM_FLASHTABLE[9])
476 //*****************************************************************************
477 //
478 // Macros for calling ROM functions in the I2C API.
479 //
480 //*****************************************************************************
481 
482 #define ROM_I2CMasterInitExpClk \
483  ((void (*)(uint32_t ui32Base, \
484  uint32_t ui32I2CClk, \
485  bool bFast))ROM_I2CTABLE[0])
486 
487 #define ROM_I2CMasterErr \
488  ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[1])
489 //*****************************************************************************
490 //
491 // Macros for calling ROM functions in the INTERRUPT API.
492 //
493 //*****************************************************************************
494 
495 #define ROM_IntPriorityGroupingSet \
496  ((void (*)(uint32_t ui32Bits))ROM_INTERRUPTTABLE[0])
497 
498 #define ROM_IntPriorityGroupingGet \
499  ((uint32_t (*)(void))ROM_INTERRUPTTABLE[1])
500 
501 #define ROM_IntPrioritySet \
502  ((void (*)(uint32_t ui32Interrupt, \
503  uint8_t ui8Priority))ROM_INTERRUPTTABLE[2])
504 
505 #define ROM_IntPriorityGet \
506  ((int32_t (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[3])
507 
508 #define ROM_IntEnable \
509  ((void (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[4])
510 
511 #define ROM_IntDisable \
512  ((void (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[5])
513 
514 #define ROM_IntPendSet \
515  ((void (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[6])
516 
517 #define ROM_IntPendGet \
518  ((bool (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[7])
519 
520 #define ROM_IntPendClear \
521  ((void (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[8])
522 //*****************************************************************************
523 //
524 // Macros for calling ROM functions in the IOC API.
525 //
526 //*****************************************************************************
527 
528 #define ROM_IOCPortConfigureSet \
529  ((void (*)(uint32_t ui32IOId, \
530  uint32_t ui32PortId, \
531  uint32_t ui32IOConfig))ROM_IOCTABLE[0])
532 
533 #define ROM_IOCPortConfigureGet \
534  ((uint32_t (*)(uint32_t ui32IOId))ROM_IOCTABLE[1])
535 
536 #define ROM_IOCIOShutdownSet \
537  ((void (*)(uint32_t ui32IOId, \
538  uint32_t ui32IOShutdown))ROM_IOCTABLE[2])
539 
540 
541 #define ROM_IOCIOModeSet \
542  ((void (*)(uint32_t ui32IOId, \
543  uint32_t ui32IOMode))ROM_IOCTABLE[4])
544 
545 #define ROM_IOCIOIntSet \
546  ((void (*)(uint32_t ui32IOId, \
547  uint32_t ui32Int, \
548  uint32_t ui32EdgeDet))ROM_IOCTABLE[5])
549 
550 #define ROM_IOCIOPortPullSet \
551  ((void (*)(uint32_t ui32IOId, \
552  uint32_t ui32Pull))ROM_IOCTABLE[6])
553 
554 #define ROM_IOCIOHystSet \
555  ((void (*)(uint32_t ui32IOId, \
556  uint32_t ui32Hysteresis))ROM_IOCTABLE[7])
557 
558 #define ROM_IOCIOInputSet \
559  ((void (*)(uint32_t ui32IOId, \
560  uint32_t ui32Input))ROM_IOCTABLE[8])
561 
562 #define ROM_IOCIOSlewCtrlSet \
563  ((void (*)(uint32_t ui32IOId, \
564  uint32_t ui32SlewEnable))ROM_IOCTABLE[9])
565 
566 #define ROM_IOCIODrvStrengthSet \
567  ((void (*)(uint32_t ui32IOId, \
568  uint32_t ui32IOCurrent, \
569  uint32_t ui32DrvStrength))ROM_IOCTABLE[10])
570 
571 #define ROM_IOCIOPortIdSet \
572  ((void (*)(uint32_t ui32IOId, \
573  uint32_t ui32PortId))ROM_IOCTABLE[11])
574 
575 #define ROM_IOCIntEnable \
576  ((void (*)(uint32_t ui32IOId))ROM_IOCTABLE[12])
577 
578 #define ROM_IOCIntDisable \
579  ((void (*)(uint32_t ui32IOId))ROM_IOCTABLE[13])
580 
581 #define ROM_IOCPinTypeGpioInput \
582  ((void (*)(uint32_t ui32IOId))ROM_IOCTABLE[14])
583 
584 #define ROM_IOCPinTypeGpioOutput \
585  ((void (*)(uint32_t ui32IOId))ROM_IOCTABLE[15])
586 
587 #define ROM_IOCPinTypeUart \
588  ((void (*)(uint32_t ui32Base, \
589  uint32_t ui32Rx, \
590  uint32_t ui32Tx, \
591  uint32_t ui32Cts, \
592  uint32_t ui32Rts))ROM_IOCTABLE[16])
593 
594 #define ROM_IOCPinTypeSsiMaster \
595  ((void (*)(uint32_t ui32Base, \
596  uint32_t ui32Rx, \
597  uint32_t ui32Tx, \
598  uint32_t ui32Fss, \
599  uint32_t ui32Clk))ROM_IOCTABLE[17])
600 
601 #define ROM_IOCPinTypeSsiSlave \
602  ((void (*)(uint32_t ui32Base, \
603  uint32_t ui32Rx, \
604  uint32_t ui32Tx, \
605  uint32_t ui32Fss, \
606  uint32_t ui32Clk))ROM_IOCTABLE[18])
607 
608 #define ROM_IOCPinTypeI2c \
609  ((void (*)(uint32_t ui32Base, \
610  uint32_t ui32Data, \
611  uint32_t ui32Clk))ROM_IOCTABLE[19])
612 
613 #define ROM_IOCPinTypeSpis \
614  ((void (*)(uint32_t ui32Rx, \
615  uint32_t ui32Tx, \
616  uint32_t ui32Fss, \
617  uint32_t ui32Clk))ROM_IOCTABLE[20])
618 
619 #define ROM_IOCPinTypeAux \
620  ((void (*)(uint32_t ui32IOId))ROM_IOCTABLE[21])
621 //*****************************************************************************
622 //
623 // Macros for calling ROM functions in the PRCM API.
624 //
625 //*****************************************************************************
626 
627 #define ROM_PRCMInfClockConfigureSet \
628  ((void (*)(uint32_t ui32ClkDiv, \
629  uint32_t ui32PowerMode))ROM_PRCMTABLE[0])
630 
631 #define ROM_PRCMInfClockConfigureGet \
632  ((uint32_t (*)(uint32_t ui32PowerMode))ROM_PRCMTABLE[1])
633 
634 #define ROM_PRCMClockConfigureSet \
635  ((void (*)(uint32_t ui32Domains, \
636  uint32_t ui32ClkDiv))ROM_PRCMTABLE[2])
637 
638 #define ROM_PRCMClockConfigureGet \
639  ((uint32_t (*)(uint32_t ui32Domain))ROM_PRCMTABLE[3])
640 
641 #define ROM_PRCMAudioClockConfigSet \
642  ((void (*)(uint32_t ui32ClkConfig, \
643  uint32_t ui32SampleRate))ROM_PRCMTABLE[4])
644 
645 #define ROM_PRCMPowerDomainOn \
646  ((void (*)(uint32_t ui32Domains))ROM_PRCMTABLE[5])
647 
648 #define ROM_PRCMPowerDomainOff \
649  ((void (*)(uint32_t ui32Domains))ROM_PRCMTABLE[6])
650 
651 #define ROM_PRCMPeripheralRunEnable \
652  ((void (*)(uint32_t ui32Peripheral))ROM_PRCMTABLE[7])
653 
654 #define ROM_PRCMPeripheralRunDisable \
655  ((void (*)(uint32_t ui32Peripheral))ROM_PRCMTABLE[8])
656 
657 #define ROM_PRCMPeripheralSleepEnable \
658  ((void (*)(uint32_t ui32Peripheral))ROM_PRCMTABLE[9])
659 
660 #define ROM_PRCMPeripheralSleepDisable \
661  ((void (*)(uint32_t ui32Peripheral))ROM_PRCMTABLE[10])
662 
663 #define ROM_PRCMPeripheralDeepSleepEnable \
664  ((void (*)(uint32_t ui32Peripheral))ROM_PRCMTABLE[11])
665 
666 #define ROM_PRCMPeripheralDeepSleepDisable \
667  ((void (*)(uint32_t ui32Peripheral))ROM_PRCMTABLE[12])
668 
669 #define ROM_PRCMPowerDomainStatus \
670  ((uint32_t (*)(uint32_t ui32Domains))ROM_PRCMTABLE[13])
671 
672 #define ROM_PRCMDeepSleep \
673  ((void (*)(void))ROM_PRCMTABLE[14])
674 
675 #define ROM_PRCMRetentionEnable \
676  ((void (*)(uint32_t ui32PowerDomain))ROM_PRCMTABLE[15])
677 
678 #define ROM_PRCMRetentionDisable \
679  ((void (*)(uint32_t ui32PowerDomain))ROM_PRCMTABLE[16])
680 //*****************************************************************************
681 //
682 // Macros for calling ROM functions in the SMPH API.
683 //
684 //*****************************************************************************
685 
686 #define ROM_SMPHAcquire \
687  ((void (*)(uint32_t ui32Semaphore))ROM_SMPHTABLE[0])
688 //*****************************************************************************
689 //
690 // Macros for calling ROM functions in the SPIS API.
691 //
692 //*****************************************************************************
693 
694 #define ROM_SPISDataPut \
695  ((void (*)(uint32_t ui32Data))ROM_SPISTABLE[0])
696 
697 #define ROM_SPISTxGetValue \
698  ((uint32_t (*)(uint32_t ui32Index))ROM_SPISTABLE[1])
699 
700 #define ROM_SPISDataGet \
701  ((void (*)(uint32_t *pui32Data))ROM_SPISTABLE[2])
702 
703 #define ROM_SPISRxGetValue \
704  ((uint32_t (*)(uint32_t ui32Index))ROM_SPISTABLE[3])
705 
706 #define ROM_SPISIntStatus \
707  ((uint32_t (*)(bool bMasked))ROM_SPISTABLE[4])
708 //*****************************************************************************
709 //
710 // Macros for calling ROM functions in the SSI API.
711 //
712 //*****************************************************************************
713 
714 #define ROM_SSIConfigSetExpClk \
715  ((void (*)(uint32_t ui32Base, \
716  uint32_t ui32SSIClk, \
717  uint32_t ui32Protocol, \
718  uint32_t ui32Mode, \
719  uint32_t ui32BitRate, \
720  uint32_t ui32DataWidth))ROM_SSITABLE[0])
721 
722 #define ROM_SSIDataPut \
723  ((void (*)(uint32_t ui32Base, \
724  uint32_t ui32Data))ROM_SSITABLE[1])
725 
726 #define ROM_SSIDataPutNonBlocking \
727  ((int32_t (*)(uint32_t ui32Base, \
728  uint32_t ui32Data))ROM_SSITABLE[2])
729 
730 #define ROM_SSIDataGet \
731  ((void (*)(uint32_t ui32Base, \
732  uint32_t *pui32Data))ROM_SSITABLE[3])
733 
734 #define ROM_SSIDataGetNonBlocking \
735  ((int32_t (*)(uint32_t ui32Base, \
736  uint32_t *pui32Data))ROM_SSITABLE[4])
737 //*****************************************************************************
738 //
739 // Macros for calling ROM functions in the TIMER API.
740 //
741 //*****************************************************************************
742 
743 #define ROM_TimerConfigure \
744  ((void (*)(uint32_t ui32Base, \
745  uint32_t ui32Config))ROM_TIMERTABLE[0])
746 
747 #define ROM_TimerLevelControl \
748  ((void (*)(uint32_t ui32Base, \
749  uint32_t ui32Timer, \
750  bool bInvert))ROM_TIMERTABLE[1])
751 
752 #define ROM_TimerTriggerControl \
753  ((void (*)(uint32_t ui32Base, \
754  uint32_t ui32Timer, \
755  bool bEnable))ROM_TIMERTABLE[2])
756 
757 #define ROM_TimerStallControl \
758  ((void (*)(uint32_t ui32Base, \
759  uint32_t ui32Timer, \
760  bool bStall))ROM_TIMERTABLE[3])
761 
762 #define ROM_TimerWaitOnTriggerControl \
763  ((void (*)(uint32_t ui32Base, \
764  uint32_t ui32Timer, \
765  bool bWait))ROM_TIMERTABLE[4])
766 //*****************************************************************************
767 //
768 // Macros for calling ROM functions in the TRNG API.
769 //
770 //*****************************************************************************
771 
772 #define ROM_TRNGConfigure \
773  ((void (*)(uint32_t ui32MinSamplesPerCycle, \
774  uint32_t ui32MaxSamplesPerCycle, \
775  uint32_t ui32ClocksPerSample))ROM_TRNGTABLE[0])
776 
777 #define ROM_TRNGNumberGet \
778  ((uint32_t (*)(uint32_t ui32Word))ROM_TRNGTABLE[1])
779 //*****************************************************************************
780 //
781 // Macros for calling ROM functions in the UART API.
782 //
783 //*****************************************************************************
784 
785 #define ROM_UARTFIFOLevelGet \
786  ((void (*)(uint32_t ui32Base, \
787  uint32_t *pui32TxLevel, \
788  uint32_t *pui32RxLevel))ROM_UARTTABLE[0])
789 
790 #define ROM_UARTConfigSetExpClk \
791  ((void (*)(uint32_t ui32Base, \
792  uint32_t ui32UARTClk, \
793  uint32_t ui32Baud, \
794  uint32_t ui32Config))ROM_UARTTABLE[1])
795 
796 #define ROM_UARTConfigGetExpClk \
797  ((void (*)(uint32_t ui32Base, \
798  uint32_t ui32UARTClk, \
799  uint32_t *pui32Baud, \
800  uint32_t *pui32Config))ROM_UARTTABLE[2])
801 
802 #define ROM_UARTDisable \
803  ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[3])
804 
805 #define ROM_UARTCharGetNonBlocking \
806  ((int32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[4])
807 
808 #define ROM_UARTCharGet \
809  ((int32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[5])
810 
811 #define ROM_UARTCharPutNonBlocking \
812  ((bool (*)(uint32_t ui32Base, \
813  uint8_t ui8Data))ROM_UARTTABLE[6])
814 
815 #define ROM_UARTCharPut \
816  ((void (*)(uint32_t ui32Base, \
817  uint8_t ui8Data))ROM_UARTTABLE[7])
818 //*****************************************************************************
819 //
820 // Macros for calling ROM functions in the UDMA API.
821 //
822 //*****************************************************************************
823 
824 #define ROM_uDMAChannelAttributeEnable \
825  ((void (*)(uint32_t ui32Base, \
826  uint32_t ui32ChannelNum, \
827  uint32_t ui32Attr))ROM_UDMATABLE[0])
828 
829 #define ROM_uDMAChannelAttributeDisable \
830  ((void (*)(uint32_t ui32Base, \
831  uint32_t ui32ChannelNum, \
832  uint32_t ui32Attr))ROM_UDMATABLE[1])
833 
834 #define ROM_uDMAChannelAttributeGet \
835  ((uint32_t (*)(uint32_t ui32Base, \
836  uint32_t ui32ChannelNum))ROM_UDMATABLE[2])
837 
838 #define ROM_uDMAChannelControlSet \
839  ((void (*)(uint32_t ui32Base, \
840  uint32_t ui32ChannelStructIndex, \
841  uint32_t ui32Control))ROM_UDMATABLE[3])
842 
843 #define ROM_uDMAChannelScatterGatherSet \
844  ((void (*)(uint32_t ui32Base, \
845  uint32_t ui32ChannelNum, \
846  uint32_t ui32TaskCount, \
847  void *pvTaskList, \
848  uint32_t ui32IsPeriphSG))ROM_UDMATABLE[5])
849 
850 #define ROM_uDMAChannelSizeGet \
851  ((uint32_t (*)(uint32_t ui32Base, \
852  uint32_t ui32ChannelStructIndex))ROM_UDMATABLE[6])
853 
854 #define ROM_uDMAChannelModeGet \
855  ((uint32_t (*)(uint32_t ui32Base, \
856  uint32_t ui32ChannelStructIndex))ROM_UDMATABLE[7])
857 //*****************************************************************************
858 //
859 // Macros for calling ROM functions in the VIMS API.
860 //
861 //*****************************************************************************
862 
863 #define ROM_VIMSConfigure \
864  ((void (*)(uint32_t ui32Base, \
865  bool bRoundRobin, \
866  bool bPrefetch))ROM_VIMSTABLE[0])
867 
868 #define ROM_VIMSModeSet \
869  ((void (*)(uint32_t ui32Base, \
870  uint32_t ui32Mode))ROM_VIMSTABLE[1])
871 
872 #define ROM_VIMSModeGet \
873  ((uint32_t (*)(uint32_t ui32Base))ROM_VIMSTABLE[2])
874 
875 
876 //*****************************************************************************
877 //
878 // Mark the end of the C bindings section for C++ compilers.
879 //
880 //*****************************************************************************
881 #ifdef __cplusplus
882 }
883 #endif
884 
885 #endif // __ROM_H__
FPTR_RESERVED2_T ReservedLocation2
Definition: rom.h:148
FPTR_GETCHIPID_T GetChipId
Definition: rom.h:146
uint32_t(* FPTR_MINVAL_T)(uint32_t *, uint32_t)
Definition: rom.h:97
FPTR_STDDVAL_T StandDeviationValue
Definition: rom.h:155
uint32_t MemBusWrkAroundHapiProgramFlash(uint8_t *pui8DataBuffer, uint32_t ui32Address, uint32_t ui32Count)
Definition: flash.c:717
uint32_t(* FPTR_RESERVED3_T)(uint8_t *, uint32_t, uint32_t)
Definition: rom.h:84
FPTR_CRC32_T Crc32
Definition: rom.h:144
FPTR_RESETDEV_T ResetDevice
Definition: rom.h:150
void(* FPTR_COMPAREF_T)(uint8_t)
Definition: rom.h:125
uint32_t(* FPTR_GETCHIPID_T)(void)
Definition: rom.h:75
void SafeHapiAuxAdiSelect(FPTR_VOID_UINT8_T fPtr, uint8_t ut8Signal)
Definition: adi.c:53
FPTR_RESETDOMAIN_T ResetDomain
Definition: rom.h:157
FPTR_MINVAL_T MinValue
Definition: rom.h:152
void(* FPTR_COMPBREF_T)(uint8_t)
Definition: rom.h:131
void(* FPTR_RESETDEV_T)(void)
Definition: rom.h:89
FPTR_FLETCHER32_T Fletcher32
Definition: rom.h:151
FPTR_GETFLSIZE_T FlashGetSize
Definition: rom.h:145
uint32_t(* FPTR_STDDVAL_T)(uint32_t *, uint32_t)
Definition: rom.h:109
FPTR_HFSOURCESAFESWITCH_T HFSourceSafeSwitch
Definition: rom.h:158
uint32_t(* FPTR_GETFLSIZE_T)(void)
Definition: rom.h:72
FPTR_COMPBREF_T SelectCompBRef
Definition: rom.h:162
uint32_t MemBusWrkAroundHapiEraseSector(uint32_t ui32Address)
Definition: flash.c:747
uint32_t(* FPTR_FLETCHER32_T)(uint16_t *, uint16_t, uint16_t)
Definition: rom.h:92
uint32_t(* FPTR_CRC32_T)(uint8_t *, uint32_t, uint32_t)
Definition: rom.h:67
void(* FPTR_RESETDOMAIN_T)(uint32_t)
Definition: rom.h:119
uint32_t(* FPTR_RESERVED2_T)(void)
Definition: rom.h:81
void(* FPTR_RESETPERIPHERAL_T)(uint32_t)
Definition: rom.h:116
FPTR_COMPAREF_T SelectCompARef
Definition: rom.h:160
uint32_t(* FPTR_RESERVED1_T)(uint32_t)
Definition: rom.h:78
void(* FPTR_COMPAIN_T)(uint8_t)
Definition: rom.h:122
uint32_t(* FPTR_MEANVAL_T)(uint32_t *, uint32_t)
Definition: rom.h:105
FPTR_RESETPERIPHERAL_T ResetPeripheral
Definition: rom.h:156
void(* FPTR_HFSOURCESAFESWITCH_T)(void)
Definition: rom.h:113
FPTR_COMPAIN_T SelectCompAInput
Definition: rom.h:159
void(* FPTR_ADCCOMPBIN_T)(uint8_t)
Definition: rom.h:128
FPTR_ADCCOMPBIN_T SelectADCCompBInput
Definition: rom.h:161
FPTR_MEANVAL_T MeanValue
Definition: rom.h:154
FPTR_RESERVED1_T ReservedLocation1
Definition: rom.h:147
FPTR_RESERVED3_T ReservedLocation3
Definition: rom.h:149
FPTR_MAXVAL_T MaxValue
Definition: rom.h:153
uint32_t(* FPTR_MAXVAL_T)(uint32_t *, uint32_t)
Definition: rom.h:101