nuc980.h 120 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748
  1. /**************************************************************************//**
  2. * @file nuc980.h
  3. * @brief NUC980 peripheral access layer header file.
  4. * This file contains all the peripheral register's definitions
  5. * and memory mapping for NuMicro NUC980 MPU.
  6. *
  7. * SPDX-License-Identifier: Apache-2.0
  8. * @copyright (C) 2019 Nuvoton Technology Corp. All rights reserved.
  9. *****************************************************************************/
  10. /**
  11. \mainpage NuMicro NUC980 Family Driver Reference Guide
  12. *
  13. * <b>Introduction</b>
  14. *
  15. * This user manual describes the usage of NUC980 family device driver
  16. *
  17. * <b>Disclaimer</b>
  18. *
  19. * The Software is furnished "AS IS", without warranty as to performance or results, and
  20. * the entire risk as to performance or results is assumed by YOU. Nuvoton disclaims all
  21. * warranties, express, implied or otherwise, with regard to the Software, its use, or
  22. * operation, including without limitation any and all warranties of merchantability, fitness
  23. * for a particular purpose, and non-infringement of intellectual property rights.
  24. *
  25. * <b>Important Notice</b>
  26. *
  27. * Nuvoton Products are neither intended nor warranted for usage in systems or equipment,
  28. * any malfunction or failure of which may cause loss of human life, bodily injury or severe
  29. * property damage. Such applications are deemed, "Insecure Usage".
  30. *
  31. * Insecure usage includes, but is not limited to: equipment for surgical implementation,
  32. * atomic energy control instruments, airplane or spaceship instruments, the control or
  33. * operation of dynamic, brake or safety systems designed for vehicular use, traffic signal
  34. * instruments, all types of safety devices, and other applications intended to support or
  35. * sustain life.
  36. *
  37. * All Insecure Usage shall be made at customer's risk, and in the event that third parties
  38. * lay claims to Nuvoton as a result of customer's Insecure Usage, customer shall indemnify
  39. * the damages and liabilities thus incurred by Nuvoton.
  40. *
  41. * Please note that all data and specifications are subject to change without notice. All the
  42. * trademarks of products and companies mentioned in this document belong to their respective
  43. * owners.
  44. *
  45. * <b>Copyright Notice</b>
  46. *
  47. * Copyright (C) 2020 Nuvoton Technology Corp. All rights reserved.
  48. */
  49. #ifndef __NUC980_H__
  50. #define __NUC980_H__
  51. #include <stdint.h>
  52. /** @addtogroup NUC980_PERIPHERAL_MEM_MAP Peripheral Memory Base
  53. Memory Mapped Structure for NUC980 Peripheral
  54. @{
  55. */
  56. /*!< AHB peripherals */
  57. #define SYS_BA 0xB0000000 /* Global Control */
  58. #define CLK_BA 0xB0000200 /* Clock Control */
  59. #define SDIC_BA 0xB0002000
  60. #define EBI_BA 0xB0010000 /* EBI Control */
  61. #define GPIO_BA 0xB0004000
  62. #define PDMA0_BA 0xB0008000
  63. #define PDMA1_BA 0xB0009000
  64. #define EMC0_BA 0xB0012000
  65. #define EHCI_BA 0xB0015000
  66. #define USBD_BA 0xB0016000
  67. #define OHCI_BA 0xB0017000
  68. #define SDH_BA 0xB0018000
  69. #define FMI_BA 0xB0019000
  70. #define CRPT_BA 0xB001C000
  71. #define I2S_BA 0xB0020000
  72. #define EMC1_BA 0xB0022000
  73. #define CAP0_BA 0xB0024000
  74. #define CAP1_BA 0xB0014000
  75. #define PA_BA 0xB0004000
  76. #define PB_BA 0xB0004040
  77. #define PC_BA 0xB0004080
  78. #define PD_BA 0xB00040C0
  79. #define PE_BA 0xB0004100
  80. #define PF_BA 0xB0004140
  81. #define PG_BA 0xB0004180
  82. /*!< APB peripherals */
  83. #define WDT_BA 0xB0040000 /* Watch Dog Timer */
  84. #define WWDT_BA 0xB0040100 /* Windows Watch Dog Timer */
  85. #define RTC_BA 0xB0041000
  86. #define AIC_BA 0xB0042000 /* Interrupt Controller */
  87. #define ADC_BA 0xB0043000
  88. #define ETMR0_BA 0xB0050000 /* ETimer0 */
  89. #define ETMR1_BA 0xB0050100 /* ETimer1 */
  90. #define ETMR2_BA 0xB0051000 /* ETimer2 */
  91. #define ETMR3_BA 0xB0051100 /* ETimer3 */
  92. #define ETMR4_BA 0xB0052000 /* ETimer4 */
  93. #define ETMR5_BA 0xB0052100 /* ETimer5 */
  94. #define PWM0_BA 0xB0058000
  95. #define PWM1_BA 0xB0059000
  96. #define QSPI0_BA 0xB0060000
  97. #define SPI0_BA 0xB0061000
  98. #define SPI1_BA 0xB0062000
  99. #define UART0_BA 0xB0070000 /* UART0 Control */
  100. #define UART1_BA 0xB0071000 /* UART1 Control */
  101. #define UART2_BA 0xB0072000
  102. #define UART3_BA 0xB0073000
  103. #define UART4_BA 0xB0074000
  104. #define UART5_BA 0xB0075000
  105. #define UART6_BA 0xB0076000
  106. #define UART7_BA 0xB0077000
  107. #define UART8_BA 0xB0078000
  108. #define UART9_BA 0xB0079000
  109. #define I2C0_BA 0xB0080000
  110. #define I2C1_BA 0xB0081000
  111. #define I2C2_BA 0xB0082000
  112. #define I2C3_BA 0xB0083000
  113. #define SC0_BA 0xB0090000
  114. #define SC1_BA 0xB0091000
  115. #define CAN0_BA 0xB00A0000
  116. #define CAN1_BA 0xB00A1000
  117. #define CAN2_BA 0xB00A2000
  118. #define CAN3_BA 0xB00A3000
  119. /*@}*/ /* end of group NUC980_PERIPHERAL_MEM_MAP */
  120. /******************************************************************************/
  121. /* Device Specific Peripheral registers structures */
  122. /******************************************************************************/
  123. /** @addtogroup REGISTER Control Register
  124. NUC980 Device Specific Peripheral registers structures
  125. @{
  126. */
  127. /*---------------------- System Manger Controller -------------------------*/
  128. /**
  129. @addtogroup SYS System Manger Controller(SYS)
  130. Memory Mapped Structure for SYS Controller
  131. @{ */
  132. #define REG_SYS_PDID (SYS_BA+0x000) /*!< Product Identifier Register */
  133. #define REG_SYS_PWRON (SYS_BA+0x004) /*!< Power-On Setting Register */
  134. #define REG_SYS_ARBCON (SYS_BA+0x008) /*!< Arbitration Control Register */
  135. #define REG_SYS_LVRDCR (SYS_BA+0x020) /*!< Low Voltage Reset & Detect Control Register */
  136. #define REG_SYS_MISCFCR (SYS_BA+0x030) /*!< Miscellaneous Function Control Register */
  137. #define REG_SYS_MISCIER (SYS_BA+0x040) /*!< Miscellaneous Interrupt Enable Register */
  138. #define REG_SYS_MISCISR (SYS_BA+0x044) /*!< Miscellaneous Interrupt Status Register */
  139. #define REG_SYS_WKUPSER0 (SYS_BA+0x050) /*!< System Wakeup Source Enable Register0 */
  140. #define REG_SYS_WKUPSER1 (SYS_BA+0x054) /*!< System Wakeup Source Enable Register1 */
  141. #define REG_SYS_WKUPSSR0 (SYS_BA+0x058) /*!< System Wakeup Source Status Register0 */
  142. #define REG_SYS_WKUPSSR1 (SYS_BA+0x05C) /*!< System Wakeup Source Status Register1 */
  143. #define REG_SYS_AHBIPRST (SYS_BA+0x060) /*!< AHB IP Reset Control Register */
  144. #define REG_SYS_APBIPRST0 (SYS_BA+0x064) /*!< APB IP Reset Control Register 0 */
  145. #define REG_SYS_APBIPRST1 (SYS_BA+0x068) /*!< APB IP Reset Control Register 1 */
  146. #define REG_SYS_RSTSTS (SYS_BA+0x06C) /*!< Reset Source Active Status Register */
  147. #define REG_SYS_GPA_MFPL (SYS_BA+0x070) /*!< GPIOA Low Byte Multiple Function Control Register */
  148. #define REG_SYS_GPA_MFPH (SYS_BA+0x074) /*!< GPIOA High Byte Multiple Function Control Register */
  149. #define REG_SYS_GPB_MFPL (SYS_BA+0x078) /*!< GPIOB Low Byte Multiple Function Control Register */
  150. #define REG_SYS_GPB_MFPH (SYS_BA+0x07C) /*!< GPIOB High Byte Multiple Function Control Register */
  151. #define REG_SYS_GPC_MFPL (SYS_BA+0x080) /*!< GPIOC Low Byte Multiple Function Control Register */
  152. #define REG_SYS_GPC_MFPH (SYS_BA+0x084) /*!< GPIOC High Byte Multiple Function Control Register */
  153. #define REG_SYS_GPD_MFPL (SYS_BA+0x088) /*!< GPIOD Low Byte Multiple Function Control Register */
  154. #define REG_SYS_GPD_MFPH (SYS_BA+0x08C) /*!< GPIOD High Byte Multiple Function Control Register */
  155. #define REG_SYS_GPE_MFPL (SYS_BA+0x090) /*!< GPIOE Low Byte Multiple Function Control Register */
  156. #define REG_SYS_GPE_MFPH (SYS_BA+0x094) /*!< GPIOE High Byte Multiple Function Control Register */
  157. #define REG_SYS_GPF_MFPL (SYS_BA+0x098) /*!< GPIOF Low Byte Multiple Function Control Register */
  158. #define REG_SYS_GPF_MFPH (SYS_BA+0x09C) /*!< GPIOF High Byte Multiple Function Control Register */
  159. #define REG_SYS_GPG_MFPL (SYS_BA+0x0A0) /*!< GPIOG Low Byte Multiple Function Control Register */
  160. #define REG_SYS_GPG_MFPH (SYS_BA+0x0A4) /*!< GPIOG High Byte Multiple Function Control Register */
  161. #define REG_SYS_GPH_MFPL (SYS_BA+0x0A8) /*!< GPIOH Low Byte Multiple Function Control Register */
  162. #define REG_SYS_GPH_MFPH (SYS_BA+0x0AC) /*!< GPIOH High Byte Multiple Function Control Register */
  163. #define REG_SYS_GPI_MFPL (SYS_BA+0x0B0) /*!< GPIOI Low Byte Multiple Function Control Register */
  164. #define REG_SYS_GPI_MFPH (SYS_BA+0x0B4) /*!< GPIOI High Byte Multiple Function Control Register */
  165. #define REG_SYS_GPJ_MFPL (SYS_BA+0x0B8) /*!< GPIOJ Low Byte Multiple Function Control Register */
  166. #define REG_SYS_DDR_DSCTL (SYS_BA+0x0F0) /*!< DDR I/O Driving Strength Control Register */
  167. #define REG_SYS_PORDISCR (SYS_BA+0x100) /*!< Power-On-Reset Disable Control Register */
  168. #define REG_SYS_ICEDBGCR (SYS_BA+0x104) /*!< ICE Debug Interface Control Register */
  169. #define REG_SYS_ERRADDCR (SYS_BA+0x108) /*!< Error Response Address Control Regsiter */
  170. #define REG_SYS_REGWPCTL (SYS_BA+0x1FC) /*!< Register Write-Protection Control Register */
  171. /**@}*/ /* end of SYS register group */
  172. /*---------------------- System Clock Controller -------------------------*/
  173. /**
  174. @addtogroup CLK System Clock Controller(CLK)
  175. Memory Mapped Structure for CLK Controller
  176. @{ */
  177. #define REG_CLK_PMCON (CLK_BA+0x00) /*!< Power Management Control Register */
  178. #define REG_CLK_HCLKEN (CLK_BA+0x10) /*!< AHB IP Clock Enable Control Register */
  179. #define REG_CLK_PCLKEN0 (CLK_BA+0x18) /*!< APB IP Clock Enable Control Register 0 */
  180. #define REG_CLK_PCLKEN1 (CLK_BA+0x1C) /*!< APB IP Clock Enable Control Register 1 */
  181. #define REG_CLK_DIVCTL0 (CLK_BA+0x20) /*!< Clock Divider Control Register 0 */
  182. #define REG_CLK_DIVCTL1 (CLK_BA+0x24) /*!< Clock Divider Control Register 1 */
  183. #define REG_CLK_DIVCTL2 (CLK_BA+0x28) /*!< Clock Divider Control Register 2 */
  184. #define REG_CLK_DIVCTL3 (CLK_BA+0x2C) /*!< Clock Divider Control Register 3 */
  185. #define REG_CLK_DIVCTL4 (CLK_BA+0x30) /*!< Clock Divider Control Register 4 */
  186. #define REG_CLK_DIVCTL5 (CLK_BA+0x34) /*!< Clock Divider Control Register 5 */
  187. #define REG_CLK_DIVCTL6 (CLK_BA+0x38) /*!< Clock Divider Control Register 6 */
  188. #define REG_CLK_DIVCTL7 (CLK_BA+0x3C) /*!< Clock Divider Control Register 7 */
  189. #define REG_CLK_DIVCTL8 (CLK_BA+0x40) /*!< Clock Divider Control Register 8 */
  190. #define REG_CLK_DIVCTL9 (CLK_BA+0x44) /*!< Clock Divider Control Register 9 */
  191. #define REG_CLK_APLLCON (CLK_BA+0x60) /*!< APLL Control Register */
  192. #define REG_CLK_UPLLCON (CLK_BA+0x64) /*!< UPLL Control Register */
  193. #define REG_CLK_PLLSTBCNTR (CLK_BA+0x80) /*!< PLL Stable Counter and Test Clock Control Register */
  194. /**@}*/ /* end of CLK register group */
  195. /*---------------------- External Bus Interface Controller -------------------------*/
  196. /**
  197. @addtogroup EBI External Bus Interface Controller(EBI)
  198. Memory Mapped Structure for EBI Controller
  199. @{ */
  200. #define REG_EBI_CTL (EBI_BA+0x000) /*!< EBI control register */
  201. #define REG_EBI_BNKCTL0 (EBI_BA+0x018) /*!< External I/O 0 control register */
  202. #define REG_EBI_BNKCTL1 (EBI_BA+0x01C) /*!< External I/O 1 control register */
  203. #define REG_EBI_BNKCTL2 (EBI_BA+0x020) /*!< External I/O 2 control register */
  204. #define REG_EBI_BNKCTL3 (EBI_BA+0x024) /*!< External I/O 3 control register */
  205. #define REG_EBI_BNKCTL4 (EBI_BA+0x028) /*!< External I/O 4 control register */
  206. /**@}*/ /* end of EBI register group */
  207. /*---------------------- Analog to Digital Converter -------------------------*/
  208. /**
  209. @addtogroup ADC Analog to Digital Converter(ADC)
  210. Memory Mapped Structure for ADC Controller
  211. @{ */
  212. #define REG_ADC_CTL (ADC_BA+0x000) /*!< ADC Contrl */
  213. #define REG_ADC_CONF (ADC_BA+0x004) /*!< ADC Configure */
  214. #define REG_ADC_IER (ADC_BA+0x008) /*!< ADC Interrupt Enable Register */
  215. #define REG_ADC_ISR (ADC_BA+0x00C) /*!< ADC Interrupt Status Register */
  216. #define REG_ADC_WKISR (ADC_BA+0x010) /*!< ADC Wake Up Interrupt Status Register */
  217. #define REG_ADC_XYDATA (ADC_BA+0x020) /*!< ADC Touch XY Pressure Data */
  218. #define REG_ADC_ZDATA (ADC_BA+0x024) /*!< ADC Touch Z Pressure Data */
  219. #define REG_ADC_DATA (ADC_BA+0x028) /*!< ADC Normal Conversion Data */
  220. #define REG_ADC_VBADATA (ADC_BA+0x02C) /*!< ADC Battery Detection Data */
  221. #define REG_ADC_KPDATA (ADC_BA+0x030) /*!< ADC Key Pad Data */
  222. #define REG_ADC_SELFDATA (ADC_BA+0x034) /*!< ADC Self-Test Data */
  223. #define REG_ADC_XYSORT0 (ADC_BA+0x1F4) /*!< ADC Touch XY Position Mean Value Sort 0 */
  224. #define REG_ADC_XYSORT1 (ADC_BA+0x1F8) /*!< ADC Touch XY Position Mean Value Sort 1 */
  225. #define REG_ADC_XYSORT2 (ADC_BA+0x1FC) /*!< ADC Touch XY Position Mean Value Sort 2 */
  226. #define REG_ADC_XYSORT3 (ADC_BA+0x200) /*!< ADC Touch XY Position Mean Value Sort 3 */
  227. #define REG_ADC_ZSORT0 (ADC_BA+0x204) /*!< ADC Touch Z Pressure Mean Value Sort 0 */
  228. #define REG_ADC_ZSORT1 (ADC_BA+0x208) /*!< ADC Touch Z Pressure Mean Value Sort 1 */
  229. #define REG_ADC_ZSORT2 (ADC_BA+0x20C) /*!< ADC Touch Z Pressure Mean Value Sort 2 */
  230. #define REG_ADC_ZSORT3 (ADC_BA+0x210) /*!< ADC Touch Z Pressure Mean Value Sort 3 */
  231. #define REG_ADC_MTMULCK (ADC_BA+0x220) /*!< ADC Manual Test Mode Unlock */
  232. #define REG_ADC_MTCONF (ADC_BA+0x224) /*!< ADC Manual Test Mode Configure */
  233. #define REG_ADC_MTCON (ADC_BA+0x228) /*!< ADC Manual Test Mode Control */
  234. #define REG_ADC_ADCAII (ADC_BA+0x22C) /*!< ADC Analog Interface Information */
  235. #define REG_ADC_ADCAIIRLT (ADC_BA+0x230) /*!< ADC Analog Interface Information Result */
  236. /**@}*/ /* end of ADC register group */
  237. /*---------------------- Ethernet MAC Controller -------------------------*/
  238. /**
  239. @addtogroup EMAC Ethernet MAC Controller(EMAC)
  240. Memory Mapped Structure for EMAC Controller
  241. @{ */
  242. #define REG_EMAC0_CAMCMR (EMC0_BA+0x000) /*!< CAM Command Register */
  243. #define REG_EMAC0_CAMEN (EMC0_BA+0x004) /*!< CAM Enable Register */
  244. #define REG_EMAC0_CAM0M (EMC0_BA+0x008) /*!< CAM0 Most Significant Word Register */
  245. #define REG_EMAC0_CAM0L (EMC0_BA+0x00c) /*!< CAM0 Least Significant Word Register */
  246. #define REG_EMAC0_CAMxM_Reg(x)(REG_EMAC0_CAM0M+(x)*0x8) /*!< CAMx Most Significant Word Register */
  247. #define REG_EMAC0_CAMxL_Reg(x)(REG_EMAC0_CAM0L+(x)*0x8) /*!< CAMx Least Significant Word Register */
  248. #define REG_EMAC0_TXDLSA (EMC0_BA+0x088) /*!< Transmit Descriptor Link List Start Address Register */
  249. #define REG_EMAC0_RXDLSA (EMC0_BA+0x08C) /*!< Receive Descriptor Link List Start Address Register */
  250. #define REG_EMAC0_MCMDR (EMC0_BA+0x090) /*!< MAC Command Register */
  251. #define REG_EMAC0_MIID (EMC0_BA+0x094) /*!< MII Management Data Register */
  252. #define REG_EMAC0_MIIDA (EMC0_BA+0x098) /*!< MII Management Control and Address Register */
  253. #define REG_EMAC0_FFTCR (EMC0_BA+0x09C) /*!< FIFO Threshold Control Register */
  254. #define REG_EMAC0_TSDR (EMC0_BA+0x0a0) /*!< Transmit Start Demand Register */
  255. #define REG_EMAC0_RSDR (EMC0_BA+0x0a4) /*!< Receive Start Demand Register */
  256. #define REG_EMAC0_DMARFC (EMC0_BA+0x0a8) /*!< Maximum Receive Frame Control Register */
  257. #define REG_EMAC0_MIEN (EMC0_BA+0x0ac) /*!< MAC Interrupt Enable Register */
  258. #define REG_EMAC0_MISTA (EMC0_BA+0x0b0) /*!< MAC Interrupt Status Register */
  259. #define REG_EMAC0_MGSTA (EMC0_BA+0x0b4) /*!< MAC General Status Register */
  260. #define REG_EMAC0_MPCNT (EMC0_BA+0x0b8) /*!< Missed Packet Count Register */
  261. #define REG_EMAC0_MRPC (EMC0_BA+0x0bc) /*!< MAC Receive Pause Count Register */
  262. #define REG_EMAC0_DMARFS (EMC0_BA+0x0c8) /*!< DMA Receive Frame Status Register */
  263. #define REG_EMAC0_CTXDSA (EMC0_BA+0x0cc) /*!< Current Transmit Descriptor Start Address Register */
  264. #define REG_EMAC0_CTXBSA (EMC0_BA+0x0d0) /*!< Current Transmit Buffer Start Address Register */
  265. #define REG_EMAC0_CRXDSA (EMC0_BA+0x0d4) /*!< Current Receive Descriptor Start Address Register */
  266. #define REG_EMAC0_CRXBSA (EMC0_BA+0x0d8) /*!< Current Receive Buffer Start Address Register */
  267. #define REG_EMAC0_TSCTL (EMC0_BA+0x100) /*!< Time Stamp Control Register */
  268. #define REG_EMAC0_TSSEC (EMC0_BA+0x110) /*!< Time Stamp Counter Second Register */
  269. #define REG_EMAC0_TSSUBSEC (EMC0_BA+0x114) /*!< Time Stamp Counter Sub Second Register */
  270. #define REG_EMAC0_TSINC (EMC0_BA+0x118) /*!< Time Stamp Increment Register */
  271. #define REG_EMAC0_TSADDEN (EMC0_BA+0x11c) /*!< Time Stamp Addend Register */
  272. #define REG_EMAC0_TSUPDSEC (EMC0_BA+0x120) /*!< Time Stamp Update Second Register */
  273. #define REG_EMAC0_TSUPDSUBSEC (EMC0_BA+0x124) /*!< Time Stamp Update Sub Second Register */
  274. #define REG_EMAC0_TSALMSEC (EMC0_BA+0x128) /*!< Time Stamp Alarm Second Register */
  275. #define REG_EMAC0_TSALMSUBSEC (EMC0_BA+0x12c) /*!< Time Stamp Alarm Sub Second Register */
  276. #define REG_EMAC1_CAMCMR (EMC1_BA+0x000) /*!< CAM Command Register */
  277. #define REG_EMAC1_CAMEN (EMC1_BA+0x004) /*!< CAM Enable Register */
  278. #define REG_EMAC1_CAM0M (EMC1_BA+0x008) /*!< CAM0 Most Significant Word Register */
  279. #define REG_EMAC1_CAM0L (EMC1_BA+0x00c) /*!< CAM0 Least Significant Word Register */
  280. #define REG_EMAC1_CAMxM_Reg(x)(REG_EMAC1_CAM0M+(x)*0x8) /*!< CAMx Most Significant Word Register */
  281. #define REG_EMAC1_CAMxL_Reg(x)(REG_EMAC1_CAM0L+(x)*0x8) /*!< CAMx Least Significant Word Register */
  282. #define REG_EMAC1_TXDLSA (EMC1_BA+0x088) /*!< Transmit Descriptor Link List Start Address Register */
  283. #define REG_EMAC1_RXDLSA (EMC1_BA+0x08C) /*!< Receive Descriptor Link List Start Address Register */
  284. #define REG_EMAC1_MCMDR (EMC1_BA+0x090) /*!< MAC Command Register */
  285. #define REG_EMAC1_MIID (EMC1_BA+0x094) /*!< MII Management Data Register */
  286. #define REG_EMAC1_MIIDA (EMC1_BA+0x098) /*!< MII Management Control and Address Register */
  287. #define REG_EMAC1_FFTCR (EMC1_BA+0x09C) /*!< FIFO Threshold Control Register */
  288. #define REG_EMAC1_TSDR (EMC1_BA+0x0a0) /*!< Transmit Start Demand Register */
  289. #define REG_EMAC1_RSDR (EMC1_BA+0x0a4) /*!< Receive Start Demand Register */
  290. #define REG_EMAC1_DMARFC (EMC1_BA+0x0a8) /*!< Maximum Receive Frame Control Register */
  291. #define REG_EMAC1_MIEN (EMC1_BA+0x0ac) /*!< MAC Interrupt Enable Register */
  292. #define REG_EMAC1_MISTA (EMC1_BA+0x0b0) /*!< MAC Interrupt Status Register */
  293. #define REG_EMAC1_MGSTA (EMC1_BA+0x0b4) /*!< MAC General Status Register */
  294. #define REG_EMAC1_MPCNT (EMC1_BA+0x0b8) /*!< Missed Packet Count Register */
  295. #define REG_EMAC1_MRPC (EMC1_BA+0x0bc) /*!< MAC Receive Pause Count Register */
  296. #define REG_EMAC1_DMARFS (EMC1_BA+0x0c8) /*!< DMA Receive Frame Status Register */
  297. #define REG_EMAC1_CTXDSA (EMC1_BA+0x0cc) /*!< Current Transmit Descriptor Start Address Register */
  298. #define REG_EMAC1_CTXBSA (EMC1_BA+0x0d0) /*!< Current Transmit Buffer Start Address Register */
  299. #define REG_EMAC1_CRXDSA (EMC1_BA+0x0d4) /*!< Current Receive Descriptor Start Address Register */
  300. #define REG_EMAC1_CRXBSA (EMC1_BA+0x0d8) /*!< Current Receive Buffer Start Address Register */
  301. #define REG_EMAC1_TSCTL (EMC1_BA+0x100) /*!< Time Stamp Control Register */
  302. #define REG_EMAC1_TSSEC (EMC1_BA+0x110) /*!< Time Stamp Counter Second Register */
  303. #define REG_EMAC1_TSSUBSEC (EMC1_BA+0x114) /*!< Time Stamp Counter Sub Second Register */
  304. #define REG_EMAC1_TSINC (EMC1_BA+0x118) /*!< Time Stamp Increment Register */
  305. #define REG_EMAC1_TSADDEN (EMC1_BA+0x11c) /*!< Time Stamp Addend Register */
  306. #define REG_EMAC1_TSUPDSEC (EMC1_BA+0x120) /*!< Time Stamp Update Second Register */
  307. #define REG_EMAC1_TSUPDSUBSEC (EMC1_BA+0x124) /*!< Time Stamp Update Sub Second Register */
  308. #define REG_EMAC1_TSALMSEC (EMC1_BA+0x128) /*!< Time Stamp Alarm Second Register */
  309. #define REG_EMAC1_TSALMSUBSEC (EMC1_BA+0x12c) /*!< Time Stamp Alarm Sub Second Register */
  310. /**@}*/ /* end of EMAC register group */
  311. /*---------------------- USB Device Controller -------------------------*/
  312. /**
  313. @addtogroup USBD USB Device Controller(USBD)
  314. Memory Mapped Structure for USBD Controller
  315. @{ */
  316. #define REG_USBD_GINTSTS (USBD_BA+0x00) /*!< Interrupt Status Low Register */
  317. #define REG_USBD_GINTEN (USBD_BA+0x08) /*!< Interrupt Enable Low Register */
  318. #define REG_USBD_BUSINTSTS (USBD_BA+0x10) /*!< USB Bus Interrupt Status Register */
  319. #define REG_USBD_BUSINTEN (USBD_BA+0x14) /*!< USB Bus Interrupt Enable Register */
  320. #define REG_USBD_OPER (USBD_BA+0x18) /*!< USB Operational Register */
  321. #define REG_USBD_FRAMECNT (USBD_BA+0x1C) /*!< USB Frame Count Register */
  322. #define REG_USBD_FADDR (USBD_BA+0x20) /*!< USB Function Address Register */
  323. #define REG_USBD_TEST (USBD_BA+0x24) /*!< USB Test Mode Register */
  324. #define REG_USBD_CEPDAT (USBD_BA+0x28) /*!< Control-ep data buffer register */
  325. #define REG_USBD_CEPCTL (USBD_BA+0x2C) /*!< Control-ep control and status register */
  326. #define REG_USBD_CEPINTEN (USBD_BA+0x30) /*!< Control-ep interrupt enable register */
  327. #define REG_USBD_CEPINTSTS (USBD_BA+0x34) /*!< Control-ep interrupt status register */
  328. #define REG_USBD_CEPTXCNT (USBD_BA+0x38) /*!< In-transfer data count register */
  329. #define REG_USBD_CEPRXCNT (USBD_BA+0x3C) /*!< Out-transfer data count register */
  330. #define REG_USBD_CEPDATCNT (USBD_BA+0x40) /*!< Control-ep data count register */
  331. #define REG_USBD_SETUP1_0 (USBD_BA+0x44) /*!< Setup byte1 & byte0 register */
  332. #define REG_USBD_SETUP3_2 (USBD_BA+0x48) /*!< Setup byte3 & byte2 register */
  333. #define REG_USBD_SETUP5_4 (USBD_BA+0x4C) /*!< Setup byte5 & byte4 register */
  334. #define REG_USBD_SETUP7_6 (USBD_BA+0x50) /*!< Setup byte7 & byte6 register */
  335. #define REG_USBD_CEPBUFSTART (USBD_BA+0x54) /*!< Control-ep ram start address register */
  336. #define REG_USBD_CEPBUFEND (USBD_BA+0x58) /*!< Control-ep ram end address register */
  337. #define REG_USBD_DMACTL (USBD_BA+0x5C) /*!< Dma control and status register */
  338. #define REG_USBD_DMACNT (USBD_BA+0x60) /*!< Dma count register */
  339. #define REG_USBD_EPADAT (USBD_BA+0x64) /*!< Endpoint A data buffer register */
  340. #define REG_USBD_EPAINTSTS (USBD_BA+0x68) /*!< Endpoint A interrupt status register */
  341. #define REG_USBD_EPAINTEN (USBD_BA+0x6C) /*!< Endpoint A interrupt enable register */
  342. #define REG_USBD_EPADATCNT (USBD_BA+0x70) /*!< Data count available in endpoint A buffer */
  343. #define REG_USBD_EPARSPCTL (USBD_BA+0x74) /*!< Endpoint A response register set/clear */
  344. #define REG_USBD_EPAMPS (USBD_BA+0x78) /*!< Endpoint A max packet size register */
  345. #define REG_USBD_EPATXCNT (USBD_BA+0x7C) /*!< Endpoint A transfer count register */
  346. #define REG_USBD_EPACFG (USBD_BA+0x80) /*!< Endpoint A configuration register */
  347. #define REG_USBD_EPABUFSTART (USBD_BA+0x84) /*!< Endpoint A ram start address register */
  348. #define REG_USBD_EPABUFEND (USBD_BA+0x88) /*!< Endpoint A ram end address register */
  349. #define REG_USBD_EPBDAT (USBD_BA+0x8C) /*!< Endpoint B data buffer register */
  350. #define REG_USBD_EPBINTSTS (USBD_BA+0x90) /*!< Endpoint B interrupt status register */
  351. #define REG_USBD_EPBINTEN (USBD_BA+0x94) /*!< Endpoint B interrupt enable register */
  352. #define REG_USBD_EPBDATCNT (USBD_BA+0x98) /*!< Data count available in endpoint B buffer */
  353. #define REG_USBD_EPBRSPCTL (USBD_BA+0x9C) /*!< Endpoint B response register set/clear */
  354. #define REG_USBD_EPBMPS (USBD_BA+0xA0) /*!< Endpoint B max packet size register */
  355. #define REG_USBD_EPBTXCNT (USBD_BA+0xA4) /*!< Endpoint B transfer count register */
  356. #define REG_USBD_EPBCFG (USBD_BA+0xA8) /*!< Endpoint B configuration register */
  357. #define REG_USBD_EPBBUFSTART (USBD_BA+0xAC) /*!< Endpoint B ram start address register */
  358. #define REG_USBD_EPBBUFEND (USBD_BA+0xB0) /*!< Endpoint B ram end address register */
  359. #define REG_USBD_EPCDAT (USBD_BA+0xB4) /*!< Endpoint C data buffer register */
  360. #define REG_USBD_EPCINTSTS (USBD_BA+0xB8) /*!< Endpoint C interrupt status register */
  361. #define REG_USBD_EPCINTEN (USBD_BA+0xBC) /*!< Endpoint C interrupt enable register */
  362. #define REG_USBD_EPCDATCNT (USBD_BA+0xC0) /*!< Data count available in endpoint C buffer */
  363. #define REG_USBD_EPCRSPCTL (USBD_BA+0xC4) /*!< Endpoint C response register set/clear */
  364. #define REG_USBD_EPCMPS (USBD_BA+0xC8) /*!< Endpoint C max packet size register */
  365. #define REG_USBD_EPCTXCNT (USBD_BA+0xCC) /*!< Endpoint C transfer count register */
  366. #define REG_USBD_EPCCFG (USBD_BA+0xD0) /*!< Endpoint C configuration register */
  367. #define REG_USBD_EPCBUFSTART (USBD_BA+0xD4) /*!< Endpoint C ram start address register */
  368. #define REG_USBD_EPCBUFEND (USBD_BA+0xD8) /*!< Endpoint C ram end address register */
  369. #define REG_USBD_EPDDAT (USBD_BA+0xDC) /*!< Endpoint D data buffer register */
  370. #define REG_USBD_EPDINTSTS (USBD_BA+0xE0) /*!< Endpoint D interrupt status register */
  371. #define REG_USBD_EPDINTEN (USBD_BA+0xE4) /*!< Endpoint D interrupt enable register */
  372. #define REG_USBD_EPDDATCNT (USBD_BA+0xE8) /*!< Data count available in endpoint D buffer */
  373. #define REG_USBD_EPDRSPCTL (USBD_BA+0xEC) /*!< Endpoint D response register set/clear */
  374. #define REG_USBD_EPDMPS (USBD_BA+0xF0) /*!< Endpoint D max packet size register */
  375. #define REG_USBD_EPDTXCNT (USBD_BA+0xF4) /*!< Endpoint D transfer count register */
  376. #define REG_USBD_EPDCFG (USBD_BA+0xF8) /*!< Endpoint D configuration register */
  377. #define REG_USBD_EPDBUFSTART (USBD_BA+0xFC) /*!< Endpoint D ram start address register */
  378. #define REG_USBD_EPDBUFEND (USBD_BA+0x100) /*!< Endpoint D ram end address register */
  379. #define REG_USBD_EPEDAT (USBD_BA+0x104) /*!< Endpoint E data buffer register */
  380. #define REG_USBD_EPEINTSTS (USBD_BA+0x108) /*!< Endpoint E interrupt status register */
  381. #define REG_USBD_EPEINTEN (USBD_BA+0x10C) /*!< Endpoint E interrupt enable register */
  382. #define REG_USBD_EPEDATCNT (USBD_BA+0x110) /*!< Data count available in endpoint E buffer */
  383. #define REG_USBD_EPERSPCTL (USBD_BA+0x114) /*!< Endpoint E response register set/clear */
  384. #define REG_USBD_EPEMPS (USBD_BA+0x118) /*!< Endpoint E max packet size register */
  385. #define REG_USBD_EPETXCNT (USBD_BA+0x11C) /*!< Endpoint E transfer count register */
  386. #define REG_USBD_EPECFG (USBD_BA+0x120) /*!< Endpoint E configuration register */
  387. #define REG_USBD_EPEBUFSTART (USBD_BA+0x124) /*!< Endpoint E ram start address register */
  388. #define REG_USBD_EPEBUFEND (USBD_BA+0x128) /*!< Endpoint E ram end address register */
  389. #define REG_USBD_EPFDAT (USBD_BA+0x12C) /*!< Endpoint F data buffer register */
  390. #define REG_USBD_EPFINTSTS (USBD_BA+0x130) /*!< Endpoint F interrupt status register */
  391. #define REG_USBD_EPFINTEN (USBD_BA+0x134) /*!< Endpoint F interrupt enable register */
  392. #define REG_USBD_EPFDATCNT (USBD_BA+0x138) /*!< Data count available in endpoint F buffer */
  393. #define REG_USBD_EPFRSPCTL (USBD_BA+0x13C) /*!< Endpoint F response register set/clear */
  394. #define REG_USBD_EPFMPS (USBD_BA+0x140) /*!< Endpoint F max packet size register */
  395. #define REG_USBD_EPFTXCNT (USBD_BA+0x144) /*!< Endpoint F transfer count register */
  396. #define REG_USBD_EPFCFG (USBD_BA+0x148) /*!< Endpoint F configuration register */
  397. #define REG_USBD_EPFBUFSTART (USBD_BA+0x14C) /*!< Endpoint F ram start address register */
  398. #define REG_USBD_EPFBUFEND (USBD_BA+0x150) /*!< Endpoint F ram end address register */
  399. #define REG_USBD_EPGDAT (USBD_BA+0x154) /*!< Endpoint G data buffer register */
  400. #define REG_USBD_EPGINTSTS (USBD_BA+0x158) /*!< Endpoint G interrupt status register */
  401. #define REG_USBD_EPGINTEN (USBD_BA+0x15C) /*!< Endpoint G interrupt enable register */
  402. #define REG_USBD_EPGDATCNT (USBD_BA+0x160) /*!< Data count available in endpoint G buffer */
  403. #define REG_USBD_EPGRSPCTL (USBD_BA+0x164) /*!< Endpoint G response register set/clear */
  404. #define REG_USBD_EPGMPS (USBD_BA+0x168) /*!< Endpoint G max packet size register */
  405. #define REG_USBD_EPGTXCNT (USBD_BA+0x16C) /*!< Endpoint G transfer count register */
  406. #define REG_USBD_EPGCFG (USBD_BA+0x170) /*!< Endpoint G configuration register */
  407. #define REG_USBD_EPGBUFSTART (USBD_BA+0x174) /*!< Endpoint G ram start address register */
  408. #define REG_USBD_EPGBUFEND (USBD_BA+0x178) /*!< Endpoint G ram end address register */
  409. #define REG_USBD_EPHDAT (USBD_BA+0x17C) /*!< Endpoint H data buffer register */
  410. #define REG_USBD_EPHINTSTS (USBD_BA+0x180) /*!< Endpoint H interrupt status register */
  411. #define REG_USBD_EPHINTEN (USBD_BA+0x184) /*!< Endpoint H interrupt enable register */
  412. #define REG_USBD_EPHDATCNT (USBD_BA+0x188) /*!< Data count available in endpoint H buffer */
  413. #define REG_USBD_EPHRSPCTL (USBD_BA+0x18C) /*!< Endpoint H response register set/clear */
  414. #define REG_USBD_EPHMPS (USBD_BA+0x190) /*!< Endpoint H max packet size register */
  415. #define REG_USBD_EPHTXCNT (USBD_BA+0x194) /*!< Endpoint H transfer count register */
  416. #define REG_USBD_EPHCFG (USBD_BA+0x198) /*!< Endpoint H configuration register */
  417. #define REG_USBD_EPHBUFSTART (USBD_BA+0x19C) /*!< Endpoint H ram start address register */
  418. #define REG_USBD_EPHBUFEND (USBD_BA+0x1A0) /*!< Endpoint H ram end address register */
  419. #define REG_USBD_EPIDAT (USBD_BA+0x1A4) /*!< Endpoint I data buffer register */
  420. #define REG_USBD_EPIINTSTS (USBD_BA+0x1A8) /*!< Endpoint I interrupt status register */
  421. #define REG_USBD_EPIINTEN (USBD_BA+0x1AC) /*!< Endpoint I interrupt enable register */
  422. #define REG_USBD_EPIDATCNT (USBD_BA+0x1B0) /*!< Data count available in endpoint I buffer */
  423. #define REG_USBD_EPIRSPCTL (USBD_BA+0x1B4) /*!< Endpoint I response register set/clear */
  424. #define REG_USBD_EPIMPS (USBD_BA+0x1B8) /*!< Endpoint I max packet size register */
  425. #define REG_USBD_EPITXCNT (USBD_BA+0x1BC) /*!< Endpoint I transfer count register */
  426. #define REG_USBD_EPICFG (USBD_BA+0x1C0) /*!< Endpoint I configuration register */
  427. #define REG_USBD_EPIBUFSTART (USBD_BA+0x1C4) /*!< Endpoint I ram start address register */
  428. #define REG_USBD_EPIBUFEND (USBD_BA+0x1C8) /*!< Endpoint I ram end address register */
  429. #define REG_USBD_EPJDAT (USBD_BA+0x1CC) /*!< Endpoint J data buffer register */
  430. #define REG_USBD_EPJINTSTS (USBD_BA+0x1D0) /*!< Endpoint J interrupt status register */
  431. #define REG_USBD_EPJINTEN (USBD_BA+0x1D4) /*!< Endpoint J interrupt enable register */
  432. #define REG_USBD_EPJDATCNT (USBD_BA+0x1D8) /*!< Data count available in endpoint J buffer */
  433. #define REG_USBD_EPJRSPCTL (USBD_BA+0x1DC) /*!< Endpoint J response register set/clear */
  434. #define REG_USBD_EPJMPS (USBD_BA+0x1E0) /*!< Endpoint J max packet size register */
  435. #define REG_USBD_EPJTXCNT (USBD_BA+0x1E4) /*!< Endpoint J transfer count register */
  436. #define REG_USBD_EPJCFG (USBD_BA+0x1E8) /*!< Endpoint J configuration register */
  437. #define REG_USBD_EPJBUFSTART (USBD_BA+0x1EC) /*!< Endpoint J ram start address register */
  438. #define REG_USBD_EPJBUFEND (USBD_BA+0x1F0) /*!< Endpoint J ram end address register */
  439. #define REG_USBD_EPKDAT (USBD_BA+0x1F4) /*!< Endpoint K data buffer register */
  440. #define REG_USBD_EPKINTSTS (USBD_BA+0x1F8) /*!< Endpoint K interrupt status register */
  441. #define REG_USBD_EPKINTEN (USBD_BA+0x1FC) /*!< Endpoint K interrupt enable register */
  442. #define REG_USBD_EPKDATCNT (USBD_BA+0x200) /*!< Data count available in endpoint K buffer */
  443. #define REG_USBD_EPKRSPCTL (USBD_BA+0x204) /*!< Endpoint K response register set/clear */
  444. #define REG_USBD_EPKMPS (USBD_BA+0x208) /*!< Endpoint K max packet size register */
  445. #define REG_USBD_EPKTXCNT (USBD_BA+0x20C) /*!< Endpoint K transfer count register */
  446. #define REG_USBD_EPKCFG (USBD_BA+0x210) /*!< Endpoint K configuration register */
  447. #define REG_USBD_EPKBUFSTART (USBD_BA+0x214) /*!< Endpoint K ram start address register */
  448. #define REG_USBD_EPKBUFEND (USBD_BA+0x218) /*!< Endpoint K ram end address register */
  449. #define REG_USBD_EPLDAT (USBD_BA+0x21C) /*!< Endpoint L data buffer register */
  450. #define REG_USBD_EPLINTSTS (USBD_BA+0x220) /*!< Endpoint L interrupt status register */
  451. #define REG_USBD_EPLINTEN (USBD_BA+0x224) /*!< Endpoint L interrupt enable register */
  452. #define REG_USBD_EPLDATCNT (USBD_BA+0x228) /*!< Data count available in endpoint L buffer */
  453. #define REG_USBD_EPLRSPCTL (USBD_BA+0x22C) /*!< Endpoint L response register set/clear */
  454. #define REG_USBD_EPLMPS (USBD_BA+0x230) /*!< Endpoint L max packet size register */
  455. #define REG_USBD_EPLTXCNT (USBD_BA+0x234) /*!< Endpoint L transfer count register */
  456. #define REG_USBD_EPLCFG (USBD_BA+0x238) /*!< Endpoint L configuration register */
  457. #define REG_USBD_EPLBUFSTART (USBD_BA+0x23C) /*!< Endpoint L ram start address register */
  458. #define REG_USBD_EPLBUFEND (USBD_BA+0x240) /*!< Endpoint L ram end address register */
  459. #define REG_USBD_DMAADDR (USBD_BA+0x700) /*!< AHB_DMA address register */
  460. #define REG_USBD_PHYCTL (USBD_BA+0x704) /*!< USB PHY control register */
  461. /**@}*/ /* end of USBD register group */
  462. /*---------------------- I2S Interface Controller -------------------------*/
  463. /**
  464. @addtogroup I2S I2S Interface Controller(I2S)
  465. Memory Mapped Structure for I2S Controller
  466. @{ */
  467. #define REG_I2S_CON (I2S_BA+0x00) /*!< Audio controller control register */
  468. #define REG_I2S_RESET (I2S_BA+0x04) /*!< Sub block reset control register */
  469. #define REG_I2S_RDESB (I2S_BA+0x08) /*!< DMA destination base address register for record */
  470. #define REG_I2S_RDES_LENGTH (I2S_BA+0x0C) /*!< DMA destination length register for record */
  471. #define REG_I2S_RDESC (I2S_BA+0x10) /*!< DMA destination current address for record */
  472. #define REG_I2S_PDESB (I2S_BA+0x14) /*!< DMA destination current address for play */
  473. #define REG_I2S_PDES_LENGTH (I2S_BA+0x18) /*!< DMA destination length register for play */
  474. #define REG_I2S_PDESC (I2S_BA+0x1C) /*!< DMA destination current address register for play */
  475. #define REG_I2S_RSR (I2S_BA+0x20) /*!< Record status register */
  476. #define REG_I2S_PSR (I2S_BA+0x24) /*!< Play status register */
  477. #define REG_I2S_I2SCON (I2S_BA+0x28) /*!< I2S control register */
  478. #define REG_I2S_COUNTER (I2S_BA+0x2C) /*!< DMA count down values */
  479. #define REG_I2S_PCMCON (I2S_BA+0x30) /*!< PCM interface control register */
  480. #define REG_I2S_PCMS1ST (I2S_BA+0x34) /*!< PCM interface slot1 start register */
  481. #define REG_I2S_PCMS2ST (I2S_BA+0x38) /*!< PCM interface slot2 start register */
  482. #define REG_I2S_RDESB2 (I2S_BA+0x40) /*!< DMA destination base address register for record right channel */
  483. #define REG_I2S_PDESB2 (I2S_BA+0x44) /*!< DMA destination base address register for play right channel */
  484. /**@}*/ /* end of I2S register group */
  485. /*---------------------- Flash Memory Interface -------------------------*/
  486. /**
  487. @addtogroup FMI Flash Memory Interface(FMI)
  488. Memory Mapped Structure for FMI Controller
  489. @{ */
  490. /* DMAC Control Registers*/
  491. #define REG_FMI_BUFFER (FMI_BA+0x000) /*!< FMI Embedded Buffer Word */
  492. #define REG_FMI_DMACTL (FMI_BA+0x400) /*!< FMI DMA Control Register */
  493. #define REG_FMI_DMASA (FMI_BA+0x408) /*!< FMI DMA Transfer Starting Address Register */
  494. #define REG_FMI_DMABCNT (FMI_BA+0x40C) /*!< FMI DMA Transfer Byte Count Register */
  495. #define REG_FMI_DMAINTEN (FMI_BA+0x410) /*!< FMI DMA Interrupt Enable Register */
  496. #define REG_FMI_DMAINTSTS (FMI_BA+0x414) /*!< FMI DMA Interrupt Status Register */
  497. #define REG_FMI_CTL (FMI_BA+0x800) /*!< Global Control and Status Register */
  498. #define REG_FMI_INTEN (FMI_BA+0x804) /*!< Global Interrupt Control Register */
  499. #define REG_FMI_INTSTS (FMI_BA+0x808) /*!< Global Interrupt Status Register */
  500. /* eMMC Registers */
  501. #define REG_FMI_EMMCCTL (FMI_BA+0x820) /*!< eMMC control and status register */
  502. #define REG_FMI_EMMCCMD (FMI_BA+0x824) /*!< eMMC command argument register */
  503. #define REG_FMI_EMMCINTEN (FMI_BA+0x828) /*!< eMMC interrupt enable register */
  504. #define REG_FMI_EMMCINTSTS (FMI_BA+0x82C) /*!< eMMC interrupt status register */
  505. #define REG_FMI_EMMCRESP0 (FMI_BA+0x830) /*!< eMMC receive response token register 0 */
  506. #define REG_FMI_EMMCRESP1 (FMI_BA+0x834) /*!< eMMC receive response token register 1 */
  507. #define REG_FMI_EMMCBLEN (FMI_BA+0x838) /*!< eMMC block length register */
  508. #define REG_FMI_EMMCTOUT (FMI_BA+0x83C) /*!< eMMC block length register */
  509. /* NAND-type Flash Registers */
  510. #define REG_NANDCTL (FMI_BA+0x8A0) /*!< NAND Flash Control and Status Register */
  511. #define REG_NANDTMCTL (FMI_BA+0x8A4) /*!< NAND Flash Timing Control Register */
  512. #define REG_NANDINTEN (FMI_BA+0x8A8) /*!< NAND Flash Interrupt Control Register */
  513. #define REG_NANDINTSTS (FMI_BA+0x8AC) /*!< NAND Flash Interrupt Status Register */
  514. #define REG_NANDCMD (FMI_BA+0x8B0) /*!< NAND Flash Command Port Register */
  515. #define REG_NANDADDR (FMI_BA+0x8B4) /*!< NAND Flash Address Port Register */
  516. #define REG_NANDDATA (FMI_BA+0x8B8) /*!< NAND Flash Data Port Register */
  517. #define REG_NANDRACTL (FMI_BA+0x8BC) /*!< NAND Flash Redundant Area Control Register */
  518. #define REG_NANDECTL (FMI_BA+0x8C0) /*!< NAND Flash Extend Control Regsiter */
  519. #define REG_NANDECCES0 (FMI_BA+0x8D0) /*!< NAND Flash ECC Error Status 0 */
  520. #define REG_NANDECCES1 (FMI_BA+0x8D4) /*!< NAND Flash ECC Error Status 1 */
  521. #define REG_NANDECCES2 (FMI_BA+0x8D8) /*!< NAND Flash ECC Error Status 2 */
  522. #define REG_NANDECCES3 (FMI_BA+0x8DC) /*!< NAND Flash ECC Error Status 3 */
  523. #define REG_NANDPROTA0 (FMI_BA+0x8E0) /*!< NAND Flash Protect Region End Address 0 */
  524. #define REG_NANDPROTA1 (FMI_BA+0x8E4) /*!< NAND Flash Protect Region End Address 1 */
  525. /* NAND-type Flash BCH Error Address Registers */
  526. #define REG_NANDECCEA0 (FMI_BA+0x900) /*!< NAND Flash ECC Error Byte Address 0 */
  527. #define REG_NANDECCEA1 (FMI_BA+0x904) /*!< NAND Flash ECC Error Byte Address 1 */
  528. #define REG_NANDECCEA2 (FMI_BA+0x908) /*!< NAND Flash ECC Error Byte Address 2 */
  529. #define REG_NANDECCEA3 (FMI_BA+0x90C) /*!< NAND Flash ECC Error Byte Address 3 */
  530. #define REG_NANDECCEA4 (FMI_BA+0x910) /*!< NAND Flash ECC Error Byte Address 4 */
  531. #define REG_NANDECCEA5 (FMI_BA+0x914) /*!< NAND Flash ECC Error Byte Address 5 */
  532. #define REG_NANDECCEA6 (FMI_BA+0x918) /*!< NAND Flash ECC Error Byte Address 6 */
  533. #define REG_NANDECCEA7 (FMI_BA+0x91C) /*!< NAND Flash ECC Error Byte Address 7 */
  534. #define REG_NANDECCEA8 (FMI_BA+0x920) /*!< NAND Flash ECC Error Byte Address 8 */
  535. #define REG_NANDECCEA9 (FMI_BA+0x924) /*!< NAND Flash ECC Error Byte Address 9 */
  536. #define REG_NANDECCEA10 (FMI_BA+0x928) /*!< NAND Flash ECC Error Byte Address 10 */
  537. #define REG_NANDECCEA11 (FMI_BA+0x92C) /*!< NAND Flash ECC Error Byte Address 11 */
  538. /* NAND-type Flash BCH Error Data Registers */
  539. #define REG_NANDECCED0 (FMI_BA+0x960) /*!< NAND Flash ECC Error Data Register 0 */
  540. #define REG_NANDECCED1 (FMI_BA+0x964) /*!< NAND Flash ECC Error Data Register 1 */
  541. #define REG_NANDECCED2 (FMI_BA+0x968) /*!< NAND Flash ECC Error Data Register 2 */
  542. #define REG_NANDECCED3 (FMI_BA+0x96C) /*!< NAND Flash ECC Error Data Register 3 */
  543. #define REG_NANDECCED4 (FMI_BA+0x970) /*!< NAND Flash ECC Error Data Register 4 */
  544. #define REG_NANDECCED5 (FMI_BA+0x974) /*!< NAND Flash ECC Error Data Register 5 */
  545. /* NAND-type Flash Redundant Area Registers */
  546. #define REG_NANDRA0 (FMI_BA+0xA00) /*!< NAND Flash Redundant Area Register */
  547. #define REG_NANDRA1 (FMI_BA+0xA04) /*!< NAND Flash Redundant Area Register */
  548. /**@}*/ /* end of FMI register group */
  549. /*---------------------- SD/SDIO Host Controller -------------------------*/
  550. /**
  551. @addtogroup SDH SD/SDIO Host Controller(SDH)
  552. Memory Mapped Structure for SDH Controller
  553. @{ */
  554. /* DMAC Control Registers*/
  555. #define REG_SDH_FB0 (SDH_BA+0x000) /*!< SD Host Embedded Buffer Word */
  556. #define REG_SDH_DMACTL (SDH_BA+0x400) /*!< SD Host DMA Control and Status Register */
  557. #define REG_SDH_DMASA (SDH_BA+0x408) /*!< SD Host DMA Transfer Starting Address Register */
  558. #define REG_SDH_DMABCNT (SDH_BA+0x40C) /*!< SD Host DMA Transfer Byte Count Register */
  559. #define REG_SDH_DMAINTEN (SDH_BA+0x410) /*!< SD Host DMA Interrupt Enable Register */
  560. #define REG_SDH_DMAINTSTS (SDH_BA+0x414) /*!< SD Host DMA Interrupt Status Register */
  561. #define REG_SDH_GCTL (SDH_BA+0x800) /*!< SD Host Global Control and Status Register */
  562. #define REG_SDH_GINTEN (SDH_BA+0x804) /*!< SD Host Global Interrupt Control Register */
  563. #define REG_SDH_GINTSTS (SDH_BA+0x808) /*!< SD Host Global Interrupt Status Register */
  564. /* Secure Digit Registers */
  565. #define REG_SDH_CTL (SDH_BA+0x820) /*!< SD Host control and status register */
  566. #define REG_SDH_CMD (SDH_BA+0x824) /*!< SD Host command argument register */
  567. #define REG_SDH_INTEN (SDH_BA+0x828) /*!< SD Host interrupt enable register */
  568. #define REG_SDH_INTSTS (SDH_BA+0x82C) /*!< SD Host interrupt status register */
  569. #define REG_SDH_RESP0 (SDH_BA+0x830) /*!< SD Host receive response token register 0 */
  570. #define REG_SDH_RESP1 (SDH_BA+0x834) /*!< SD Host receive response token register 1 */
  571. #define REG_SDH_BLEN (SDH_BA+0x838) /*!< SD Host block length register */
  572. #define REG_SDH_TMOUT (SDH_BA+0x83C) /*!< SD Host Response/Data-in Time-out register */
  573. #define REG_SDH_ECTL (SDH_BA+0x840) /*!< SD Host Extend Control Register */
  574. /**@}*/ /* end of SDH register group */
  575. /*---------------------- Serial Peripheral Interface Controller -------------------------*/
  576. /**
  577. @addtogroup SPI Serial Peripheral Interface Controller(SPI)
  578. Memory Mapped Structure for SPI Controller
  579. @{ */
  580. #define REG_QSPI0_CTL (QSPI0_BA+0x00) /*!< Control Register Address */
  581. #define REG_QSPI0_CLKDIV (QSPI0_BA+0x04) /*!< Divider Register Address */
  582. #define REG_QSPI0_SSCTL (QSPI0_BA+0x08) /*!< Slave Select Register Address */
  583. #define REG_QSPI0_PDMACTL (QSPI0_BA+0x0C) /*!< PDMA Control Register Address */
  584. #define REG_QSPI0_FIFOCTL (QSPI0_BA+0x10) /*!< FIFO Control Register Address */
  585. #define REG_QSPI0_STATUS (QSPI0_BA+0x14) /*!< Status Register Address */
  586. #define REG_QSPI0_TX (QSPI0_BA+0x20) /*!< Data Transmit Register Address */
  587. #define REG_QSPI0_RX (QSPI0_BA+0x30) /*!< Data Receive Register Address */
  588. #define REG_SPI0_CTL (SPI0_BA+0x00) /*!< Control Register Address */
  589. #define REG_SPI0_CLKDIV (SPI0_BA+0x04) /*!< Divider Register Address */
  590. #define REG_SPI0_SSCTL (SPI0_BA+0x08) /*!< Slave Select Register Address */
  591. #define REG_SPI0_PDMACTL (SPI0_BA+0x0C) /*!< PDMA Control Register Address */
  592. #define REG_SPI0_FIFOCTL (SPI0_BA+0x10) /*!< FIFO Control Register Address */
  593. #define REG_SPI0_STATUS (SPI0_BA+0x14) /*!< Status Register Address */
  594. #define REG_SPI0_TX (SPI0_BA+0x20) /*!< Data Transmit Register Address */
  595. #define REG_SPI0_RX (SPI0_BA+0x30) /*!< Data Receive Register Address */
  596. #define REG_SPI1_CTL (SPI1_BA+0x00) /*!< Control Register Address */
  597. #define REG_SPI1_CLKDIV (SPI1_BA+0x04) /*!< Divider Register Address */
  598. #define REG_SPI1_SSCTL (SPI1_BA+0x08) /*!< Slave Select Register Address */
  599. #define REG_SPI1_PDMACTL (SPI1_BA+0x0C) /*!< PDMA Control Register Address */
  600. #define REG_SPI1_FIFOCTL (SPI1_BA+0x10) /*!< FIFO Control Register Address */
  601. #define REG_SPI1_STATUS (SPI1_BA+0x14) /*!< Status Register Address */
  602. #define REG_SPI1_TX (SPI1_BA+0x20) /*!< Data Transmit Register Address */
  603. #define REG_SPI1_RX (SPI1_BA+0x30) /*!< Data Receive Register Address */
  604. /**@}*/ /* end of SPI register group */
  605. /*---------------------- Cryptographic Accelerator -------------------------*/
  606. /**
  607. @addtogroup CRYPTO Cryptographic Accelerator(CRYPTO)
  608. Memory Mapped Structure for Cryptographic Accelerator registers
  609. @{ */
  610. /* Crypto Control Registers */
  611. #define CRPT_INTEN (CRPT_BA+0x000) /*!< Crypto Interrupt Enable Control Register */
  612. #define CRPT_INTSTS (CRPT_BA+0x004) /*!< Crypto Interrupt Flag */
  613. /* PRNG Registers */
  614. #define CRPT_PRNG_CTL (CRPT_BA+0x008) /*!< PRNG Control Register */
  615. #define CRPT_PRNG_SEED (CRPT_BA+0x00C) /*!< Seed for PRNG */
  616. #define CRPT_PRNG_KEY0 (CRPT_BA+0x010) /*!< PRNG Generated Key 0 */
  617. #define CRPT_PRNG_KEY1 (CRPT_BA+0x014) /*!< PRNG Generated Key 1 */
  618. #define CRPT_PRNG_KEY2 (CRPT_BA+0x018) /*!< PRNG Generated Key 2 */
  619. #define CRPT_PRNG_KEY3 (CRPT_BA+0x01C) /*!< PRNG Generated Key 3 */
  620. #define CRPT_PRNG_KEY4 (CRPT_BA+0x020) /*!< PRNG Generated Key 4 */
  621. #define CRPT_PRNG_KEY5 (CRPT_BA+0x024) /*!< PRNG Generated Key 5 */
  622. #define CRPT_PRNG_KEY6 (CRPT_BA+0x028) /*!< PRNG Generated Key 6 */
  623. #define CRPT_PRNG_KEY7 (CRPT_BA+0x02C) /*!< PRNG Generated Key 7 */
  624. /* AES/TDES feedback Registers */
  625. #define CRPT_AES_FDBCK0 (CRPT_BA+0x050) /*!< AES Engine Output Feedback Data after Cryptographic Operation */
  626. #define CRPT_AES_FDBCK1 (CRPT_BA+0x054) /*!< AES Engine Output Feedback Data after Cryptographic Operation */
  627. #define CRPT_AES_FDBCK2 (CRPT_BA+0x058) /*!< AES Engine Output Feedback Data after Cryptographic Operation */
  628. #define CRPT_AES_FDBCK3 (CRPT_BA+0x05C) /*!< AES Engine Output Feedback Data after Cryptographic Operation */
  629. #define CRPT_TDES_FDBCKH (CRPT_BA+0x060) /*!< TDES/DES Engine Output Feedback High Word Data after Cryptographic Operation */
  630. #define CRPT_TDES_FDBCKL (CRPT_BA+0x064) /*!< TDES/DES Engine Output Feedback Low Word Data after Cryptographic Operation */
  631. /* AES Control Registers */
  632. #define CRPT_AES_CTL (CRPT_BA+0x100) /*!< AES Control Register */
  633. #define CRPT_AES_STS (CRPT_BA+0x104) /*!< AES Engine Flag */
  634. #define CRPT_AES_DATIN (CRPT_BA+0x108) /*!< AES Engine Data Input Port Register */
  635. #define CRPT_AES_DATOUT (CRPT_BA+0x10C) /*!< AES Engine Data Output Port Register */
  636. #define CRPT_AES0_KEY0 (CRPT_BA+0x110) /*!< AES Key Word 0 Register for Channel 0 */
  637. #define CRPT_AES0_KEY1 (CRPT_BA+0x114) /*!< AES Key Word 1 Register for Channel 0 */
  638. #define CRPT_AES0_KEY2 (CRPT_BA+0x118) /*!< AES Key Word 2 Register for Channel 0 */
  639. #define CRPT_AES0_KEY3 (CRPT_BA+0x11C) /*!< AES Key Word 3 Register for Channel 0 */
  640. #define CRPT_AES0_KEY4 (CRPT_BA+0x120) /*!< AES Key Word 4 Register for Channel 0 */
  641. #define CRPT_AES0_KEY5 (CRPT_BA+0x124) /*!< AES Key Word 5 Register for Channel 0 */
  642. #define CRPT_AES0_KEY6 (CRPT_BA+0x128) /*!< AES Key Word 6 Register for Channel 0 */
  643. #define CRPT_AES0_KEY7 (CRPT_BA+0x12C) /*!< AES Key Word 7 Register for Channel 0 */
  644. #define CRPT_AES0_IV0 (CRPT_BA+0x130) /*!< AES Initial Vector Word 0 Register for Channel 0 */
  645. #define CRPT_AES0_IV1 (CRPT_BA+0x134) /*!< AES Initial Vector Word 1 Register for Channel 0 */
  646. #define CRPT_AES0_IV2 (CRPT_BA+0x138) /*!< AES Initial Vector Word 2 Register for Channel 0 */
  647. #define CRPT_AES0_IV3 (CRPT_BA+0x13C) /*!< AES Initial Vector Word 3 Register for Channel 0 */
  648. #define CRPT_AES0_SADDR (CRPT_BA+0x140) /*!< AES DMA Source Address Register for Channel 0 */
  649. #define CRPT_AES0_DADDR (CRPT_BA+0x144) /*!< AES DMA Destination Address Register for Channel 0 */
  650. #define CRPT_AES0_CNT (CRPT_BA+0x148) /*!< AES Byte Count Register for Channel 0 */
  651. #define CRPT_AES1_KEY0 (CRPT_BA+0x14C) /*!< AES Key Word 0 Register for Channel 1 */
  652. #define CRPT_AES1_KEY1 (CRPT_BA+0x150) /*!< AES Key Word 1 Register for Channel 1 */
  653. #define CRPT_AES1_KEY2 (CRPT_BA+0x154) /*!< AES Key Word 2 Register for Channel 1 */
  654. #define CRPT_AES1_KEY3 (CRPT_BA+0x158) /*!< AES Key Word 3 Register for Channel 1 */
  655. #define CRPT_AES1_KEY4 (CRPT_BA+0x15C) /*!< AES Key Word 4 Register for Channel 1 */
  656. #define CRPT_AES1_KEY5 (CRPT_BA+0x160) /*!< AES Key Word 5 Register for Channel 1 */
  657. #define CRPT_AES1_KEY6 (CRPT_BA+0x164) /*!< AES Key Word 6 Register for Channel 1 */
  658. #define CRPT_AES1_KEY7 (CRPT_BA+0x168) /*!< AES Key Word 7 Register for Channel 1 */
  659. #define CRPT_AES1_IV0 (CRPT_BA+0x16C) /*!< AES Initial Vector Word 0 Register for Channel 1 */
  660. #define CRPT_AES1_IV1 (CRPT_BA+0x170) /*!< AES Initial Vector Word 1 Register for Channel 1 */
  661. #define CRPT_AES1_IV2 (CRPT_BA+0x174) /*!< AES Initial Vector Word 2 Register for Channel 1 */
  662. #define CRPT_AES1_IV3 (CRPT_BA+0x178) /*!< AES Initial Vector Word 3 Register for Channel 1 */
  663. #define CRPT_AES1_SADDR (CRPT_BA+0x17C) /*!< AES DMA Source Address Register for Channel 1 */
  664. #define CRPT_AES1_DADDR (CRPT_BA+0x180) /*!< AES DMA Destination Address Register for Channel 1 */
  665. #define CRPT_AES1_CNT (CRPT_BA+0x184) /*!< AES Byte Count Register for Channel 1 */
  666. #define CRPT_AES2_KEY0 (CRPT_BA+0x188) /*!< AES Key Word 0 Register for Channel 2 */
  667. #define CRPT_AES2_KEY1 (CRPT_BA+0x18C) /*!< AES Key Word 1 Register for Channel 2 */
  668. #define CRPT_AES2_KEY2 (CRPT_BA+0x190) /*!< AES Key Word 2 Register for Channel 2 */
  669. #define CRPT_AES2_KEY3 (CRPT_BA+0x194) /*!< AES Key Word 3 Register for Channel 2 */
  670. #define CRPT_AES2_KEY4 (CRPT_BA+0x198) /*!< AES Key Word 4 Register for Channel 2 */
  671. #define CRPT_AES2_KEY5 (CRPT_BA+0x19C) /*!< AES Key Word 5 Register for Channel 2 */
  672. #define CRPT_AES2_KEY6 (CRPT_BA+0x1A0) /*!< AES Key Word 6 Register for Channel 2 */
  673. #define CRPT_AES2_KEY7 (CRPT_BA+0x1A4) /*!< AES Key Word 7 Register for Channel 2 */
  674. #define CRPT_AES2_IV0 (CRPT_BA+0x1A8) /*!< AES Initial Vector Word 0 Register for Channel 2 */
  675. #define CRPT_AES2_IV1 (CRPT_BA+0x1AC) /*!< AES Initial Vector Word 1 Register for Channel 2 */
  676. #define CRPT_AES2_IV2 (CRPT_BA+0x1B0) /*!< AES Initial Vector Word 2 Register for Channel 2 */
  677. #define CRPT_AES2_IV3 (CRPT_BA+0x1B4) /*!< AES Initial Vector Word 3 Register for Channel 2 */
  678. #define CRPT_AES2_SADDR (CRPT_BA+0x1B8) /*!< AES DMA Source Address Register for Channel 2 */
  679. #define CRPT_AES2_DADDR (CRPT_BA+0x1BC) /*!< AES DMA Destination Address Register for Channel 2 */
  680. #define CRPT_AES2_CNT (CRPT_BA+0x1C0) /*!< AES Byte Count Register for Channel 2 */
  681. #define CRPT_AES3_KEY0 (CRPT_BA+0x1C4) /*!< AES Key Word 0 Register for Channel 3 */
  682. #define CRPT_AES3_KEY1 (CRPT_BA+0x1C8) /*!< AES Key Word 1 Register for Channel 3 */
  683. #define CRPT_AES3_KEY2 (CRPT_BA+0x1CC) /*!< AES Key Word 2 Register for Channel 3 */
  684. #define CRPT_AES3_KEY3 (CRPT_BA+0x1D0) /*!< AES Key Word 3 Register for Channel 3 */
  685. #define CRPT_AES3_KEY4 (CRPT_BA+0x1D4) /*!< AES Key Word 4 Register for Channel 3 */
  686. #define CRPT_AES3_KEY5 (CRPT_BA+0x1D8) /*!< AES Key Word 5 Register for Channel 3 */
  687. #define CRPT_AES3_KEY6 (CRPT_BA+0x1DC) /*!< AES Key Word 6 Register for Channel 3 */
  688. #define CRPT_AES3_KEY7 (CRPT_BA+0x1E0) /*!< AES Key Word 7 Register for Channel 3 */
  689. #define CRPT_AES3_IV0 (CRPT_BA+0x1E4) /*!< AES Initial Vector Word 0 Register for Channel 3 */
  690. #define CRPT_AES3_IV1 (CRPT_BA+0x1E8) /*!< AES Initial Vector Word 1 Register for Channel 3 */
  691. #define CRPT_AES3_IV2 (CRPT_BA+0x1EC) /*!< AES Initial Vector Word 2 Register for Channel 3 */
  692. #define CRPT_AES3_IV3 (CRPT_BA+0x1F0) /*!< AES Initial Vector Word 3 Register for Channel 3 */
  693. #define CRPT_AES3_SADDR (CRPT_BA+0x1F4) /*!< AES DMA Source Address Register for Channel 3 */
  694. #define CRPT_AES3_DADDR (CRPT_BA+0x1F8) /*!< AES DMA Destination Address Register for Channel 3 */
  695. #define CRPT_AES3_CNT (CRPT_BA+0x1FC) /*!< AES Byte Count Register for Channel 3 */
  696. /* DES/TDES Control Registers */
  697. #define CRPT_TDES_CTL (CRPT_BA+0x200) /*!< TDES/DES Control Register */
  698. #define CRPT_TDES_STS (CRPT_BA+0x204) /*!< TDES/DES Engine Flag */
  699. #define CRPT_TDES0_KEY1H (CRPT_BA+0x208) /*!< TDES/DES Key 1 High Word Register for Channel 0 */
  700. #define CRPT_TDES0_KEY1L (CRPT_BA+0x20C) /*!< TDES/DES Key 1 Low Word Register for Channel 0 */
  701. #define CRPT_TDES0_KEY2H (CRPT_BA+0x210) /*!< TDES/DES Key 2 High Word Register for Channel 0 */
  702. #define CRPT_TDES0_KEY2L (CRPT_BA+0x214) /*!< TDES/DES Key 2 Low Word Register for Channel 0 */
  703. #define CRPT_TDES0_KEY3H (CRPT_BA+0x218) /*!< TDES/DES Key 3 High Word Register for Channel 0 */
  704. #define CRPT_TDES0_KEY3L (CRPT_BA+0x21C) /*!< TDES/DES Key 3 Low Word Register for Channel 0 */
  705. #define CRPT_TDES0_IVH (CRPT_BA+0x220) /*!< TDES/DES Initial Vector High Word Register for Channel 0 */
  706. #define CRPT_TDES0_IVL (CRPT_BA+0x224) /*!< TDES/DES Initial Vector Low Word Register for Channel 0 */
  707. #define CRPT_TDES0_SADDR (CRPT_BA+0x228) /*!< TDES/DES DMA Source Address Register for Channel 0 */
  708. #define CRPT_TDES0_DADDR (CRPT_BA+0x22C) /*!< TDES/DES DMA Destination Address Register for Channel 0 */
  709. #define CRPT_TDES0_CNT (CRPT_BA+0x230) /*!< TDES/DES Byte Count Register for Channel 0 */
  710. #define CRPT_TDES_DATIN (CRPT_BA+0x234) /*!< TDES/DES Engine Input data Word Register */
  711. #define CRPT_TDES_DATOUT (CRPT_BA+0x238) /*!< TDES/DES Engine Output data Word Register */
  712. #define CRPT_TDES1_KEY1H (CRPT_BA+0x248) /*!< TDES/DES Key 1 High Word Register for Channel 1 */
  713. #define CRPT_TDES1_KEY1L (CRPT_BA+0x24C) /*!< TDES/DES Key 1 Low Word Register for Channel 1 */
  714. #define CRPT_TDES1_KEY2H (CRPT_BA+0x250) /*!< TDES/DES Key 2 High Word Register for Channel 1 */
  715. #define CRPT_TDES1_KEY2L (CRPT_BA+0x254) /*!< TDES/DES Key 2 Low Word Register for Channel 1 */
  716. #define CRPT_TDES1_KEY3H (CRPT_BA+0x258) /*!< TDES/DES Key 3 High Word Register for Channel 1 */
  717. #define CRPT_TDES1_KEY3L (CRPT_BA+0x25C) /*!< TDES/DES Key 3 Low Word Register for Channel 1 */
  718. #define CRPT_TDES1_IVH (CRPT_BA+0x260) /*!< TDES/DES Initial Vector High Word Register for Channel 1 */
  719. #define CRPT_TDES1_IVL (CRPT_BA+0x264) /*!< TDES/DES Initial Vector Low Word Register for Channel 1 */
  720. #define CRPT_TDES1_SADDR (CRPT_BA+0x268) /*!< TDES/DES DMA Source Address Register for Channel 1 */
  721. #define CRPT_TDES1_DADDR (CRPT_BA+0x26C) /*!< TDES/DES DMA Destination Address Register for Channel 1 */
  722. #define CRPT_TDES1_CNT (CRPT_BA+0x270) /*!< TDES/DES Byte Count Register for Channel 1 */
  723. #define CRPT_TDES2_KEY1H (CRPT_BA+0x288) /*!< TDES/DES Key 1 High Word Register for Channel 2 */
  724. #define CRPT_TDES2_KEY1L (CRPT_BA+0x28C) /*!< TDES/DES Key 1 Low Word Register for Channel 2 */
  725. #define CRPT_TDES2_KEY2H (CRPT_BA+0x290) /*!< TDES/DES Key 2 High Word Register for Channel 2 */
  726. #define CRPT_TDES2_KEY2L (CRPT_BA+0x294) /*!< TDES/DES Key 2 Low Word Register for Channel 2 */
  727. #define CRPT_TDES2_KEY3H (CRPT_BA+0x298) /*!< TDES/DES Key 3 High Word Register for Channel 2 */
  728. #define CRPT_TDES2_KEY3L (CRPT_BA+0x29C) /*!< TDES/DES Key 3 Low Word Register for Channel 2 */
  729. #define CRPT_TDES2_IVH (CRPT_BA+0x2A0) /*!< TDES/DES Initial Vector High Word Register for Channel 2 */
  730. #define CRPT_TDES2_IVL (CRPT_BA+0x2A4) /*!< TDES/DES Initial Vector Low Word Register for Channel 2 */
  731. #define CRPT_TDES2_SADDR (CRPT_BA+0x2A8) /*!< TDES/DES DMA Source Address Register for Channel 2 */
  732. #define CRPT_TDES2_DADDR (CRPT_BA+0x2AC) /*!< TDES/DES DMA Destination Address Register for Channel 2 */
  733. #define CRPT_TDES2_CNT (CRPT_BA+0x2B0) /*!< TDES/DES Byte Count Register for Channel 3 */
  734. #define CRPT_TDES3_KEY1H (CRPT_BA+0x2C8) /*!< TDES/DES Key 1 High Word Register for Channel 3 */
  735. #define CRPT_TDES3_KEY1L (CRPT_BA+0x2CC) /*!< TDES/DES Key 1 Low Word Register for Channel 3 */
  736. #define CRPT_TDES3_KEY2H (CRPT_BA+0x2D0) /*!< TDES/DES Key 2 High Word Register for Channel 3 */
  737. #define CRPT_TDES3_KEY2L (CRPT_BA+0x2D4) /*!< TDES/DES Key 2 Low Word Register for Channel 3 */
  738. #define CRPT_TDES3_KEY3H (CRPT_BA+0x2D8) /*!< TDES/DES Key 3 High Word Register for Channel 3 */
  739. #define CRPT_TDES3_KEY3L (CRPT_BA+0x2DC) /*!< TDES/DES Key 3 Low Word Register for Channel 3 */
  740. #define CRPT_TDES3_IVH (CRPT_BA+0x2E0) /*!< TDES/DES Initial Vector High Word Register for Channel 3 */
  741. #define CRPT_TDES3_IVL (CRPT_BA+0x2E4) /*!< TDES/DES Initial Vector Low Word Register for Channel 3 */
  742. #define CRPT_TDES3_SADDR (CRPT_BA+0x2E8) /*!< TDES/DES DMA Source Address Register for Channel 3 */
  743. #define CRPT_TDES3_DADDR (CRPT_BA+0x2EC) /*!< TDES/DES DMA Destination Address Register for Channel 3 */
  744. #define CRPT_TDES3_CNT (CRPT_BA+0x2F0) /*!< TDES/DES Byte Count Register for Channel 3 */
  745. /* SHA/HMAC Control Registers */
  746. #define CRPT_HMAC_CTL (CRPT_BA+0x300) /*!< SHA/HMAC Control Register */
  747. #define CRPT_HMAC_STS (CRPT_BA+0x304) /*!< SHA/HMAC Status Flag */
  748. #define CRPT_HMAC_DGST0 (CRPT_BA+0x308) /*!< SHA/HMAC Digest Message 0 */
  749. #define CRPT_HMAC_DGST1 (CRPT_BA+0x30C) /*!< SHA/HMAC Digest Message 1 */
  750. #define CRPT_HMAC_DGST2 (CRPT_BA+0x310) /*!< SHA/HMAC Digest Message 2 */
  751. #define CRPT_HMAC_DGST3 (CRPT_BA+0x314) /*!< SHA/HMAC Digest Message 3 */
  752. #define CRPT_HMAC_DGST4 (CRPT_BA+0x318) /*!< SHA/HMAC Digest Message 4 */
  753. #define CRPT_HMAC_DGST5 (CRPT_BA+0x31C) /*!< SHA/HMAC Digest Message 5 */
  754. #define CRPT_HMAC_DGST6 (CRPT_BA+0x320) /*!< SHA/HMAC Digest Message 6 */
  755. #define CRPT_HMAC_DGST7 (CRPT_BA+0x324) /*!< SHA/HMAC Digest Message 7 */
  756. #define CRPT_HMAC_DGST8 (CRPT_BA+0x328) /*!< SHA/HMAC Digest Message 8 */
  757. #define CRPT_HMAC_DGST9 (CRPT_BA+0x32C) /*!< SHA/HMAC Digest Message 8 */
  758. #define CRPT_HMAC_DGST10 (CRPT_BA+0x330) /*!< SHA/HMAC Digest Message 10 */
  759. #define CRPT_HMAC_DGST11 (CRPT_BA+0x334) /*!< SHA/HMAC Digest Message 11 */
  760. #define CRPT_HMAC_DGST12 (CRPT_BA+0x338) /*!< SHA/HMAC Digest Message 12 */
  761. #define CRPT_HMAC_DGST13 (CRPT_BA+0x33C) /*!< SHA/HMAC Digest Message 13 */
  762. #define CRPT_HMAC_DGST14 (CRPT_BA+0x340) /*!< SHA/HMAC Digest Message 14 */
  763. #define CRPT_HMAC_DGST15 (CRPT_BA+0x344) /*!< SHA/HMAC Digest Message 15 */
  764. #define CRPT_HMAC_KEYCNT (CRPT_BA+0x348) /*!< SHA/HMAC Key Byte Count */
  765. #define CRPT_HMAC_SADDR (CRPT_BA+0x34C) /*!< SHA/HMAC Key Byte Count */
  766. #define CRPT_HMAC_DMACNT (CRPT_BA+0x350) /*!< SHA/HMAC Byte Count Register */
  767. #define CRPT_HMAC_DATIN (CRPT_BA+0x354) /*!< SHA/HMAC Engine Non-DMA Mode Data Input Port Register */
  768. /**@}*/ /* end of Cryptographic Accelerator register group */
  769. /*---------------------- Universal Asynchronous Receiver/Transmitter Controller -------------------------*/
  770. /**
  771. @addtogroup UART Universal Asynchronous Receiver/Transmitter Controller(UART)
  772. Memory Mapped Structure for UART Controller
  773. @{ */
  774. #define REG_UART0_RBR (UART0_BA+0x00) /*!< Receive Buffer Register */
  775. #define REG_UART0_THR (UART0_BA+0x00) /*!< Transmit Holding Register */
  776. #define REG_UART0_IER (UART0_BA+0x04) /*!< Interrupt Enable Register */
  777. #define REG_UART0_FCR (UART0_BA+0x08) /*!< FIFO Control Register */
  778. #define REG_UART0_LCR (UART0_BA+0x0C) /*!< Line Control Register */
  779. #define REG_UART0_MCR (UART0_BA+0x10) /*!< Modem Control Register */
  780. #define REG_UART0_MSR (UART0_BA+0x14) /*!< MODEM Status Register */
  781. #define REG_UART0_FSR (UART0_BA+0x18) /*!< FIFO Status Register */
  782. #define REG_UART0_ISR (UART0_BA+0x1C) /*!< Interrupt Status Control Register */
  783. #define REG_UART0_TOR (UART0_BA+0x20) /*!< Time-out Register */
  784. #define REG_UART0_BAUD (UART0_BA+0x24) /*!< Baud Rate Divider Register */
  785. #define REG_UART0_IRCR (UART0_BA+0x28) /*!< IrDA Control Register */
  786. #define REG_UART0_ALT_CSR (UART0_BA+0x2C) /*!< Alternate Control Register */
  787. #define REG_UART0_FUN_SEL (UART0_BA+0x30) /*!< UART Function Select REgister */
  788. #define REG_UART0_LIN_CTL (UART0_BA+0x34) /*!< UART LIN Control Register */
  789. #define REG_UART0_LIN_SR (UART0_BA+0x38) /*!< LIN Status Register */
  790. /*
  791. UART1 Control Registers
  792. */
  793. #define REG_UART1_RBR (UART1_BA+0x00) /*!< Receive Buffer Register */
  794. #define REG_UART1_THR (UART1_BA+0x00) /*!< Transmit Holding Register */
  795. #define REG_UART1_IER (UART1_BA+0x04) /*!< Interrupt Enable Register */
  796. #define REG_UART1_FCR (UART1_BA+0x08) /*!< FIFO Control Register */
  797. #define REG_UART1_LCR (UART1_BA+0x0C) /*!< Line Control Register */
  798. #define REG_UART1_MCR (UART1_BA+0x10) /*!< Modem Control Register */
  799. #define REG_UART1_MSR (UART1_BA+0x14) /*!< MODEM Status Register */
  800. #define REG_UART1_FSR (UART1_BA+0x18) /*!< FIFO Status Register */
  801. #define REG_UART1_ISR (UART1_BA+0x1C) /*!< Interrupt Status Control Register */
  802. #define REG_UART1_TOR (UART1_BA+0x20) /*!< Time-out Register */
  803. #define REG_UART1_BAUD (UART1_BA+0x24) /*!< Baud Rate Divider Register */
  804. #define REG_UART1_IRCR (UART1_BA+0x28) /*!< IrDA Control Register */
  805. #define REG_UART1_ALT_CSR (UART1_BA+0x2C) /*!< Alternate Control Register */
  806. #define REG_UART1_FUN_SEL (UART1_BA+0x30) /*!< UART Function Select REgister */
  807. #define REG_UART1_LIN_CTL (UART1_BA+0x34) /*!< UART LIN Control Register */
  808. #define REG_UART1_LIN_SR (UART1_BA+0x38) /*!< LIN Status Register */
  809. /*
  810. UART2 Control Registers
  811. */
  812. #define REG_UART2_RBR (UART2_BA+0x00) /*!< Receive Buffer Register */
  813. #define REG_UART2_THR (UART2_BA+0x00) /*!< Transmit Holding Register */
  814. #define REG_UART2_IER (UART2_BA+0x04) /*!< Interrupt Enable Register */
  815. #define REG_UART2_FCR (UART2_BA+0x08) /*!< FIFO Control Register */
  816. #define REG_UART2_LCR (UART2_BA+0x0C) /*!< Line Control Register */
  817. #define REG_UART2_MCR (UART2_BA+0x10) /*!< Modem Control Register */
  818. #define REG_UART2_MSR (UART2_BA+0x14) /*!< MODEM Status Register */
  819. #define REG_UART2_FSR (UART2_BA+0x18) /*!< FIFO Status Register */
  820. #define REG_UART2_ISR (UART2_BA+0x1C) /*!< Interrupt Status Control Register */
  821. #define REG_UART2_TOR (UART2_BA+0x20) /*!< Time-out Register */
  822. #define REG_UART2_BAUD (UART2_BA+0x24) /*!< Baud Rate Divider Register */
  823. #define REG_UART2_IRCR (UART2_BA+0x28) /*!< IrDA Control Register */
  824. #define REG_UART2_ALT_CSR (UART2_BA+0x2C) /*!< Alternate Control Register */
  825. #define REG_UART2_FUN_SEL (UART2_BA+0x30) /*!< UART Function Select REgister */
  826. #define REG_UART2_LIN_CTL (UART2_BA+0x34) /*!< UART LIN Control Register */
  827. #define REG_UART2_LIN_SR (UART2_BA+0x38) /*!< LIN Status Register */
  828. /*
  829. UART3 Control Registers
  830. */
  831. #define REG_UART3_RBR (UART3_BA+0x00) /*!< Receive Buffer Register */
  832. #define REG_UART3_THR (UART3_BA+0x00) /*!< Transmit Holding Register */
  833. #define REG_UART3_IER (UART3_BA+0x04) /*!< Interrupt Enable Register */
  834. #define REG_UART3_FCR (UART3_BA+0x08) /*!< FIFO Control Register */
  835. #define REG_UART3_LCR (UART3_BA+0x0C) /*!< Line Control Register */
  836. #define REG_UART3_MCR (UART3_BA+0x10) /*!< Modem Control Register */
  837. #define REG_UART3_MSR (UART3_BA+0x14) /*!< MODEM Status Register */
  838. #define REG_UART3_FSR (UART3_BA+0x18) /*!< FIFO Status Register */
  839. #define REG_UART3_ISR (UART3_BA+0x1C) /*!< Interrupt Status Control Register */
  840. #define REG_UART3_TOR (UART3_BA+0x20) /*!< Time-out Register */
  841. #define REG_UART3_BAUD (UART3_BA+0x24) /*!< Baud Rate Divider Register */
  842. #define REG_UART3_IRCR (UART3_BA+0x28) /*!< IrDA Control Register */
  843. #define REG_UART3_ALT_CSR (UART3_BA+0x2C) /*!< Alternate Control Register */
  844. #define REG_UART3_FUN_SEL (UART3_BA+0x30) /*!< UART Function Select REgister */
  845. #define REG_UART3_LIN_CTL (UART3_BA+0x34) /*!< UART LIN Control Register */
  846. #define REG_UART3_LIN_SR (UART3_BA+0x38) /*!< LIN Status Register */
  847. /*
  848. UART4 Control Registers
  849. */
  850. #define REG_UART4_RBR (UART4_BA+0x00) /*!< Receive Buffer Register */
  851. #define REG_UART4_THR (UART4_BA+0x00) /*!< Transmit Holding Register */
  852. #define REG_UART4_IER (UART4_BA+0x04) /*!< Interrupt Enable Register */
  853. #define REG_UART4_FCR (UART4_BA+0x08) /*!< FIFO Control Register */
  854. #define REG_UART4_LCR (UART4_BA+0x0C) /*!< Line Control Register */
  855. #define REG_UART4_MCR (UART4_BA+0x10) /*!< Modem Control Register */
  856. #define REG_UART4_MSR (UART4_BA+0x14) /*!< MODEM Status Register */
  857. #define REG_UART4_FSR (UART4_BA+0x18) /*!< FIFO Status Register */
  858. #define REG_UART4_ISR (UART4_BA+0x1C) /*!< Interrupt Status Control Register */
  859. #define REG_UART4_TOR (UART4_BA+0x20) /*!< Time-out Register */
  860. #define REG_UART4_BAUD (UART4_BA+0x24) /*!< Baud Rate Divider Register */
  861. #define REG_UART4_IRCR (UART4_BA+0x28) /*!< IrDA Control Register */
  862. #define REG_UART4_ALT_CSR (UART4_BA+0x2C) /*!< Alternate Control Register */
  863. #define REG_UART4_FUN_SEL (UART4_BA+0x30) /*!< UART Function Select REgister */
  864. #define REG_UART4_LIN_CTL (UART4_BA+0x34) /*!< UART LIN Control Register */
  865. #define REG_UART4_LIN_SR (UART4_BA+0x38) /*!< LIN Status Register */
  866. /*
  867. UART5 Control Registers
  868. */
  869. #define REG_UART5_RBR (UART5_BA+0x00) /*!< Receive Buffer Register */
  870. #define REG_UART5_THR (UART5_BA+0x00) /*!< Transmit Holding Register */
  871. #define REG_UART5_IER (UART5_BA+0x04) /*!< Interrupt Enable Register */
  872. #define REG_UART5_FCR (UART5_BA+0x08) /*!< FIFO Control Register */
  873. #define REG_UART5_LCR (UART5_BA+0x0C) /*!< Line Control Register */
  874. #define REG_UART5_MCR (UART5_BA+0x10) /*!< Modem Control Register */
  875. #define REG_UART5_MSR (UART5_BA+0x14) /*!< MODEM Status Register */
  876. #define REG_UART5_FSR (UART5_BA+0x18) /*!< FIFO Status Register */
  877. #define REG_UART5_ISR (UART5_BA+0x1C) /*!< Interrupt Status Control Register */
  878. #define REG_UART5_TOR (UART5_BA+0x20) /*!< Time-out Register */
  879. #define REG_UART5_BAUD (UART5_BA+0x24) /*!< Baud Rate Divider Register */
  880. #define REG_UART5_IRCR (UART5_BA+0x28) /*!< IrDA Control Register */
  881. #define REG_UART5_ALT_CSR (UART5_BA+0x2C) /*!< Alternate Control Register */
  882. #define REG_UART5_FUN_SEL (UART5_BA+0x30) /*!< UART Function Select REgister */
  883. #define REG_UART5_LIN_CTL (UART5_BA+0x34) /*!< UART LIN Control Register */
  884. #define REG_UART5_LIN_SR (UART5_BA+0x38) /*!< LIN Status Register */
  885. /*
  886. UART6 Control Registers
  887. */
  888. #define REG_UART6_RBR (UART6_BA+0x00) /*!< Receive Buffer Register */
  889. #define REG_UART6_THR (UART6_BA+0x00) /*!< Transmit Holding Register */
  890. #define REG_UART6_IER (UART6_BA+0x04) /*!< Interrupt Enable Register */
  891. #define REG_UART6_FCR (UART6_BA+0x08) /*!< FIFO Control Register */
  892. #define REG_UART6_LCR (UART6_BA+0x0C) /*!< Line Control Register */
  893. #define REG_UART6_MCR (UART6_BA+0x10) /*!< Modem Control Register */
  894. #define REG_UART6_MSR (UART6_BA+0x14) /*!< MODEM Status Register */
  895. #define REG_UART6_FSR (UART6_BA+0x18) /*!< FIFO Status Register */
  896. #define REG_UART6_ISR (UART6_BA+0x1C) /*!< Interrupt Status Control Register */
  897. #define REG_UART6_TOR (UART6_BA+0x20) /*!< Time-out Register */
  898. #define REG_UART6_BAUD (UART6_BA+0x24) /*!< Baud Rate Divider Register */
  899. #define REG_UART6_IRCR (UART6_BA+0x28) /*!< IrDA Control Register */
  900. #define REG_UART6_ALT_CSR (UART6_BA+0x2C) /*!< Alternate Control Register */
  901. #define REG_UART6_FUN_SEL (UART6_BA+0x30) /*!< UART Function Select REgister */
  902. #define REG_UART6_LIN_CTL (UART6_BA+0x34) /*!< UART LIN Control Register */
  903. #define REG_UART6_LIN_SR (UART6_BA+0x38) /*!< LIN Status Register */
  904. /*
  905. UART7 Control Registers
  906. */
  907. #define REG_UART7_RBR (UART7_BA+0x00) /*!< Receive Buffer Register */
  908. #define REG_UART7_THR (UART7_BA+0x00) /*!< Transmit Holding Register */
  909. #define REG_UART7_IER (UART7_BA+0x04) /*!< Interrupt Enable Register */
  910. #define REG_UART7_FCR (UART7_BA+0x08) /*!< FIFO Control Register */
  911. #define REG_UART7_LCR (UART7_BA+0x0C) /*!< Line Control Register */
  912. #define REG_UART7_MCR (UART7_BA+0x10) /*!< Modem Control Register */
  913. #define REG_UART7_MSR (UART7_BA+0x14) /*!< MODEM Status Register */
  914. #define REG_UART7_FSR (UART7_BA+0x18) /*!< FIFO Status Register */
  915. #define REG_UART7_ISR (UART7_BA+0x1C) /*!< Interrupt Status Control Register */
  916. #define REG_UART7_TOR (UART7_BA+0x20) /*!< Time-out Register */
  917. #define REG_UART7_BAUD (UART7_BA+0x24) /*!< Baud Rate Divider Register */
  918. #define REG_UART7_IRCR (UART7_BA+0x28) /*!< IrDA Control Register */
  919. #define REG_UART7_ALT_CSR (UART7_BA+0x2C) /*!< Alternate Control Register */
  920. #define REG_UART7_FUN_SEL (UART7_BA+0x30) /*!< UART Function Select REgister */
  921. #define REG_UART7_LIN_CTL (UART7_BA+0x34) /*!< UART LIN Control Register */
  922. #define REG_UART7_LIN_SR (UART7_BA+0x38) /*!< LIN Status Register */
  923. /*
  924. UART8 Control Registers
  925. */
  926. #define REG_UART8_RBR (UART8_BA+0x00) /*!< Receive Buffer Register */
  927. #define REG_UART8_THR (UART8_BA+0x00) /*!< Transmit Holding Register */
  928. #define REG_UART8_IER (UART8_BA+0x04) /*!< Interrupt Enable Register */
  929. #define REG_UART8_FCR (UART8_BA+0x08) /*!< FIFO Control Register */
  930. #define REG_UART8_LCR (UART8_BA+0x0C) /*!< Line Control Register */
  931. #define REG_UART8_MCR (UART8_BA+0x10) /*!< Modem Control Register */
  932. #define REG_UART8_MSR (UART8_BA+0x14) /*!< MODEM Status Register */
  933. #define REG_UART8_FSR (UART8_BA+0x18) /*!< FIFO Status Register */
  934. #define REG_UART8_ISR (UART8_BA+0x1C) /*!< Interrupt Status Control Register */
  935. #define REG_UART8_TOR (UART8_BA+0x20) /*!< Time-out Register */
  936. #define REG_UART8_BAUD (UART8_BA+0x24) /*!< Baud Rate Divider Register */
  937. #define REG_UART8_IRCR (UART8_BA+0x28) /*!< IrDA Control Register */
  938. #define REG_UART8_ALT_CSR (UART8_BA+0x2C) /*!< Alternate Control Register */
  939. #define REG_UART8_FUN_SEL (UART8_BA+0x30) /*!< UART Function Select REgister */
  940. #define REG_UART8_LIN_CTL (UART8_BA+0x34) /*!< UART LIN Control Register */
  941. #define REG_UART8_LIN_SR (UART8_BA+0x38) /*!< LIN Status Register */
  942. /*
  943. UART9 Control Registers
  944. */
  945. #define REG_UART9_RBR (UART9_BA+0x00) /*!< Receive Buffer Register */
  946. #define REG_UART9_THR (UART9_BA+0x00) /*!< Transmit Holding Register */
  947. #define REG_UART9_IER (UART9_BA+0x04) /*!< Interrupt Enable Register */
  948. #define REG_UART9_FCR (UART9_BA+0x08) /*!< FIFO Control Register */
  949. #define REG_UART9_LCR (UART9_BA+0x0C) /*!< Line Control Register */
  950. #define REG_UART9_MCR (UART9_BA+0x10) /*!< Modem Control Register */
  951. #define REG_UART9_MSR (UART9_BA+0x14) /*!< MODEM Status Register */
  952. #define REG_UART9_FSR (UART9_BA+0x18) /*!< FIFO Status Register */
  953. #define REG_UART9_ISR (UART9_BA+0x1C) /*!< Interrupt Status Control Register */
  954. #define REG_UART9_TOR (UART9_BA+0x20) /*!< Time-out Register */
  955. #define REG_UART9_BAUD (UART9_BA+0x24) /*!< Baud Rate Divider Register */
  956. #define REG_UART9_IRCR (UART9_BA+0x28) /*!< IrDA Control Register */
  957. #define REG_UART9_ALT_CSR (UART9_BA+0x2C) /*!< Alternate Control Register */
  958. #define REG_UART9_FUN_SEL (UART9_BA+0x30) /*!< UART Function Select REgister */
  959. #define REG_UART9_LIN_CTL (UART9_BA+0x34) /*!< UART LIN Control Register */
  960. #define REG_UART9_LIN_SR (UART9_BA+0x38) /*!< LIN Status Register */
  961. /**@}*/ /* end of UART register group */
  962. /*---------------------- Enhance Timer Controller -------------------------*/
  963. /**
  964. @addtogroup ETIMER Enhance Timer Controller(ETIMER)
  965. Memory Mapped Structure for TIMER Controller
  966. @{ */
  967. #define REG_ETMR0_CTL (ETMR0_BA+0x00) /*!< Enhance Timer 0 Control Register */
  968. #define REG_ETMR0_PRECNT (ETMR0_BA+0x04) /*!< Enhance Timer 0 Pre-Scale Counter Register */
  969. #define REG_ETMR0_CMPR (ETMR0_BA+0x08) /*!< Enhance Timer 0 Compare Register */
  970. #define REG_ETMR0_IER (ETMR0_BA+0x0C) /*!< Enhance Timer 0 Interrupt Enable Register */
  971. #define REG_ETMR0_ISR (ETMR0_BA+0x10) /*!< Enhance Timer 0 Interrupt Status Register */
  972. #define REG_ETMR0_DR (ETMR0_BA+0x14) /*!< Enhance Timer 0 Data Register */
  973. #define REG_ETMR0_TCAP (ETMR0_BA+0x18) /*!< Enhance Timer 0 Capture Data Register */
  974. #define REG_ETMR0_ECTL (ETMR0_BA+0x20) /*!< Enhance Timer 0 Extended Control Register */
  975. #define REG_ETMR1_CTL (ETMR1_BA+0x00) /*!< Enhance Timer 1 Control Register */
  976. #define REG_ETMR1_PRECNT (ETMR1_BA+0x04) /*!< Enhance Timer 1 Pre-Scale Counter Register */
  977. #define REG_ETMR1_CMPR (ETMR1_BA+0x08) /*!< Enhance Timer 1 Compare Register */
  978. #define REG_ETMR1_IER (ETMR1_BA+0x0C) /*!< Enhance Timer 1 Interrupt Enable Register */
  979. #define REG_ETMR1_ISR (ETMR1_BA+0x10) /*!< Enhance Timer 1 Interrupt Status Register */
  980. #define REG_ETMR1_DR (ETMR1_BA+0x14) /*!< Enhance Timer 1 Data Register */
  981. #define REG_ETMR1_TCAP (ETMR1_BA+0x18) /*!< Enhance Timer 1 Capture Data Register */
  982. #define REG_ETMR1_ECTL (ETMR1_BA+0x20) /*!< Enhance Timer 1 Extended Control Register */
  983. #define REG_ETMR2_CTL (ETMR2_BA+0x00) /*!< Enhance Timer 2 Control Register */
  984. #define REG_ETMR2_PRECNT (ETMR2_BA+0x04) /*!< Enhance Timer 2 Pre-Scale Counter Register */
  985. #define REG_ETMR2_CMPR (ETMR2_BA+0x08) /*!< Enhance Timer 2 Compare Register */
  986. #define REG_ETMR2_IER (ETMR2_BA+0x0C) /*!< Enhance Timer 2 Interrupt Enable Register */
  987. #define REG_ETMR2_ISR (ETMR2_BA+0x10) /*!< Enhance Timer 2 Interrupt Status Register */
  988. #define REG_ETMR2_DR (ETMR2_BA+0x14) /*!< Enhance Timer 2 Data Register */
  989. #define REG_ETMR2_TCAP (ETMR2_BA+0x18) /*!< Enhance Timer 2 Capture Data Register */
  990. #define REG_ETMR2_ECTL (ETMR2_BA+0x20) /*!< Enhance Timer 2 Extended Control Register */
  991. #define REG_ETMR3_CTL (ETMR3_BA+0x00) /*!< Enhance Timer 3 Control Register */
  992. #define REG_ETMR3_PRECNT (ETMR3_BA+0x04) /*!< Enhance Timer 3 Pre-Scale Counter Register */
  993. #define REG_ETMR3_CMPR (ETMR3_BA+0x08) /*!< Enhance Timer 3 Compare Register */
  994. #define REG_ETMR3_IER (ETMR3_BA+0x0C) /*!< Enhance Timer 3 Interrupt Enable Register */
  995. #define REG_ETMR3_ISR (ETMR3_BA+0x10) /*!< Enhance Timer 3 Interrupt Status Register */
  996. #define REG_ETMR3_DR (ETMR3_BA+0x14) /*!< Enhance Timer 3 Data Register */
  997. #define REG_ETMR3_TCAP (ETMR3_BA+0x18) /*!< Enhance Timer 3 Capture Data Register */
  998. #define REG_ETMR3_ECTL (ETMR3_BA+0x20) /*!< Enhance Timer 3 Extended Control Register */
  999. #define REG_ETMR4_CTL (ETMR4_BA+0x00) /*!< Enhance Timer 4 Control Register */
  1000. #define REG_ETMR4_PRECNT (ETMR4_BA+0x04) /*!< Enhance Timer 4 Pre-Scale Counter Register */
  1001. #define REG_ETMR4_CMPR (ETMR4_BA+0x08) /*!< Enhance Timer 4 Compare Register */
  1002. #define REG_ETMR4_IER (ETMR4_BA+0x0C) /*!< Enhance Timer 4 Interrupt Enable Register */
  1003. #define REG_ETMR4_ISR (ETMR4_BA+0x10) /*!< Enhance Timer 4 Interrupt Status Register */
  1004. #define REG_ETMR4_DR (ETMR4_BA+0x14) /*!< Enhance Timer 4 Data Register */
  1005. #define REG_ETMR4_TCAP (ETMR4_BA+0x18) /*!< Enhance Timer 4 Capture Data Register */
  1006. #define REG_ETMR4_ECTL (ETMR4_BA+0x20) /*!< Enhance Timer 4 Extended Control Register */
  1007. #define REG_ETMR5_CTL (ETMR5_BA+0x00) /*!< Enhance Timer 5 Control Register */
  1008. #define REG_ETMR5_PRECNT (ETMR5_BA+0x04) /*!< Enhance Timer 5 Pre-Scale Counter Register */
  1009. #define REG_ETMR5_CMPR (ETMR5_BA+0x08) /*!< Enhance Timer 5 Compare Register */
  1010. #define REG_ETMR5_IER (ETMR5_BA+0x0C) /*!< Enhance Timer 5 Interrupt Enable Register */
  1011. #define REG_ETMR5_ISR (ETMR5_BA+0x10) /*!< Enhance Timer 5 Interrupt Status Register */
  1012. #define REG_ETMR5_DR (ETMR5_BA+0x14) /*!< Enhance Timer 5 Data Register */
  1013. #define REG_ETMR5_TCAP (ETMR5_BA+0x18) /*!< Enhance Timer 5 Capture Data Register */
  1014. #define REG_ETMR5_ECTL (ETMR5_BA+0x20) /*!< Enhance Timer 5 Extended Control Register */
  1015. /**@}*/ /* end of ETIMER register group */
  1016. /*---------------------- WDT Controller -------------------------*/
  1017. /**
  1018. @addtogroup WDT Watch Dog Timer Controller(WDT)
  1019. Memory Mapped Structure for WDT Controller
  1020. @{ */
  1021. #define REG_WDT_CTL (WDT_BA+0x00) /*!< WDT Control Register */
  1022. #define REG_WDT_ALTCTL (WDT_BA+0x04) /*!< WDT Alternative Control Register */
  1023. #define REG_WDT_RSTCNT (WDT_BA+0x08) /*!< WDT Reset Counter Register */
  1024. /**@}*/ /* end of WDT register group */
  1025. /*---------------------- WWDT Controller -------------------------*/
  1026. /**
  1027. @addtogroup WWDT Window Watch Dog Timer Controller(WWDT)
  1028. Memory Mapped Structure for WWDT Controller
  1029. @{ */
  1030. #define REG_WWDT_RLDCNT (WWDT_BA+0x00) /*!< WWDT Reload Counter Register */
  1031. #define REG_WWDT_CTL (WWDT_BA+0x04) /*!< WWDT Control Register */
  1032. #define REG_WWDT_STATUS (WWDT_BA+0x08) /*!< WWDT Status Register */
  1033. #define REG_WWDT_CNT (WWDT_BA+0x0C) /*!< WWDT Counter Value Register */
  1034. /**@}*/ /* end of WWDT register group */
  1035. /*---------------------- SC Host Interface -------------------------*/
  1036. /**
  1037. @addtogroup SC Smart Card Host Interface (SC)
  1038. Memory Mapped Structure for Smart Card Host Interface
  1039. @{ */
  1040. #define REG_SC0_DAT (SC0_BA+0x00) /*!< SC0 Receiving/Transmit Holding Buffer Register */
  1041. #define REG_SC0_CTL (SC0_BA+0x04) /*!< SC0 Control Register */
  1042. #define REG_SC0_ALTCTL (SC0_BA+0x08) /*!< SC0 Alternate Control Register */
  1043. #define REG_SC0_EGT (SC0_BA+0x0C) /*!< SC0 Extend Guard Time Register */
  1044. #define REG_SC0_RXTOUT (SC0_BA+0x10) /*!< SC0 Receive Buffer Time-out Register */
  1045. #define REG_SC0_ETUCTL (SC0_BA+0x14) /*!< SC0 ETU Control Register */
  1046. #define REG_SC0_INTEN (SC0_BA+0x18) /*!< SC0 Interrupt Enable Control Register */
  1047. #define REG_SC0_INTSTS (SC0_BA+0x1C) /*!< SC0 Interrupt Status Register */
  1048. #define REG_SC0_STATUS (SC0_BA+0x20) /*!< SC0 Status Register */
  1049. #define REG_SC0_PINCTL (SC0_BA+0x24) /*!< SC0 Pin Control State Register */
  1050. #define REG_SC0_TMRCTL0 (SC0_BA+0x28) /*!< SC0 Internal Timer Control Register 0 */
  1051. #define REG_SC0_TMRCTL1 (SC0_BA+0x2C) /*!< SC0 Internal Timer Control Register 1 */
  1052. #define REG_SC0_TMRCTL2 (SC0_BA+0x30) /*!< SC0 Internal Timer Control Register 2 */
  1053. #define REG_SC0_UARTCTL (SC0_BA+0x34) /*!< SC0 UART Mode Control Register */
  1054. #define REG_SC0_ACTCTL (SC0_BA+0x4C) /*!< SC0 Activation Control Register */
  1055. #define REG_SC1_DAT (SC1_BA+0x00) /*!< SC1 Receiving/Transmit Holding Buffer Register */
  1056. #define REG_SC1_CTL (SC1_BA+0x04) /*!< SC1 Control Register */
  1057. #define REG_SC1_ALTCTL (SC1_BA+0x08) /*!< SC1 Alternate Control Register */
  1058. #define REG_SC1_EGT (SC1_BA+0x0C) /*!< SC1 Extend Guard Time Register */
  1059. #define REG_SC1_RXTOUT (SC1_BA+0x10) /*!< SC1 Receive Buffer Time-out Register */
  1060. #define REG_SC1_ETUCTL (SC1_BA+0x14) /*!< SC1 ETU Control Register */
  1061. #define REG_SC1_INTEN (SC1_BA+0x18) /*!< SC1 Interrupt Enable Control Register */
  1062. #define REG_SC1_INTSTS (SC1_BA+0x1C) /*!< SC1 Interrupt Status Register */
  1063. #define REG_SC1_STATUS (SC1_BA+0x20) /*!< SC1 Status Register */
  1064. #define REG_SC1_PINCTL (SC1_BA+0x24) /*!< SC1 Pin Control State Register */
  1065. #define REG_SC1_TMRCTL0 (SC1_BA+0x28) /*!< SC1 Internal Timer Control Register 0 */
  1066. #define REG_SC1_TMRCTL1 (SC1_BA+0x2C) /*!< SC1 Internal Timer Control Register 1 */
  1067. #define REG_SC1_TMRCTL2 (SC1_BA+0x30) /*!< SC1 Internal Timer Control Register 2 */
  1068. #define REG_SC1_UARTCTL (SC1_BA+0x34) /*!< SC1 UART Mode Control Register */
  1069. #define REG_SC1_ACTCTL (SC1_BA+0x4C) /*!< SC1 Activation Control Register 1 */
  1070. /**@}*/ /* end of SC register group */
  1071. /*---------------------- Advance Interrupt Controller -------------------------*/
  1072. /**
  1073. @addtogroup AIC Advance Interrupt Controller(AIC)
  1074. Memory Mapped Structure for AIC Controller
  1075. @{ */
  1076. #define REG_AIC_SRCCTL0 (AIC_BA+0x00) /* Source control register 0 */
  1077. #define REG_AIC_SRCCTL1 (AIC_BA+0x04) /* Source control register 1 */
  1078. #define REG_AIC_SRCCTL2 (AIC_BA+0x08) /* Source control register 2 */
  1079. #define REG_AIC_SRCCTL3 (AIC_BA+0x0C) /* Source control register 3 */
  1080. #define REG_AIC_SRCCTL4 (AIC_BA+0x10) /* Source control register 4 */
  1081. #define REG_AIC_SRCCTL5 (AIC_BA+0x14) /* Source control register 5 */
  1082. #define REG_AIC_SRCCTL6 (AIC_BA+0x18) /* Source control register 6 */
  1083. #define REG_AIC_SRCCTL7 (AIC_BA+0x1C) /* Source control register 7 */
  1084. #define REG_AIC_SRCCTL8 (AIC_BA+0x20) /* Source control register 8 */
  1085. #define REG_AIC_SRCCTL9 (AIC_BA+0x24) /* Source control register 9 */
  1086. #define REG_AIC_SRCCTL10 (AIC_BA+0x28) /* Source control register 10 */
  1087. #define REG_AIC_SRCCTL11 (AIC_BA+0x2C) /* Source control register 11 */
  1088. #define REG_AIC_SRCCTL12 (AIC_BA+0x30) /* Source control register 12 */
  1089. #define REG_AIC_SRCCTL13 (AIC_BA+0x34) /* Source control register 13 */
  1090. #define REG_AIC_SRCCTL14 (AIC_BA+0x38) /* Source control register 14 */
  1091. #define REG_AIC_SRCCTL15 (AIC_BA+0x3C) /* Source control register 15 */
  1092. #define REG_AIC_RAWSTS0 (AIC_BA+0x100) /* Interrupt raw status register */
  1093. #define REG_AIC_RAWSTS1 (AIC_BA+0x104) /* Interrupt raw status register (Hign) */
  1094. #define REG_AIC_ACTSTS0 (AIC_BA+0x108) /* Interrupt active status register */
  1095. #define REG_AIC_ACTSTS1 (AIC_BA+0x10C) /* Interrupt active status register (Hign) */
  1096. #define REG_AIC_INTSTS0 (AIC_BA+0x110) /* Interrupt status register */
  1097. #define REG_AIC_INTSTS1 (AIC_BA+0x114) /* Interrupt status register (High) */
  1098. #define REG_AIC_IRQNUM (AIC_BA+0x120) /* Interrupt source number register */
  1099. #define REG_AIC_FIQNUM (AIC_BA+0x124) /* Output interrupt status register */
  1100. #define REG_AIC_INTMSK0 (AIC_BA+0x128) /* Interrupt mask register */
  1101. #define REG_AIC_INTMSK1 (AIC_BA+0x12C) /* Interrupt mask register (High) */
  1102. #define REG_AIC_INTEN0 (AIC_BA+0x130) /* Mask enable command register */
  1103. #define REG_AIC_INTEN1 (AIC_BA+0x134) /* Mask enable command register (High) */
  1104. #define REG_AIC_INTDIS0 (AIC_BA+0x138) /* Mask disable command register */
  1105. #define REG_AIC_INTDIS1 (AIC_BA+0x13C) /* Mask disable command register (High) */
  1106. #define REG_AIC_EOIS (AIC_BA+0x150) /* End of service command register */
  1107. #define REG_AIC_EOFS (AIC_BA+0x154) /* End of service command register */
  1108. /**@}*/ /* end of AIC register group */
  1109. /*---------------------- Real Time Clock Controller -------------------------*/
  1110. /**
  1111. @addtogroup RTC Real Time Clock Controller(RTC)
  1112. Memory Mapped Structure for RTC Controller
  1113. @{ */
  1114. #define REG_RTC_INIT (RTC_BA+0x00) /*!< RTC Initiation Register */
  1115. #define REG_RTC_RWEN (RTC_BA+0x04) /*!< RTC Access Enable Register */
  1116. #define REG_RTC_FREQADJ (RTC_BA+0x08) /*!< RTC Frequency Compensation Register */
  1117. #define REG_RTC_TIME (RTC_BA+0x0C) /*!< Time Loading Register */
  1118. #define REG_RTC_CAL (RTC_BA+0x10) /*!< Calendar Loading Register */
  1119. #define REG_RTC_TIMEFMT (RTC_BA+0x14) /*!< Time Format Selection Register */
  1120. #define REG_RTC_WEEKDAY (RTC_BA+0x18) /*!< Day of the Week Register */
  1121. #define REG_RTC_TALM (RTC_BA+0x1C) /*!< Time Alarm Register */
  1122. #define REG_RTC_CALM (RTC_BA+0x20) /*!< Calendar Alarm Register */
  1123. #define REG_RTC_LEAPYEAR (RTC_BA+0x24) /*!< Leap year Indicator Register */
  1124. #define REG_RTC_INTEN (RTC_BA+0x28) /*!< RTC Interrupt Enable Register */
  1125. #define REG_RTC_INTSTS (RTC_BA+0x2C) /*!< RTC Interrupt Indicator Register */
  1126. #define REG_RTC_TICK (RTC_BA+0x30) /*!< RTC Time Tick Register */
  1127. #define REG_RTC_PWRCTL (RTC_BA+0x34) /*!< Power Control Register */
  1128. #define REG_RTC_PWRCNT (RTC_BA+0x38) /*!< Power Control Counter Register */
  1129. #define REG_RTC_SPR0 (RTC_BA+0x40) /*!< Spare REgistger 0 */
  1130. #define REG_RTC_SPR1 (RTC_BA+0x44) /*!< Spare REgistger 1 */
  1131. #define REG_RTC_SPR2 (RTC_BA+0x48) /*!< Spare REgistger 2 */
  1132. #define REG_RTC_SPR3 (RTC_BA+0x4C) /*!< Spare REgistger 3 */
  1133. #define REG_RTC_SPR4 (RTC_BA+0x50) /*!< Spare REgistger 4 */
  1134. #define REG_RTC_SPR5 (RTC_BA+0x54) /*!< Spare REgistger 5 */
  1135. #define REG_RTC_SPR6 (RTC_BA+0x58) /*!< Spare REgistger 6 */
  1136. #define REG_RTC_SPR7 (RTC_BA+0x5C) /*!< Spare REgistger 7 */
  1137. #define REG_RTC_SPR8 (RTC_BA+0x60) /*!< Spare REgistger 8 */
  1138. #define REG_RTC_SPR9 (RTC_BA+0x64) /*!< Spare REgistger 9 */
  1139. #define REG_RTC_SPR10 (RTC_BA+0x68) /*!< Spare REgistger 10 */
  1140. #define REG_RTC_SPR11 (RTC_BA+0x6C) /*!< Spare REgistger 11 */
  1141. #define REG_RTC_SPR12 (RTC_BA+0x70) /*!< Spare REgistger 12 */
  1142. #define REG_RTC_SPR13 (RTC_BA+0x74) /*!< Spare REgistger 13 */
  1143. #define REG_RTC_SPR14 (RTC_BA+0x78) /*!< Spare REgistger 14 */
  1144. #define REG_RTC_SPR15 (RTC_BA+0x7C) /*!< Spare REgistger 15 */
  1145. /**@}*/ /* end of RTC register group */
  1146. /*---------------------- Pulse Width Modulation Controller -------------------------*/
  1147. /**
  1148. @addtogroup PWM Pulse Width Modulation Controller(PWM)
  1149. Memory Mapped Structure for PWM Controller
  1150. @{ */
  1151. #define REG_PWM0_PPR (PWM0_BA+0x00) /*!< PWM Pre-scale Register 0 */
  1152. #define REG_PWM0_CSR (PWM0_BA+0x04) /*!< PWM Clock Select Register */
  1153. #define REG_PWM0_PCR (PWM0_BA+0x08) /*!< PWM Control Register */
  1154. #define REG_PWM0_CNR0 (PWM0_BA+0x0C) /*!< PWM Counter Register 0 */
  1155. #define REG_PWM0_CMR0 (PWM0_BA+0x10) /*!< PWM Comparator Register 0 */
  1156. #define REG_PWM0_PDR0 (PWM0_BA+0x14) /*!< PWM Data Register 0 */
  1157. #define REG_PWM0_CNR1 (PWM0_BA+0x18) /*!< PWM Counter Register 1 */
  1158. #define REG_PWM0_CMR1 (PWM0_BA+0x1C) /*!< PWM Comparator Register 1 */
  1159. #define REG_PWM0_PDR1 (PWM0_BA+0x20) /*!< PWM Data Register 1 */
  1160. #define REG_PWM0_CNR2 (PWM0_BA+0x24) /*!< PWM Counter Register 2 */
  1161. #define REG_PWM0_CMR2 (PWM0_BA+0x28) /*!< PWM Comparator Register 2 */
  1162. #define REG_PWM0_PDR2 (PWM0_BA+0x2C) /*!< PWM Data Register 2 */
  1163. #define REG_PWM0_CNR3 (PWM0_BA+0x30) /*!< PWM Counter Register 3 */
  1164. #define REG_PWM0_CMR3 (PWM0_BA+0x34) /*!< PWM Comparator Register 3 */
  1165. #define REG_PWM0_PDR3 (PWM0_BA+0x38) /*!< PWM Data Register 3 */
  1166. #define REG_PWM0_PIER (PWM0_BA+0x3C) /*!< PWM Timer Interrupt Enable Register */
  1167. #define REG_PWM0_PIIR (PWM0_BA+0x40) /*!< PWM Timer Interrupt Identification Register */
  1168. /*---------------------- Analog to Digital Converter -------------------------*/
  1169. /**
  1170. @addtogroup ADC Analog to Digital Converter(ADC)
  1171. Memory Mapped Structure for ADC Controller
  1172. @{ */
  1173. #define REG_ADC_CTL (ADC_BA+0x000) /*!< ADC Contrl */
  1174. #define REG_ADC_CONF (ADC_BA+0x004) /*!< ADC Configure */
  1175. #define REG_ADC_IER (ADC_BA+0x008) /*!< ADC Interrupt Enable Register */
  1176. #define REG_ADC_ISR (ADC_BA+0x00C) /*!< ADC Interrupt Status Register */
  1177. #define REG_ADC_WKISR (ADC_BA+0x010) /*!< ADC Wake Up Interrupt Status Register */
  1178. #define REG_ADC_XYDATA (ADC_BA+0x020) /*!< ADC Touch XY Pressure Data */
  1179. #define REG_ADC_ZDATA (ADC_BA+0x024) /*!< ADC Touch Z Pressure Data */
  1180. #define REG_ADC_DATA (ADC_BA+0x028) /*!< ADC Normal Conversion Data */
  1181. #define REG_ADC_VBADATA (ADC_BA+0x02C) /*!< ADC Battery Detection Data */
  1182. #define REG_ADC_KPDATA (ADC_BA+0x030) /*!< ADC Key Pad Data */
  1183. #define REG_ADC_SELFDATA (ADC_BA+0x034) /*!< ADC Self-Test Data */
  1184. #define REG_ADC_XYSORT0 (ADC_BA+0x1F4) /*!< ADC Touch XY Position Mean Value Sort 0 */
  1185. #define REG_ADC_XYSORT1 (ADC_BA+0x1F8) /*!< ADC Touch XY Position Mean Value Sort 1 */
  1186. #define REG_ADC_XYSORT2 (ADC_BA+0x1FC) /*!< ADC Touch XY Position Mean Value Sort 2 */
  1187. #define REG_ADC_XYSORT3 (ADC_BA+0x200) /*!< ADC Touch XY Position Mean Value Sort 3 */
  1188. #define REG_ADC_ZSORT0 (ADC_BA+0x204) /*!< ADC Touch Z Pressure Mean Value Sort 0 */
  1189. #define REG_ADC_ZSORT1 (ADC_BA+0x208) /*!< ADC Touch Z Pressure Mean Value Sort 1 */
  1190. #define REG_ADC_ZSORT2 (ADC_BA+0x20C) /*!< ADC Touch Z Pressure Mean Value Sort 2 */
  1191. #define REG_ADC_ZSORT3 (ADC_BA+0x210) /*!< ADC Touch Z Pressure Mean Value Sort 3 */
  1192. #define REG_ADC_MTMULCK (ADC_BA+0x220) /*!< ADC Manual Test Mode Unlock */
  1193. #define REG_ADC_MTCONF (ADC_BA+0x224) /*!< ADC Manual Test Mode Configure */
  1194. #define REG_ADC_MTCON (ADC_BA+0x228) /*!< ADC Manual Test Mode Control */
  1195. #define REG_ADC_ADCAII (ADC_BA+0x22C) /*!< ADC Analog Interface Information */
  1196. #define REG_ADC_ADCAIIRLT (ADC_BA+0x230) /*!< ADC Analog Interface Information Result */
  1197. /**@}*/ /* end of ADC register group */
  1198. /*------------------ Capture Sensor Interface Controller ---------------------*/
  1199. /**
  1200. @addtogroup CAP Capture Engine(CAP)
  1201. Memory Mapped Structure for CAP Controller
  1202. @{ */
  1203. #define REG_CAP0_CTL (CAP0_BA+0x000) /*!< Image Capture Interface Control Register */
  1204. #define REG_CAP0_PAR (CAP0_BA+0x004) /*!< Image Capture Interface Parameter Register */
  1205. #define REG_CAP0_INT (CAP0_BA+0x008) /*!< Image Capture Interface Interrupt Registe */
  1206. #define REG_CAP0_POSTERIZE (CAP0_BA+0x00C) /*!< YUV Component Posterizing Factor Register */
  1207. #define REG_CAP0_MD (CAP0_BA+0x010) /*!< Motion Detection Register */
  1208. #define REG_CAP0_MDADDR (CAP0_BA+0x014) /*!< Motion Detection Output Address Register */
  1209. #define REG_CAP0_MDYADDR (CAP0_BA+0x018) /*!< Motion Detection Temp YOutput Address Register */
  1210. #define REG_CAP0_SEPIA (CAP0_BA+0x01C) /*!< Sepia Effect Control Register */
  1211. #define REG_CAP0_CWSP (CAP0_BA+0x020) /*!< Cropping Window Starting Address Register */
  1212. #define REG_CAP0_CWS (CAP0_BA+0x024) /*!< Cropping Window Size Register */
  1213. #define REG_CAP0_PKTSL (CAP0_BA+0x028) /*!< Packet Scaling Vertical/Horizontal Factor Register (LSB) */
  1214. #define REG_CAP0_PLNSL (CAP0_BA+0x02C) /*!< Planar Scaling Vertical/Horizontal Factor Register (LSB) */
  1215. #define REG_CAP0_FRCTL (CAP0_BA+0x030) /*!< Scaling Frame Rate Factor Register */
  1216. #define REG_CAP0_STRIDE (CAP0_BA+0x034) /*!< Frame Output Pixel Stride Register */
  1217. #define REG_CAP0_FIFOTH (CAP0_BA+0x03C) /*!< FIFO threshold Register */
  1218. #define REG_CAP0_CMPADDR (CAP0_BA+0x040) /*!< Compare Packet Memory Base Address Register */
  1219. #define REG_CAP0_PKTSM (CAP0_BA+0x048) /*!< Packet Scaling Vertical/Horizontal Factor Register (MSB) */
  1220. #define REG_CAP0_PLNSM (CAP0_BA+0x04C) /*!< Planar Scaling Vertical/Horizontal Factor Register (MSB) */
  1221. #define REG_CAP0_CURADDRP (CAP0_BA+0x050) /*!< Current Packet System Memory Address Register */
  1222. #define REG_CAP0_CURADDRY (CAP0_BA+0x054) /*!< Current Planar Y System Memory Address Register */
  1223. #define REG_CAP0_CURADDRU (CAP0_BA+0x058) /*!< Current Planar U System Memory Address Register */
  1224. #define REG_CAP0_CURADDRV (CAP0_BA+0x05C) /*!< Current Planar V System Memory Address Register */
  1225. #define REG_CAP0_PKTBA0 (CAP0_BA+0x060) /*!< System Memory Packet Base Address Register */
  1226. #define REG_CAP0_PKTBA1 (CAP0_BA+0x064) /*!< System Memory Packet Base Address Register */
  1227. #define REG_CAP0_YBA (CAP0_BA+0x080) /*!< System Memory Planar Y Base Address Register */
  1228. #define REG_CAP0_UBA (CAP0_BA+0x084) /*!< System Memory Planar U Base Address Register */
  1229. #define REG_CAP0_VBA (CAP0_BA+0x088) /*!< System Memory Planar V Base Address Register */
  1230. /**@}*/ /* end of CAP register group */
  1231. /*------------------ SDRAM Interface Controller ---------------------*/
  1232. /**
  1233. @addtogroup SDIC SDRAM Interface Controller(SDIC)
  1234. Memory Mapped Structure for SDIC Controller
  1235. @{ */
  1236. #define REG_SDIC_OPMCTL (SDIC_BA+0x000) /*!< SDRAM Controller Operation Mode Control Register */
  1237. #define REG_SDIC_CMD (SDIC_BA+0x004) /*!< SDRAM Command Register */
  1238. #define REG_SDIC_REFCTL (SDIC_BA+0x008) /*!< SDRAM Controller Refresh Control Register */
  1239. #define REG_SDIC_SIZE0 (SDIC_BA+0x010) /*!< SDRAM 0 Size Register */
  1240. #define REG_SDIC_SIZE1 (SDIC_BA+0x014) /*!< SDRAM 1 Size Register */
  1241. #define REG_SDIC_MR (SDIC_BA+0x018) /*!< SDRAM Mode Register */
  1242. #define REG_SDIC_EMR (SDIC_BA+0x01C) /*!< SDRAM Extended Mode Register */
  1243. #define REG_SDIC_EMR2 (SDIC_BA+0x020) /*!< SDRAM Extended Mode Register 2 */
  1244. #define REG_SDIC_EMR3 (SDIC_BA+0x024) /*!< SDRAM Extended Mode Register 3 */
  1245. #define REG_SDIC_TIME (SDIC_BA+0x028) /*!< SDRAM Timing Control Register */
  1246. #define REG_SDIC_DQSODS (SDIC_BA+0x030) /*!< DQS Output Delay Selection Register */
  1247. #define REG_SDIC_CKDQSDS (SDIC_BA+0x034) /*!< Clock and DQS Delay Selection Register */
  1248. #define REG_SDIC_DAENSEL (SDIC_BA+0x038) /*!< Data Latch Enable Selection Register */
  1249. /**@}*/ /* end of SDIC register group */
  1250. /*---------------------- Controller Area Network -------------------------*/
  1251. /**
  1252. @addtogroup CAN Controller Area Network(CAN)
  1253. Memory Mapped Structure for CAN Controller
  1254. @{ */
  1255. #define REG_CAN0_CON (CAN0_BA+0x00) /*!< Control Register */
  1256. #define REG_CAN0_STATUS (CAN0_BA+0x04) /*!< Status Register */
  1257. #define REG_CAN0_ERR (CAN0_BA+0x08) /*!< Error Counter Register */
  1258. #define REG_CAN0_BTIME (CAN0_BA+0x0C) /*!< Bit Time Register */
  1259. #define REG_CAN0_IIDR (CAN0_BA+0x10) /*!< Interrupt Identifier Register */
  1260. #define REG_CAN0_TEST (CAN0_BA+0x14) /*!< Test Register */
  1261. #define REG_CAN0_BRPE (CAN0_BA+0x18) /*!< BRP Extension Register */
  1262. #define REG_CAN0_IF1_CREQ (CAN0_BA+0x20) /*!< IF1 Command Request Register */
  1263. #define REG_CAN0_IF2_CREQ (CAN0_BA+0x80) /*!< IF2 Command Request Register */
  1264. #define REG_CAN0_IF1_CMASK (CAN0_BA+0x24) /*!< IF1 Command Mask Register */
  1265. #define REG_CAN0_IF2_CMASK (CAN0_BA+0x84) /*!< IF2 Command Mask Register */
  1266. #define REG_CAN0_IF1_MASK1 (CAN0_BA+0x28) /*!< IF1 Msak 1 Register */
  1267. #define REG_CNA0_IF2_MASK1 (CAN0_BA+0x88) /*!< IF2 Mask 1 Register */
  1268. #define REG_CAN0_IF1_MASK2 (CAN0_BA+0x2C) /*!< IF1 Mask 2 Register */
  1269. #define REG_CAN0_IF2_MASK2 (CAN0_BA+0x8C) /*!< IF2 Mask 2 REgister */
  1270. #define REG_CAN0_IF1_ARB1 (CAN0_BA+0x30) /*!< IF1 Arbitration 1 Register */
  1271. #define REG_CAN0_IF2_ARB1 (CAN0_BA+0x90) /*!< IF2 Arbitration 1 Register */
  1272. #define REG_CAN0_IF1_ARB2 (CAN0_BA+0x34) /*!< IF1 Arbitration 2 Register */
  1273. #define REG_CAN0_IF2_ARB2 (CAN0_BA+0x94) /*!< IF2 Arbitration 2 Register */
  1274. #define REG_CAN0_IF1_MCON (CAN0_BA+0x38) /*!< IF1 Message Control Register */
  1275. #define REG_CAN0_IF2_MCON (CAN0_BA+0x98) /*!< IF2 Message Control Register */
  1276. #define REG_CAN0_IF1_DAT_A1 (CAN0_BA+0x3C) /*!< IF1 Data A1 Register */
  1277. #define REG_CAN0_IF1_DAT_A2 (CAN0_BA+0x40) /*!< IF1 Data A2 Register */
  1278. #define REG_CAN0_IF1_DAT_B1 (CAN0_BA+0x44) /*!< IF1 Data B1 Register */
  1279. #define REG_CAN0_IF1_DAT_B2 (CAN0_BA+0x48) /*!< IF1 Data B2 Register */
  1280. #define REG_CAN0_IF2_DAT_A1 (CAN0_BA+0x9C) /*!< IF2 Data A1 Register */
  1281. #define REG_CAN0_IF2_DAT_A2 (CAN0_BA+0xA0) /*!< IF2 Data A2 Register */
  1282. #define REG_CAN0_IF2_DAT_B1 (CAN0_BA+0xA4) /*!< IF2 Data B1 Register */
  1283. #define REG_CAN0_IF2_DAT_B2 (CAN0_BA+0xA8) /*!< IF2 Data B2 Register */
  1284. #define REG_CAN0_TXREQ1 (CAN0_BA+0x100) /*!< Transmission Request Register 1 */
  1285. #define REG_CAN0_TXREQ2 (CAN0_BA+0x104) /*!< Transmission Request Register 2 */
  1286. #define REG_CAN0_NDAT1 (CAN0_BA+0x120) /*!< New Data Register 1 */
  1287. #define REG_CAN0_NDAT2 (CAN0_BA+0x124) /*!< New Data Register 2 */
  1288. #define REG_CAN0_IPND1 (CAN0_BA+0x140) /*!< Interrupt Pending Register 1 */
  1289. #define REG_CAN0_IPND2 (CAN0_BA+0x142) /*!< Interrupt Pending Register 2 */
  1290. #define REG_CAN0_MVLD1 (CAN0_BA+0x160) /*!< Message Valid Register 1 */
  1291. #define REG_CAN0_MVLD2 (CAN0_BA+0x164) /*!< Message Valid Register 2 */
  1292. #define REG_CAN0_WU_EN (CAN0_BA+0x168) /*!< Wake-up Function Enable */
  1293. #define REG_CAN0_WU_STATUS (CAN0_BA+0x16C) /*!< Wake-up Function Status */
  1294. #define REG_CAN1_CON (CAN1_BA+0x00) /*!< Control Register */
  1295. #define REG_CAN1_STATUS (CAN1_BA+0x04) /*!< Status Register */
  1296. #define REG_CAN1_ERR (CAN1_BA+0x08) /*!< Error Counter Register */
  1297. #define REG_CAN1_BTIME (CAN1_BA+0x0C) /*!< Bit Time Register */
  1298. #define REG_CAN1_IIDR (CAN1_BA+0x10) /*!< Interrupt Identifier Register */
  1299. #define REG_CAN1_TEST (CAN1_BA+0x14) /*!< Test Register */
  1300. #define REG_CAN1_BRPE (CAN1_BA+0x18) /*!< BRP Extension Register */
  1301. #define REG_CAN1_IF1_CREQ (CAN1_BA+0x20) /*!< IF1 Command Request Register */
  1302. #define REG_CAN1_IF2_CREQ (CAN1_BA+0x80) /*!< IF2 Command Request Register */
  1303. #define REG_CAN1_IF1_CMASK (CAN1_BA+0x24) /*!< IF1 Command Mask Register */
  1304. #define REG_CAN1_IF2_CMASK (CAN1_BA+0x84) /*!< IF2 Command Mask Register */
  1305. #define REG_CAN1_IF1_MASK1 (CAN1_BA+0x28) /*!< IF1 Msak 1 Register */
  1306. #define REG_CNA1_IF2_MASK1 (CAN1_BA+0x88) /*!< IF2 Mask 1 Register */
  1307. #define REG_CAN1_IF1_MASK2 (CAN1_BA+0x2C) /*!< IF1 Mask 2 Register */
  1308. #define REG_CAN1_IF2_MASK2 (CAN1_BA+0x8C) /*!< IF2 Mask 2 REgister */
  1309. #define REG_CAN1_IF1_ARB1 (CAN1_BA+0x30) /*!< IF1 Arbitration 1 Register */
  1310. #define REG_CAN1_IF2_ARB1 (CAN1_BA+0x90) /*!< IF2 Arbitration 1 Register */
  1311. #define REG_CAN1_IF1_ARB2 (CAN1_BA+0x34) /*!< IF1 Arbitration 2 Register */
  1312. #define REG_CAN1_IF2_ARB2 (CAN1_BA+0x94) /*!< IF2 Arbitration 2 Register */
  1313. #define REG_CAN1_IF1_MCON (CAN1_BA+0x38) /*!< IF1 Message Control Register */
  1314. #define REG_CAN1_IF2_MCON (CAN1_BA+0x98) /*!< IF2 Message Control Register */
  1315. #define REG_CAN1_IF1_DAT_A1 (CAN1_BA+0x3C) /*!< IF1 Data A1 Register */
  1316. #define REG_CAN1_IF1_DAT_A2 (CAN1_BA+0x40) /*!< IF1 Data A2 Register */
  1317. #define REG_CAN1_IF1_DAT_B1 (CAN1_BA+0x44) /*!< IF1 Data B1 Register */
  1318. #define REG_CAN1_IF1_DAT_B2 (CAN1_BA+0x48) /*!< IF1 Data B2 Register */
  1319. #define REG_CAN1_IF2_DAT_A1 (CAN1_BA+0x9C) /*!< IF2 Data A1 Register */
  1320. #define REG_CAN1_IF2_DAT_A2 (CAN1_BA+0xA0) /*!< IF2 Data A2 Register */
  1321. #define REG_CAN1_IF2_DAT_B1 (CAN1_BA+0xA4) /*!< IF2 Data B1 Register */
  1322. #define REG_CAN1_IF2_DAT_B2 (CAN1_BA+0xA8) /*!< IF2 Data B2 Register */
  1323. #define REG_CAN1_TXREQ1 (CAN1_BA+0x100) /*!< Transmission Request Register 1 */
  1324. #define REG_CAN1_TXREQ2 (CAN1_BA+0x104) /*!< Transmission Request Register 2 */
  1325. #define REG_CAN1_NDAT1 (CAN1_BA+0x120) /*!< New Data Register 1 */
  1326. #define REG_CAN1_NDAT2 (CAN1_BA+0x124) /*!< New Data Register 2 */
  1327. #define REG_CAN1_IPND1 (CAN1_BA+0x140) /*!< Interrupt Pending Register 1 */
  1328. #define REG_CAN1_IPND2 (CAN1_BA+0x142) /*!< Interrupt Pending Register 2 */
  1329. #define REG_CAN1_MVLD1 (CAN1_BA+0x160) /*!< Message Valid Register 1 */
  1330. #define REG_CAN1_MVLD2 (CAN1_BA+0x164) /*!< Message Valid Register 2 */
  1331. #define REG_CAN1_WU_EN (CAN1_BA+0x168) /*!< Wake-up Function Enable */
  1332. #define REG_CAN1_WU_STATUS (CAN1_BA+0x16C) /*!< Wake-up Function Status */
  1333. /**@}*/ /* end of CAN register group */
  1334. /*@}*/ /* end of group REGISTER */
  1335. /** @addtogroup IO_ROUTINE I/O Routines
  1336. The Declaration of NUC980 I/O Routines
  1337. @{
  1338. */
  1339. typedef volatile unsigned char vu8; ///< Define 8-bit unsigned volatile data type
  1340. typedef volatile unsigned short vu16; ///< Define 16-bit unsigned volatile data type
  1341. typedef volatile unsigned long vu32; ///< Define 32-bit unsigned volatile data type
  1342. /**
  1343. * @brief Get a 8-bit unsigned value from specified address
  1344. * @param[in] addr Address to get 8-bit data from
  1345. * @return 8-bit unsigned value stored in specified address
  1346. */
  1347. #define M8(addr) (*((vu8 *) (addr)))
  1348. /**
  1349. * @brief Get a 16-bit unsigned value from specified address
  1350. * @param[in] addr Address to get 16-bit data from
  1351. * @return 16-bit unsigned value stored in specified address
  1352. * @note The input address must be 16-bit aligned
  1353. */
  1354. #define M16(addr) (*((vu16 *) (addr)))
  1355. /**
  1356. * @brief Get a 32-bit unsigned value from specified address
  1357. * @param[in] addr Address to get 32-bit data from
  1358. * @return 32-bit unsigned value stored in specified address
  1359. * @note The input address must be 32-bit aligned
  1360. */
  1361. #define M32(addr) (*((vu32 *) (addr)))
  1362. /**
  1363. * @brief Set a 32-bit unsigned value to specified I/O port
  1364. * @param[in] port Port address to set 32-bit data
  1365. * @param[in] value Value to write to I/O port
  1366. * @return None
  1367. * @note The output port must be 32-bit aligned
  1368. */
  1369. #define outpw(port,value) *((volatile unsigned int *)(port)) = value
  1370. /**
  1371. * @brief Get a 32-bit unsigned value from specified I/O port
  1372. * @param[in] port Port address to get 32-bit data from
  1373. * @return 32-bit unsigned value stored in specified I/O port
  1374. * @note The input port must be 32-bit aligned
  1375. */
  1376. #define inpw(port) (*((volatile unsigned int *)(port)))
  1377. /**
  1378. * @brief Set a 16-bit unsigned value to specified I/O port
  1379. * @param[in] port Port address to set 16-bit data
  1380. * @param[in] value Value to write to I/O port
  1381. * @return None
  1382. * @note The output port must be 16-bit aligned
  1383. */
  1384. #define outps(port,value) *((volatile unsigned short *)(port)) = value
  1385. /**
  1386. * @brief Get a 16-bit unsigned value from specified I/O port
  1387. * @param[in] port Port address to get 16-bit data from
  1388. * @return 16-bit unsigned value stored in specified I/O port
  1389. * @note The input port must be 16-bit aligned
  1390. */
  1391. #define inps(port) (*((volatile unsigned short *)(port)))
  1392. /**
  1393. * @brief Set a 8-bit unsigned value to specified I/O port
  1394. * @param[in] port Port address to set 8-bit data
  1395. * @param[in] value Value to write to I/O port
  1396. * @return None
  1397. */
  1398. #define outpb(port,value) *((volatile unsigned char *)(port)) = value
  1399. /**
  1400. * @brief Get a 8-bit unsigned value from specified I/O port
  1401. * @param[in] port Port address to get 8-bit data from
  1402. * @return 8-bit unsigned value stored in specified I/O port
  1403. */
  1404. #define inpb(port) (*((volatile unsigned char *)(port)))
  1405. /**
  1406. * @brief Set a 32-bit unsigned value to specified I/O port
  1407. * @param[in] port Port address to set 32-bit data
  1408. * @param[in] value Value to write to I/O port
  1409. * @return None
  1410. * @note The output port must be 32-bit aligned
  1411. */
  1412. #define outp32(port,value) *((volatile unsigned int *)(port)) = value
  1413. /**
  1414. * @brief Get a 32-bit unsigned value from specified I/O port
  1415. * @param[in] port Port address to get 32-bit data from
  1416. * @return 32-bit unsigned value stored in specified I/O port
  1417. * @note The input port must be 32-bit aligned
  1418. */
  1419. #define inp32(port) (*((volatile unsigned int *)(port)))
  1420. /**
  1421. * @brief Set a 16-bit unsigned value to specified I/O port
  1422. * @param[in] port Port address to set 16-bit data
  1423. * @param[in] value Value to write to I/O port
  1424. * @return None
  1425. * @note The output port must be 16-bit aligned
  1426. */
  1427. #define outp16(port,value) *((volatile unsigned short *)(port)) = value
  1428. /**
  1429. * @brief Get a 16-bit unsigned value from specified I/O port
  1430. * @param[in] port Port address to get 16-bit data from
  1431. * @return 16-bit unsigned value stored in specified I/O port
  1432. * @note The input port must be 16-bit aligned
  1433. */
  1434. #define inp16(port) (*((volatile unsigned short *)(port)))
  1435. /**
  1436. * @brief Set a 8-bit unsigned value to specified I/O port
  1437. * @param[in] port Port address to set 8-bit data
  1438. * @param[in] value Value to write to I/O port
  1439. * @return None
  1440. */
  1441. #define outp8(port,value) *((volatile unsigned char *)(port)) = value
  1442. /**
  1443. * @brief Get a 8-bit unsigned value from specified I/O port
  1444. * @param[in] port Port address to get 8-bit data from
  1445. * @return 8-bit unsigned value stored in specified I/O port
  1446. */
  1447. #define inp8(port) (*((volatile unsigned char *)(port)))
  1448. /*@}*/ /* end of group IO_ROUTINE */
  1449. /******************************************************************************/
  1450. /* Legacy Constants */
  1451. /******************************************************************************/
  1452. /** @addtogroup Legacy_Constants Legacy Constants
  1453. NUC980 Legacy Constants
  1454. @{
  1455. */
  1456. typedef void *PVOID; ///< Define void pointer data type
  1457. typedef void VOID; ///< Define void data type
  1458. typedef char BOOL; ///< Define bool data type
  1459. typedef char *PBOOL; ///< Define bool pointer data type
  1460. typedef char INT8; ///< Define 8-bit singed data type
  1461. typedef char CHAR; ///< Define char data type
  1462. typedef char *PINT8; ///< Define 8-bit singed pointer data type
  1463. typedef char *PCHAR; ///< Define char pointer data type
  1464. typedef unsigned char UINT8; ///< Define 8-bit unsigned data type
  1465. typedef unsigned char UCHAR; ///< Define char unsigned data type
  1466. typedef unsigned char *PUINT8; ///< Define 8-bit unsigned pointer data type
  1467. typedef unsigned char *PUCHAR; ///< Define char unsigned pointer data type
  1468. typedef char *PSTR; ///< Define string pointer data type
  1469. typedef const char *PCSTR; ///< Define constant string pointer data type
  1470. typedef short SHORT; ///< Define short signed data type
  1471. typedef short *PSHORT; ///< Define short signed pointer data type
  1472. typedef unsigned short USHORT; ///< Define short unsigned data type
  1473. typedef unsigned short *PUSHORT; ///< Define short unsigned pointer data type
  1474. typedef short INT16; ///< Define 16-bit signed data type
  1475. typedef short *PINT16; ///< Define 16-bit signed pointer data type
  1476. typedef unsigned short UINT16; ///< Define 16-bit unsigned data type
  1477. typedef unsigned short *PUINT16; ///< Define 16-bit unsigned pointer data type
  1478. typedef int INT; ///< Define integer signed data type
  1479. typedef int *PINT; ///< Define integer signed pointer data type
  1480. typedef unsigned int UINT; ///< Define integer unsigned data type
  1481. typedef unsigned int *PUINT; ///< Define integer unsigned pointer data type
  1482. typedef int INT32; ///< Define 32-bit signed data type
  1483. typedef int *PINT32; ///< Define 32-bit signed pointer data type
  1484. typedef unsigned int UINT32; ///< Define 32-bit unsigned data type
  1485. typedef unsigned int *PUINT32; ///< Define 32-bit unsigned pointer data type
  1486. #if defined (__GNUC__) && !(__CC_ARM)
  1487. typedef long long INT64;
  1488. typedef unsigned long long UINT64;
  1489. #else
  1490. typedef __int64 INT64; ///< Define 64-bit signed data type
  1491. typedef unsigned __int64 UINT64; ///< Define 64-bit unsigned data type
  1492. #endif
  1493. typedef float FLOAT; ///< Define float data type
  1494. typedef float *PFLOAT; ///< Define float pointer data type
  1495. typedef double DOUBLE; ///< Define double data type
  1496. typedef double *PDOUBLE; ///< Define double pointer data type
  1497. typedef int SIZE_T; ///< Define size of data type
  1498. typedef unsigned char REG8; ///< Define 8-bit register data type
  1499. typedef unsigned short REG16; ///< Define 16-bit register data type
  1500. typedef unsigned int REG32; ///< Define 32-bit register data type
  1501. #ifndef NULL
  1502. #define NULL (0) ///< NULL pointer
  1503. #endif
  1504. #define TRUE (1) ///< Boolean true, define to use in API parameters or return value
  1505. #define FALSE (0) ///< Boolean false, define to use in API parameters or return value
  1506. #define ENABLE (1) ///< Enable, define to use in API parameters
  1507. #define DISABLE (0) ///< Disable, define to use in API parameters
  1508. #define Successful 0 ///< Function return value success
  1509. #define Fail 1 ///< Function return value failed
  1510. /* Define one bit mask */
  1511. #define BIT0 (0x00000001) ///< Bit 0 mask of an 32 bit integer
  1512. #define BIT1 (0x00000002) ///< Bit 1 mask of an 32 bit integer
  1513. #define BIT2 (0x00000004) ///< Bit 2 mask of an 32 bit integer
  1514. #define BIT3 (0x00000008) ///< Bit 3 mask of an 32 bit integer
  1515. #define BIT4 (0x00000010) ///< Bit 4 mask of an 32 bit integer
  1516. #define BIT5 (0x00000020) ///< Bit 5 mask of an 32 bit integer
  1517. #define BIT6 (0x00000040) ///< Bit 6 mask of an 32 bit integer
  1518. #define BIT7 (0x00000080) ///< Bit 7 mask of an 32 bit integer
  1519. #define BIT8 (0x00000100) ///< Bit 8 mask of an 32 bit integer
  1520. #define BIT9 (0x00000200) ///< Bit 9 mask of an 32 bit integer
  1521. #define BIT10 (0x00000400) ///< Bit 10 mask of an 32 bit integer
  1522. #define BIT11 (0x00000800) ///< Bit 11 mask of an 32 bit integer
  1523. #define BIT12 (0x00001000) ///< Bit 12 mask of an 32 bit integer
  1524. #define BIT13 (0x00002000) ///< Bit 13 mask of an 32 bit integer
  1525. #define BIT14 (0x00004000) ///< Bit 14 mask of an 32 bit integer
  1526. #define BIT15 (0x00008000) ///< Bit 15 mask of an 32 bit integer
  1527. #define BIT16 (0x00010000) ///< Bit 16 mask of an 32 bit integer
  1528. #define BIT17 (0x00020000) ///< Bit 17 mask of an 32 bit integer
  1529. #define BIT18 (0x00040000) ///< Bit 18 mask of an 32 bit integer
  1530. #define BIT19 (0x00080000) ///< Bit 19 mask of an 32 bit integer
  1531. #define BIT20 (0x00100000) ///< Bit 20 mask of an 32 bit integer
  1532. #define BIT21 (0x00200000) ///< Bit 21 mask of an 32 bit integer
  1533. #define BIT22 (0x00400000) ///< Bit 22 mask of an 32 bit integer
  1534. #define BIT23 (0x00800000) ///< Bit 23 mask of an 32 bit integer
  1535. #define BIT24 (0x01000000) ///< Bit 24 mask of an 32 bit integer
  1536. #define BIT25 (0x02000000) ///< Bit 25 mask of an 32 bit integer
  1537. #define BIT26 (0x04000000) ///< Bit 26 mask of an 32 bit integer
  1538. #define BIT27 (0x08000000) ///< Bit 27 mask of an 32 bit integer
  1539. #define BIT28 (0x10000000) ///< Bit 28 mask of an 32 bit integer
  1540. #define BIT29 (0x20000000) ///< Bit 29 mask of an 32 bit integer
  1541. #define BIT30 (0x40000000) ///< Bit 30 mask of an 32 bit integer
  1542. #define BIT31 (0x80000000) ///< Bit 31 mask of an 32 bit integer
  1543. /* Byte Mask Definitions */
  1544. #define BYTE0_Msk (0x000000FF) ///< Mask to get bit0~bit7 from a 32 bit integer
  1545. #define BYTE1_Msk (0x0000FF00) ///< Mask to get bit8~bit15 from a 32 bit integer
  1546. #define BYTE2_Msk (0x00FF0000) ///< Mask to get bit16~bit23 from a 32 bit integer
  1547. #define BYTE3_Msk (0xFF000000) ///< Mask to get bit24~bit31 from a 32 bit integer
  1548. #define GET_BYTE0(u32Param) ((u32Param & BYTE0_Msk) ) /*!< Extract Byte 0 (Bit 0~ 7) from parameter u32Param */
  1549. #define GET_BYTE1(u32Param) ((u32Param & BYTE1_Msk) >> 8) /*!< Extract Byte 1 (Bit 8~15) from parameter u32Param */
  1550. #define GET_BYTE2(u32Param) ((u32Param & BYTE2_Msk) >> 16) /*!< Extract Byte 2 (Bit 16~23) from parameter u32Param */
  1551. #define GET_BYTE3(u32Param) ((u32Param & BYTE3_Msk) >> 24) /*!< Extract Byte 3 (Bit 24~31) from parameter u32Param */
  1552. #ifdef __cplusplus
  1553. #define __I volatile /*!< Defines 'read only' permissions */
  1554. #else
  1555. #define __I volatile const /*!< Defines 'read only' permissions */
  1556. #endif
  1557. #define __O volatile /*!< Defines 'write only' permissions */
  1558. #define __IO volatile /*!< Defines 'read / write' permissions */
  1559. #endif /* __NUC980_H__ */
  1560. /*@}*/ /* end of group Legacy_Constants */