CC13xx Driver Library
rom.h
Go to the documentation of this file.
1 /******************************************************************************
2 * Filename: rom.h
3 * Revised: 2015-12-15 10:40:56 +0100 (Tue, 15 Dec 2015)
4 * Revision: 45307
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) ( uint8_t* /* pui8Data */,\
67  uint32_t /* ui32ByteCount */,\
68  uint32_t /* ui32RepeatCount */);
69 
70 typedef uint32_t (* FPTR_GETFLSIZE_T) ( void );
71 
72 typedef uint32_t (* FPTR_GETCHIPID_T) ( void );
73 
74 typedef uint32_t (* FPTR_RESERVED1_T) ( uint32_t );
75 
76 typedef uint32_t (* FPTR_RESERVED2_T) ( void );
77 
78 typedef uint32_t (* FPTR_RESERVED3_T) ( uint8_t* ,\
79  uint32_t ,\
80  uint32_t );
81 typedef void (* FPTR_RESETDEV_T) ( void );
82 
83 typedef uint32_t (* FPTR_FLETCHER32_T) ( uint16_t* /* pui16Data */,\
84  uint16_t /* ui16WordCount */,\
85  uint16_t /* ui16RepeatCount */);
86 
87 typedef uint32_t (* FPTR_MINVAL_T) ( uint32_t* /* ulpDataBuffer */,\
88  uint32_t /* ui32DataCount */);
89 
90 typedef uint32_t (* FPTR_MAXVAL_T) ( uint32_t* /* pui32DataBuffer */,\
91  uint32_t /* ui32DataCount */);
92 
93 typedef uint32_t (* FPTR_MEANVAL_T) ( uint32_t* /* pui32DataBuffer */,\
94  uint32_t /* ui32DataCount */);
95 
96 typedef uint32_t (* FPTR_STDDVAL_T) ( uint32_t* /* pui32DataBuffer */,\
97  uint32_t /* ui32DataCount */);
98 
99 typedef void (* FPTR_HFSOURCESAFESWITCH_T) ( void );
100 
101 typedef void (* FPTR_RESERVED4_T) ( uint32_t );
102 
103 typedef void (* FPTR_RESERVED5_T) ( uint32_t );
104 
105 typedef void (* FPTR_COMPAIN_T) ( uint8_t /* ut8Signal */);
106 
107 typedef void (* FPTR_COMPAREF_T) ( uint8_t /* ut8Signal */);
108 
109 typedef void (* FPTR_ADCCOMPBIN_T) ( uint8_t /* ut8Signal */);
110 
111 typedef void (* FPTR_COMPBREF_T) ( uint8_t /* ut8Signal */);
112 
113 extern uint32_t MemBusWrkAroundHapiProgramFlash(uint8_t *pui8DataBuffer,
114  uint32_t ui32Address,
115  uint32_t ui32Count);
116 
117 extern uint32_t MemBusWrkAroundHapiEraseSector(uint32_t ui32Address);
118 
119 //
120 // ROM Hard-API access table type
121 //
122 typedef struct
123 {
143 } HARD_API_T;
144 
145 //
146 // Pointer to the ROM HAPI table
147 //
148 #define P_HARD_API ((HARD_API_T*) ROM_HAPI_TABLE_ADDR)
149 
150 //
151 // Add wrapper around the Hapi functions needing the "bus arbitration issue" workaround
152 //
153 extern void SafeHapiVoid( FPTR_VOID_VOID_T fPtr );
154 extern void SafeHapiAuxAdiSelect( FPTR_VOID_UINT8_T fPtr, uint8_t ut8Signal );
155 
156 #define HapiCrc32(a,b,c) P_HARD_API->Crc32(a,b,c)
157 #define HapiGetFlashSize() P_HARD_API->FlashGetSize()
158 #define HapiGetChipId() P_HARD_API->GetChipId()
159 #define HapiSectorErase(a) MemBusWrkAroundHapiEraseSector(a)
160 #define HapiProgramFlash(a,b,c) MemBusWrkAroundHapiProgramFlash(a,b,c)
161 #define HapiResetDevice() P_HARD_API->ResetDevice()
162 #define HapiFletcher32(a,b,c) P_HARD_API->Fletcher32(a,b,c)
163 #define HapiMinValue(a,b) P_HARD_API->MinValue(a,b)
164 #define HapiMaxValue(a,b) P_HARD_API->MaxValue(a,b)
165 #define HapiMeanValue(a,b) P_HARD_API->MeanValue(a,b)
166 #define HapiStandDeviationValue(a,b) P_HARD_API->StandDeviationValue(a,b)
167 #define HapiHFSourceSafeSwitch() SafeHapiVoid( P_HARD_API->HFSourceSafeSwitch )
168 #define HapiSelectCompAInput(a) SafeHapiAuxAdiSelect( P_HARD_API->SelectCompAInput , a )
169 #define HapiSelectCompARef(a) SafeHapiAuxAdiSelect( P_HARD_API->SelectCompARef , a )
170 #define HapiSelectADCCompBInput(a) SafeHapiAuxAdiSelect( P_HARD_API->SelectADCCompBInput, a )
171 #define HapiSelectCompBRef(a) SafeHapiAuxAdiSelect( P_HARD_API->SelectCompBRef , a )
172 
173 //
174 // Defines for input parameter to the HapiSelectCompAInput function.
175 // The define values can not be changed!
176 //
177 #define COMPA_IN_NC 0x00
178 #define COMPA_IN_AUXIO7 0x09
179 #define COMPA_IN_AUXIO6 0x0A
180 #define COMPA_IN_AUXIO5 0x0B
181 #define COMPA_IN_AUXIO4 0x0C
182 #define COMPA_IN_AUXIO3 0x0D
183 #define COMPA_IN_AUXIO2 0x0E
184 #define COMPA_IN_AUXIO1 0x0F
185 #define COMPA_IN_AUXIO0 0x10
186 
187 //
188 // Defines for input parameter to the HapiSelectCompARef function.
189 // The define values can not be changed!
190 //
191 #define COMPA_REF_NC 0x00
192 #define COMPA_REF_DCOUPL 0x01
193 #define COMPA_REF_VSS 0x02
194 #define COMPA_REF_VDDS 0x03
195 #define COMPA_REF_ADCVREFP 0x04
196 #define COMPA_REF_AUXIO7 0x09
197 #define COMPA_REF_AUXIO6 0x0A
198 #define COMPA_REF_AUXIO5 0x0B
199 #define COMPA_REF_AUXIO4 0x0C
200 #define COMPA_REF_AUXIO3 0x0D
201 #define COMPA_REF_AUXIO2 0x0E
202 #define COMPA_REF_AUXIO1 0x0F
203 #define COMPA_REF_AUXIO0 0x10
204 
205 //
206 // Defines for input parameter to the HapiSelectADCCompBInput function.
207 // The define values can not be changed!
208 //
209 #define ADC_COMPB_IN_NC 0x00
210 #define ADC_COMPB_IN_DCOUPL 0x03
211 #define ADC_COMPB_IN_VSS 0x04
212 #define ADC_COMPB_IN_VDDS 0x05
213 #define ADC_COMPB_IN_AUXIO7 0x09
214 #define ADC_COMPB_IN_AUXIO6 0x0A
215 #define ADC_COMPB_IN_AUXIO5 0x0B
216 #define ADC_COMPB_IN_AUXIO4 0x0C
217 #define ADC_COMPB_IN_AUXIO3 0x0D
218 #define ADC_COMPB_IN_AUXIO2 0x0E
219 #define ADC_COMPB_IN_AUXIO1 0x0F
220 #define ADC_COMPB_IN_AUXIO0 0x10
221 
222 //
223 // Defines for input parameter to the HapiSelectCompBRef function.
224 // The define values can not be changed!
225 //
226 #define COMPB_REF_NC 0x00
227 #define COMPB_REF_DCOUPL 0x01
228 #define COMPB_REF_VSS 0x02
229 #define COMPB_REF_VDDS 0x03
230 
231 #endif // __HAPI_H__
232 
233 //*****************************************************************************
234 //
235 // Pointers to the main API tables.
236 //
237 //*****************************************************************************
238 #define ROM_API_TABLE ((uint32_t *) 0x10000180)
239 #define ROM_VERSION (ROM_API_TABLE[0])
240 
241 
242 #define ROM_API_AON_EVENT_TABLE ((uint32_t*) (ROM_API_TABLE[1]))
243 #define ROM_API_AON_IOC_TABLE ((uint32_t*) (ROM_API_TABLE[2]))
244 #define ROM_API_AON_RTC_TABLE ((uint32_t*) (ROM_API_TABLE[3]))
245 #define ROM_API_AON_WUC_TABLE ((uint32_t*) (ROM_API_TABLE[4]))
246 #define ROM_API_AUX_CTRL_TABLE ((uint32_t*) (ROM_API_TABLE[5]))
247 #define ROM_API_AUX_TDC_TABLE ((uint32_t*) (ROM_API_TABLE[6]))
248 #define ROM_API_AUX_TIMER_TABLE ((uint32_t*) (ROM_API_TABLE[7]))
249 #define ROM_API_AUX_WUC_TABLE ((uint32_t*) (ROM_API_TABLE[8]))
250 #define ROM_API_DDI_TABLE ((uint32_t*) (ROM_API_TABLE[9]))
251 #define ROM_API_FLASH_TABLE ((uint32_t*) (ROM_API_TABLE[10]))
252 #define ROM_API_I2C_TABLE ((uint32_t*) (ROM_API_TABLE[11]))
253 #define ROM_API_INTERRUPT_TABLE ((uint32_t*) (ROM_API_TABLE[12]))
254 #define ROM_API_IOC_TABLE ((uint32_t*) (ROM_API_TABLE[13]))
255 #define ROM_API_PRCM_TABLE ((uint32_t*) (ROM_API_TABLE[14]))
256 #define ROM_API_SMPH_TABLE ((uint32_t*) (ROM_API_TABLE[15]))
257 #define ROM_API_SPIS_TABLE ((uint32_t*) (ROM_API_TABLE[16]))
258 #define ROM_API_SSI_TABLE ((uint32_t*) (ROM_API_TABLE[17]))
259 #define ROM_API_TIMER_TABLE ((uint32_t*) (ROM_API_TABLE[18]))
260 #define ROM_API_TRNG_TABLE ((uint32_t*) (ROM_API_TABLE[19]))
261 #define ROM_API_UART_TABLE ((uint32_t*) (ROM_API_TABLE[20]))
262 #define ROM_API_UDMA_TABLE ((uint32_t*) (ROM_API_TABLE[21]))
263 #define ROM_API_VIMS_TABLE ((uint32_t*) (ROM_API_TABLE[22]))
264 
265 // AON_EVENT FUNCTIONS
266 #define ROM_AONEventMcuWakeUpSet \
267  ((void (*)(uint32_t ui32MCUWUEvent, uint32_t ui32EventSrc)) \
268  ROM_API_AON_EVENT_TABLE[0])
269 
270 #define ROM_AONEventMcuWakeUpGet \
271  ((uint32_t (*)(uint32_t ui32MCUWUEvent)) \
272  ROM_API_AON_EVENT_TABLE[1])
273 
274 #define ROM_AONEventAuxWakeUpSet \
275  ((void (*)(uint32_t ui32AUXWUEvent, uint32_t ui32EventSrc)) \
276  ROM_API_AON_EVENT_TABLE[2])
277 
278 #define ROM_AONEventAuxWakeUpGet \
279  ((uint32_t (*)(uint32_t ui32AUXWUEvent)) \
280  ROM_API_AON_EVENT_TABLE[3])
281 
282 #define ROM_AONEventMcuSet \
283  ((void (*)(uint32_t ui32MCUEvent, uint32_t ui32EventSrc)) \
284  ROM_API_AON_EVENT_TABLE[4])
285 
286 #define ROM_AONEventMcuGet \
287  ((uint32_t (*)(uint32_t ui32MCUEvent)) \
288  ROM_API_AON_EVENT_TABLE[5])
289 
290 
291 // AON_WUC FUNCTIONS
292 #define ROM_AONWUCAuxReset \
293  ((void (*)(void)) \
294  ROM_API_AON_WUC_TABLE[3])
295 
296 #define ROM_AONWUCRechargeCtrlConfigSet \
297  ((void (*)(bool bAdaptEnable, uint32_t ui32AdaptRate, uint32_t ui32Period, uint32_t ui32MaxPeriod)) \
298  ROM_API_AON_WUC_TABLE[4])
299 
300 #define ROM_AONWUCOscConfig \
301  ((void (*)(uint32_t ui32Period)) \
302  ROM_API_AON_WUC_TABLE[5])
303 
304 
305 // AUX_TDC FUNCTIONS
306 #define ROM_AUXTDCConfigSet \
307  ((void (*)(uint32_t ui32Base, uint32_t ui32StartCondition, uint32_t ui32StopCondition)) \
308  ROM_API_AUX_TDC_TABLE[0])
309 
310 #define ROM_AUXTDCMeasurementDone \
311  ((uint32_t (*)(uint32_t ui32Base)) \
312  ROM_API_AUX_TDC_TABLE[1])
313 
314 
315 // AUX_TIMER FUNCTIONS
316 #define ROM_AUXTimerConfigure \
317  ((void (*)(uint32_t ui32Timer, uint32_t ui32Config)) \
318  ROM_API_AUX_TIMER_TABLE[0])
319 
320 #define ROM_AUXTimerStart \
321  ((void (*)(uint32_t ui32Timer)) \
322  ROM_API_AUX_TIMER_TABLE[1])
323 
324 #define ROM_AUXTimerStop \
325  ((void (*)(uint32_t ui32Timer)) \
326  ROM_API_AUX_TIMER_TABLE[2])
327 
328 #define ROM_AUXTimerPrescaleSet \
329  ((void (*)(uint32_t ui32Timer, uint32_t ui32PrescaleDiv)) \
330  ROM_API_AUX_TIMER_TABLE[3])
331 
332 #define ROM_AUXTimerPrescaleGet \
333  ((uint32_t (*)(uint32_t ui32Timer)) \
334  ROM_API_AUX_TIMER_TABLE[4])
335 
336 
337 // AUX_WUC FUNCTIONS
338 #define ROM_AUXWUCClockEnable \
339  ((void (*)(uint32_t ui32Clocks)) \
340  ROM_API_AUX_WUC_TABLE[0])
341 
342 #define ROM_AUXWUCClockDisable \
343  ((void (*)(uint32_t ui32Clocks)) \
344  ROM_API_AUX_WUC_TABLE[1])
345 
346 #define ROM_AUXWUCClockStatus \
347  ((uint32_t (*)(uint32_t ui32Clocks)) \
348  ROM_API_AUX_WUC_TABLE[2])
349 
350 #define ROM_AUXWUCPowerCtrl \
351  ((void (*)(uint32_t ui32PowerMode)) \
352  ROM_API_AUX_WUC_TABLE[3])
353 
354 
355 // DDI FUNCTIONS
356 #define ROM_DDI16BitWrite \
357  ((void (*)(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Mask, uint32_t ui32WrData)) \
358  ROM_API_DDI_TABLE[0])
359 
360 #define ROM_DDI16BitfieldWrite \
361  ((void (*)(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Mask, uint32_t ui32Shift, uint16_t ui32Data)) \
362  ROM_API_DDI_TABLE[1])
363 
364 #define ROM_DDI16BitRead \
365  ((uint16_t (*)(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Mask)) \
366  ROM_API_DDI_TABLE[2])
367 
368 #define ROM_DDI16BitfieldRead \
369  ((uint16_t (*)(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Mask, uint32_t ui32Shift)) \
370  ROM_API_DDI_TABLE[3])
371 
372 
373 // FLASH FUNCTIONS
374 #define ROM_FlashPowerModeGet \
375  ((uint32_t (*)(void)) \
376  ROM_API_FLASH_TABLE[1])
377 
378 #define ROM_FlashProtectionSet \
379  ((void (*)(uint32_t ui32SectorAddress, uint32_t ui32ProtectMode)) \
380  ROM_API_FLASH_TABLE[2])
381 
382 #define ROM_FlashProtectionGet \
383  ((uint32_t (*)(uint32_t ui32SectorAddress)) \
384  ROM_API_FLASH_TABLE[3])
385 
386 #define ROM_FlashProtectionSave \
387  ((uint32_t (*)(uint32_t ui32SectorAddress)) \
388  ROM_API_FLASH_TABLE[4])
389 
390 #define ROM_FlashEfuseReadRow \
391  ((bool (*)(uint32_t *pui32EfuseData, uint32_t ui32RowAddress)) \
392  ROM_API_FLASH_TABLE[8])
393 
394 #define ROM_FlashDisableSectorsForWrite \
395  ((void (*)(void)) \
396  ROM_API_FLASH_TABLE[9])
397 
398 
399 // I2C FUNCTIONS
400 #define ROM_I2CMasterInitExpClk \
401  ((void (*)(uint32_t ui32Base, uint32_t ui32I2CClk, bool bFast)) \
402  ROM_API_I2C_TABLE[0])
403 
404 #define ROM_I2CMasterErr \
405  ((uint32_t (*)(uint32_t ui32Base)) \
406  ROM_API_I2C_TABLE[1])
407 
408 
409 // INTERRUPT FUNCTIONS
410 #define ROM_IntPriorityGroupingSet \
411  ((void (*)(uint32_t ui32Bits)) \
412  ROM_API_INTERRUPT_TABLE[0])
413 
414 #define ROM_IntPriorityGroupingGet \
415  ((uint32_t (*)(void)) \
416  ROM_API_INTERRUPT_TABLE[1])
417 
418 #define ROM_IntPrioritySet \
419  ((void (*)(uint32_t ui32Interrupt, uint8_t ui8Priority)) \
420  ROM_API_INTERRUPT_TABLE[2])
421 
422 #define ROM_IntPriorityGet \
423  ((int32_t (*)(uint32_t ui32Interrupt)) \
424  ROM_API_INTERRUPT_TABLE[3])
425 
426 #define ROM_IntEnable \
427  ((void (*)(uint32_t ui32Interrupt)) \
428  ROM_API_INTERRUPT_TABLE[4])
429 
430 #define ROM_IntDisable \
431  ((void (*)(uint32_t ui32Interrupt)) \
432  ROM_API_INTERRUPT_TABLE[5])
433 
434 #define ROM_IntPendSet \
435  ((void (*)(uint32_t ui32Interrupt)) \
436  ROM_API_INTERRUPT_TABLE[6])
437 
438 #define ROM_IntPendGet \
439  ((bool (*)(uint32_t ui32Interrupt)) \
440  ROM_API_INTERRUPT_TABLE[7])
441 
442 #define ROM_IntPendClear \
443  ((void (*)(uint32_t ui32Interrupt)) \
444  ROM_API_INTERRUPT_TABLE[8])
445 
446 
447 // IOC FUNCTIONS
448 #define ROM_IOCPortConfigureSet \
449  ((void (*)(uint32_t ui32IOId, uint32_t ui32PortId, uint32_t ui32IOConfig)) \
450  ROM_API_IOC_TABLE[0])
451 
452 #define ROM_IOCPortConfigureGet \
453  ((uint32_t (*)(uint32_t ui32IOId)) \
454  ROM_API_IOC_TABLE[1])
455 
456 #define ROM_IOCIOShutdownSet \
457  ((void (*)(uint32_t ui32IOId, uint32_t ui32IOShutdown)) \
458  ROM_API_IOC_TABLE[2])
459 
460 #define ROM_IOCIOModeSet \
461  ((void (*)(uint32_t ui32IOId, uint32_t ui32IOMode)) \
462  ROM_API_IOC_TABLE[4])
463 
464 #define ROM_IOCIOIntSet \
465  ((void (*)(uint32_t ui32IOId, uint32_t ui32Int, uint32_t ui32EdgeDet)) \
466  ROM_API_IOC_TABLE[5])
467 
468 #define ROM_IOCIOPortPullSet \
469  ((void (*)(uint32_t ui32IOId, uint32_t ui32Pull)) \
470  ROM_API_IOC_TABLE[6])
471 
472 #define ROM_IOCIOHystSet \
473  ((void (*)(uint32_t ui32IOId, uint32_t ui32Hysteresis)) \
474  ROM_API_IOC_TABLE[7])
475 
476 #define ROM_IOCIOInputSet \
477  ((void (*)(uint32_t ui32IOId, uint32_t ui32Input)) \
478  ROM_API_IOC_TABLE[8])
479 
480 #define ROM_IOCIOSlewCtrlSet \
481  ((void (*)(uint32_t ui32IOId, uint32_t ui32SlewEnable)) \
482  ROM_API_IOC_TABLE[9])
483 
484 #define ROM_IOCIODrvStrengthSet \
485  ((void (*)(uint32_t ui32IOId, uint32_t ui32IOCurrent, uint32_t ui32DrvStrength)) \
486  ROM_API_IOC_TABLE[10])
487 
488 #define ROM_IOCIOPortIdSet \
489  ((void (*)(uint32_t ui32IOId, uint32_t ui32PortId)) \
490  ROM_API_IOC_TABLE[11])
491 
492 #define ROM_IOCIntEnable \
493  ((void (*)(uint32_t ui32IOId)) \
494  ROM_API_IOC_TABLE[12])
495 
496 #define ROM_IOCIntDisable \
497  ((void (*)(uint32_t ui32IOId)) \
498  ROM_API_IOC_TABLE[13])
499 
500 #define ROM_IOCPinTypeGpioInput \
501  ((void (*)(uint32_t ui32IOId)) \
502  ROM_API_IOC_TABLE[14])
503 
504 #define ROM_IOCPinTypeGpioOutput \
505  ((void (*)(uint32_t ui32IOId)) \
506  ROM_API_IOC_TABLE[15])
507 
508 #define ROM_IOCPinTypeUart \
509  ((void (*)(uint32_t ui32Base, uint32_t ui32Rx, uint32_t ui32Tx, uint32_t ui32Cts, uint32_t ui32Rts)) \
510  ROM_API_IOC_TABLE[16])
511 
512 #define ROM_IOCPinTypeSsiMaster \
513  ((void (*)(uint32_t ui32Base, uint32_t ui32Rx, uint32_t ui32Tx, uint32_t ui32Fss, uint32_t ui32Clk)) \
514  ROM_API_IOC_TABLE[17])
515 
516 #define ROM_IOCPinTypeSsiSlave \
517  ((void (*)(uint32_t ui32Base, uint32_t ui32Rx, uint32_t ui32Tx, uint32_t ui32Fss, uint32_t ui32Clk)) \
518  ROM_API_IOC_TABLE[18])
519 
520 #define ROM_IOCPinTypeI2c \
521  ((void (*)(uint32_t ui32Base, uint32_t ui32Data, uint32_t ui32Clk)) \
522  ROM_API_IOC_TABLE[19])
523 
524 #define ROM_IOCPinTypeAux \
525  ((void (*)(uint32_t ui32IOId)) \
526  ROM_API_IOC_TABLE[21])
527 
528 
529 // PRCM FUNCTIONS
530 #define ROM_PRCMInfClockConfigureSet \
531  ((void (*)(uint32_t ui32ClkDiv, uint32_t ui32PowerMode)) \
532  ROM_API_PRCM_TABLE[0])
533 
534 #define ROM_PRCMInfClockConfigureGet \
535  ((uint32_t (*)(uint32_t ui32PowerMode)) \
536  ROM_API_PRCM_TABLE[1])
537 
538 #define ROM_PRCMAudioClockConfigSet \
539  ((void (*)(uint32_t ui32ClkConfig, uint32_t ui32SampleRate)) \
540  ROM_API_PRCM_TABLE[4])
541 
542 #define ROM_PRCMPowerDomainOn \
543  ((void (*)(uint32_t ui32Domains)) \
544  ROM_API_PRCM_TABLE[5])
545 
546 #define ROM_PRCMPowerDomainOff \
547  ((void (*)(uint32_t ui32Domains)) \
548  ROM_API_PRCM_TABLE[6])
549 
550 #define ROM_PRCMPeripheralRunEnable \
551  ((void (*)(uint32_t ui32Peripheral)) \
552  ROM_API_PRCM_TABLE[7])
553 
554 #define ROM_PRCMPeripheralRunDisable \
555  ((void (*)(uint32_t ui32Peripheral)) \
556  ROM_API_PRCM_TABLE[8])
557 
558 #define ROM_PRCMPeripheralSleepEnable \
559  ((void (*)(uint32_t ui32Peripheral)) \
560  ROM_API_PRCM_TABLE[9])
561 
562 #define ROM_PRCMPeripheralSleepDisable \
563  ((void (*)(uint32_t ui32Peripheral)) \
564  ROM_API_PRCM_TABLE[10])
565 
566 #define ROM_PRCMPeripheralDeepSleepEnable \
567  ((void (*)(uint32_t ui32Peripheral)) \
568  ROM_API_PRCM_TABLE[11])
569 
570 #define ROM_PRCMPeripheralDeepSleepDisable \
571  ((void (*)(uint32_t ui32Peripheral)) \
572  ROM_API_PRCM_TABLE[12])
573 
574 #define ROM_PRCMPowerDomainStatus \
575  ((uint32_t (*)(uint32_t ui32Domains)) \
576  ROM_API_PRCM_TABLE[13])
577 
578 #define ROM_PRCMDeepSleep \
579  ((void (*)(void)) \
580  ROM_API_PRCM_TABLE[14])
581 
582 
583 // SMPH FUNCTIONS
584 #define ROM_SMPHAcquire \
585  ((void (*)(uint32_t ui32Semaphore)) \
586  ROM_API_SMPH_TABLE[0])
587 
588 
589 // SSI FUNCTIONS
590 #define ROM_SSIConfigSetExpClk \
591  ((void (*)(uint32_t ui32Base, uint32_t ui32SSIClk, uint32_t ui32Protocol, uint32_t ui32Mode, uint32_t ui32BitRate, uint32_t ui32DataWidth)) \
592  ROM_API_SSI_TABLE[0])
593 
594 #define ROM_SSIDataPut \
595  ((void (*)(uint32_t ui32Base, uint32_t ui32Data)) \
596  ROM_API_SSI_TABLE[1])
597 
598 #define ROM_SSIDataPutNonBlocking \
599  ((int32_t (*)(uint32_t ui32Base, uint32_t ui32Data)) \
600  ROM_API_SSI_TABLE[2])
601 
602 #define ROM_SSIDataGet \
603  ((void (*)(uint32_t ui32Base, uint32_t *pui32Data)) \
604  ROM_API_SSI_TABLE[3])
605 
606 #define ROM_SSIDataGetNonBlocking \
607  ((int32_t (*)(uint32_t ui32Base, uint32_t *pui32Data)) \
608  ROM_API_SSI_TABLE[4])
609 
610 
611 // TIMER FUNCTIONS
612 #define ROM_TimerConfigure \
613  ((void (*)(uint32_t ui32Base, uint32_t ui32Config)) \
614  ROM_API_TIMER_TABLE[0])
615 
616 #define ROM_TimerLevelControl \
617  ((void (*)(uint32_t ui32Base, uint32_t ui32Timer, bool bInvert)) \
618  ROM_API_TIMER_TABLE[1])
619 
620 #define ROM_TimerStallControl \
621  ((void (*)(uint32_t ui32Base, uint32_t ui32Timer, bool bStall)) \
622  ROM_API_TIMER_TABLE[3])
623 
624 #define ROM_TimerWaitOnTriggerControl \
625  ((void (*)(uint32_t ui32Base, uint32_t ui32Timer, bool bWait)) \
626  ROM_API_TIMER_TABLE[4])
627 
628 
629 // TRNG FUNCTIONS
630 #define ROM_TRNGNumberGet \
631  ((uint32_t (*)(uint32_t ui32Word)) \
632  ROM_API_TRNG_TABLE[1])
633 
634 
635 // UART FUNCTIONS
636 #define ROM_UARTFIFOLevelGet \
637  ((void (*)(uint32_t ui32Base, uint32_t *pui32TxLevel, uint32_t *pui32RxLevel)) \
638  ROM_API_UART_TABLE[0])
639 
640 #define ROM_UARTConfigSetExpClk \
641  ((void (*)(uint32_t ui32Base, uint32_t ui32UARTClk, uint32_t ui32Baud, uint32_t ui32Config)) \
642  ROM_API_UART_TABLE[1])
643 
644 #define ROM_UARTConfigGetExpClk \
645  ((void (*)(uint32_t ui32Base, uint32_t ui32UARTClk, uint32_t *pui32Baud, uint32_t *pui32Config)) \
646  ROM_API_UART_TABLE[2])
647 
648 #define ROM_UARTDisable \
649  ((void (*)(uint32_t ui32Base)) \
650  ROM_API_UART_TABLE[3])
651 
652 #define ROM_UARTCharGetNonBlocking \
653  ((int32_t (*)(uint32_t ui32Base)) \
654  ROM_API_UART_TABLE[4])
655 
656 #define ROM_UARTCharGet \
657  ((int32_t (*)(uint32_t ui32Base)) \
658  ROM_API_UART_TABLE[5])
659 
660 #define ROM_UARTCharPutNonBlocking \
661  ((bool (*)(uint32_t ui32Base, uint8_t ui8Data)) \
662  ROM_API_UART_TABLE[6])
663 
664 #define ROM_UARTCharPut \
665  ((void (*)(uint32_t ui32Base, uint8_t ui8Data)) \
666  ROM_API_UART_TABLE[7])
667 
668 
669 // UDMA FUNCTIONS
670 #define ROM_uDMAChannelAttributeEnable \
671  ((void (*)(uint32_t ui32Base, uint32_t ui32ChannelNum, uint32_t ui32Attr)) \
672  ROM_API_UDMA_TABLE[0])
673 
674 #define ROM_uDMAChannelAttributeDisable \
675  ((void (*)(uint32_t ui32Base, uint32_t ui32ChannelNum, uint32_t ui32Attr)) \
676  ROM_API_UDMA_TABLE[1])
677 
678 #define ROM_uDMAChannelAttributeGet \
679  ((uint32_t (*)(uint32_t ui32Base, uint32_t ui32ChannelNum)) \
680  ROM_API_UDMA_TABLE[2])
681 
682 #define ROM_uDMAChannelControlSet \
683  ((void (*)(uint32_t ui32Base, uint32_t ui32ChannelStructIndex, uint32_t ui32Control)) \
684  ROM_API_UDMA_TABLE[3])
685 
686 #define ROM_uDMAChannelScatterGatherSet \
687  ((void (*)(uint32_t ui32Base, uint32_t ui32ChannelNum, uint32_t ui32TaskCount, void *pvTaskList, uint32_t ui32IsPeriphSG)) \
688  ROM_API_UDMA_TABLE[5])
689 
690 #define ROM_uDMAChannelSizeGet \
691  ((uint32_t (*)(uint32_t ui32Base, uint32_t ui32ChannelStructIndex)) \
692  ROM_API_UDMA_TABLE[6])
693 
694 #define ROM_uDMAChannelModeGet \
695  ((uint32_t (*)(uint32_t ui32Base, uint32_t ui32ChannelStructIndex)) \
696  ROM_API_UDMA_TABLE[7])
697 
698 
699 // VIMS FUNCTIONS
700 #define ROM_VIMSConfigure \
701  ((void (*)(uint32_t ui32Base, bool bRoundRobin, bool bPrefetch)) \
702  ROM_API_VIMS_TABLE[0])
703 
704 #define ROM_VIMSModeSet \
705  ((void (*)(uint32_t ui32Base, uint32_t ui32Mode)) \
706  ROM_API_VIMS_TABLE[1])
707 
708 
709 
710 //*****************************************************************************
711 //
712 // Mark the end of the C bindings section for C++ compilers.
713 //
714 //*****************************************************************************
715 #ifdef __cplusplus
716 }
717 #endif
718 
719 #endif // __ROM_H__
FPTR_RESERVED2_T ReservedLocation2
Definition: rom.h:128
FPTR_RESERVED5_T ReservedLocation5
Definition: rom.h:137
FPTR_GETCHIPID_T GetChipId
Definition: rom.h:126
FPTR_STDDVAL_T StandDeviationValue
Definition: rom.h:135
uint32_t(* FPTR_MEANVAL_T)(uint32_t *, uint32_t)
Definition: rom.h:93
uint32_t MemBusWrkAroundHapiProgramFlash(uint8_t *pui8DataBuffer, uint32_t ui32Address, uint32_t ui32Count)
Definition: flash.c:715
void(* FPTR_RESERVED5_T)(uint32_t)
Definition: rom.h:103
void(* FPTR_ADCCOMPBIN_T)(uint8_t)
Definition: rom.h:109
FPTR_CRC32_T Crc32
Definition: rom.h:124
FPTR_RESETDEV_T ResetDevice
Definition: rom.h:130
void(* FPTR_COMPAIN_T)(uint8_t)
Definition: rom.h:105
void SafeHapiAuxAdiSelect(FPTR_VOID_UINT8_T fPtr, uint8_t ut8Signal)
Definition: adi.c:64
FPTR_MINVAL_T MinValue
Definition: rom.h:132
FPTR_FLETCHER32_T Fletcher32
Definition: rom.h:131
uint32_t(* FPTR_STDDVAL_T)(uint32_t *, uint32_t)
Definition: rom.h:96
uint32_t(* FPTR_GETFLSIZE_T)(void)
Definition: rom.h:70
FPTR_GETFLSIZE_T FlashGetSize
Definition: rom.h:125
void SafeHapiVoid(FPTR_VOID_VOID_T fPtr)
Definition: adi.c:53
FPTR_HFSOURCESAFESWITCH_T HFSourceSafeSwitch
Definition: rom.h:138
FPTR_COMPBREF_T SelectCompBRef
Definition: rom.h:142
uint32_t(* FPTR_RESERVED3_T)(uint8_t *, uint32_t, uint32_t)
Definition: rom.h:78
uint32_t MemBusWrkAroundHapiEraseSector(uint32_t ui32Address)
Definition: flash.c:745
uint32_t(* FPTR_RESERVED2_T)(void)
Definition: rom.h:76
uint32_t(* FPTR_FLETCHER32_T)(uint16_t *, uint16_t, uint16_t)
Definition: rom.h:83
uint32_t(* FPTR_MINVAL_T)(uint32_t *, uint32_t)
Definition: rom.h:87
uint32_t(* FPTR_GETCHIPID_T)(void)
Definition: rom.h:72
void(* FPTR_RESETDEV_T)(void)
Definition: rom.h:81
void(* FPTR_COMPBREF_T)(uint8_t)
Definition: rom.h:111
FPTR_COMPAREF_T SelectCompARef
Definition: rom.h:140
uint32_t(* FPTR_RESERVED1_T)(uint32_t)
Definition: rom.h:74
FPTR_COMPAIN_T SelectCompAInput
Definition: rom.h:139
uint32_t(* FPTR_CRC32_T)(uint8_t *, uint32_t, uint32_t)
Definition: rom.h:66
void(* FPTR_COMPAREF_T)(uint8_t)
Definition: rom.h:107
FPTR_ADCCOMPBIN_T SelectADCCompBInput
Definition: rom.h:141
uint32_t(* FPTR_MAXVAL_T)(uint32_t *, uint32_t)
Definition: rom.h:90
void(* FPTR_HFSOURCESAFESWITCH_T)(void)
Definition: rom.h:99
FPTR_MEANVAL_T MeanValue
Definition: rom.h:134
FPTR_RESERVED1_T ReservedLocation1
Definition: rom.h:127
void(* FPTR_RESERVED4_T)(uint32_t)
Definition: rom.h:101
FPTR_RESERVED3_T ReservedLocation3
Definition: rom.h:129
FPTR_MAXVAL_T MaxValue
Definition: rom.h:133
FPTR_RESERVED4_T ReservedLocation4
Definition: rom.h:136