rom.h 189 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788
  1. //*****************************************************************************
  2. //
  3. // rom.h - Macros to facilitate calling functions in the ROM.
  4. //
  5. // Copyright (c) 2007-2017 Texas Instruments Incorporated. All rights reserved.
  6. // Software License Agreement
  7. //
  8. // Redistribution and use in source and binary forms, with or without
  9. // modification, are permitted provided that the following conditions
  10. // are met:
  11. //
  12. // Redistributions of source code must retain the above copyright
  13. // notice, this list of conditions and the following disclaimer.
  14. //
  15. // Redistributions in binary form must reproduce the above copyright
  16. // notice, this list of conditions and the following disclaimer in the
  17. // documentation and/or other materials provided with the
  18. // distribution.
  19. //
  20. // Neither the name of Texas Instruments Incorporated nor the names of
  21. // its contributors may be used to endorse or promote products derived
  22. // from this software without specific prior written permission.
  23. //
  24. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  25. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  26. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  27. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  28. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  29. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  30. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  31. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  32. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  33. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  34. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  35. //
  36. //*****************************************************************************
  37. #ifndef __DRIVERLIB_ROM_H__
  38. #define __DRIVERLIB_ROM_H__
  39. #include <stdint.h>
  40. #include <stdbool.h>
  41. //*****************************************************************************
  42. //
  43. // Pointers to the main API tables.
  44. //
  45. //*****************************************************************************
  46. #define ROM_APITABLE ((uint32_t *)0x01000010)
  47. #define ROM_VERSION (ROM_APITABLE[0])
  48. #define ROM_UARTTABLE ((uint32_t *)(ROM_APITABLE[1]))
  49. #define ROM_SSITABLE ((uint32_t *)(ROM_APITABLE[2]))
  50. #define ROM_I2CTABLE ((uint32_t *)(ROM_APITABLE[3]))
  51. #define ROM_GPIOTABLE ((uint32_t *)(ROM_APITABLE[4]))
  52. #define ROM_ADCTABLE ((uint32_t *)(ROM_APITABLE[5]))
  53. #define ROM_COMPARATORTABLE ((uint32_t *)(ROM_APITABLE[6]))
  54. #define ROM_FLASHTABLE ((uint32_t *)(ROM_APITABLE[7]))
  55. #define ROM_PWMTABLE ((uint32_t *)(ROM_APITABLE[8]))
  56. #define ROM_QEITABLE ((uint32_t *)(ROM_APITABLE[9]))
  57. #define ROM_SYSTICKTABLE ((uint32_t *)(ROM_APITABLE[10]))
  58. #define ROM_TIMERTABLE ((uint32_t *)(ROM_APITABLE[11]))
  59. #define ROM_WATCHDOGTABLE ((uint32_t *)(ROM_APITABLE[12]))
  60. #define ROM_SYSCTLTABLE ((uint32_t *)(ROM_APITABLE[13]))
  61. #define ROM_INTERRUPTTABLE ((uint32_t *)(ROM_APITABLE[14]))
  62. #define ROM_USBTABLE ((uint32_t *)(ROM_APITABLE[16]))
  63. #define ROM_UDMATABLE ((uint32_t *)(ROM_APITABLE[17]))
  64. #define ROM_CANTABLE ((uint32_t *)(ROM_APITABLE[18]))
  65. #define ROM_HIBERNATETABLE ((uint32_t *)(ROM_APITABLE[19]))
  66. #define ROM_MPUTABLE ((uint32_t *)(ROM_APITABLE[20]))
  67. #define ROM_SOFTWARETABLE ((uint32_t *)(ROM_APITABLE[21]))
  68. #define ROM_EPITABLE ((uint32_t *)(ROM_APITABLE[23]))
  69. #define ROM_EEPROMTABLE ((uint32_t *)(ROM_APITABLE[24]))
  70. #define ROM_FPUTABLE ((uint32_t *)(ROM_APITABLE[26]))
  71. #define ROM_SMBUSTABLE ((uint32_t *)(ROM_APITABLE[29]))
  72. #define ROM_SYSEXCTABLE ((uint32_t *)(ROM_APITABLE[30]))
  73. #define ROM_ONEWIRETABLE ((uint32_t *)(ROM_APITABLE[34]))
  74. #define ROM_SPIFLASHTABLE ((uint32_t *)(ROM_APITABLE[38]))
  75. #define ROM_LCDTABLE ((uint32_t *)(ROM_APITABLE[41]))
  76. #define ROM_EMACTABLE ((uint32_t *)(ROM_APITABLE[42]))
  77. #define ROM_AESTABLE ((uint32_t *)(ROM_APITABLE[43]))
  78. #define ROM_CRCTABLE ((uint32_t *)(ROM_APITABLE[44]))
  79. #define ROM_DESTABLE ((uint32_t *)(ROM_APITABLE[45]))
  80. #define ROM_SHAMD5TABLE ((uint32_t *)(ROM_APITABLE[46]))
  81. //*****************************************************************************
  82. //
  83. // Macros for calling ROM functions in the ADC API.
  84. //
  85. //*****************************************************************************
  86. #define ROM_ADCSequenceDataGet \
  87. ((int32_t (*)(uint32_t ui32Base, \
  88. uint32_t ui32SequenceNum, \
  89. uint32_t *pui32Buffer))ROM_ADCTABLE[0])
  90. #define ROM_ADCIntDisable \
  91. ((void (*)(uint32_t ui32Base, \
  92. uint32_t ui32SequenceNum))ROM_ADCTABLE[1])
  93. #define ROM_ADCIntEnable \
  94. ((void (*)(uint32_t ui32Base, \
  95. uint32_t ui32SequenceNum))ROM_ADCTABLE[2])
  96. #define ROM_ADCIntStatus \
  97. ((uint32_t (*)(uint32_t ui32Base, \
  98. uint32_t ui32SequenceNum, \
  99. bool bMasked))ROM_ADCTABLE[3])
  100. #define ROM_ADCIntClear \
  101. ((void (*)(uint32_t ui32Base, \
  102. uint32_t ui32SequenceNum))ROM_ADCTABLE[4])
  103. #define ROM_ADCSequenceEnable \
  104. ((void (*)(uint32_t ui32Base, \
  105. uint32_t ui32SequenceNum))ROM_ADCTABLE[5])
  106. #define ROM_ADCSequenceDisable \
  107. ((void (*)(uint32_t ui32Base, \
  108. uint32_t ui32SequenceNum))ROM_ADCTABLE[6])
  109. #define ROM_ADCSequenceConfigure \
  110. ((void (*)(uint32_t ui32Base, \
  111. uint32_t ui32SequenceNum, \
  112. uint32_t ui32Trigger, \
  113. uint32_t ui32Priority))ROM_ADCTABLE[7])
  114. #define ROM_ADCSequenceOverflow \
  115. ((int32_t (*)(uint32_t ui32Base, \
  116. uint32_t ui32SequenceNum))ROM_ADCTABLE[9])
  117. #define ROM_ADCSequenceOverflowClear \
  118. ((void (*)(uint32_t ui32Base, \
  119. uint32_t ui32SequenceNum))ROM_ADCTABLE[10])
  120. #define ROM_ADCSequenceUnderflow \
  121. ((int32_t (*)(uint32_t ui32Base, \
  122. uint32_t ui32SequenceNum))ROM_ADCTABLE[11])
  123. #define ROM_ADCSequenceUnderflowClear \
  124. ((void (*)(uint32_t ui32Base, \
  125. uint32_t ui32SequenceNum))ROM_ADCTABLE[12])
  126. #define ROM_ADCProcessorTrigger \
  127. ((void (*)(uint32_t ui32Base, \
  128. uint32_t ui32SequenceNum))ROM_ADCTABLE[13])
  129. #define ROM_ADCHardwareOversampleConfigure \
  130. ((void (*)(uint32_t ui32Base, \
  131. uint32_t ui32Factor))ROM_ADCTABLE[14])
  132. #define ROM_ADCComparatorConfigure \
  133. ((void (*)(uint32_t ui32Base, \
  134. uint32_t ui32Comp, \
  135. uint32_t ui32Config))ROM_ADCTABLE[15])
  136. #define ROM_ADCComparatorRegionSet \
  137. ((void (*)(uint32_t ui32Base, \
  138. uint32_t ui32Comp, \
  139. uint32_t ui32LowRef, \
  140. uint32_t ui32HighRef))ROM_ADCTABLE[16])
  141. #define ROM_ADCComparatorReset \
  142. ((void (*)(uint32_t ui32Base, \
  143. uint32_t ui32Comp, \
  144. bool bTrigger, \
  145. bool bInterrupt))ROM_ADCTABLE[17])
  146. #define ROM_ADCComparatorIntDisable \
  147. ((void (*)(uint32_t ui32Base, \
  148. uint32_t ui32SequenceNum))ROM_ADCTABLE[18])
  149. #define ROM_ADCComparatorIntEnable \
  150. ((void (*)(uint32_t ui32Base, \
  151. uint32_t ui32SequenceNum))ROM_ADCTABLE[19])
  152. #define ROM_ADCComparatorIntStatus \
  153. ((uint32_t (*)(uint32_t ui32Base))ROM_ADCTABLE[20])
  154. #define ROM_ADCComparatorIntClear \
  155. ((void (*)(uint32_t ui32Base, \
  156. uint32_t ui32Status))ROM_ADCTABLE[21])
  157. #define ROM_ADCReferenceSet \
  158. ((void (*)(uint32_t ui32Base, \
  159. uint32_t ui32Ref))ROM_ADCTABLE[22])
  160. #define ROM_ADCReferenceGet \
  161. ((uint32_t (*)(uint32_t ui32Base))ROM_ADCTABLE[23])
  162. #define ROM_ADCPhaseDelaySet \
  163. ((void (*)(uint32_t ui32Base, \
  164. uint32_t ui32Phase))ROM_ADCTABLE[24])
  165. #define ROM_ADCPhaseDelayGet \
  166. ((uint32_t (*)(uint32_t ui32Base))ROM_ADCTABLE[25])
  167. #define ROM_ADCIntDisableEx \
  168. ((void (*)(uint32_t ui32Base, \
  169. uint32_t ui32IntFlags))ROM_ADCTABLE[29])
  170. #define ROM_ADCIntEnableEx \
  171. ((void (*)(uint32_t ui32Base, \
  172. uint32_t ui32IntFlags))ROM_ADCTABLE[30])
  173. #define ROM_ADCIntStatusEx \
  174. ((uint32_t (*)(uint32_t ui32Base, \
  175. bool bMasked))ROM_ADCTABLE[31])
  176. #define ROM_ADCSequenceDMAEnable \
  177. ((void (*)(uint32_t ui32Base, \
  178. uint32_t ui32SequenceNum))ROM_ADCTABLE[32])
  179. #define ROM_ADCSequenceDMADisable \
  180. ((void (*)(uint32_t ui32Base, \
  181. uint32_t ui32SequenceNum))ROM_ADCTABLE[33])
  182. #define ROM_ADCBusy \
  183. ((bool (*)(uint32_t ui32Base))ROM_ADCTABLE[34])
  184. //*****************************************************************************
  185. //
  186. // Macros for calling ROM functions in the AES API.
  187. //
  188. //*****************************************************************************
  189. #define ROM_AESIntStatus \
  190. ((uint32_t (*)(uint32_t ui32Base, \
  191. bool bMasked))ROM_AESTABLE[0])
  192. #define ROM_AESAuthLengthSet \
  193. ((void (*)(uint32_t ui32Base, \
  194. uint32_t ui32Length))ROM_AESTABLE[1])
  195. #define ROM_AESConfigSet \
  196. ((void (*)(uint32_t ui32Base, \
  197. uint32_t ui32Config))ROM_AESTABLE[2])
  198. #define ROM_AESDataAuth \
  199. ((bool (*)(uint32_t ui32Base, \
  200. uint32_t *pui32Src, \
  201. uint32_t ui32Length, \
  202. uint32_t *pui32Tag))ROM_AESTABLE[3])
  203. #define ROM_AESDataProcess \
  204. ((bool (*)(uint32_t ui32Base, \
  205. uint32_t *pui32Src, \
  206. uint32_t *pui32Dest, \
  207. uint32_t ui32Length))ROM_AESTABLE[4])
  208. #define ROM_AESDataProcessAuth \
  209. ((bool (*)(uint32_t ui32Base, \
  210. uint32_t *pui32Src, \
  211. uint32_t *pui32Dest, \
  212. uint32_t ui32Length, \
  213. uint32_t *pui32AuthSrc, \
  214. uint32_t ui32AuthLength, \
  215. uint32_t *pui32Tag))ROM_AESTABLE[5])
  216. #define ROM_AESDataRead \
  217. ((void (*)(uint32_t ui32Base, \
  218. uint32_t *pui32Dest))ROM_AESTABLE[6])
  219. #define ROM_AESDataReadNonBlocking \
  220. ((bool (*)(uint32_t ui32Base, \
  221. uint32_t *pui32Dest))ROM_AESTABLE[7])
  222. #define ROM_AESDataWrite \
  223. ((void (*)(uint32_t ui32Base, \
  224. uint32_t *pui32Src))ROM_AESTABLE[8])
  225. #define ROM_AESDataWriteNonBlocking \
  226. ((bool (*)(uint32_t ui32Base, \
  227. uint32_t *pui32Src))ROM_AESTABLE[9])
  228. #define ROM_AESDMADisable \
  229. ((void (*)(uint32_t ui32Base, \
  230. uint32_t ui32Flags))ROM_AESTABLE[10])
  231. #define ROM_AESDMAEnable \
  232. ((void (*)(uint32_t ui32Base, \
  233. uint32_t ui32Flags))ROM_AESTABLE[11])
  234. #define ROM_AESIntClear \
  235. ((void (*)(uint32_t ui32Base, \
  236. uint32_t ui32IntFlags))ROM_AESTABLE[12])
  237. #define ROM_AESIntDisable \
  238. ((void (*)(uint32_t ui32Base, \
  239. uint32_t ui32IntFlags))ROM_AESTABLE[13])
  240. #define ROM_AESIntEnable \
  241. ((void (*)(uint32_t ui32Base, \
  242. uint32_t ui32IntFlags))ROM_AESTABLE[14])
  243. #define ROM_AESIVSet \
  244. ((void (*)(uint32_t ui32Base, \
  245. uint32_t *pui32IVdata))ROM_AESTABLE[15])
  246. #define ROM_AESKey1Set \
  247. ((void (*)(uint32_t ui32Base, \
  248. uint32_t *pui32Key, \
  249. uint32_t ui32Keysize))ROM_AESTABLE[16])
  250. #define ROM_AESKey2Set \
  251. ((void (*)(uint32_t ui32Base, \
  252. uint32_t *pui32Key, \
  253. uint32_t ui32Keysize))ROM_AESTABLE[17])
  254. #define ROM_AESKey3Set \
  255. ((void (*)(uint32_t ui32Base, \
  256. uint32_t *pui32Key))ROM_AESTABLE[18])
  257. #define ROM_AESLengthSet \
  258. ((void (*)(uint32_t ui32Base, \
  259. uint64_t ui64Length))ROM_AESTABLE[19])
  260. #define ROM_AESReset \
  261. ((void (*)(uint32_t ui32Base))ROM_AESTABLE[20])
  262. #define ROM_AESTagRead \
  263. ((void (*)(uint32_t ui32Base, \
  264. uint32_t *pui32TagData))ROM_AESTABLE[21])
  265. #define ROM_AESIVRead \
  266. ((void (*)(uint32_t ui32Base, \
  267. uint32_t *pui32IVdata))ROM_AESTABLE[22])
  268. //*****************************************************************************
  269. //
  270. // Macros for calling ROM functions in the CAN API.
  271. //
  272. //*****************************************************************************
  273. #define ROM_CANIntClear \
  274. ((void (*)(uint32_t ui32Base, \
  275. uint32_t ui32IntClr))ROM_CANTABLE[0])
  276. #define ROM_CANInit \
  277. ((void (*)(uint32_t ui32Base))ROM_CANTABLE[1])
  278. #define ROM_CANEnable \
  279. ((void (*)(uint32_t ui32Base))ROM_CANTABLE[2])
  280. #define ROM_CANDisable \
  281. ((void (*)(uint32_t ui32Base))ROM_CANTABLE[3])
  282. #define ROM_CANBitTimingSet \
  283. ((void (*)(uint32_t ui32Base, \
  284. tCANBitClkParms *psClkParms))ROM_CANTABLE[4])
  285. #define ROM_CANBitTimingGet \
  286. ((void (*)(uint32_t ui32Base, \
  287. tCANBitClkParms *psClkParms))ROM_CANTABLE[5])
  288. #define ROM_CANMessageSet \
  289. ((void (*)(uint32_t ui32Base, \
  290. uint32_t ui32ObjID, \
  291. tCANMsgObject *psMsgObject, \
  292. tMsgObjType eMsgType))ROM_CANTABLE[6])
  293. #define ROM_CANMessageGet \
  294. ((void (*)(uint32_t ui32Base, \
  295. uint32_t ui32ObjID, \
  296. tCANMsgObject *psMsgObject, \
  297. bool bClrPendingInt))ROM_CANTABLE[7])
  298. #define ROM_CANStatusGet \
  299. ((uint32_t (*)(uint32_t ui32Base, \
  300. tCANStsReg eStatusReg))ROM_CANTABLE[8])
  301. #define ROM_CANMessageClear \
  302. ((void (*)(uint32_t ui32Base, \
  303. uint32_t ui32ObjID))ROM_CANTABLE[9])
  304. #define ROM_CANIntEnable \
  305. ((void (*)(uint32_t ui32Base, \
  306. uint32_t ui32IntFlags))ROM_CANTABLE[10])
  307. #define ROM_CANIntDisable \
  308. ((void (*)(uint32_t ui32Base, \
  309. uint32_t ui32IntFlags))ROM_CANTABLE[11])
  310. #define ROM_CANIntStatus \
  311. ((uint32_t (*)(uint32_t ui32Base, \
  312. tCANIntStsReg eIntStsReg))ROM_CANTABLE[12])
  313. #define ROM_CANRetryGet \
  314. ((bool (*)(uint32_t ui32Base))ROM_CANTABLE[13])
  315. #define ROM_CANRetrySet \
  316. ((void (*)(uint32_t ui32Base, \
  317. bool bAutoRetry))ROM_CANTABLE[14])
  318. #define ROM_CANErrCntrGet \
  319. ((bool (*)(uint32_t ui32Base, \
  320. uint32_t *pui32RxCount, \
  321. uint32_t *pui32TxCount))ROM_CANTABLE[15])
  322. #define ROM_CANBitRateSet \
  323. ((uint32_t (*)(uint32_t ui32Base, \
  324. uint32_t ui32SourceClock, \
  325. uint32_t ui32BitRate))ROM_CANTABLE[16])
  326. //*****************************************************************************
  327. //
  328. // Macros for calling ROM functions in the Comparator API.
  329. //
  330. //*****************************************************************************
  331. #define ROM_ComparatorIntClear \
  332. ((void (*)(uint32_t ui32Base, \
  333. uint32_t ui32Comp))ROM_COMPARATORTABLE[0])
  334. #define ROM_ComparatorConfigure \
  335. ((void (*)(uint32_t ui32Base, \
  336. uint32_t ui32Comp, \
  337. uint32_t ui32Config))ROM_COMPARATORTABLE[1])
  338. #define ROM_ComparatorRefSet \
  339. ((void (*)(uint32_t ui32Base, \
  340. uint32_t ui32Ref))ROM_COMPARATORTABLE[2])
  341. #define ROM_ComparatorValueGet \
  342. ((bool (*)(uint32_t ui32Base, \
  343. uint32_t ui32Comp))ROM_COMPARATORTABLE[3])
  344. #define ROM_ComparatorIntEnable \
  345. ((void (*)(uint32_t ui32Base, \
  346. uint32_t ui32Comp))ROM_COMPARATORTABLE[4])
  347. #define ROM_ComparatorIntDisable \
  348. ((void (*)(uint32_t ui32Base, \
  349. uint32_t ui32Comp))ROM_COMPARATORTABLE[5])
  350. #define ROM_ComparatorIntStatus \
  351. ((bool (*)(uint32_t ui32Base, \
  352. uint32_t ui32Comp, \
  353. bool bMasked))ROM_COMPARATORTABLE[6])
  354. //*****************************************************************************
  355. //
  356. // Macros for calling ROM functions in the CRC API.
  357. //
  358. //*****************************************************************************
  359. #define ROM_CRCConfigSet \
  360. ((void (*)(uint32_t ui32Base, \
  361. uint32_t ui32CRCConfig))ROM_CRCTABLE[0])
  362. #define ROM_CRCDataProcess \
  363. ((uint32_t (*)(uint32_t ui32Base, \
  364. uint32_t *pui32DataIn, \
  365. uint32_t ui32DataLength, \
  366. bool bPPResult))ROM_CRCTABLE[1])
  367. #define ROM_CRCDataWrite \
  368. ((void (*)(uint32_t ui32Base, \
  369. uint32_t ui32Data))ROM_CRCTABLE[2])
  370. #define ROM_CRCResultRead \
  371. ((uint32_t (*)(uint32_t ui32Base, \
  372. bool bPPResult))ROM_CRCTABLE[3])
  373. #define ROM_CRCSeedSet \
  374. ((void (*)(uint32_t ui32Base, \
  375. uint32_t ui32Seed))ROM_CRCTABLE[4])
  376. //*****************************************************************************
  377. //
  378. // Macros for calling ROM functions in the DES API.
  379. //
  380. //*****************************************************************************
  381. #define ROM_DESIntStatus \
  382. ((uint32_t (*)(uint32_t ui32Base, \
  383. bool bMasked))ROM_DESTABLE[0])
  384. #define ROM_DESConfigSet \
  385. ((void (*)(uint32_t ui32Base, \
  386. uint32_t ui32Config))ROM_DESTABLE[1])
  387. #define ROM_DESDataRead \
  388. ((void (*)(uint32_t ui32Base, \
  389. uint32_t *pui32Dest))ROM_DESTABLE[2])
  390. #define ROM_DESDataReadNonBlocking \
  391. ((bool (*)(uint32_t ui32Base, \
  392. uint32_t *pui32Dest))ROM_DESTABLE[3])
  393. #define ROM_DESDataProcess \
  394. ((bool (*)(uint32_t ui32Base, \
  395. uint32_t *pui32Src, \
  396. uint32_t *pui32Dest, \
  397. uint32_t ui32Length))ROM_DESTABLE[4])
  398. #define ROM_DESDataWrite \
  399. ((void (*)(uint32_t ui32Base, \
  400. uint32_t *pui32Src))ROM_DESTABLE[5])
  401. #define ROM_DESDataWriteNonBlocking \
  402. ((bool (*)(uint32_t ui32Base, \
  403. uint32_t *pui32Src))ROM_DESTABLE[6])
  404. #define ROM_DESDMADisable \
  405. ((void (*)(uint32_t ui32Base, \
  406. uint32_t ui32Flags))ROM_DESTABLE[7])
  407. #define ROM_DESDMAEnable \
  408. ((void (*)(uint32_t ui32Base, \
  409. uint32_t ui32Flags))ROM_DESTABLE[8])
  410. #define ROM_DESIntClear \
  411. ((void (*)(uint32_t ui32Base, \
  412. uint32_t ui32IntFlags))ROM_DESTABLE[9])
  413. #define ROM_DESIntDisable \
  414. ((void (*)(uint32_t ui32Base, \
  415. uint32_t ui32IntFlags))ROM_DESTABLE[10])
  416. #define ROM_DESIntEnable \
  417. ((void (*)(uint32_t ui32Base, \
  418. uint32_t ui32IntFlags))ROM_DESTABLE[11])
  419. #define ROM_DESIVSet \
  420. ((bool (*)(uint32_t ui32Base, \
  421. uint32_t *pui32IVdata))ROM_DESTABLE[12])
  422. #define ROM_DESKeySet \
  423. ((void (*)(uint32_t ui32Base, \
  424. uint32_t *pui32Key))ROM_DESTABLE[13])
  425. #define ROM_DESLengthSet \
  426. ((void (*)(uint32_t ui32Base, \
  427. uint32_t ui32Length))ROM_DESTABLE[14])
  428. #define ROM_DESReset \
  429. ((void (*)(uint32_t ui32Base))ROM_DESTABLE[15])
  430. //*****************************************************************************
  431. //
  432. // Macros for calling ROM functions in the EEPROM API.
  433. //
  434. //*****************************************************************************
  435. #define ROM_EEPROMRead \
  436. ((void (*)(uint32_t *pui32Data, \
  437. uint32_t ui32Address, \
  438. uint32_t ui32Count))ROM_EEPROMTABLE[0])
  439. #define ROM_EEPROMBlockCountGet \
  440. ((uint32_t (*)(void))ROM_EEPROMTABLE[1])
  441. #define ROM_EEPROMBlockHide \
  442. ((void (*)(uint32_t ui32Block))ROM_EEPROMTABLE[2])
  443. #define ROM_EEPROMBlockLock \
  444. ((uint32_t (*)(uint32_t ui32Block))ROM_EEPROMTABLE[3])
  445. #define ROM_EEPROMBlockPasswordSet \
  446. ((uint32_t (*)(uint32_t ui32Block, \
  447. uint32_t *pui32Password, \
  448. uint32_t ui32Count))ROM_EEPROMTABLE[4])
  449. #define ROM_EEPROMBlockProtectGet \
  450. ((uint32_t (*)(uint32_t ui32Block))ROM_EEPROMTABLE[5])
  451. #define ROM_EEPROMBlockProtectSet \
  452. ((uint32_t (*)(uint32_t ui32Block, \
  453. uint32_t ui32Protect))ROM_EEPROMTABLE[6])
  454. #define ROM_EEPROMBlockUnlock \
  455. ((uint32_t (*)(uint32_t ui32Block, \
  456. uint32_t *pui32Password, \
  457. uint32_t ui32Count))ROM_EEPROMTABLE[7])
  458. #define ROM_EEPROMIntClear \
  459. ((void (*)(uint32_t ui32IntFlags))ROM_EEPROMTABLE[8])
  460. #define ROM_EEPROMIntDisable \
  461. ((void (*)(uint32_t ui32IntFlags))ROM_EEPROMTABLE[9])
  462. #define ROM_EEPROMIntEnable \
  463. ((void (*)(uint32_t ui32IntFlags))ROM_EEPROMTABLE[10])
  464. #define ROM_EEPROMIntStatus \
  465. ((uint32_t (*)(bool bMasked))ROM_EEPROMTABLE[11])
  466. #define ROM_EEPROMProgram \
  467. ((uint32_t (*)(uint32_t *pui32Data, \
  468. uint32_t ui32Address, \
  469. uint32_t ui32Count))ROM_EEPROMTABLE[13])
  470. #define ROM_EEPROMProgramNonBlocking \
  471. ((uint32_t (*)(uint32_t ui32Data, \
  472. uint32_t ui32Address))ROM_EEPROMTABLE[14])
  473. #define ROM_EEPROMSizeGet \
  474. ((uint32_t (*)(void))ROM_EEPROMTABLE[15])
  475. #define ROM_EEPROMStatusGet \
  476. ((uint32_t (*)(void))ROM_EEPROMTABLE[16])
  477. #define ROM_EEPROMInit \
  478. ((uint32_t (*)(void))ROM_EEPROMTABLE[17])
  479. //*****************************************************************************
  480. //
  481. // Macros for calling ROM functions in the EPI API.
  482. //
  483. //*****************************************************************************
  484. #define ROM_EPIIntStatus \
  485. ((uint32_t (*)(uint32_t ui32Base, \
  486. bool bMasked))ROM_EPITABLE[0])
  487. #define ROM_EPIModeSet \
  488. ((void (*)(uint32_t ui32Base, \
  489. uint32_t ui32Mode))ROM_EPITABLE[1])
  490. #define ROM_EPIDividerSet \
  491. ((void (*)(uint32_t ui32Base, \
  492. uint32_t ui32Divider))ROM_EPITABLE[2])
  493. #define ROM_EPIConfigSDRAMSet \
  494. ((void (*)(uint32_t ui32Base, \
  495. uint32_t ui32Config, \
  496. uint32_t ui32Refresh))ROM_EPITABLE[3])
  497. #define ROM_EPIConfigGPModeSet \
  498. ((void (*)(uint32_t ui32Base, \
  499. uint32_t ui32Config, \
  500. uint32_t ui32FrameCount, \
  501. uint32_t ui32MaxWait))ROM_EPITABLE[4])
  502. #define ROM_EPIConfigHB8Set \
  503. ((void (*)(uint32_t ui32Base, \
  504. uint32_t ui32Config, \
  505. uint32_t ui32MaxWait))ROM_EPITABLE[5])
  506. #define ROM_EPIConfigHB16Set \
  507. ((void (*)(uint32_t ui32Base, \
  508. uint32_t ui32Config, \
  509. uint32_t ui32MaxWait))ROM_EPITABLE[6])
  510. #define ROM_EPIAddressMapSet \
  511. ((void (*)(uint32_t ui32Base, \
  512. uint32_t ui32Map))ROM_EPITABLE[7])
  513. #define ROM_EPINonBlockingReadConfigure \
  514. ((void (*)(uint32_t ui32Base, \
  515. uint32_t ui32Channel, \
  516. uint32_t ui32DataSize, \
  517. uint32_t ui32Address))ROM_EPITABLE[8])
  518. #define ROM_EPINonBlockingReadStart \
  519. ((void (*)(uint32_t ui32Base, \
  520. uint32_t ui32Channel, \
  521. uint32_t ui32Count))ROM_EPITABLE[9])
  522. #define ROM_EPINonBlockingReadStop \
  523. ((void (*)(uint32_t ui32Base, \
  524. uint32_t ui32Channel))ROM_EPITABLE[10])
  525. #define ROM_EPINonBlockingReadCount \
  526. ((uint32_t (*)(uint32_t ui32Base, \
  527. uint32_t ui32Channel))ROM_EPITABLE[11])
  528. #define ROM_EPINonBlockingReadAvail \
  529. ((uint32_t (*)(uint32_t ui32Base))ROM_EPITABLE[12])
  530. #define ROM_EPINonBlockingReadGet32 \
  531. ((uint32_t (*)(uint32_t ui32Base, \
  532. uint32_t ui32Count, \
  533. uint32_t *pui32Buf))ROM_EPITABLE[13])
  534. #define ROM_EPINonBlockingReadGet16 \
  535. ((uint32_t (*)(uint32_t ui32Base, \
  536. uint32_t ui32Count, \
  537. uint16_t *pui16Buf))ROM_EPITABLE[14])
  538. #define ROM_EPINonBlockingReadGet8 \
  539. ((uint32_t (*)(uint32_t ui32Base, \
  540. uint32_t ui32Count, \
  541. uint8_t *pui8Buf))ROM_EPITABLE[15])
  542. #define ROM_EPIFIFOConfig \
  543. ((void (*)(uint32_t ui32Base, \
  544. uint32_t ui32Config))ROM_EPITABLE[16])
  545. #define ROM_EPIWriteFIFOCountGet \
  546. ((uint32_t (*)(uint32_t ui32Base))ROM_EPITABLE[17])
  547. #define ROM_EPIIntEnable \
  548. ((void (*)(uint32_t ui32Base, \
  549. uint32_t ui32IntFlags))ROM_EPITABLE[18])
  550. #define ROM_EPIIntDisable \
  551. ((void (*)(uint32_t ui32Base, \
  552. uint32_t ui32IntFlags))ROM_EPITABLE[19])
  553. #define ROM_EPIIntErrorStatus \
  554. ((uint32_t (*)(uint32_t ui32Base))ROM_EPITABLE[20])
  555. #define ROM_EPIIntErrorClear \
  556. ((void (*)(uint32_t ui32Base, \
  557. uint32_t ui32ErrFlags))ROM_EPITABLE[21])
  558. #define ROM_EPIDividerCSSet \
  559. ((void (*)(uint32_t ui32Base, \
  560. uint32_t ui32CS, \
  561. uint32_t ui32Divider))ROM_EPITABLE[22])
  562. #define ROM_EPIConfigHB8CSSet \
  563. ((void (*)(uint32_t ui32Base, \
  564. uint32_t ui32CS, \
  565. uint32_t ui32Config))ROM_EPITABLE[24])
  566. #define ROM_EPIConfigHB16CSSet \
  567. ((void (*)(uint32_t ui32Base, \
  568. uint32_t ui32CS, \
  569. uint32_t ui32Config))ROM_EPITABLE[25])
  570. #define ROM_EPIConfigHB8TimingSet \
  571. ((void (*)(uint32_t ui32Base, \
  572. uint32_t ui32CS, \
  573. uint32_t ui32Config))ROM_EPITABLE[26])
  574. #define ROM_EPIConfigHB16TimingSet \
  575. ((void (*)(uint32_t ui32Base, \
  576. uint32_t ui32CS, \
  577. uint32_t ui32Config))ROM_EPITABLE[27])
  578. #define ROM_EPIPSRAMConfigRegSet \
  579. ((void (*)(uint32_t ui32Base, \
  580. uint32_t ui32CS, \
  581. uint32_t ui32CR))ROM_EPITABLE[28])
  582. #define ROM_EPIPSRAMConfigRegRead \
  583. ((void (*)(uint32_t ui32Base, \
  584. uint32_t ui32CS))ROM_EPITABLE[29])
  585. #define ROM_EPIPSRAMConfigRegGetNonBlocking \
  586. ((bool (*)(uint32_t ui32Base, \
  587. uint32_t ui32CS, \
  588. uint32_t *pui32CR))ROM_EPITABLE[30])
  589. #define ROM_EPIPSRAMConfigRegGet \
  590. ((uint32_t (*)(uint32_t ui32Base, \
  591. uint32_t ui32CS))ROM_EPITABLE[31])
  592. //*****************************************************************************
  593. //
  594. // Macros for calling ROM functions in the EMAC API.
  595. //
  596. //*****************************************************************************
  597. #define ROM_EMACIntStatus \
  598. ((uint32_t (*)(uint32_t ui32Base, \
  599. bool bMasked))ROM_EMACTABLE[0])
  600. #define ROM_EMACAddrGet \
  601. ((void (*)(uint32_t ui32Base, \
  602. uint32_t ui32Index, \
  603. uint8_t *pui8MACAddr))ROM_EMACTABLE[1])
  604. #define ROM_EMACAddrSet \
  605. ((void (*)(uint32_t ui32Base, \
  606. uint32_t ui32Index, \
  607. const uint8_t *pui8MACAddr))ROM_EMACTABLE[2])
  608. #define ROM_EMACConfigGet \
  609. ((void (*)(uint32_t ui32Base, \
  610. uint32_t *pui32Config, \
  611. uint32_t *pui32Mode, \
  612. uint32_t *pui32RxMaxFrameSize))ROM_EMACTABLE[3])
  613. #define ROM_EMACConfigSet \
  614. ((void (*)(uint32_t ui32Base, \
  615. uint32_t ui32Config, \
  616. uint32_t ui32ModeFlags, \
  617. uint32_t ui32RxMaxFrameSize))ROM_EMACTABLE[4])
  618. #define ROM_EMACDMAStateGet \
  619. ((uint32_t (*)(uint32_t ui32Base))ROM_EMACTABLE[5])
  620. #define ROM_EMACFrameFilterGet \
  621. ((uint32_t (*)(uint32_t ui32Base))ROM_EMACTABLE[6])
  622. #define ROM_EMACFrameFilterSet \
  623. ((void (*)(uint32_t ui32Base, \
  624. uint32_t ui32FilterOpts))ROM_EMACTABLE[7])
  625. #define ROM_EMACInit \
  626. ((void (*)(uint32_t ui32Base, \
  627. uint32_t ui32SysClk, \
  628. uint32_t ui32BusConfig, \
  629. uint32_t ui32RxBurst, \
  630. uint32_t ui32TxBurst, \
  631. uint32_t ui32DescSkipSize))ROM_EMACTABLE[8])
  632. #define ROM_EMACIntClear \
  633. ((void (*)(uint32_t ui32Base, \
  634. uint32_t ui32IntFlags))ROM_EMACTABLE[9])
  635. #define ROM_EMACIntDisable \
  636. ((void (*)(uint32_t ui32Base, \
  637. uint32_t ui32IntFlags))ROM_EMACTABLE[10])
  638. #define ROM_EMACIntEnable \
  639. ((void (*)(uint32_t ui32Base, \
  640. uint32_t ui32IntFlags))ROM_EMACTABLE[11])
  641. #define ROM_EMACPHYConfigSet \
  642. ((void (*)(uint32_t ui32Base, \
  643. uint32_t ui32Config))ROM_EMACTABLE[12])
  644. #define ROM_EMACPHYPowerOff \
  645. ((void (*)(uint32_t ui32Base, \
  646. uint8_t ui8PhyAddr))ROM_EMACTABLE[13])
  647. #define ROM_EMACPHYPowerOn \
  648. ((void (*)(uint32_t ui32Base, \
  649. uint8_t ui8PhyAddr))ROM_EMACTABLE[14])
  650. #define ROM_EMACPHYRead \
  651. ((uint16_t (*)(uint32_t ui32Base, \
  652. uint8_t ui8PhyAddr, \
  653. uint8_t ui8RegAddr))ROM_EMACTABLE[15])
  654. #define ROM_EMACPHYWrite \
  655. ((void (*)(uint32_t ui32Base, \
  656. uint8_t ui8PhyAddr, \
  657. uint8_t ui8RegAddr, \
  658. uint16_t ui16Data))ROM_EMACTABLE[16])
  659. #define ROM_EMACReset \
  660. ((void (*)(uint32_t ui32Base))ROM_EMACTABLE[17])
  661. #define ROM_EMACRxDisable \
  662. ((void (*)(uint32_t ui32Base))ROM_EMACTABLE[18])
  663. #define ROM_EMACRxDMACurrentBufferGet \
  664. ((uint8_t * (*)(uint32_t ui32Base))ROM_EMACTABLE[19])
  665. #define ROM_EMACRxDMACurrentDescriptorGet \
  666. ((tEMACDMADescriptor * (*)(uint32_t ui32Base))ROM_EMACTABLE[20])
  667. #define ROM_EMACRxDMADescriptorListGet \
  668. ((tEMACDMADescriptor * (*)(uint32_t ui32Base))ROM_EMACTABLE[21])
  669. #define ROM_EMACRxDMADescriptorListSet \
  670. ((void (*)(uint32_t ui32Base, \
  671. tEMACDMADescriptor *pDescriptor))ROM_EMACTABLE[22])
  672. #define ROM_EMACRxDMAPollDemand \
  673. ((void (*)(uint32_t ui32Base))ROM_EMACTABLE[23])
  674. #define ROM_EMACRxEnable \
  675. ((void (*)(uint32_t ui32Base))ROM_EMACTABLE[24])
  676. #define ROM_EMACRxWatchdogTimerSet \
  677. ((void (*)(uint32_t ui32Base, \
  678. uint8_t ui8Timeout))ROM_EMACTABLE[25])
  679. #define ROM_EMACStatusGet \
  680. ((uint32_t (*)(uint32_t ui32Base))ROM_EMACTABLE[26])
  681. #define ROM_EMACTxDisable \
  682. ((void (*)(uint32_t ui32Base))ROM_EMACTABLE[27])
  683. #define ROM_EMACTxDMACurrentBufferGet \
  684. ((uint8_t * (*)(uint32_t ui32Base))ROM_EMACTABLE[28])
  685. #define ROM_EMACTxDMACurrentDescriptorGet \
  686. ((tEMACDMADescriptor * (*)(uint32_t ui32Base))ROM_EMACTABLE[29])
  687. #define ROM_EMACTxDMADescriptorListGet \
  688. ((tEMACDMADescriptor * (*)(uint32_t ui32Base))ROM_EMACTABLE[30])
  689. #define ROM_EMACTxDMADescriptorListSet \
  690. ((void (*)(uint32_t ui32Base, \
  691. tEMACDMADescriptor *pDescriptor))ROM_EMACTABLE[31])
  692. #define ROM_EMACTxDMAPollDemand \
  693. ((void (*)(uint32_t ui32Base))ROM_EMACTABLE[32])
  694. #define ROM_EMACTxEnable \
  695. ((void (*)(uint32_t ui32Base))ROM_EMACTABLE[33])
  696. #define ROM_EMACTxFlush \
  697. ((void (*)(uint32_t ui32Base))ROM_EMACTABLE[34])
  698. #define ROM_EMACAddrFilterGet \
  699. ((uint32_t (*)(uint32_t ui32Base, \
  700. uint32_t ui32Index))ROM_EMACTABLE[35])
  701. #define ROM_EMACAddrFilterSet \
  702. ((void (*)(uint32_t ui32Base, \
  703. uint32_t ui32Index, \
  704. uint32_t ui32Config))ROM_EMACTABLE[36])
  705. #define ROM_EMACHashFilterBitCalculate \
  706. ((uint32_t (*)(uint8_t *pui8MACAddr))ROM_EMACTABLE[37])
  707. #define ROM_EMACHashFilterGet \
  708. ((void (*)(uint32_t ui32Base, \
  709. uint32_t *pui32HashHi, \
  710. uint32_t *pui32HashLo))ROM_EMACTABLE[38])
  711. #define ROM_EMACHashFilterSet \
  712. ((void (*)(uint32_t ui32Base, \
  713. uint32_t ui32HashHi, \
  714. uint32_t ui32HashLo))ROM_EMACTABLE[39])
  715. #define ROM_EMACNumAddrGet \
  716. ((uint32_t (*)(uint32_t ui32Base))ROM_EMACTABLE[40])
  717. #define ROM_EMACPHYExtendedRead \
  718. ((uint16_t (*)(uint32_t ui32Base, \
  719. uint8_t ui8PhyAddr, \
  720. uint16_t ui16RegAddr))ROM_EMACTABLE[41])
  721. #define ROM_EMACPHYExtendedWrite \
  722. ((void (*)(uint32_t ui32Base, \
  723. uint8_t ui8PhyAddr, \
  724. uint16_t ui16RegAddr, \
  725. uint16_t ui16Data))ROM_EMACTABLE[42])
  726. #define ROM_EMACPowerManagementControlGet \
  727. ((uint32_t (*)(uint32_t ui32Base))ROM_EMACTABLE[43])
  728. #define ROM_EMACPowerManagementControlSet \
  729. ((void (*)(uint32_t ui32Base, \
  730. uint32_t ui32Flags))ROM_EMACTABLE[44])
  731. #define ROM_EMACPowerManagementStatusGet \
  732. ((uint32_t (*)(uint32_t ui32Base))ROM_EMACTABLE[45])
  733. #define ROM_EMACRemoteWakeUpFrameFilterGet \
  734. ((void (*)(uint32_t ui32Base, \
  735. tEMACWakeUpFrameFilter *pFilter))ROM_EMACTABLE[46])
  736. #define ROM_EMACRemoteWakeUpFrameFilterSet \
  737. ((void (*)(uint32_t ui32Base, \
  738. const tEMACWakeUpFrameFilter *pFilter))ROM_EMACTABLE[47])
  739. #define ROM_EMACTimestampAddendSet \
  740. ((void (*)(uint32_t ui32Base, \
  741. uint32_t ui32Seconds))ROM_EMACTABLE[48])
  742. #define ROM_EMACTimestampConfigGet \
  743. ((uint32_t (*)(uint32_t ui32Base, \
  744. uint32_t *pui32SubSecondInc))ROM_EMACTABLE[49])
  745. #define ROM_EMACTimestampConfigSet \
  746. ((void (*)(uint32_t ui32Base, \
  747. uint32_t ui32Config, \
  748. uint32_t ui32SubSecondInc))ROM_EMACTABLE[50])
  749. #define ROM_EMACTimestampDisable \
  750. ((void (*)(uint32_t ui32Base))ROM_EMACTABLE[51])
  751. #define ROM_EMACTimestampEnable \
  752. ((void (*)(uint32_t ui32Base))ROM_EMACTABLE[52])
  753. #define ROM_EMACTimestampIntStatus \
  754. ((uint32_t (*)(uint32_t ui32Base))ROM_EMACTABLE[53])
  755. #define ROM_EMACTimestampPPSCommand \
  756. ((void (*)(uint32_t ui32Base, \
  757. uint8_t ui8Cmd))ROM_EMACTABLE[54])
  758. #define ROM_EMACTimestampPPSCommandModeSet \
  759. ((void (*)(uint32_t ui32Base, \
  760. uint32_t ui32Config))ROM_EMACTABLE[55])
  761. #define ROM_EMACTimestampPPSPeriodSet \
  762. ((void (*)(uint32_t ui32Base, \
  763. uint32_t ui32Period, \
  764. uint32_t ui32Width))ROM_EMACTABLE[56])
  765. #define ROM_EMACTimestampPPSSimpleModeSet \
  766. ((void (*)(uint32_t ui32Base, \
  767. uint32_t ui32FreqConfig))ROM_EMACTABLE[57])
  768. #define ROM_EMACTimestampSysTimeSet \
  769. ((void (*)(uint32_t ui32Base, \
  770. uint32_t ui32Seconds, \
  771. uint32_t ui32SubSeconds))ROM_EMACTABLE[59])
  772. #define ROM_EMACTimestampSysTimeUpdate \
  773. ((void (*)(uint32_t ui32Base, \
  774. uint32_t ui32Seconds, \
  775. uint32_t ui32SubSeconds, \
  776. bool bInc))ROM_EMACTABLE[60])
  777. #define ROM_EMACTimestampTargetIntDisable \
  778. ((void (*)(uint32_t ui32Base))ROM_EMACTABLE[61])
  779. #define ROM_EMACTimestampTargetIntEnable \
  780. ((void (*)(uint32_t ui32Base))ROM_EMACTABLE[62])
  781. #define ROM_EMACTimestampTargetSet \
  782. ((void (*)(uint32_t ui32Base, \
  783. uint32_t ui32Seconds, \
  784. uint32_t ui32Nanoseconds))ROM_EMACTABLE[63])
  785. #define ROM_EMACVLANHashFilterBitCalculate \
  786. ((uint32_t (*)(uint16_t ui16Tag))ROM_EMACTABLE[64])
  787. #define ROM_EMACVLANHashFilterGet \
  788. ((uint32_t (*)(uint32_t ui32Base))ROM_EMACTABLE[65])
  789. #define ROM_EMACVLANHashFilterSet \
  790. ((void (*)(uint32_t ui32Base, \
  791. uint32_t ui32Hash))ROM_EMACTABLE[66])
  792. #define ROM_EMACVLANRxConfigGet \
  793. ((uint32_t (*)(uint32_t ui32Base, \
  794. uint16_t *pui16Tag))ROM_EMACTABLE[67])
  795. #define ROM_EMACVLANRxConfigSet \
  796. ((void (*)(uint32_t ui32Base, \
  797. uint16_t ui16Tag, \
  798. uint32_t ui32Config))ROM_EMACTABLE[68])
  799. #define ROM_EMACVLANTxConfigGet \
  800. ((uint32_t (*)(uint32_t ui32Base, \
  801. uint16_t *pui16Tag))ROM_EMACTABLE[69])
  802. #define ROM_EMACVLANTxConfigSet \
  803. ((void (*)(uint32_t ui32Base, \
  804. uint16_t ui16Tag, \
  805. uint32_t ui32Config))ROM_EMACTABLE[70])
  806. #define ROM_UpdateEMAC \
  807. ((void (*)(uint32_t ui32Clock))ROM_EMACTABLE[71])
  808. //*****************************************************************************
  809. //
  810. // Macros for calling ROM functions in the Flash API.
  811. //
  812. //*****************************************************************************
  813. #define ROM_FlashProgram \
  814. ((int32_t (*)(uint32_t *pui32Data, \
  815. uint32_t ui32Address, \
  816. uint32_t ui32Count))ROM_FLASHTABLE[0])
  817. #define ROM_FlashErase \
  818. ((int32_t (*)(uint32_t ui32Address))ROM_FLASHTABLE[3])
  819. #define ROM_FlashProtectGet \
  820. ((tFlashProtection (*)(uint32_t ui32Address))ROM_FLASHTABLE[4])
  821. #define ROM_FlashProtectSet \
  822. ((int32_t (*)(uint32_t ui32Address, \
  823. tFlashProtection eProtect))ROM_FLASHTABLE[5])
  824. #define ROM_FlashProtectSave \
  825. ((int32_t (*)(void))ROM_FLASHTABLE[6])
  826. #define ROM_FlashUserGet \
  827. ((int32_t (*)(uint32_t *pui32User0, \
  828. uint32_t *pui32User1))ROM_FLASHTABLE[7])
  829. #define ROM_FlashUserSet \
  830. ((int32_t (*)(uint32_t ui32User0, \
  831. uint32_t ui32User1))ROM_FLASHTABLE[8])
  832. #define ROM_FlashUserSave \
  833. ((int32_t (*)(void))ROM_FLASHTABLE[9])
  834. #define ROM_FlashIntEnable \
  835. ((void (*)(uint32_t ui32IntFlags))ROM_FLASHTABLE[10])
  836. #define ROM_FlashIntDisable \
  837. ((void (*)(uint32_t ui32IntFlags))ROM_FLASHTABLE[11])
  838. #define ROM_FlashIntStatus \
  839. ((uint32_t (*)(bool bMasked))ROM_FLASHTABLE[12])
  840. #define ROM_FlashIntClear \
  841. ((void (*)(uint32_t ui32IntFlags))ROM_FLASHTABLE[13])
  842. //*****************************************************************************
  843. //
  844. // Macros for calling ROM functions in the FPU API.
  845. //
  846. //*****************************************************************************
  847. #define ROM_FPUEnable \
  848. ((void (*)(void))ROM_FPUTABLE[0])
  849. #define ROM_FPUDisable \
  850. ((void (*)(void))ROM_FPUTABLE[1])
  851. #define ROM_FPUFlushToZeroModeSet \
  852. ((void (*)(uint32_t ui32Mode))ROM_FPUTABLE[2])
  853. #define ROM_FPUHalfPrecisionModeSet \
  854. ((void (*)(uint32_t ui32Mode))ROM_FPUTABLE[3])
  855. #define ROM_FPULazyStackingEnable \
  856. ((void (*)(void))ROM_FPUTABLE[4])
  857. #define ROM_FPUNaNModeSet \
  858. ((void (*)(uint32_t ui32Mode))ROM_FPUTABLE[5])
  859. #define ROM_FPURoundingModeSet \
  860. ((void (*)(uint32_t ui32Mode))ROM_FPUTABLE[6])
  861. #define ROM_FPUStackingDisable \
  862. ((void (*)(void))ROM_FPUTABLE[7])
  863. #define ROM_FPUStackingEnable \
  864. ((void (*)(void))ROM_FPUTABLE[8])
  865. //*****************************************************************************
  866. //
  867. // Macros for calling ROM functions in the GPIO API.
  868. //
  869. //*****************************************************************************
  870. #define ROM_GPIOPinWrite \
  871. ((void (*)(uint32_t ui32Port, \
  872. uint8_t ui8Pins, \
  873. uint8_t ui8Val))ROM_GPIOTABLE[0])
  874. #define ROM_GPIODirModeSet \
  875. ((void (*)(uint32_t ui32Port, \
  876. uint8_t ui8Pins, \
  877. uint32_t ui32PinIO))ROM_GPIOTABLE[1])
  878. #define ROM_GPIODirModeGet \
  879. ((uint32_t (*)(uint32_t ui32Port, \
  880. uint8_t ui8Pin))ROM_GPIOTABLE[2])
  881. #define ROM_GPIOIntTypeSet \
  882. ((void (*)(uint32_t ui32Port, \
  883. uint8_t ui8Pins, \
  884. uint32_t ui32IntType))ROM_GPIOTABLE[3])
  885. #define ROM_GPIOIntTypeGet \
  886. ((uint32_t (*)(uint32_t ui32Port, \
  887. uint8_t ui8Pin))ROM_GPIOTABLE[4])
  888. #define ROM_GPIOPadConfigGet \
  889. ((void (*)(uint32_t ui32Port, \
  890. uint8_t ui8Pin, \
  891. uint32_t *pui32Strength, \
  892. uint32_t *pui32PadType))ROM_GPIOTABLE[6])
  893. #define ROM_GPIOPinRead \
  894. ((int32_t (*)(uint32_t ui32Port, \
  895. uint8_t ui8Pins))ROM_GPIOTABLE[11])
  896. #define ROM_GPIOPinTypeComparator \
  897. ((void (*)(uint32_t ui32Port, \
  898. uint8_t ui8Pins))ROM_GPIOTABLE[13])
  899. #define ROM_GPIOPinTypeGPIOInput \
  900. ((void (*)(uint32_t ui32Port, \
  901. uint8_t ui8Pins))ROM_GPIOTABLE[14])
  902. #define ROM_GPIOPinTypeGPIOOutput \
  903. ((void (*)(uint32_t ui32Port, \
  904. uint8_t ui8Pins))ROM_GPIOTABLE[15])
  905. #define ROM_GPIOPinTypeI2C \
  906. ((void (*)(uint32_t ui32Port, \
  907. uint8_t ui8Pins))ROM_GPIOTABLE[16])
  908. #define ROM_GPIOPinTypePWM \
  909. ((void (*)(uint32_t ui32Port, \
  910. uint8_t ui8Pins))ROM_GPIOTABLE[17])
  911. #define ROM_GPIOPinTypeQEI \
  912. ((void (*)(uint32_t ui32Port, \
  913. uint8_t ui8Pins))ROM_GPIOTABLE[18])
  914. #define ROM_GPIOPinTypeSSI \
  915. ((void (*)(uint32_t ui32Port, \
  916. uint8_t ui8Pins))ROM_GPIOTABLE[19])
  917. #define ROM_GPIOPinTypeTimer \
  918. ((void (*)(uint32_t ui32Port, \
  919. uint8_t ui8Pins))ROM_GPIOTABLE[20])
  920. #define ROM_GPIOPinTypeUART \
  921. ((void (*)(uint32_t ui32Port, \
  922. uint8_t ui8Pins))ROM_GPIOTABLE[21])
  923. #define ROM_GPIOPinTypeGPIOOutputOD \
  924. ((void (*)(uint32_t ui32Port, \
  925. uint8_t ui8Pins))ROM_GPIOTABLE[22])
  926. #define ROM_GPIOPinTypeADC \
  927. ((void (*)(uint32_t ui32Port, \
  928. uint8_t ui8Pins))ROM_GPIOTABLE[23])
  929. #define ROM_GPIOPinTypeUSBDigital \
  930. ((void (*)(uint32_t ui32Port, \
  931. uint8_t ui8Pins))ROM_GPIOTABLE[24])
  932. #define ROM_GPIOPinConfigure \
  933. ((void (*)(uint32_t ui32PinConfig))ROM_GPIOTABLE[26])
  934. #define ROM_GPIOPinTypeUSBAnalog \
  935. ((void (*)(uint32_t ui32Port, \
  936. uint8_t ui8Pins))ROM_GPIOTABLE[28])
  937. #define ROM_GPIOPinTypeI2CSCL \
  938. ((void (*)(uint32_t ui32Port, \
  939. uint8_t ui8Pins))ROM_GPIOTABLE[39])
  940. #define ROM_GPIOPinTypeOneWire \
  941. ((void (*)(uint32_t ui32Port, \
  942. uint8_t ui8Pins))ROM_GPIOTABLE[44])
  943. #define ROM_GPIOPinTypeWakeHigh \
  944. ((void (*)(uint32_t ui32Port, \
  945. uint8_t ui8Pins))ROM_GPIOTABLE[48])
  946. #define ROM_GPIOPinTypeWakeLow \
  947. ((void (*)(uint32_t ui32Port, \
  948. uint8_t ui8Pins))ROM_GPIOTABLE[49])
  949. #define ROM_GPIOIntClear \
  950. ((void (*)(uint32_t ui32Port, \
  951. uint32_t ui32IntFlags))ROM_GPIOTABLE[51])
  952. #define ROM_GPIOIntDisable \
  953. ((void (*)(uint32_t ui32Port, \
  954. uint32_t ui32IntFlags))ROM_GPIOTABLE[52])
  955. #define ROM_GPIOIntEnable \
  956. ((void (*)(uint32_t ui32Port, \
  957. uint32_t ui32IntFlags))ROM_GPIOTABLE[53])
  958. #define ROM_GPIOIntStatus \
  959. ((uint32_t (*)(uint32_t ui32Port, \
  960. bool bMasked))ROM_GPIOTABLE[54])
  961. //*****************************************************************************
  962. //
  963. // Macros for calling ROM functions in the Hibernate API.
  964. //
  965. //*****************************************************************************
  966. #define ROM_HibernateIntClear \
  967. ((void (*)(uint32_t ui32IntFlags))ROM_HIBERNATETABLE[0])
  968. #define ROM_HibernateEnableExpClk \
  969. ((void (*)(uint32_t ui32HibClk))ROM_HIBERNATETABLE[1])
  970. #define ROM_HibernateDisable \
  971. ((void (*)(void))ROM_HIBERNATETABLE[2])
  972. #define ROM_HibernateRTCEnable \
  973. ((void (*)(void))ROM_HIBERNATETABLE[4])
  974. #define ROM_HibernateRTCDisable \
  975. ((void (*)(void))ROM_HIBERNATETABLE[5])
  976. #define ROM_HibernateWakeSet \
  977. ((void (*)(uint32_t ui32WakeFlags))ROM_HIBERNATETABLE[6])
  978. #define ROM_HibernateWakeGet \
  979. ((uint32_t (*)(void))ROM_HIBERNATETABLE[7])
  980. #define ROM_HibernateLowBatSet \
  981. ((void (*)(uint32_t ui32LowBatFlags))ROM_HIBERNATETABLE[8])
  982. #define ROM_HibernateLowBatGet \
  983. ((uint32_t (*)(void))ROM_HIBERNATETABLE[9])
  984. #define ROM_HibernateRTCSet \
  985. ((void (*)(uint32_t ui32RTCValue))ROM_HIBERNATETABLE[10])
  986. #define ROM_HibernateRTCGet \
  987. ((uint32_t (*)(void))ROM_HIBERNATETABLE[11])
  988. #define ROM_HibernateRTCTrimSet \
  989. ((void (*)(uint32_t ui32Trim))ROM_HIBERNATETABLE[16])
  990. #define ROM_HibernateRTCTrimGet \
  991. ((uint32_t (*)(void))ROM_HIBERNATETABLE[17])
  992. #define ROM_HibernateDataSet \
  993. ((void (*)(uint32_t *pui32Data, \
  994. uint32_t ui32Count))ROM_HIBERNATETABLE[18])
  995. #define ROM_HibernateDataGet \
  996. ((void (*)(uint32_t *pui32Data, \
  997. uint32_t ui32Count))ROM_HIBERNATETABLE[19])
  998. #define ROM_HibernateRequest \
  999. ((void (*)(void))ROM_HIBERNATETABLE[20])
  1000. #define ROM_HibernateIntEnable \
  1001. ((void (*)(uint32_t ui32IntFlags))ROM_HIBERNATETABLE[21])
  1002. #define ROM_HibernateIntDisable \
  1003. ((void (*)(uint32_t ui32IntFlags))ROM_HIBERNATETABLE[22])
  1004. #define ROM_HibernateIntStatus \
  1005. ((uint32_t (*)(bool bMasked))ROM_HIBERNATETABLE[23])
  1006. #define ROM_HibernateIsActive \
  1007. ((uint32_t (*)(void))ROM_HIBERNATETABLE[24])
  1008. #define ROM_HibernateRTCSSGet \
  1009. ((uint32_t (*)(void))ROM_HIBERNATETABLE[27])
  1010. #define ROM_HibernateClockConfig \
  1011. ((void (*)(uint32_t ui32Config))ROM_HIBERNATETABLE[28])
  1012. #define ROM_HibernateBatCheckStart \
  1013. ((void (*)(void))ROM_HIBERNATETABLE[29])
  1014. #define ROM_HibernateBatCheckDone \
  1015. ((uint32_t (*)(void))ROM_HIBERNATETABLE[30])
  1016. #define ROM_HibernateGPIORetentionEnable \
  1017. ((void (*)(void))ROM_HIBERNATETABLE[31])
  1018. #define ROM_HibernateGPIORetentionDisable \
  1019. ((void (*)(void))ROM_HIBERNATETABLE[32])
  1020. #define ROM_HibernateGPIORetentionGet \
  1021. ((bool (*)(void))ROM_HIBERNATETABLE[33])
  1022. #define ROM_HibernateCounterMode \
  1023. ((void (*)(uint32_t ui32Config))ROM_HIBERNATETABLE[34])
  1024. #define ROM_HibernateCalendarSet \
  1025. ((void (*)(struct tm *psTime))ROM_HIBERNATETABLE[35])
  1026. #define ROM_HibernateCalendarGet \
  1027. ((int (*)(struct tm *psTime))ROM_HIBERNATETABLE[36])
  1028. #define ROM_HibernateCalendarMatchSet \
  1029. ((void (*)(uint32_t ui32Index, \
  1030. struct tm *psTime))ROM_HIBERNATETABLE[37])
  1031. #define ROM_HibernateCalendarMatchGet \
  1032. ((void (*)(uint32_t ui32Index, \
  1033. struct tm *psTime))ROM_HIBERNATETABLE[38])
  1034. #define ROM_HibernateTamperDisable \
  1035. ((void (*)(void))ROM_HIBERNATETABLE[39])
  1036. #define ROM_HibernateTamperEnable \
  1037. ((void (*)(void))ROM_HIBERNATETABLE[40])
  1038. #define ROM_HibernateTamperEventsClear \
  1039. ((void (*)(void))ROM_HIBERNATETABLE[41])
  1040. #define ROM_HibernateTamperEventsConfig \
  1041. ((void (*)(uint32_t ui32Config))ROM_HIBERNATETABLE[42])
  1042. #define ROM_HibernateTamperEventsGet \
  1043. ((bool (*)(uint32_t ui32Index, \
  1044. uint32_t *pui32RTC, \
  1045. uint32_t *pui32Event))ROM_HIBERNATETABLE[43])
  1046. #define ROM_HibernateTamperExtOscValid \
  1047. ((bool (*)(void))ROM_HIBERNATETABLE[44])
  1048. #define ROM_HibernateTamperExtOscRecover \
  1049. ((void (*)(void))ROM_HIBERNATETABLE[45])
  1050. #define ROM_HibernateTamperIODisable \
  1051. ((void (*)(uint32_t ui32Input))ROM_HIBERNATETABLE[46])
  1052. #define ROM_HibernateTamperIOEnable \
  1053. ((void (*)(uint32_t ui32Input, \
  1054. uint32_t ui32Config))ROM_HIBERNATETABLE[47])
  1055. #define ROM_HibernateTamperStatusGet \
  1056. ((uint32_t (*)(void))ROM_HIBERNATETABLE[48])
  1057. #define ROM_HibernateRTCMatchGet \
  1058. ((uint32_t (*)(uint32_t ui32Match))ROM_HIBERNATETABLE[49])
  1059. #define ROM_HibernateRTCMatchSet \
  1060. ((void (*)(uint32_t ui32Match, \
  1061. uint32_t ui32Value))ROM_HIBERNATETABLE[50])
  1062. #define ROM_HibernateRTCSSMatchGet \
  1063. ((uint32_t (*)(uint32_t ui32Match))ROM_HIBERNATETABLE[51])
  1064. #define ROM_HibernateRTCSSMatchSet \
  1065. ((void (*)(uint32_t ui32Match, \
  1066. uint32_t ui32Value))ROM_HIBERNATETABLE[52])
  1067. //*****************************************************************************
  1068. //
  1069. // Macros for calling ROM functions in the I2C API.
  1070. //
  1071. //*****************************************************************************
  1072. #define ROM_I2CMasterDataPut \
  1073. ((void (*)(uint32_t ui32Base, \
  1074. uint8_t ui8Data))ROM_I2CTABLE[0])
  1075. #define ROM_I2CMasterInitExpClk \
  1076. ((void (*)(uint32_t ui32Base, \
  1077. uint32_t ui32I2CClk, \
  1078. bool bFast))ROM_I2CTABLE[1])
  1079. #define ROM_I2CSlaveInit \
  1080. ((void (*)(uint32_t ui32Base, \
  1081. uint8_t ui8SlaveAddr))ROM_I2CTABLE[2])
  1082. #define ROM_I2CMasterEnable \
  1083. ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[3])
  1084. #define ROM_I2CSlaveEnable \
  1085. ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[4])
  1086. #define ROM_I2CMasterDisable \
  1087. ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[5])
  1088. #define ROM_I2CSlaveDisable \
  1089. ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[6])
  1090. #define ROM_I2CMasterIntEnable \
  1091. ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[7])
  1092. #define ROM_I2CSlaveIntEnable \
  1093. ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[8])
  1094. #define ROM_I2CMasterIntDisable \
  1095. ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[9])
  1096. #define ROM_I2CSlaveIntDisable \
  1097. ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[10])
  1098. #define ROM_I2CMasterIntStatus \
  1099. ((bool (*)(uint32_t ui32Base, \
  1100. bool bMasked))ROM_I2CTABLE[11])
  1101. #define ROM_I2CSlaveIntStatus \
  1102. ((bool (*)(uint32_t ui32Base, \
  1103. bool bMasked))ROM_I2CTABLE[12])
  1104. #define ROM_I2CMasterIntClear \
  1105. ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[13])
  1106. #define ROM_I2CSlaveIntClear \
  1107. ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[14])
  1108. #define ROM_I2CMasterSlaveAddrSet \
  1109. ((void (*)(uint32_t ui32Base, \
  1110. uint8_t ui8SlaveAddr, \
  1111. bool bReceive))ROM_I2CTABLE[15])
  1112. #define ROM_I2CMasterBusy \
  1113. ((bool (*)(uint32_t ui32Base))ROM_I2CTABLE[16])
  1114. #define ROM_I2CMasterBusBusy \
  1115. ((bool (*)(uint32_t ui32Base))ROM_I2CTABLE[17])
  1116. #define ROM_I2CMasterControl \
  1117. ((void (*)(uint32_t ui32Base, \
  1118. uint32_t ui32Cmd))ROM_I2CTABLE[18])
  1119. #define ROM_I2CMasterErr \
  1120. ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[19])
  1121. #define ROM_I2CMasterDataGet \
  1122. ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[20])
  1123. #define ROM_I2CSlaveStatus \
  1124. ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[21])
  1125. #define ROM_I2CSlaveDataPut \
  1126. ((void (*)(uint32_t ui32Base, \
  1127. uint8_t ui8Data))ROM_I2CTABLE[22])
  1128. #define ROM_I2CSlaveDataGet \
  1129. ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[23])
  1130. #define ROM_UpdateI2C \
  1131. ((void (*)(void))ROM_I2CTABLE[24])
  1132. #define ROM_I2CSlaveIntEnableEx \
  1133. ((void (*)(uint32_t ui32Base, \
  1134. uint32_t ui32IntFlags))ROM_I2CTABLE[25])
  1135. #define ROM_I2CSlaveIntDisableEx \
  1136. ((void (*)(uint32_t ui32Base, \
  1137. uint32_t ui32IntFlags))ROM_I2CTABLE[26])
  1138. #define ROM_I2CSlaveIntStatusEx \
  1139. ((uint32_t (*)(uint32_t ui32Base, \
  1140. bool bMasked))ROM_I2CTABLE[27])
  1141. #define ROM_I2CSlaveIntClearEx \
  1142. ((void (*)(uint32_t ui32Base, \
  1143. uint32_t ui32IntFlags))ROM_I2CTABLE[28])
  1144. #define ROM_I2CMasterIntEnableEx \
  1145. ((void (*)(uint32_t ui32Base, \
  1146. uint32_t ui32IntFlags))ROM_I2CTABLE[29])
  1147. #define ROM_I2CMasterIntDisableEx \
  1148. ((void (*)(uint32_t ui32Base, \
  1149. uint32_t ui32IntFlags))ROM_I2CTABLE[30])
  1150. #define ROM_I2CMasterIntStatusEx \
  1151. ((uint32_t (*)(uint32_t ui32Base, \
  1152. bool bMasked))ROM_I2CTABLE[31])
  1153. #define ROM_I2CMasterIntClearEx \
  1154. ((void (*)(uint32_t ui32Base, \
  1155. uint32_t ui32IntFlags))ROM_I2CTABLE[32])
  1156. #define ROM_I2CMasterTimeoutSet \
  1157. ((void (*)(uint32_t ui32Base, \
  1158. uint32_t ui32Value))ROM_I2CTABLE[33])
  1159. #define ROM_I2CSlaveACKOverride \
  1160. ((void (*)(uint32_t ui32Base, \
  1161. bool bEnable))ROM_I2CTABLE[34])
  1162. #define ROM_I2CSlaveACKValueSet \
  1163. ((void (*)(uint32_t ui32Base, \
  1164. bool bACK))ROM_I2CTABLE[35])
  1165. #define ROM_I2CSlaveAddressSet \
  1166. ((void (*)(uint32_t ui32Base, \
  1167. uint8_t ui8AddrNum, \
  1168. uint8_t ui8SlaveAddr))ROM_I2CTABLE[37])
  1169. #define ROM_I2CMasterLineStateGet \
  1170. ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[38])
  1171. #define ROM_I2CTxFIFOConfigSet \
  1172. ((void (*)(uint32_t ui32Base, \
  1173. uint32_t ui32Config))ROM_I2CTABLE[39])
  1174. #define ROM_I2CTxFIFOFlush \
  1175. ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[40])
  1176. #define ROM_I2CRxFIFOConfigSet \
  1177. ((void (*)(uint32_t ui32Base, \
  1178. uint32_t ui32Config))ROM_I2CTABLE[41])
  1179. #define ROM_I2CRxFIFOFlush \
  1180. ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[42])
  1181. #define ROM_I2CFIFOStatus \
  1182. ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[43])
  1183. #define ROM_I2CFIFODataPut \
  1184. ((void (*)(uint32_t ui32Base, \
  1185. uint8_t ui8Data))ROM_I2CTABLE[44])
  1186. #define ROM_I2CFIFODataPutNonBlocking \
  1187. ((uint32_t (*)(uint32_t ui32Base, \
  1188. uint8_t ui8Data))ROM_I2CTABLE[45])
  1189. #define ROM_I2CFIFODataGet \
  1190. ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[46])
  1191. #define ROM_I2CFIFODataGetNonBlocking \
  1192. ((uint32_t (*)(uint32_t ui32Base, \
  1193. uint8_t *pui8Data))ROM_I2CTABLE[47])
  1194. #define ROM_I2CMasterBurstLengthSet \
  1195. ((void (*)(uint32_t ui32Base, \
  1196. uint8_t ui8Length))ROM_I2CTABLE[48])
  1197. #define ROM_I2CMasterBurstCountGet \
  1198. ((uint32_t (*)(uint32_t ui32Base))ROM_I2CTABLE[49])
  1199. #define ROM_I2CSlaveFIFODisable \
  1200. ((void (*)(uint32_t ui32Base))ROM_I2CTABLE[50])
  1201. #define ROM_I2CSlaveFIFOEnable \
  1202. ((void (*)(uint32_t ui32Base, \
  1203. uint32_t ui32Config))ROM_I2CTABLE[51])
  1204. #define ROM_I2CMasterGlitchFilterConfigSet \
  1205. ((void (*)(uint32_t ui32Base, \
  1206. uint32_t ui32Config))ROM_I2CTABLE[54])
  1207. //*****************************************************************************
  1208. //
  1209. // Macros for calling ROM functions in the Interrupt API.
  1210. //
  1211. //*****************************************************************************
  1212. #define ROM_IntEnable \
  1213. ((void (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[0])
  1214. #define ROM_IntMasterEnable \
  1215. ((bool (*)(void))ROM_INTERRUPTTABLE[1])
  1216. #define ROM_IntMasterDisable \
  1217. ((bool (*)(void))ROM_INTERRUPTTABLE[2])
  1218. #define ROM_IntDisable \
  1219. ((void (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[3])
  1220. #define ROM_IntPriorityGroupingSet \
  1221. ((void (*)(uint32_t ui32Bits))ROM_INTERRUPTTABLE[4])
  1222. #define ROM_IntPriorityGroupingGet \
  1223. ((uint32_t (*)(void))ROM_INTERRUPTTABLE[5])
  1224. #define ROM_IntPrioritySet \
  1225. ((void (*)(uint32_t ui32Interrupt, \
  1226. uint8_t ui8Priority))ROM_INTERRUPTTABLE[6])
  1227. #define ROM_IntPriorityGet \
  1228. ((int32_t (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[7])
  1229. #define ROM_IntPendSet \
  1230. ((void (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[8])
  1231. #define ROM_IntPendClear \
  1232. ((void (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[9])
  1233. #define ROM_IntPriorityMaskSet \
  1234. ((void (*)(uint32_t ui32PriorityMask))ROM_INTERRUPTTABLE[10])
  1235. #define ROM_IntPriorityMaskGet \
  1236. ((uint32_t (*)(void))ROM_INTERRUPTTABLE[11])
  1237. #define ROM_IntIsEnabled \
  1238. ((uint32_t (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[12])
  1239. #define ROM_IntTrigger \
  1240. ((void (*)(uint32_t ui32Interrupt))ROM_INTERRUPTTABLE[13])
  1241. //*****************************************************************************
  1242. //
  1243. // Macros for calling ROM functions in the LCD API.
  1244. //
  1245. //*****************************************************************************
  1246. #define ROM_LCDIntStatus \
  1247. ((uint32_t (*)(uint32_t ui32Base, \
  1248. bool bMasked))ROM_LCDTABLE[0])
  1249. #define ROM_LCDClockReset \
  1250. ((void (*)(uint32_t ui32Base, \
  1251. uint32_t ui32Clocks))ROM_LCDTABLE[1])
  1252. #define ROM_LCDDMAConfigSet \
  1253. ((void (*)(uint32_t ui32Base, \
  1254. uint32_t ui32Config))ROM_LCDTABLE[2])
  1255. #define ROM_LCDIDDCommandWrite \
  1256. ((void (*)(uint32_t ui32Base, \
  1257. uint32_t ui32CS, \
  1258. uint16_t ui16Cmd))ROM_LCDTABLE[3])
  1259. #define ROM_LCDIDDConfigSet \
  1260. ((void (*)(uint32_t ui32Base, \
  1261. uint32_t ui32Config))ROM_LCDTABLE[4])
  1262. #define ROM_LCDIDDDataRead \
  1263. ((uint16_t (*)(uint32_t ui32Base, \
  1264. uint32_t ui32CS))ROM_LCDTABLE[5])
  1265. #define ROM_LCDIDDDataWrite \
  1266. ((void (*)(uint32_t ui32Base, \
  1267. uint32_t ui32CS, \
  1268. uint16_t ui16Data))ROM_LCDTABLE[6])
  1269. #define ROM_LCDIDDDMADisable \
  1270. ((void (*)(uint32_t ui32Base))ROM_LCDTABLE[7])
  1271. #define ROM_LCDIDDDMAWrite \
  1272. ((void (*)(uint32_t ui32Base, \
  1273. uint32_t ui32CS, \
  1274. const uint32_t *pui32Data, \
  1275. uint32_t ui32Count))ROM_LCDTABLE[8])
  1276. #define ROM_LCDIDDIndexedRead \
  1277. ((uint16_t (*)(uint32_t ui32Base, \
  1278. uint32_t ui32CS, \
  1279. uint16_t ui16Addr))ROM_LCDTABLE[9])
  1280. #define ROM_LCDIDDIndexedWrite \
  1281. ((void (*)(uint32_t ui32Base, \
  1282. uint32_t ui32CS, \
  1283. uint16_t ui16Addr, \
  1284. uint16_t ui16Data))ROM_LCDTABLE[10])
  1285. #define ROM_LCDIDDStatusRead \
  1286. ((uint16_t (*)(uint32_t ui32Base, \
  1287. uint32_t ui32CS))ROM_LCDTABLE[11])
  1288. #define ROM_LCDIDDTimingSet \
  1289. ((void (*)(uint32_t ui32Base, \
  1290. uint32_t ui32CS, \
  1291. const tLCDIDDTiming *pTiming))ROM_LCDTABLE[12])
  1292. #define ROM_LCDIntClear \
  1293. ((void (*)(uint32_t ui32Base, \
  1294. uint32_t ui32IntFlags))ROM_LCDTABLE[13])
  1295. #define ROM_LCDIntDisable \
  1296. ((void (*)(uint32_t ui32Base, \
  1297. uint32_t ui32IntFlags))ROM_LCDTABLE[14])
  1298. #define ROM_LCDIntEnable \
  1299. ((void (*)(uint32_t ui32Base, \
  1300. uint32_t ui32IntFlags))ROM_LCDTABLE[15])
  1301. #define ROM_LCDModeSet \
  1302. ((uint32_t (*)(uint32_t ui32Base, \
  1303. uint8_t ui8Mode, \
  1304. uint32_t ui32PixClk, \
  1305. uint32_t ui32SysClk))ROM_LCDTABLE[16])
  1306. #define ROM_LCDRasterACBiasIntCountSet \
  1307. ((void (*)(uint32_t ui32Base, \
  1308. uint8_t ui8Count))ROM_LCDTABLE[17])
  1309. #define ROM_LCDRasterConfigSet \
  1310. ((void (*)(uint32_t ui32Base, \
  1311. uint32_t ui32Config, \
  1312. uint8_t ui8PalLoadDelay))ROM_LCDTABLE[18])
  1313. #define ROM_LCDRasterDisable \
  1314. ((void (*)(uint32_t ui32Base))ROM_LCDTABLE[19])
  1315. #define ROM_LCDRasterEnable \
  1316. ((void (*)(uint32_t ui32Base))ROM_LCDTABLE[20])
  1317. #define ROM_LCDRasterFrameBufferSet \
  1318. ((void (*)(uint32_t ui32Base, \
  1319. uint8_t ui8Buffer, \
  1320. uint32_t *pui32Addr, \
  1321. uint32_t ui32NumBytes))ROM_LCDTABLE[21])
  1322. #define ROM_LCDRasterPaletteSet \
  1323. ((void (*)(uint32_t ui32Base, \
  1324. uint32_t ui32Type, \
  1325. uint32_t *pui32PalAddr, \
  1326. const uint32_t *pui32SrcColors, \
  1327. uint32_t ui32Start, \
  1328. uint32_t ui32Count))ROM_LCDTABLE[22])
  1329. #define ROM_LCDRasterSubPanelConfigSet \
  1330. ((void (*)(uint32_t ui32Base, \
  1331. uint32_t ui32Flags, \
  1332. uint32_t ui32BottomLines, \
  1333. uint32_t ui32DefaultPixel))ROM_LCDTABLE[23])
  1334. #define ROM_LCDRasterSubPanelDisable \
  1335. ((void (*)(uint32_t ui32Base))ROM_LCDTABLE[24])
  1336. #define ROM_LCDRasterSubPanelEnable \
  1337. ((void (*)(uint32_t ui32Base))ROM_LCDTABLE[25])
  1338. #define ROM_LCDRasterTimingSet \
  1339. ((void (*)(uint32_t ui32Base, \
  1340. const tLCDRasterTiming *pTiming))ROM_LCDTABLE[26])
  1341. #define ROM_LCDRasterEnabled \
  1342. ((bool (*)(uint32_t ui32Base))ROM_LCDTABLE[27])
  1343. //*****************************************************************************
  1344. //
  1345. // Macros for calling ROM functions in the MPU API.
  1346. //
  1347. //*****************************************************************************
  1348. #define ROM_MPUEnable \
  1349. ((void (*)(uint32_t ui32MPUConfig))ROM_MPUTABLE[0])
  1350. #define ROM_MPUDisable \
  1351. ((void (*)(void))ROM_MPUTABLE[1])
  1352. #define ROM_MPURegionCountGet \
  1353. ((uint32_t (*)(void))ROM_MPUTABLE[2])
  1354. #define ROM_MPURegionEnable \
  1355. ((void (*)(uint32_t ui32Region))ROM_MPUTABLE[3])
  1356. #define ROM_MPURegionDisable \
  1357. ((void (*)(uint32_t ui32Region))ROM_MPUTABLE[4])
  1358. #define ROM_MPURegionSet \
  1359. ((void (*)(uint32_t ui32Region, \
  1360. uint32_t ui32Addr, \
  1361. uint32_t ui32Flags))ROM_MPUTABLE[5])
  1362. #define ROM_MPURegionGet \
  1363. ((void (*)(uint32_t ui32Region, \
  1364. uint32_t *pui32Addr, \
  1365. uint32_t *pui32Flags))ROM_MPUTABLE[6])
  1366. //*****************************************************************************
  1367. //
  1368. // Macros for calling ROM functions in the OneWire API.
  1369. //
  1370. //*****************************************************************************
  1371. #define ROM_OneWireIntStatus \
  1372. ((uint32_t (*)(uint32_t ui32Base, \
  1373. bool bMasked))ROM_ONEWIRETABLE[0])
  1374. #define ROM_OneWireBusReset \
  1375. ((void (*)(uint32_t ui32Base))ROM_ONEWIRETABLE[1])
  1376. #define ROM_OneWireBusStatus \
  1377. ((uint32_t (*)(uint32_t ui32Base))ROM_ONEWIRETABLE[2])
  1378. #define ROM_OneWireDataGet \
  1379. ((void (*)(uint32_t u3i2Base, \
  1380. uint32_t *pui32Data))ROM_ONEWIRETABLE[3])
  1381. #define ROM_OneWireDataGetNonBlocking \
  1382. ((bool (*)(uint32_t ui32Base, \
  1383. uint32_t *pui32Data))ROM_ONEWIRETABLE[4])
  1384. #define ROM_OneWireInit \
  1385. ((void (*)(uint32_t ui32Base, \
  1386. uint32_t ui32InitFlags))ROM_ONEWIRETABLE[5])
  1387. #define ROM_OneWireIntClear \
  1388. ((void (*)(uint32_t ui32Base, \
  1389. uint32_t ui32IntFlags))ROM_ONEWIRETABLE[6])
  1390. #define ROM_OneWireIntDisable \
  1391. ((void (*)(uint32_t ui32Base, \
  1392. uint32_t ui32IntFlags))ROM_ONEWIRETABLE[7])
  1393. #define ROM_OneWireIntEnable \
  1394. ((void (*)(uint32_t ui32Base, \
  1395. uint32_t ui32IntFlags))ROM_ONEWIRETABLE[8])
  1396. #define ROM_OneWireTransaction \
  1397. ((void (*)(uint32_t ui32Base, \
  1398. uint32_t ui32OpFlags, \
  1399. uint32_t ui32Data, \
  1400. uint32_t ui32BitCnt))ROM_ONEWIRETABLE[9])
  1401. #define ROM_OneWireDMADisable \
  1402. ((void (*)(uint32_t ui32Base, \
  1403. uint32_t ui32DMAFlags))ROM_ONEWIRETABLE[10])
  1404. #define ROM_OneWireDMAEnable \
  1405. ((void (*)(uint32_t ui32Base, \
  1406. uint32_t ui32DMAFlags))ROM_ONEWIRETABLE[11])
  1407. //*****************************************************************************
  1408. //
  1409. // Macros for calling ROM functions in the PWM API.
  1410. //
  1411. //*****************************************************************************
  1412. #define ROM_PWMPulseWidthSet \
  1413. ((void (*)(uint32_t ui32Base, \
  1414. uint32_t ui32PWMOut, \
  1415. uint32_t ui32Width))ROM_PWMTABLE[0])
  1416. #define ROM_PWMGenConfigure \
  1417. ((void (*)(uint32_t ui32Base, \
  1418. uint32_t ui32Gen, \
  1419. uint32_t ui32Config))ROM_PWMTABLE[1])
  1420. #define ROM_PWMGenPeriodSet \
  1421. ((void (*)(uint32_t ui32Base, \
  1422. uint32_t ui32Gen, \
  1423. uint32_t ui32Period))ROM_PWMTABLE[2])
  1424. #define ROM_PWMGenPeriodGet \
  1425. ((uint32_t (*)(uint32_t ui32Base, \
  1426. uint32_t ui32Gen))ROM_PWMTABLE[3])
  1427. #define ROM_PWMGenEnable \
  1428. ((void (*)(uint32_t ui32Base, \
  1429. uint32_t ui32Gen))ROM_PWMTABLE[4])
  1430. #define ROM_PWMGenDisable \
  1431. ((void (*)(uint32_t ui32Base, \
  1432. uint32_t ui32Gen))ROM_PWMTABLE[5])
  1433. #define ROM_PWMPulseWidthGet \
  1434. ((uint32_t (*)(uint32_t ui32Base, \
  1435. uint32_t ui32PWMOut))ROM_PWMTABLE[6])
  1436. #define ROM_PWMDeadBandEnable \
  1437. ((void (*)(uint32_t ui32Base, \
  1438. uint32_t ui32Gen, \
  1439. uint16_t ui16Rise, \
  1440. uint16_t ui16Fall))ROM_PWMTABLE[7])
  1441. #define ROM_PWMDeadBandDisable \
  1442. ((void (*)(uint32_t ui32Base, \
  1443. uint32_t ui32Gen))ROM_PWMTABLE[8])
  1444. #define ROM_PWMSyncUpdate \
  1445. ((void (*)(uint32_t ui32Base, \
  1446. uint32_t ui32GenBits))ROM_PWMTABLE[9])
  1447. #define ROM_PWMSyncTimeBase \
  1448. ((void (*)(uint32_t ui32Base, \
  1449. uint32_t ui32GenBits))ROM_PWMTABLE[10])
  1450. #define ROM_PWMOutputState \
  1451. ((void (*)(uint32_t ui32Base, \
  1452. uint32_t ui32PWMOutBits, \
  1453. bool bEnable))ROM_PWMTABLE[11])
  1454. #define ROM_PWMOutputInvert \
  1455. ((void (*)(uint32_t ui32Base, \
  1456. uint32_t ui32PWMOutBits, \
  1457. bool bInvert))ROM_PWMTABLE[12])
  1458. #define ROM_PWMOutputFault \
  1459. ((void (*)(uint32_t ui32Base, \
  1460. uint32_t ui32PWMOutBits, \
  1461. bool bFaultSuppress))ROM_PWMTABLE[13])
  1462. #define ROM_PWMGenIntTrigEnable \
  1463. ((void (*)(uint32_t ui32Base, \
  1464. uint32_t ui32Gen, \
  1465. uint32_t ui32IntTrig))ROM_PWMTABLE[14])
  1466. #define ROM_PWMGenIntTrigDisable \
  1467. ((void (*)(uint32_t ui32Base, \
  1468. uint32_t ui32Gen, \
  1469. uint32_t ui32IntTrig))ROM_PWMTABLE[15])
  1470. #define ROM_PWMGenIntStatus \
  1471. ((uint32_t (*)(uint32_t ui32Base, \
  1472. uint32_t ui32Gen, \
  1473. bool bMasked))ROM_PWMTABLE[16])
  1474. #define ROM_PWMGenIntClear \
  1475. ((void (*)(uint32_t ui32Base, \
  1476. uint32_t ui32Gen, \
  1477. uint32_t ui32Ints))ROM_PWMTABLE[17])
  1478. #define ROM_PWMIntEnable \
  1479. ((void (*)(uint32_t ui32Base, \
  1480. uint32_t ui32GenFault))ROM_PWMTABLE[18])
  1481. #define ROM_PWMIntDisable \
  1482. ((void (*)(uint32_t ui32Base, \
  1483. uint32_t ui32GenFault))ROM_PWMTABLE[19])
  1484. #define ROM_PWMIntStatus \
  1485. ((uint32_t (*)(uint32_t ui32Base, \
  1486. bool bMasked))ROM_PWMTABLE[21])
  1487. #define ROM_PWMOutputFaultLevel \
  1488. ((void (*)(uint32_t ui32Base, \
  1489. uint32_t ui32PWMOutBits, \
  1490. bool bDriveHigh))ROM_PWMTABLE[22])
  1491. #define ROM_PWMFaultIntClearExt \
  1492. ((void (*)(uint32_t ui32Base, \
  1493. uint32_t ui32FaultInts))ROM_PWMTABLE[23])
  1494. #define ROM_PWMGenFaultConfigure \
  1495. ((void (*)(uint32_t ui32Base, \
  1496. uint32_t ui32Gen, \
  1497. uint32_t ui32MinFaultPeriod, \
  1498. uint32_t ui32FaultSenses))ROM_PWMTABLE[24])
  1499. #define ROM_PWMGenFaultTriggerSet \
  1500. ((void (*)(uint32_t ui32Base, \
  1501. uint32_t ui32Gen, \
  1502. uint32_t ui32Group, \
  1503. uint32_t ui32FaultTriggers))ROM_PWMTABLE[25])
  1504. #define ROM_PWMGenFaultTriggerGet \
  1505. ((uint32_t (*)(uint32_t ui32Base, \
  1506. uint32_t ui32Gen, \
  1507. uint32_t ui32Group))ROM_PWMTABLE[26])
  1508. #define ROM_PWMGenFaultStatus \
  1509. ((uint32_t (*)(uint32_t ui32Base, \
  1510. uint32_t ui32Gen, \
  1511. uint32_t ui32Group))ROM_PWMTABLE[27])
  1512. #define ROM_PWMGenFaultClear \
  1513. ((void (*)(uint32_t ui32Base, \
  1514. uint32_t ui32Gen, \
  1515. uint32_t ui32Group, \
  1516. uint32_t ui32FaultTriggers))ROM_PWMTABLE[28])
  1517. #define ROM_PWMClockSet \
  1518. ((void (*)(uint32_t ui32Base, \
  1519. uint32_t ui32Config))ROM_PWMTABLE[29])
  1520. #define ROM_PWMClockGet \
  1521. ((uint32_t (*)(uint32_t ui32Base))ROM_PWMTABLE[30])
  1522. #define ROM_PWMOutputUpdateMode \
  1523. ((void (*)(uint32_t ui32Base, \
  1524. uint32_t ui32PWMOutBits, \
  1525. uint32_t ui32Mode))ROM_PWMTABLE[31])
  1526. //*****************************************************************************
  1527. //
  1528. // Macros for calling ROM functions in the QEI API.
  1529. //
  1530. //*****************************************************************************
  1531. #define ROM_QEIPositionGet \
  1532. ((uint32_t (*)(uint32_t ui32Base))ROM_QEITABLE[0])
  1533. #define ROM_QEIEnable \
  1534. ((void (*)(uint32_t ui32Base))ROM_QEITABLE[1])
  1535. #define ROM_QEIDisable \
  1536. ((void (*)(uint32_t ui32Base))ROM_QEITABLE[2])
  1537. #define ROM_QEIConfigure \
  1538. ((void (*)(uint32_t ui32Base, \
  1539. uint32_t ui32Config, \
  1540. uint32_t ui32MaxPosition))ROM_QEITABLE[3])
  1541. #define ROM_QEIPositionSet \
  1542. ((void (*)(uint32_t ui32Base, \
  1543. uint32_t ui32Position))ROM_QEITABLE[4])
  1544. #define ROM_QEIDirectionGet \
  1545. ((int32_t (*)(uint32_t ui32Base))ROM_QEITABLE[5])
  1546. #define ROM_QEIErrorGet \
  1547. ((bool (*)(uint32_t ui32Base))ROM_QEITABLE[6])
  1548. #define ROM_QEIVelocityEnable \
  1549. ((void (*)(uint32_t ui32Base))ROM_QEITABLE[7])
  1550. #define ROM_QEIVelocityDisable \
  1551. ((void (*)(uint32_t ui32Base))ROM_QEITABLE[8])
  1552. #define ROM_QEIVelocityConfigure \
  1553. ((void (*)(uint32_t ui32Base, \
  1554. uint32_t ui32PreDiv, \
  1555. uint32_t ui32Period))ROM_QEITABLE[9])
  1556. #define ROM_QEIVelocityGet \
  1557. ((uint32_t (*)(uint32_t ui32Base))ROM_QEITABLE[10])
  1558. #define ROM_QEIIntEnable \
  1559. ((void (*)(uint32_t ui32Base, \
  1560. uint32_t ui32IntFlags))ROM_QEITABLE[11])
  1561. #define ROM_QEIIntDisable \
  1562. ((void (*)(uint32_t ui32Base, \
  1563. uint32_t ui32IntFlags))ROM_QEITABLE[12])
  1564. #define ROM_QEIIntStatus \
  1565. ((uint32_t (*)(uint32_t ui32Base, \
  1566. bool bMasked))ROM_QEITABLE[13])
  1567. #define ROM_QEIIntClear \
  1568. ((void (*)(uint32_t ui32Base, \
  1569. uint32_t ui32IntFlags))ROM_QEITABLE[14])
  1570. //*****************************************************************************
  1571. //
  1572. // Macros for calling ROM functions in the SHAMD5 API.
  1573. //
  1574. //*****************************************************************************
  1575. #define ROM_SHAMD5IntStatus \
  1576. ((uint32_t (*)(uint32_t ui32Base, \
  1577. bool bMasked))ROM_SHAMD5TABLE[0])
  1578. #define ROM_SHAMD5ConfigSet \
  1579. ((void (*)(uint32_t ui32Base, \
  1580. uint32_t ui32Mode))ROM_SHAMD5TABLE[1])
  1581. #define ROM_SHAMD5DataProcess \
  1582. ((void (*)(uint32_t ui32Base, \
  1583. uint32_t *pui32DataSrc, \
  1584. uint32_t ui32DataLength, \
  1585. uint32_t *pui32HashResult))ROM_SHAMD5TABLE[2])
  1586. #define ROM_SHAMD5DataWrite \
  1587. ((void (*)(uint32_t ui32Base, \
  1588. uint32_t *pui32Src))ROM_SHAMD5TABLE[3])
  1589. #define ROM_SHAMD5DataWriteNonBlocking \
  1590. ((bool (*)(uint32_t ui32Base, \
  1591. uint32_t *pui32Src))ROM_SHAMD5TABLE[4])
  1592. #define ROM_SHAMD5DMADisable \
  1593. ((void (*)(uint32_t ui32Base))ROM_SHAMD5TABLE[5])
  1594. #define ROM_SHAMD5DMAEnable \
  1595. ((void (*)(uint32_t ui32Base))ROM_SHAMD5TABLE[6])
  1596. #define ROM_SHAMD5HashLengthSet \
  1597. ((void (*)(uint32_t ui32Base, \
  1598. uint32_t ui32Length))ROM_SHAMD5TABLE[7])
  1599. #define ROM_SHAMD5HMACKeySet \
  1600. ((void (*)(uint32_t ui32Base, \
  1601. uint32_t *pui32Src))ROM_SHAMD5TABLE[8])
  1602. #define ROM_SHAMD5HMACPPKeyGenerate \
  1603. ((void (*)(uint32_t ui32Base, \
  1604. uint32_t *pui32Key, \
  1605. uint32_t *pui32PPKey))ROM_SHAMD5TABLE[9])
  1606. #define ROM_SHAMD5HMACPPKeySet \
  1607. ((void (*)(uint32_t ui32Base, \
  1608. uint32_t *pui32Src))ROM_SHAMD5TABLE[10])
  1609. #define ROM_SHAMD5HMACProcess \
  1610. ((void (*)(uint32_t ui32Base, \
  1611. uint32_t *pui32DataSrc, \
  1612. uint32_t ui32DataLength, \
  1613. uint32_t *pui32HashResult))ROM_SHAMD5TABLE[11])
  1614. #define ROM_SHAMD5IntClear \
  1615. ((void (*)(uint32_t ui32Base, \
  1616. uint32_t ui32IntFlags))ROM_SHAMD5TABLE[12])
  1617. #define ROM_SHAMD5IntDisable \
  1618. ((void (*)(uint32_t ui32Base, \
  1619. uint32_t ui32IntFlags))ROM_SHAMD5TABLE[13])
  1620. #define ROM_SHAMD5IntEnable \
  1621. ((void (*)(uint32_t ui32Base, \
  1622. uint32_t ui32IntFlags))ROM_SHAMD5TABLE[14])
  1623. #define ROM_SHAMD5Reset \
  1624. ((void (*)(uint32_t ui32Base))ROM_SHAMD5TABLE[15])
  1625. #define ROM_SHAMD5ResultRead \
  1626. ((void (*)(uint32_t ui32Base, \
  1627. uint32_t *pui32Dest))ROM_SHAMD5TABLE[16])
  1628. //*****************************************************************************
  1629. //
  1630. // Macros for calling ROM functions in the SMBus API.
  1631. //
  1632. //*****************************************************************************
  1633. #define ROM_SMBusMasterIntProcess \
  1634. ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[0])
  1635. #define ROM_SMBusARPDisable \
  1636. ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[1])
  1637. #define ROM_SMBusARPEnable \
  1638. ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[2])
  1639. #define ROM_SMBusARPUDIDPacketDecode \
  1640. ((void (*)(tSMBusUDID *pUDID, \
  1641. uint8_t *pui8Address, \
  1642. uint8_t *pui8Data))ROM_SMBUSTABLE[3])
  1643. #define ROM_SMBusARPUDIDPacketEncode \
  1644. ((void (*)(tSMBusUDID *pUDID, \
  1645. uint8_t ui8Address, \
  1646. uint8_t *pui8Data))ROM_SMBUSTABLE[4])
  1647. #define ROM_SMBusMasterARPAssignAddress \
  1648. ((tSMBusStatus (*)(tSMBus *psSMBus, \
  1649. uint8_t *pui8Data))ROM_SMBUSTABLE[5])
  1650. #define ROM_SMBusMasterARPGetUDIDDir \
  1651. ((tSMBusStatus (*)(tSMBus *psSMBus, \
  1652. uint8_t ui8TargetAddress, \
  1653. uint8_t *pui8Data))ROM_SMBUSTABLE[6])
  1654. #define ROM_SMBusMasterARPGetUDIDGen \
  1655. ((tSMBusStatus (*)(tSMBus *psSMBus, \
  1656. uint8_t *pui8Data))ROM_SMBUSTABLE[7])
  1657. #define ROM_SMBusMasterARPNotifyMaster \
  1658. ((tSMBusStatus (*)(tSMBus *psSMBus, \
  1659. uint8_t *pui8Data))ROM_SMBUSTABLE[8])
  1660. #define ROM_SMBusMasterARPPrepareToARP \
  1661. ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[9])
  1662. #define ROM_SMBusMasterARPResetDeviceDir \
  1663. ((tSMBusStatus (*)(tSMBus *psSMBus, \
  1664. uint8_t ui8TargetAddress))ROM_SMBUSTABLE[10])
  1665. #define ROM_SMBusMasterARPResetDeviceGen \
  1666. ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[11])
  1667. #define ROM_SMBusMasterBlockProcessCall \
  1668. ((tSMBusStatus (*)(tSMBus *psSMBus, \
  1669. uint8_t ui8TargetAddress, \
  1670. uint8_t ui8Command, \
  1671. uint8_t *pui8TxData, \
  1672. uint8_t ui8TxSize, \
  1673. uint8_t *pui8RxData))ROM_SMBUSTABLE[12])
  1674. #define ROM_SMBusMasterBlockRead \
  1675. ((tSMBusStatus (*)(tSMBus *psSMBus, \
  1676. uint8_t ui8TargetAddress, \
  1677. uint8_t ui8Command, \
  1678. uint8_t *pui8Data))ROM_SMBUSTABLE[13])
  1679. #define ROM_SMBusMasterBlockWrite \
  1680. ((tSMBusStatus (*)(tSMBus *psSMBus, \
  1681. uint8_t ui8TargetAddress, \
  1682. uint8_t ui8Command, \
  1683. uint8_t *pui8Data, \
  1684. uint8_t ui8Size))ROM_SMBUSTABLE[14])
  1685. #define ROM_SMBusMasterByteReceive \
  1686. ((tSMBusStatus (*)(tSMBus *psSMBus, \
  1687. uint8_t ui8TargetAddress, \
  1688. uint8_t *pui8Data))ROM_SMBUSTABLE[15])
  1689. #define ROM_SMBusMasterByteSend \
  1690. ((tSMBusStatus (*)(tSMBus *psSMBus, \
  1691. uint8_t ui8TargetAddress, \
  1692. uint8_t ui8Data))ROM_SMBUSTABLE[16])
  1693. #define ROM_SMBusMasterByteWordRead \
  1694. ((tSMBusStatus (*)(tSMBus *psSMBus, \
  1695. uint8_t ui8TargetAddress, \
  1696. uint8_t ui8Command, \
  1697. uint8_t *pui8Data, \
  1698. uint8_t ui8Size))ROM_SMBUSTABLE[17])
  1699. #define ROM_SMBusMasterByteWordWrite \
  1700. ((tSMBusStatus (*)(tSMBus *psSMBus, \
  1701. uint8_t ui8TargetAddress, \
  1702. uint8_t ui8Command, \
  1703. uint8_t *pui8Data, \
  1704. uint8_t ui8Size))ROM_SMBUSTABLE[18])
  1705. #define ROM_SMBusMasterHostNotify \
  1706. ((tSMBusStatus (*)(tSMBus *psSMBus, \
  1707. uint8_t ui8OwnSlaveAddress, \
  1708. uint8_t *pui8Data))ROM_SMBUSTABLE[19])
  1709. #define ROM_SMBusMasterI2CRead \
  1710. ((tSMBusStatus (*)(tSMBus *psSMBus, \
  1711. uint8_t ui8TargetAddress, \
  1712. uint8_t *pui8Data, \
  1713. uint8_t ui8Size))ROM_SMBUSTABLE[20])
  1714. #define ROM_SMBusMasterI2CWrite \
  1715. ((tSMBusStatus (*)(tSMBus *psSMBus, \
  1716. uint8_t ui8TargetAddress, \
  1717. uint8_t *pui8Data, \
  1718. uint8_t ui8Size))ROM_SMBUSTABLE[21])
  1719. #define ROM_SMBusMasterI2CWriteRead \
  1720. ((tSMBusStatus (*)(tSMBus *psSMBus, \
  1721. uint8_t ui8TargetAddress, \
  1722. uint8_t *pui8TxData, \
  1723. uint8_t ui8TxSize, \
  1724. uint8_t *pui8RxData, \
  1725. uint8_t ui8RxSize))ROM_SMBUSTABLE[22])
  1726. #define ROM_SMBusMasterInit \
  1727. ((void (*)(tSMBus *psSMBus, \
  1728. uint32_t ui32I2CBase, \
  1729. uint32_t ui32SMBusClock))ROM_SMBUSTABLE[23])
  1730. #define ROM_SMBusMasterIntEnable \
  1731. ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[24])
  1732. #define ROM_SMBusMasterProcessCall \
  1733. ((tSMBusStatus (*)(tSMBus *psSMBus, \
  1734. uint8_t ui8TargetAddress, \
  1735. uint8_t ui8Command, \
  1736. uint8_t *pui8TxData, \
  1737. uint8_t *pui8RxData))ROM_SMBUSTABLE[25])
  1738. #define ROM_SMBusMasterQuickCommand \
  1739. ((tSMBusStatus (*)(tSMBus *psSMBus, \
  1740. uint8_t ui8TargetAddress, \
  1741. bool bData))ROM_SMBUSTABLE[26])
  1742. #define ROM_SMBusPECDisable \
  1743. ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[27])
  1744. #define ROM_SMBusPECEnable \
  1745. ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[28])
  1746. #define ROM_SMBusRxPacketSizeGet \
  1747. ((uint8_t (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[29])
  1748. #define ROM_SMBusSlaveACKSend \
  1749. ((void (*)(tSMBus *psSMBus, \
  1750. bool bACK))ROM_SMBUSTABLE[30])
  1751. #define ROM_SMBusSlaveAddressSet \
  1752. ((void (*)(tSMBus *psSMBus, \
  1753. uint8_t ui8AddressNum, \
  1754. uint8_t ui8SlaveAddress))ROM_SMBUSTABLE[31])
  1755. #define ROM_SMBusSlaveARPFlagARGet \
  1756. ((bool (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[32])
  1757. #define ROM_SMBusSlaveARPFlagARSet \
  1758. ((void (*)(tSMBus *psSMBus, \
  1759. bool bValue))ROM_SMBUSTABLE[33])
  1760. #define ROM_SMBusSlaveARPFlagAVGet \
  1761. ((bool (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[34])
  1762. #define ROM_SMBusSlaveARPFlagAVSet \
  1763. ((void (*)(tSMBus *psSMBus, \
  1764. bool bValue))ROM_SMBUSTABLE[35])
  1765. #define ROM_SMBusSlaveBlockTransferDisable \
  1766. ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[36])
  1767. #define ROM_SMBusSlaveBlockTransferEnable \
  1768. ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[37])
  1769. #define ROM_SMBusSlaveCommandGet \
  1770. ((uint8_t (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[38])
  1771. #define ROM_SMBusSlaveI2CDisable \
  1772. ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[39])
  1773. #define ROM_SMBusSlaveI2CEnable \
  1774. ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[40])
  1775. #define ROM_SMBusSlaveInit \
  1776. ((void (*)(tSMBus *psSMBus, \
  1777. uint32_t ui32I2CBase))ROM_SMBUSTABLE[41])
  1778. #define ROM_SMBusSlaveIntAddressGet \
  1779. ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[42])
  1780. #define ROM_SMBusSlaveIntEnable \
  1781. ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[43])
  1782. #define ROM_SMBusSlaveIntProcess \
  1783. ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[44])
  1784. #define ROM_SMBusSlaveManualACKDisable \
  1785. ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[45])
  1786. #define ROM_SMBusSlaveManualACKEnable \
  1787. ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[46])
  1788. #define ROM_SMBusSlaveManualACKStatusGet \
  1789. ((bool (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[47])
  1790. #define ROM_SMBusSlaveProcessCallDisable \
  1791. ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[48])
  1792. #define ROM_SMBusSlaveProcessCallEnable \
  1793. ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[49])
  1794. #define ROM_SMBusSlaveRxBufferSet \
  1795. ((void (*)(tSMBus *psSMBus, \
  1796. uint8_t *pui8Data, \
  1797. uint8_t ui8Size))ROM_SMBUSTABLE[50])
  1798. #define ROM_SMBusSlaveTransferInit \
  1799. ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[51])
  1800. #define ROM_SMBusSlaveTxBufferSet \
  1801. ((void (*)(tSMBus *psSMBus, \
  1802. uint8_t *pui8Data, \
  1803. uint8_t ui8Size))ROM_SMBUSTABLE[52])
  1804. #define ROM_SMBusSlaveUDIDSet \
  1805. ((void (*)(tSMBus *psSMBus, \
  1806. tSMBusUDID *pUDID))ROM_SMBUSTABLE[53])
  1807. #define ROM_SMBusStatusGet \
  1808. ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[54])
  1809. #define ROM_SMBusSlaveDataSend \
  1810. ((tSMBusStatus (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[55])
  1811. #define ROM_SMBusFIFOEnable \
  1812. ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[56])
  1813. #define ROM_SMBusFIFODisable \
  1814. ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[57])
  1815. #define ROM_SMBusDMAEnable \
  1816. ((void (*)(tSMBus *psSMBus, \
  1817. uint8_t ui8TxChannel, \
  1818. uint8_t ui8RxChannel))ROM_SMBUSTABLE[58])
  1819. #define ROM_SMBusDMADisable \
  1820. ((void (*)(tSMBus *psSMBus))ROM_SMBUSTABLE[59])
  1821. //*****************************************************************************
  1822. //
  1823. // Macros for calling ROM functions in the SPIFlash API.
  1824. //
  1825. //*****************************************************************************
  1826. #define ROM_SPIFlashIntHandler \
  1827. ((uint32_t (*)(tSPIFlashState *pState))ROM_SPIFLASHTABLE[0])
  1828. #define ROM_SPIFlashInit \
  1829. ((void (*)(uint32_t ui32Base, \
  1830. uint32_t ui32Clock, \
  1831. uint32_t ui32BitRate))ROM_SPIFLASHTABLE[1])
  1832. #define ROM_SPIFlashWriteStatus \
  1833. ((void (*)(uint32_t ui32Base, \
  1834. uint8_t ui8Status))ROM_SPIFLASHTABLE[2])
  1835. #define ROM_SPIFlashPageProgram \
  1836. ((void (*)(uint32_t ui32Base, \
  1837. uint32_t ui32Addr, \
  1838. const uint8_t *pui8Data, \
  1839. uint32_t ui32Count))ROM_SPIFLASHTABLE[3])
  1840. #define ROM_SPIFlashPageProgramNonBlocking \
  1841. ((void (*)(tSPIFlashState *pState, \
  1842. uint32_t ui32Base, \
  1843. uint32_t ui32Addr, \
  1844. const uint8_t *pui8Data, \
  1845. uint32_t ui32Count, \
  1846. bool bUseDMA, \
  1847. uint32_t ui32TxChannel))ROM_SPIFLASHTABLE[4])
  1848. #define ROM_SPIFlashRead \
  1849. ((void (*)(uint32_t ui32Base, \
  1850. uint32_t ui32Addr, \
  1851. uint8_t *pui8Data, \
  1852. uint32_t ui32Count))ROM_SPIFLASHTABLE[5])
  1853. #define ROM_SPIFlashReadNonBlocking \
  1854. ((void (*)(tSPIFlashState *pState, \
  1855. uint32_t ui32Base, \
  1856. uint32_t ui32Addr, \
  1857. uint8_t *pui8Data, \
  1858. uint32_t ui32Count, \
  1859. bool bUseDMA, \
  1860. uint32_t ui32TxChannel, \
  1861. uint32_t ui32RxChannel))ROM_SPIFLASHTABLE[6])
  1862. #define ROM_SPIFlashWriteDisable \
  1863. ((void (*)(uint32_t ui32Base))ROM_SPIFLASHTABLE[7])
  1864. #define ROM_SPIFlashReadStatus \
  1865. ((uint8_t (*)(uint32_t ui32Base))ROM_SPIFLASHTABLE[8])
  1866. #define ROM_SPIFlashWriteEnable \
  1867. ((void (*)(uint32_t ui32Base))ROM_SPIFLASHTABLE[9])
  1868. #define ROM_SPIFlashFastRead \
  1869. ((void (*)(uint32_t ui32Base, \
  1870. uint32_t ui32Addr, \
  1871. uint8_t *pui8Data, \
  1872. uint32_t ui32Count))ROM_SPIFLASHTABLE[10])
  1873. #define ROM_SPIFlashFastReadNonBlocking \
  1874. ((void (*)(tSPIFlashState *pState, \
  1875. uint32_t ui32Base, \
  1876. uint32_t ui32Addr, \
  1877. uint8_t *pui8Data, \
  1878. uint32_t ui32Count, \
  1879. bool bUseDMA, \
  1880. uint32_t ui32TxChannel, \
  1881. uint32_t ui32RxChannel))ROM_SPIFLASHTABLE[11])
  1882. #define ROM_SPIFlashSectorErase \
  1883. ((void (*)(uint32_t ui32Base, \
  1884. uint32_t ui32Addr))ROM_SPIFLASHTABLE[12])
  1885. #define ROM_SPIFlashDualRead \
  1886. ((void (*)(uint32_t ui32Base, \
  1887. uint32_t ui32Addr, \
  1888. uint8_t *pui8Data, \
  1889. uint32_t ui32Count))ROM_SPIFLASHTABLE[13])
  1890. #define ROM_SPIFlashDualReadNonBlocking \
  1891. ((void (*)(tSPIFlashState *pState, \
  1892. uint32_t ui32Base, \
  1893. uint32_t ui32Addr, \
  1894. uint8_t *pui8Data, \
  1895. uint32_t ui32Count, \
  1896. bool bUseDMA, \
  1897. uint32_t ui32TxChannel, \
  1898. uint32_t ui32RxChannel))ROM_SPIFLASHTABLE[14])
  1899. #define ROM_SPIFlashBlockErase32 \
  1900. ((void (*)(uint32_t ui32Base, \
  1901. uint32_t ui32Addr))ROM_SPIFLASHTABLE[15])
  1902. #define ROM_SPIFlashQuadRead \
  1903. ((void (*)(uint32_t ui32Base, \
  1904. uint32_t ui32Addr, \
  1905. uint8_t *pui8Data, \
  1906. uint32_t ui32Count))ROM_SPIFLASHTABLE[16])
  1907. #define ROM_SPIFlashQuadReadNonBlocking \
  1908. ((void (*)(tSPIFlashState *pState, \
  1909. uint32_t ui32Base, \
  1910. uint32_t ui32Addr, \
  1911. uint8_t *pui8Data, \
  1912. uint32_t ui32Count, \
  1913. bool bUseDMA, \
  1914. uint32_t ui32TxChannel, \
  1915. uint32_t ui32RxChannel))ROM_SPIFLASHTABLE[17])
  1916. #define ROM_SPIFlashReadID \
  1917. ((void (*)(uint32_t ui32Base, \
  1918. uint8_t *pui8ManufacturerID, \
  1919. uint16_t *pui16DeviceID))ROM_SPIFLASHTABLE[18])
  1920. #define ROM_SPIFlashChipErase \
  1921. ((void (*)(uint32_t ui32Base))ROM_SPIFLASHTABLE[19])
  1922. #define ROM_SPIFlashBlockErase64 \
  1923. ((void (*)(uint32_t ui32Base, \
  1924. uint32_t ui32Addr))ROM_SPIFLASHTABLE[20])
  1925. //*****************************************************************************
  1926. //
  1927. // Macros for calling ROM functions in the SSI API.
  1928. //
  1929. //*****************************************************************************
  1930. #define ROM_SSIDataPut \
  1931. ((void (*)(uint32_t ui32Base, \
  1932. uint32_t ui32Data))ROM_SSITABLE[0])
  1933. #define ROM_SSIConfigSetExpClk \
  1934. ((void (*)(uint32_t ui32Base, \
  1935. uint32_t ui32SSIClk, \
  1936. uint32_t ui32Protocol, \
  1937. uint32_t ui32Mode, \
  1938. uint32_t ui32BitRate, \
  1939. uint32_t ui32DataWidth))ROM_SSITABLE[1])
  1940. #define ROM_SSIEnable \
  1941. ((void (*)(uint32_t ui32Base))ROM_SSITABLE[2])
  1942. #define ROM_SSIDisable \
  1943. ((void (*)(uint32_t ui32Base))ROM_SSITABLE[3])
  1944. #define ROM_SSIIntEnable \
  1945. ((void (*)(uint32_t ui32Base, \
  1946. uint32_t ui32IntFlags))ROM_SSITABLE[4])
  1947. #define ROM_SSIIntDisable \
  1948. ((void (*)(uint32_t ui32Base, \
  1949. uint32_t ui32IntFlags))ROM_SSITABLE[5])
  1950. #define ROM_SSIIntStatus \
  1951. ((uint32_t (*)(uint32_t ui32Base, \
  1952. bool bMasked))ROM_SSITABLE[6])
  1953. #define ROM_SSIIntClear \
  1954. ((void (*)(uint32_t ui32Base, \
  1955. uint32_t ui32IntFlags))ROM_SSITABLE[7])
  1956. #define ROM_SSIDataPutNonBlocking \
  1957. ((int32_t (*)(uint32_t ui32Base, \
  1958. uint32_t ui32Data))ROM_SSITABLE[8])
  1959. #define ROM_SSIDataGet \
  1960. ((void (*)(uint32_t ui32Base, \
  1961. uint32_t *pui32Data))ROM_SSITABLE[9])
  1962. #define ROM_SSIDataGetNonBlocking \
  1963. ((int32_t (*)(uint32_t ui32Base, \
  1964. uint32_t *pui32Data))ROM_SSITABLE[10])
  1965. #define ROM_UpdateSSI \
  1966. ((void (*)(void))ROM_SSITABLE[11])
  1967. #define ROM_SSIDMAEnable \
  1968. ((void (*)(uint32_t ui32Base, \
  1969. uint32_t ui32DMAFlags))ROM_SSITABLE[12])
  1970. #define ROM_SSIDMADisable \
  1971. ((void (*)(uint32_t ui32Base, \
  1972. uint32_t ui32DMAFlags))ROM_SSITABLE[13])
  1973. #define ROM_SSIBusy \
  1974. ((bool (*)(uint32_t ui32Base))ROM_SSITABLE[14])
  1975. #define ROM_SSIClockSourceGet \
  1976. ((uint32_t (*)(uint32_t ui32Base))ROM_SSITABLE[15])
  1977. #define ROM_SSIClockSourceSet \
  1978. ((void (*)(uint32_t ui32Base, \
  1979. uint32_t ui32Source))ROM_SSITABLE[16])
  1980. #define ROM_SSIAdvModeSet \
  1981. ((void (*)(uint32_t ui32Base, \
  1982. uint32_t ui32Mode))ROM_SSITABLE[17])
  1983. #define ROM_SSIAdvFrameHoldEnable \
  1984. ((void (*)(uint32_t ui32Base))ROM_SSITABLE[20])
  1985. #define ROM_SSIAdvFrameHoldDisable \
  1986. ((void (*)(uint32_t ui32Base))ROM_SSITABLE[21])
  1987. //*****************************************************************************
  1988. //
  1989. // Macros for calling ROM functions in the SysCtl API.
  1990. //
  1991. //*****************************************************************************
  1992. #define ROM_SysCtlSleep \
  1993. ((void (*)(void))ROM_SYSCTLTABLE[0])
  1994. #define ROM_SysCtlSRAMSizeGet \
  1995. ((uint32_t (*)(void))ROM_SYSCTLTABLE[1])
  1996. #define ROM_SysCtlFlashSizeGet \
  1997. ((uint32_t (*)(void))ROM_SYSCTLTABLE[2])
  1998. #define ROM_SysCtlPeripheralPresent \
  1999. ((bool (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[4])
  2000. #define ROM_SysCtlPeripheralReset \
  2001. ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[5])
  2002. #define ROM_SysCtlPeripheralEnable \
  2003. ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[6])
  2004. #define ROM_SysCtlPeripheralDisable \
  2005. ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[7])
  2006. #define ROM_SysCtlPeripheralSleepEnable \
  2007. ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[8])
  2008. #define ROM_SysCtlPeripheralSleepDisable \
  2009. ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[9])
  2010. #define ROM_SysCtlPeripheralDeepSleepEnable \
  2011. ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[10])
  2012. #define ROM_SysCtlPeripheralDeepSleepDisable \
  2013. ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[11])
  2014. #define ROM_SysCtlPeripheralClockGating \
  2015. ((void (*)(bool bEnable))ROM_SYSCTLTABLE[12])
  2016. #define ROM_SysCtlIntEnable \
  2017. ((void (*)(uint32_t ui32Ints))ROM_SYSCTLTABLE[13])
  2018. #define ROM_SysCtlIntDisable \
  2019. ((void (*)(uint32_t ui32Ints))ROM_SYSCTLTABLE[14])
  2020. #define ROM_SysCtlIntClear \
  2021. ((void (*)(uint32_t ui32Ints))ROM_SYSCTLTABLE[15])
  2022. #define ROM_SysCtlIntStatus \
  2023. ((uint32_t (*)(bool bMasked))ROM_SYSCTLTABLE[16])
  2024. #define ROM_SysCtlReset \
  2025. ((void (*)(void))ROM_SYSCTLTABLE[19])
  2026. #define ROM_SysCtlDeepSleep \
  2027. ((void (*)(void))ROM_SYSCTLTABLE[20])
  2028. #define ROM_SysCtlResetCauseGet \
  2029. ((uint32_t (*)(void))ROM_SYSCTLTABLE[21])
  2030. #define ROM_SysCtlResetCauseClear \
  2031. ((void (*)(uint32_t ui32Causes))ROM_SYSCTLTABLE[22])
  2032. #define ROM_SysCtlDelay \
  2033. ((void (*)(uint32_t ui32Count))ROM_SYSCTLTABLE[34])
  2034. #define ROM_SysCtlPeripheralReady \
  2035. ((bool (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[35])
  2036. #define ROM_SysCtlPeripheralPowerOn \
  2037. ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[36])
  2038. #define ROM_SysCtlPeripheralPowerOff \
  2039. ((void (*)(uint32_t ui32Peripheral))ROM_SYSCTLTABLE[37])
  2040. #define ROM_SysCtlMOSCConfigSet \
  2041. ((void (*)(uint32_t ui32Config))ROM_SYSCTLTABLE[44])
  2042. #define ROM_SysCtlPIOSCCalibrate \
  2043. ((uint32_t (*)(uint32_t ui32Type))ROM_SYSCTLTABLE[45])
  2044. #define ROM_SysCtlDeepSleepClockConfigSet \
  2045. ((void (*)(uint32_t ui32Div, \
  2046. uint32_t ui32Config))ROM_SYSCTLTABLE[47])
  2047. #define ROM_SysCtlResetBehaviorSet \
  2048. ((void (*)(uint32_t ui32Behavior))ROM_SYSCTLTABLE[51])
  2049. #define ROM_SysCtlResetBehaviorGet \
  2050. ((uint32_t (*)(void))ROM_SYSCTLTABLE[52])
  2051. #define ROM_SysCtlFlashSectorSizeGet \
  2052. ((uint32_t (*)(void))ROM_SYSCTLTABLE[54])
  2053. #define ROM_SysCtlVoltageEventConfig \
  2054. ((void (*)(uint32_t ui32Config))ROM_SYSCTLTABLE[55])
  2055. #define ROM_SysCtlVoltageEventStatus \
  2056. ((uint32_t (*)(void))ROM_SYSCTLTABLE[56])
  2057. #define ROM_SysCtlVoltageEventClear \
  2058. ((void (*)(uint32_t ui32Status))ROM_SYSCTLTABLE[57])
  2059. #define ROM_SysCtlNMIStatus \
  2060. ((uint32_t (*)(void))ROM_SYSCTLTABLE[58])
  2061. #define ROM_SysCtlNMIClear \
  2062. ((void (*)(uint32_t ui32Status))ROM_SYSCTLTABLE[59])
  2063. #define ROM_SysCtlClockOutConfig \
  2064. ((void (*)(uint32_t ui32Config, \
  2065. uint32_t ui32Div))ROM_SYSCTLTABLE[60])
  2066. #define ROM_SysCtlAltClkConfig \
  2067. ((void (*)(uint32_t ui32Config))ROM_SYSCTLTABLE[61])
  2068. //*****************************************************************************
  2069. //
  2070. // Macros for calling ROM functions in the SysExc API.
  2071. //
  2072. //*****************************************************************************
  2073. #define ROM_SysExcIntStatus \
  2074. ((uint32_t (*)(bool bMasked))ROM_SYSEXCTABLE[0])
  2075. #define ROM_SysExcIntClear \
  2076. ((void (*)(uint32_t ui32IntFlags))ROM_SYSEXCTABLE[1])
  2077. #define ROM_SysExcIntDisable \
  2078. ((void (*)(uint32_t ui32IntFlags))ROM_SYSEXCTABLE[2])
  2079. #define ROM_SysExcIntEnable \
  2080. ((void (*)(uint32_t ui32IntFlags))ROM_SYSEXCTABLE[3])
  2081. //*****************************************************************************
  2082. //
  2083. // Macros for calling ROM functions in the SysTick API.
  2084. //
  2085. //*****************************************************************************
  2086. #define ROM_SysTickValueGet \
  2087. ((uint32_t (*)(void))ROM_SYSTICKTABLE[0])
  2088. #define ROM_SysTickEnable \
  2089. ((void (*)(void))ROM_SYSTICKTABLE[1])
  2090. #define ROM_SysTickDisable \
  2091. ((void (*)(void))ROM_SYSTICKTABLE[2])
  2092. #define ROM_SysTickIntEnable \
  2093. ((void (*)(void))ROM_SYSTICKTABLE[3])
  2094. #define ROM_SysTickIntDisable \
  2095. ((void (*)(void))ROM_SYSTICKTABLE[4])
  2096. #define ROM_SysTickPeriodSet \
  2097. ((void (*)(uint32_t ui32Period))ROM_SYSTICKTABLE[5])
  2098. #define ROM_SysTickPeriodGet \
  2099. ((uint32_t (*)(void))ROM_SYSTICKTABLE[6])
  2100. //*****************************************************************************
  2101. //
  2102. // Macros for calling ROM functions in the Timer API.
  2103. //
  2104. //*****************************************************************************
  2105. #define ROM_TimerIntClear \
  2106. ((void (*)(uint32_t ui32Base, \
  2107. uint32_t ui32IntFlags))ROM_TIMERTABLE[0])
  2108. #define ROM_TimerEnable \
  2109. ((void (*)(uint32_t ui32Base, \
  2110. uint32_t ui32Timer))ROM_TIMERTABLE[1])
  2111. #define ROM_TimerDisable \
  2112. ((void (*)(uint32_t ui32Base, \
  2113. uint32_t ui32Timer))ROM_TIMERTABLE[2])
  2114. #define ROM_TimerConfigure \
  2115. ((void (*)(uint32_t ui32Base, \
  2116. uint32_t ui32Config))ROM_TIMERTABLE[3])
  2117. #define ROM_TimerControlLevel \
  2118. ((void (*)(uint32_t ui32Base, \
  2119. uint32_t ui32Timer, \
  2120. bool bInvert))ROM_TIMERTABLE[4])
  2121. #define ROM_TimerControlEvent \
  2122. ((void (*)(uint32_t ui32Base, \
  2123. uint32_t ui32Timer, \
  2124. uint32_t ui32Event))ROM_TIMERTABLE[6])
  2125. #define ROM_TimerControlStall \
  2126. ((void (*)(uint32_t ui32Base, \
  2127. uint32_t ui32Timer, \
  2128. bool bStall))ROM_TIMERTABLE[7])
  2129. #define ROM_TimerRTCEnable \
  2130. ((void (*)(uint32_t ui32Base))ROM_TIMERTABLE[8])
  2131. #define ROM_TimerRTCDisable \
  2132. ((void (*)(uint32_t ui32Base))ROM_TIMERTABLE[9])
  2133. #define ROM_TimerPrescaleSet \
  2134. ((void (*)(uint32_t ui32Base, \
  2135. uint32_t ui32Timer, \
  2136. uint32_t ui32Value))ROM_TIMERTABLE[10])
  2137. #define ROM_TimerPrescaleGet \
  2138. ((uint32_t (*)(uint32_t ui32Base, \
  2139. uint32_t ui32Timer))ROM_TIMERTABLE[11])
  2140. #define ROM_TimerPrescaleMatchSet \
  2141. ((void (*)(uint32_t ui32Base, \
  2142. uint32_t ui32Timer, \
  2143. uint32_t ui32Value))ROM_TIMERTABLE[12])
  2144. #define ROM_TimerPrescaleMatchGet \
  2145. ((uint32_t (*)(uint32_t ui32Base, \
  2146. uint32_t ui32Timer))ROM_TIMERTABLE[13])
  2147. #define ROM_TimerLoadSet \
  2148. ((void (*)(uint32_t ui32Base, \
  2149. uint32_t ui32Timer, \
  2150. uint32_t ui32Value))ROM_TIMERTABLE[14])
  2151. #define ROM_TimerLoadGet \
  2152. ((uint32_t (*)(uint32_t ui32Base, \
  2153. uint32_t ui32Timer))ROM_TIMERTABLE[15])
  2154. #define ROM_TimerValueGet \
  2155. ((uint32_t (*)(uint32_t ui32Base, \
  2156. uint32_t ui32Timer))ROM_TIMERTABLE[16])
  2157. #define ROM_TimerMatchSet \
  2158. ((void (*)(uint32_t ui32Base, \
  2159. uint32_t ui32Timer, \
  2160. uint32_t ui32Value))ROM_TIMERTABLE[17])
  2161. #define ROM_TimerMatchGet \
  2162. ((uint32_t (*)(uint32_t ui32Base, \
  2163. uint32_t ui32Timer))ROM_TIMERTABLE[18])
  2164. #define ROM_TimerIntEnable \
  2165. ((void (*)(uint32_t ui32Base, \
  2166. uint32_t ui32IntFlags))ROM_TIMERTABLE[19])
  2167. #define ROM_TimerIntDisable \
  2168. ((void (*)(uint32_t ui32Base, \
  2169. uint32_t ui32IntFlags))ROM_TIMERTABLE[20])
  2170. #define ROM_TimerIntStatus \
  2171. ((uint32_t (*)(uint32_t ui32Base, \
  2172. bool bMasked))ROM_TIMERTABLE[21])
  2173. #define ROM_TimerControlWaitOnTrigger \
  2174. ((void (*)(uint32_t ui32Base, \
  2175. uint32_t ui32Timer, \
  2176. bool bWait))ROM_TIMERTABLE[22])
  2177. #define ROM_TimerClockSourceGet \
  2178. ((uint32_t (*)(uint32_t ui32Base))ROM_TIMERTABLE[28])
  2179. #define ROM_TimerClockSourceSet \
  2180. ((void (*)(uint32_t ui32Base, \
  2181. uint32_t ui32Source))ROM_TIMERTABLE[29])
  2182. #define ROM_TimerADCEventGet \
  2183. ((uint32_t (*)(uint32_t ui32Base))ROM_TIMERTABLE[30])
  2184. #define ROM_TimerADCEventSet \
  2185. ((void (*)(uint32_t ui32Base, \
  2186. uint32_t ui32ADCEvent))ROM_TIMERTABLE[31])
  2187. #define ROM_TimerDMAEventGet \
  2188. ((uint32_t (*)(uint32_t ui32Base))ROM_TIMERTABLE[32])
  2189. #define ROM_TimerDMAEventSet \
  2190. ((void (*)(uint32_t ui32Base, \
  2191. uint32_t ui32DMAEvent))ROM_TIMERTABLE[33])
  2192. #define ROM_TimerSynchronize \
  2193. ((void (*)(uint32_t ui32Base, \
  2194. uint32_t ui32Timers))ROM_TIMERTABLE[34])
  2195. //*****************************************************************************
  2196. //
  2197. // Macros for calling ROM functions in the UART API.
  2198. //
  2199. //*****************************************************************************
  2200. #define ROM_UARTCharPut \
  2201. ((void (*)(uint32_t ui32Base, \
  2202. unsigned char ucData))ROM_UARTTABLE[0])
  2203. #define ROM_UARTParityModeSet \
  2204. ((void (*)(uint32_t ui32Base, \
  2205. uint32_t ui32Parity))ROM_UARTTABLE[1])
  2206. #define ROM_UARTParityModeGet \
  2207. ((uint32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[2])
  2208. #define ROM_UARTFIFOLevelSet \
  2209. ((void (*)(uint32_t ui32Base, \
  2210. uint32_t ui32TxLevel, \
  2211. uint32_t ui32RxLevel))ROM_UARTTABLE[3])
  2212. #define ROM_UARTFIFOLevelGet \
  2213. ((void (*)(uint32_t ui32Base, \
  2214. uint32_t *pui32TxLevel, \
  2215. uint32_t *pui32RxLevel))ROM_UARTTABLE[4])
  2216. #define ROM_UARTConfigSetExpClk \
  2217. ((void (*)(uint32_t ui32Base, \
  2218. uint32_t ui32UARTClk, \
  2219. uint32_t ui32Baud, \
  2220. uint32_t ui32Config))ROM_UARTTABLE[5])
  2221. #define ROM_UARTConfigGetExpClk \
  2222. ((void (*)(uint32_t ui32Base, \
  2223. uint32_t ui32UARTClk, \
  2224. uint32_t *pui32Baud, \
  2225. uint32_t *pui32Config))ROM_UARTTABLE[6])
  2226. #define ROM_UARTEnable \
  2227. ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[7])
  2228. #define ROM_UARTDisable \
  2229. ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[8])
  2230. #define ROM_UARTEnableSIR \
  2231. ((void (*)(uint32_t ui32Base, \
  2232. bool bLowPower))ROM_UARTTABLE[9])
  2233. #define ROM_UARTDisableSIR \
  2234. ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[10])
  2235. #define ROM_UARTCharsAvail \
  2236. ((bool (*)(uint32_t ui32Base))ROM_UARTTABLE[11])
  2237. #define ROM_UARTSpaceAvail \
  2238. ((bool (*)(uint32_t ui32Base))ROM_UARTTABLE[12])
  2239. #define ROM_UARTCharGetNonBlocking \
  2240. ((int32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[13])
  2241. #define ROM_UARTCharGet \
  2242. ((int32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[14])
  2243. #define ROM_UARTCharPutNonBlocking \
  2244. ((bool (*)(uint32_t ui32Base, \
  2245. unsigned char ucData))ROM_UARTTABLE[15])
  2246. #define ROM_UARTBreakCtl \
  2247. ((void (*)(uint32_t ui32Base, \
  2248. bool bBreakState))ROM_UARTTABLE[16])
  2249. #define ROM_UARTIntEnable \
  2250. ((void (*)(uint32_t ui32Base, \
  2251. uint32_t ui32IntFlags))ROM_UARTTABLE[17])
  2252. #define ROM_UARTIntDisable \
  2253. ((void (*)(uint32_t ui32Base, \
  2254. uint32_t ui32IntFlags))ROM_UARTTABLE[18])
  2255. #define ROM_UARTIntStatus \
  2256. ((uint32_t (*)(uint32_t ui32Base, \
  2257. bool bMasked))ROM_UARTTABLE[19])
  2258. #define ROM_UARTIntClear \
  2259. ((void (*)(uint32_t ui32Base, \
  2260. uint32_t ui32IntFlags))ROM_UARTTABLE[20])
  2261. #define ROM_UpdateUART \
  2262. ((void (*)(void))ROM_UARTTABLE[21])
  2263. #define ROM_UARTDMAEnable \
  2264. ((void (*)(uint32_t ui32Base, \
  2265. uint32_t ui32DMAFlags))ROM_UARTTABLE[22])
  2266. #define ROM_UARTDMADisable \
  2267. ((void (*)(uint32_t ui32Base, \
  2268. uint32_t ui32DMAFlags))ROM_UARTTABLE[23])
  2269. #define ROM_UARTFIFOEnable \
  2270. ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[24])
  2271. #define ROM_UARTFIFODisable \
  2272. ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[25])
  2273. #define ROM_UARTBusy \
  2274. ((bool (*)(uint32_t ui32Base))ROM_UARTTABLE[26])
  2275. #define ROM_UARTTxIntModeSet \
  2276. ((void (*)(uint32_t ui32Base, \
  2277. uint32_t ui32Mode))ROM_UARTTABLE[27])
  2278. #define ROM_UARTTxIntModeGet \
  2279. ((uint32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[28])
  2280. #define ROM_UARTRxErrorGet \
  2281. ((uint32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[29])
  2282. #define ROM_UARTRxErrorClear \
  2283. ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[30])
  2284. #define ROM_UARTClockSourceSet \
  2285. ((void (*)(uint32_t ui32Base, \
  2286. uint32_t ui32Source))ROM_UARTTABLE[31])
  2287. #define ROM_UARTClockSourceGet \
  2288. ((uint32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[32])
  2289. #define ROM_UART9BitEnable \
  2290. ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[33])
  2291. #define ROM_UART9BitDisable \
  2292. ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[34])
  2293. #define ROM_UART9BitAddrSet \
  2294. ((void (*)(uint32_t ui32Base, \
  2295. uint8_t ui8Addr, \
  2296. uint8_t ui8Mask))ROM_UARTTABLE[35])
  2297. #define ROM_UART9BitAddrSend \
  2298. ((void (*)(uint32_t ui32Base, \
  2299. uint8_t ui8Addr))ROM_UARTTABLE[36])
  2300. #define ROM_UARTSmartCardDisable \
  2301. ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[37])
  2302. #define ROM_UARTSmartCardEnable \
  2303. ((void (*)(uint32_t ui32Base))ROM_UARTTABLE[38])
  2304. #define ROM_UARTModemControlClear \
  2305. ((void (*)(uint32_t ui32Base, \
  2306. uint32_t ui32Control))ROM_UARTTABLE[39])
  2307. #define ROM_UARTModemControlGet \
  2308. ((uint32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[40])
  2309. #define ROM_UARTModemControlSet \
  2310. ((void (*)(uint32_t ui32Base, \
  2311. uint32_t ui32Control))ROM_UARTTABLE[41])
  2312. #define ROM_UARTModemStatusGet \
  2313. ((uint32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[42])
  2314. #define ROM_UARTFlowControlGet \
  2315. ((uint32_t (*)(uint32_t ui32Base))ROM_UARTTABLE[43])
  2316. #define ROM_UARTFlowControlSet \
  2317. ((void (*)(uint32_t ui32Base, \
  2318. uint32_t ui32Mode))ROM_UARTTABLE[44])
  2319. //*****************************************************************************
  2320. //
  2321. // Macros for calling ROM functions in the uDMA API.
  2322. //
  2323. //*****************************************************************************
  2324. #define ROM_uDMAChannelTransferSet \
  2325. ((void (*)(uint32_t ui32ChannelStructIndex, \
  2326. uint32_t ui32Mode, \
  2327. void *pvSrcAddr, \
  2328. void *pvDstAddr, \
  2329. uint32_t ui32TransferSize))ROM_UDMATABLE[0])
  2330. #define ROM_uDMAEnable \
  2331. ((void (*)(void))ROM_UDMATABLE[1])
  2332. #define ROM_uDMADisable \
  2333. ((void (*)(void))ROM_UDMATABLE[2])
  2334. #define ROM_uDMAErrorStatusGet \
  2335. ((uint32_t (*)(void))ROM_UDMATABLE[3])
  2336. #define ROM_uDMAErrorStatusClear \
  2337. ((void (*)(void))ROM_UDMATABLE[4])
  2338. #define ROM_uDMAChannelEnable \
  2339. ((void (*)(uint32_t ui32ChannelNum))ROM_UDMATABLE[5])
  2340. #define ROM_uDMAChannelDisable \
  2341. ((void (*)(uint32_t ui32ChannelNum))ROM_UDMATABLE[6])
  2342. #define ROM_uDMAChannelIsEnabled \
  2343. ((bool (*)(uint32_t ui32ChannelNum))ROM_UDMATABLE[7])
  2344. #define ROM_uDMAControlBaseSet \
  2345. ((void (*)(void *pControlTable))ROM_UDMATABLE[8])
  2346. #define ROM_uDMAControlBaseGet \
  2347. ((void * (*)(void))ROM_UDMATABLE[9])
  2348. #define ROM_uDMAChannelRequest \
  2349. ((void (*)(uint32_t ui32ChannelNum))ROM_UDMATABLE[10])
  2350. #define ROM_uDMAChannelAttributeEnable \
  2351. ((void (*)(uint32_t ui32ChannelNum, \
  2352. uint32_t ui32Attr))ROM_UDMATABLE[11])
  2353. #define ROM_uDMAChannelAttributeDisable \
  2354. ((void (*)(uint32_t ui32ChannelNum, \
  2355. uint32_t ui32Attr))ROM_UDMATABLE[12])
  2356. #define ROM_uDMAChannelAttributeGet \
  2357. ((uint32_t (*)(uint32_t ui32ChannelNum))ROM_UDMATABLE[13])
  2358. #define ROM_uDMAChannelControlSet \
  2359. ((void (*)(uint32_t ui32ChannelStructIndex, \
  2360. uint32_t ui32Control))ROM_UDMATABLE[14])
  2361. #define ROM_uDMAChannelSizeGet \
  2362. ((uint32_t (*)(uint32_t ui32ChannelStructIndex))ROM_UDMATABLE[15])
  2363. #define ROM_uDMAChannelModeGet \
  2364. ((uint32_t (*)(uint32_t ui32ChannelStructIndex))ROM_UDMATABLE[16])
  2365. #define ROM_uDMAControlAlternateBaseGet \
  2366. ((void * (*)(void))ROM_UDMATABLE[21])
  2367. #define ROM_uDMAChannelScatterGatherSet \
  2368. ((void (*)(uint32_t ui32ChannelNum, \
  2369. uint32_t ui32TaskCount, \
  2370. void *pvTaskList, \
  2371. uint32_t ui32IsPeriphSG))ROM_UDMATABLE[22])
  2372. #define ROM_uDMAChannelAssign \
  2373. ((void (*)(uint32_t ui32Mapping))ROM_UDMATABLE[23])
  2374. //*****************************************************************************
  2375. //
  2376. // Macros for calling ROM functions in the USB API.
  2377. //
  2378. //*****************************************************************************
  2379. #define ROM_USBDevAddrGet \
  2380. ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[1])
  2381. #define ROM_USBDevAddrSet \
  2382. ((void (*)(uint32_t ui32Base, \
  2383. uint32_t ui32Address))ROM_USBTABLE[2])
  2384. #define ROM_USBDevConnect \
  2385. ((void (*)(uint32_t ui32Base))ROM_USBTABLE[3])
  2386. #define ROM_USBDevDisconnect \
  2387. ((void (*)(uint32_t ui32Base))ROM_USBTABLE[4])
  2388. #define ROM_USBDevEndpointConfigSet \
  2389. ((void (*)(uint32_t ui32Base, \
  2390. uint32_t ui32Endpoint, \
  2391. uint32_t ui32MaxPacketSize, \
  2392. uint32_t ui32Flags))ROM_USBTABLE[5])
  2393. #define ROM_USBDevEndpointDataAck \
  2394. ((void (*)(uint32_t ui32Base, \
  2395. uint32_t ui32Endpoint, \
  2396. bool bIsLastPacket))ROM_USBTABLE[6])
  2397. #define ROM_USBDevEndpointStall \
  2398. ((void (*)(uint32_t ui32Base, \
  2399. uint32_t ui32Endpoint, \
  2400. uint32_t ui32Flags))ROM_USBTABLE[7])
  2401. #define ROM_USBDevEndpointStallClear \
  2402. ((void (*)(uint32_t ui32Base, \
  2403. uint32_t ui32Endpoint, \
  2404. uint32_t ui32Flags))ROM_USBTABLE[8])
  2405. #define ROM_USBDevEndpointStatusClear \
  2406. ((void (*)(uint32_t ui32Base, \
  2407. uint32_t ui32Endpoint, \
  2408. uint32_t ui32Flags))ROM_USBTABLE[9])
  2409. #define ROM_USBEndpointDataGet \
  2410. ((int32_t (*)(uint32_t ui32Base, \
  2411. uint32_t ui32Endpoint, \
  2412. uint8_t *pui8Data, \
  2413. uint32_t *pui32Size))ROM_USBTABLE[10])
  2414. #define ROM_USBEndpointDataPut \
  2415. ((int32_t (*)(uint32_t ui32Base, \
  2416. uint32_t ui32Endpoint, \
  2417. uint8_t *pui8Data, \
  2418. uint32_t ui32Size))ROM_USBTABLE[11])
  2419. #define ROM_USBEndpointDataSend \
  2420. ((int32_t (*)(uint32_t ui32Base, \
  2421. uint32_t ui32Endpoint, \
  2422. uint32_t ui32TransType))ROM_USBTABLE[12])
  2423. #define ROM_USBEndpointDataToggleClear \
  2424. ((void (*)(uint32_t ui32Base, \
  2425. uint32_t ui32Endpoint, \
  2426. uint32_t ui32Flags))ROM_USBTABLE[13])
  2427. #define ROM_USBEndpointStatus \
  2428. ((uint32_t (*)(uint32_t ui32Base, \
  2429. uint32_t ui32Endpoint))ROM_USBTABLE[14])
  2430. #define ROM_USBFIFOAddrGet \
  2431. ((uint32_t (*)(uint32_t ui32Base, \
  2432. uint32_t ui32Endpoint))ROM_USBTABLE[15])
  2433. #define ROM_USBFIFOConfigGet \
  2434. ((void (*)(uint32_t ui32Base, \
  2435. uint32_t ui32Endpoint, \
  2436. uint32_t *pui32FIFOAddress, \
  2437. uint32_t *pui32FIFOSize, \
  2438. uint32_t ui32Flags))ROM_USBTABLE[16])
  2439. #define ROM_USBFIFOConfigSet \
  2440. ((void (*)(uint32_t ui32Base, \
  2441. uint32_t ui32Endpoint, \
  2442. uint32_t ui32FIFOAddress, \
  2443. uint32_t ui32FIFOSize, \
  2444. uint32_t ui32Flags))ROM_USBTABLE[17])
  2445. #define ROM_USBFIFOFlush \
  2446. ((void (*)(uint32_t ui32Base, \
  2447. uint32_t ui32Endpoint, \
  2448. uint32_t ui32Flags))ROM_USBTABLE[18])
  2449. #define ROM_USBFrameNumberGet \
  2450. ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[19])
  2451. #define ROM_USBHostAddrGet \
  2452. ((uint32_t (*)(uint32_t ui32Base, \
  2453. uint32_t ui32Endpoint, \
  2454. uint32_t ui32Flags))ROM_USBTABLE[20])
  2455. #define ROM_USBHostAddrSet \
  2456. ((void (*)(uint32_t ui32Base, \
  2457. uint32_t ui32Endpoint, \
  2458. uint32_t ui32Addr, \
  2459. uint32_t ui32Flags))ROM_USBTABLE[21])
  2460. #define ROM_USBHostEndpointConfig \
  2461. ((void (*)(uint32_t ui32Base, \
  2462. uint32_t ui32Endpoint, \
  2463. uint32_t ui32MaxPacketSize, \
  2464. uint32_t ui32NAKPollInterval, \
  2465. uint32_t ui32TargetEndpoint, \
  2466. uint32_t ui32Flags))ROM_USBTABLE[22])
  2467. #define ROM_USBHostEndpointDataAck \
  2468. ((void (*)(uint32_t ui32Base, \
  2469. uint32_t ui32Endpoint))ROM_USBTABLE[23])
  2470. #define ROM_USBHostEndpointDataToggle \
  2471. ((void (*)(uint32_t ui32Base, \
  2472. uint32_t ui32Endpoint, \
  2473. bool bDataToggle, \
  2474. uint32_t ui32Flags))ROM_USBTABLE[24])
  2475. #define ROM_USBHostEndpointStatusClear \
  2476. ((void (*)(uint32_t ui32Base, \
  2477. uint32_t ui32Endpoint, \
  2478. uint32_t ui32Flags))ROM_USBTABLE[25])
  2479. #define ROM_USBHostHubAddrGet \
  2480. ((uint32_t (*)(uint32_t ui32Base, \
  2481. uint32_t ui32Endpoint, \
  2482. uint32_t ui32Flags))ROM_USBTABLE[26])
  2483. #define ROM_USBHostHubAddrSet \
  2484. ((void (*)(uint32_t ui32Base, \
  2485. uint32_t ui32Endpoint, \
  2486. uint32_t ui32Addr, \
  2487. uint32_t ui32Flags))ROM_USBTABLE[27])
  2488. #define ROM_USBHostPwrDisable \
  2489. ((void (*)(uint32_t ui32Base))ROM_USBTABLE[28])
  2490. #define ROM_USBHostPwrEnable \
  2491. ((void (*)(uint32_t ui32Base))ROM_USBTABLE[29])
  2492. #define ROM_USBHostPwrConfig \
  2493. ((void (*)(uint32_t ui32Base, \
  2494. uint32_t ui32Flags))ROM_USBTABLE[30])
  2495. #define ROM_USBHostPwrFaultDisable \
  2496. ((void (*)(uint32_t ui32Base))ROM_USBTABLE[31])
  2497. #define ROM_USBHostPwrFaultEnable \
  2498. ((void (*)(uint32_t ui32Base))ROM_USBTABLE[32])
  2499. #define ROM_USBHostRequestIN \
  2500. ((void (*)(uint32_t ui32Base, \
  2501. uint32_t ui32Endpoint))ROM_USBTABLE[33])
  2502. #define ROM_USBHostRequestStatus \
  2503. ((void (*)(uint32_t ui32Base))ROM_USBTABLE[34])
  2504. #define ROM_USBHostReset \
  2505. ((void (*)(uint32_t ui32Base, \
  2506. bool bStart))ROM_USBTABLE[35])
  2507. #define ROM_USBHostResume \
  2508. ((void (*)(uint32_t ui32Base, \
  2509. bool bStart))ROM_USBTABLE[36])
  2510. #define ROM_USBHostSpeedGet \
  2511. ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[37])
  2512. #define ROM_USBHostSuspend \
  2513. ((void (*)(uint32_t ui32Base))ROM_USBTABLE[38])
  2514. #define ROM_USBDevEndpointConfigGet \
  2515. ((void (*)(uint32_t ui32Base, \
  2516. uint32_t ui32Endpoint, \
  2517. uint32_t *pui32MaxPacketSize, \
  2518. uint32_t *pui32Flags))ROM_USBTABLE[41])
  2519. #define ROM_USBEndpointDMAEnable \
  2520. ((void (*)(uint32_t ui32Base, \
  2521. uint32_t ui32Endpoint, \
  2522. uint32_t ui32Flags))ROM_USBTABLE[42])
  2523. #define ROM_USBEndpointDMADisable \
  2524. ((void (*)(uint32_t ui32Base, \
  2525. uint32_t ui32Endpoint, \
  2526. uint32_t ui32Flags))ROM_USBTABLE[43])
  2527. #define ROM_USBEndpointDataAvail \
  2528. ((uint32_t (*)(uint32_t ui32Base, \
  2529. uint32_t ui32Endpoint))ROM_USBTABLE[44])
  2530. #define ROM_USBModeGet \
  2531. ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[46])
  2532. #define ROM_USBIntDisableControl \
  2533. ((void (*)(uint32_t ui32Base, \
  2534. uint32_t ui32IntFlags))ROM_USBTABLE[48])
  2535. #define ROM_USBIntEnableControl \
  2536. ((void (*)(uint32_t ui32Base, \
  2537. uint32_t ui32IntFlags))ROM_USBTABLE[49])
  2538. #define ROM_USBIntStatusControl \
  2539. ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[50])
  2540. #define ROM_USBIntDisableEndpoint \
  2541. ((void (*)(uint32_t ui32Base, \
  2542. uint32_t ui32IntFlags))ROM_USBTABLE[51])
  2543. #define ROM_USBIntEnableEndpoint \
  2544. ((void (*)(uint32_t ui32Base, \
  2545. uint32_t ui32IntFlags))ROM_USBTABLE[52])
  2546. #define ROM_USBIntStatusEndpoint \
  2547. ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[53])
  2548. #define ROM_USBHostMode \
  2549. ((void (*)(uint32_t ui32Base))ROM_USBTABLE[54])
  2550. #define ROM_USBDevMode \
  2551. ((void (*)(uint32_t ui32Base))ROM_USBTABLE[55])
  2552. #define ROM_USBPHYPowerOff \
  2553. ((void (*)(uint32_t ui32Base))ROM_USBTABLE[56])
  2554. #define ROM_USBPHYPowerOn \
  2555. ((void (*)(uint32_t ui32Base))ROM_USBTABLE[57])
  2556. #define ROM_UpdateUSB \
  2557. ((void (*)(uint8_t *pui8DescriptorInfo))ROM_USBTABLE[58])
  2558. #define ROM_USBOTGMode \
  2559. ((void (*)(uint32_t ui32Base))ROM_USBTABLE[59])
  2560. #define ROM_USBHostRequestINClear \
  2561. ((void (*)(uint32_t ui32Base, \
  2562. uint32_t ui32Endpoint))ROM_USBTABLE[60])
  2563. #define ROM_USBNumEndpointsGet \
  2564. ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[61])
  2565. #define ROM_USBClockDisable \
  2566. ((void (*)(uint32_t ui32Base))ROM_USBTABLE[62])
  2567. #define ROM_USBClockEnable \
  2568. ((void (*)(uint32_t ui32Base, \
  2569. uint32_t ui32Div, \
  2570. uint32_t ui32Flags))ROM_USBTABLE[63])
  2571. #define ROM_USBDevLPMConfig \
  2572. ((void (*)(uint32_t ui32Base, \
  2573. uint32_t ui32Config))ROM_USBTABLE[65])
  2574. #define ROM_USBDevLPMDisable \
  2575. ((void (*)(uint32_t ui32Base))ROM_USBTABLE[66])
  2576. #define ROM_USBDevLPMEnable \
  2577. ((void (*)(uint32_t ui32Base))ROM_USBTABLE[67])
  2578. #define ROM_USBDevLPMRemoteWake \
  2579. ((void (*)(uint32_t ui32Base))ROM_USBTABLE[68])
  2580. #define ROM_USBDevSpeedGet \
  2581. ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[69])
  2582. #define ROM_USBDMAChannelAddressGet \
  2583. ((void * (*)(uint32_t ui32Base, \
  2584. uint32_t ui32Channel))ROM_USBTABLE[70])
  2585. #define ROM_USBDMAChannelAddressSet \
  2586. ((void (*)(uint32_t ui32Base, \
  2587. uint32_t ui32Channel, \
  2588. void *pvAddress))ROM_USBTABLE[71])
  2589. #define ROM_USBDMAChannelConfigSet \
  2590. ((void (*)(uint32_t ui32Base, \
  2591. uint32_t ui32Channel, \
  2592. uint32_t ui32Endpoint, \
  2593. uint32_t ui32Config))ROM_USBTABLE[72])
  2594. #define ROM_USBDMAChannelDisable \
  2595. ((void (*)(uint32_t ui32Base, \
  2596. uint32_t ui32Channel))ROM_USBTABLE[73])
  2597. #define ROM_USBDMAChannelEnable \
  2598. ((void (*)(uint32_t ui32Base, \
  2599. uint32_t ui32Channel))ROM_USBTABLE[74])
  2600. #define ROM_USBDMAChannelIntDisable \
  2601. ((void (*)(uint32_t ui32Base, \
  2602. uint32_t ui32Channel))ROM_USBTABLE[75])
  2603. #define ROM_USBDMAChannelIntEnable \
  2604. ((void (*)(uint32_t ui32Base, \
  2605. uint32_t ui32Channel))ROM_USBTABLE[76])
  2606. #define ROM_USBDMAChannelCountGet \
  2607. ((uint32_t (*)(uint32_t ui32Base, \
  2608. uint32_t ui32Channel))ROM_USBTABLE[77])
  2609. #define ROM_USBDMAChannelCountSet \
  2610. ((void (*)(uint32_t ui32Base, \
  2611. uint32_t ui32Count, \
  2612. uint32_t ui32Channel))ROM_USBTABLE[78])
  2613. #define ROM_USBDMAChannelIntStatus \
  2614. ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[79])
  2615. #define ROM_USBDMAChannelStatus \
  2616. ((uint32_t (*)(uint32_t ui32Base, \
  2617. uint32_t ui32Channel))ROM_USBTABLE[80])
  2618. #define ROM_USBDMAChannelStatusClear \
  2619. ((void (*)(uint32_t ui32Base, \
  2620. uint32_t ui32Channel, \
  2621. uint32_t ui32Status))ROM_USBTABLE[81])
  2622. #define ROM_USBHighSpeed \
  2623. ((void (*)(uint32_t ui32Base, \
  2624. bool bEnable))ROM_USBTABLE[82])
  2625. #define ROM_USBHostEndpointPing \
  2626. ((void (*)(uint32_t ui32Base, \
  2627. uint32_t ui32Endpoint, \
  2628. bool bEnable))ROM_USBTABLE[83])
  2629. #define ROM_USBHostEndpointSpeed \
  2630. ((void (*)(uint32_t ui32Base, \
  2631. uint32_t ui32Endpoint, \
  2632. uint32_t ui32Flags))ROM_USBTABLE[84])
  2633. #define ROM_USBHostLPMConfig \
  2634. ((void (*)(uint32_t ui32Base, \
  2635. uint32_t ui32ResumeTime, \
  2636. uint32_t ui32Config))ROM_USBTABLE[85])
  2637. #define ROM_USBHostLPMResume \
  2638. ((void (*)(uint32_t ui32Base))ROM_USBTABLE[86])
  2639. #define ROM_USBHostLPMSend \
  2640. ((void (*)(uint32_t ui32Base, \
  2641. uint32_t ui32Address, \
  2642. uint32_t uiEndpoint))ROM_USBTABLE[87])
  2643. #define ROM_USBLPMIntDisable \
  2644. ((void (*)(uint32_t ui32Base, \
  2645. uint32_t ui32Ints))ROM_USBTABLE[88])
  2646. #define ROM_USBLPMIntEnable \
  2647. ((void (*)(uint32_t ui32Base, \
  2648. uint32_t ui32Ints))ROM_USBTABLE[89])
  2649. #define ROM_USBLPMIntStatus \
  2650. ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[90])
  2651. #define ROM_USBLPMLinkStateGet \
  2652. ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[91])
  2653. #define ROM_USBEndpointPacketCountSet \
  2654. ((void (*)(uint32_t ui32Base, \
  2655. uint32_t ui32Endpoint, \
  2656. uint32_t ui32Count))ROM_USBTABLE[92])
  2657. #define ROM_USBULPIConfig \
  2658. ((void (*)(uint32_t ui32Base, \
  2659. uint32_t ui32Config))ROM_USBTABLE[93])
  2660. #define ROM_USBULPIDisable \
  2661. ((void (*)(uint32_t ui32Base))ROM_USBTABLE[94])
  2662. #define ROM_USBULPIEnable \
  2663. ((void (*)(uint32_t ui32Base))ROM_USBTABLE[95])
  2664. #define ROM_USBULPIRegRead \
  2665. ((uint8_t (*)(uint32_t ui32Base, \
  2666. uint8_t ui8Reg))ROM_USBTABLE[96])
  2667. #define ROM_USBULPIRegWrite \
  2668. ((void (*)(uint32_t ui32Base, \
  2669. uint8_t ui8Reg, \
  2670. uint8_t ui8Data))ROM_USBTABLE[97])
  2671. #define ROM_USBOTGSessionRequest \
  2672. ((void (*)(uint32_t ui32Base, \
  2673. bool bStart))ROM_USBTABLE[98])
  2674. #define ROM_USBDMANumChannels \
  2675. ((uint32_t (*)(uint32_t ui32Base))ROM_USBTABLE[99])
  2676. #define ROM_USBEndpointDMAConfigSet \
  2677. ((void (*)(uint32_t ui32Base, \
  2678. uint32_t ui32Endpoint, \
  2679. uint32_t ui32Config))ROM_USBTABLE[100])
  2680. #define ROM_USBLPMRemoteWakeEnabled \
  2681. ((bool (*)(uint32_t ui32Base))ROM_USBTABLE[102])
  2682. #define ROM_USBModeConfig \
  2683. ((void (*)(uint32_t ui32Base, \
  2684. uint32_t ui32Mode))ROM_USBTABLE[103])
  2685. //*****************************************************************************
  2686. //
  2687. // Macros for calling ROM functions in the Watchdog API.
  2688. //
  2689. //*****************************************************************************
  2690. #define ROM_WatchdogIntClear \
  2691. ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[0])
  2692. #define ROM_WatchdogRunning \
  2693. ((bool (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[1])
  2694. #define ROM_WatchdogEnable \
  2695. ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[2])
  2696. #define ROM_WatchdogResetEnable \
  2697. ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[3])
  2698. #define ROM_WatchdogResetDisable \
  2699. ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[4])
  2700. #define ROM_WatchdogLock \
  2701. ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[5])
  2702. #define ROM_WatchdogUnlock \
  2703. ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[6])
  2704. #define ROM_WatchdogLockState \
  2705. ((bool (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[7])
  2706. #define ROM_WatchdogReloadSet \
  2707. ((void (*)(uint32_t ui32Base, \
  2708. uint32_t ui32LoadVal))ROM_WATCHDOGTABLE[8])
  2709. #define ROM_WatchdogReloadGet \
  2710. ((uint32_t (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[9])
  2711. #define ROM_WatchdogValueGet \
  2712. ((uint32_t (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[10])
  2713. #define ROM_WatchdogIntEnable \
  2714. ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[11])
  2715. #define ROM_WatchdogIntStatus \
  2716. ((uint32_t (*)(uint32_t ui32Base, \
  2717. bool bMasked))ROM_WATCHDOGTABLE[12])
  2718. #define ROM_WatchdogStallEnable \
  2719. ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[13])
  2720. #define ROM_WatchdogStallDisable \
  2721. ((void (*)(uint32_t ui32Base))ROM_WATCHDOGTABLE[14])
  2722. #define ROM_WatchdogIntTypeSet \
  2723. ((void (*)(uint32_t ui32Base, \
  2724. uint32_t ui32Type))ROM_WATCHDOGTABLE[15])
  2725. //*****************************************************************************
  2726. //
  2727. // Macros for calling ROM functions in the Software API.
  2728. //
  2729. //*****************************************************************************
  2730. #define ROM_Crc16Array \
  2731. ((uint16_t (*)(uint32_t ui32WordLen, \
  2732. const uint32_t *pui32Data))ROM_SOFTWARETABLE[1])
  2733. #define ROM_Crc16Array3 \
  2734. ((void (*)(uint32_t ui32WordLen, \
  2735. const uint32_t *pui32Data, \
  2736. uint16_t *pui16Crc3))ROM_SOFTWARETABLE[2])
  2737. #define ROM_Crc16 \
  2738. ((uint16_t (*)(uint16_t ui16Crc, \
  2739. const uint8_t *pui8Data, \
  2740. uint32_t ui32Count))ROM_SOFTWARETABLE[3])
  2741. #define ROM_Crc8CCITT \
  2742. ((uint8_t (*)(uint8_t ui8Crc, \
  2743. const uint8_t *pui8Data, \
  2744. uint32_t ui32Count))ROM_SOFTWARETABLE[4])
  2745. #define ROM_Crc32 \
  2746. ((uint32_t (*)(uint32_t ui32Crc, \
  2747. const uint8_t *pui8Data, \
  2748. uint32_t ui32Count))ROM_SOFTWARETABLE[5])
  2749. #define ROM_pvAESTable \
  2750. ((void *)&(ROM_SOFTWARETABLE[7]))
  2751. #endif // __DRIVERLIB_ROM_H__