hsusbd_reg.h 104 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381
  1. /**************************************************************************//**
  2. * @file hsusbd_reg.h
  3. * @version V1.00
  4. * @brief HSUSBD register definition header file
  5. *
  6. * SPDX-License-Identifier: Apache-2.0
  7. * @copyright (C) 2017-2020 Nuvoton Technology Corp. All rights reserved.
  8. *****************************************************************************/
  9. #ifndef __HSUSBD_REG_H__
  10. #define __HSUSBD_REG_H__
  11. #if defined ( __CC_ARM )
  12. #pragma anon_unions
  13. #endif
  14. /**
  15. @addtogroup REGISTER Control Register
  16. @{
  17. */
  18. /**
  19. @addtogroup HSUSBD USB 2.0 Device Controller(HSUSBD)
  20. Memory Mapped Structure for HSUSBD Controller
  21. @{ */
  22. typedef struct
  23. {
  24. /**
  25. * @var HSUSBD_EP_T::EPDAT
  26. * Offset: 0x00 Endpoint n Data Register
  27. * ---------------------------------------------------------------------------------------------------
  28. * |Bits |Field |Descriptions
  29. * | :----: | :----: | :---- |
  30. * |[31:0] |EPDAT |Endpoint A~L Data Register
  31. * | | |Endpoint A~L data buffer for the buffer transaction (read or write).
  32. * | | |Note: Only word access is supported.
  33. * @var HSUSBD_EP_T::EPDAT_BYTE
  34. * Offset: 0x00 Endpoint n Data Register
  35. * ---------------------------------------------------------------------------------------------------
  36. * |Bits |Field |Descriptions
  37. * | :----: | :----: | :---- |
  38. * |[7:0] |EPDAT |Endpoint A~L Data Register
  39. * | | |Endpoint A~L data buffer for the buffer transaction (read or write).
  40. * | | |Note: Only byte access is supported.
  41. * @var HSUSBD_EP_T::EPINTSTS
  42. * Offset: 0x04 Endpoint n Interrupt Status Register
  43. * ---------------------------------------------------------------------------------------------------
  44. * |Bits |Field |Descriptions
  45. * | :----: | :----: | :---- |
  46. * |[0] |BUFFULLIF |Buffer Full
  47. * | | |For an IN endpoint, the currently selected buffer is full, or no buffer is available to the local side for writing (no space to write)
  48. * | | |For an OUT endpoint, there is a buffer available on the local side, and there are FIFO full of bytes available to be read (entire packet is available for reading).
  49. * | | |0 = The endpoint packet buffer is not full.
  50. * | | |1 = The endpoint packet buffer is full.
  51. * | | |Note: This bit is read-only.
  52. * |[1] |BUFEMPTYIF|Buffer Empty
  53. * | | |For an IN endpoint, a buffer is available to the local side for writing up to FIFO full of bytes.
  54. * | | |0 = The endpoint buffer is not empty.
  55. * | | |1 = The endpoint buffer is empty.
  56. * | | |For an OUT endpoint:
  57. * | | |0 = The currently selected buffer has not a count of 0.
  58. * | | |1 = The currently selected buffer has a count of 0, or no buffer is available on the local side (nothing to read).
  59. * | | |Note: This bit is read-only.
  60. * |[2] |SHORTTXIF |Short Packet Transferred Interrupt
  61. * | | |0 = The length of the last packet was not less than the Maximum Packet Size (EPMPS).
  62. * | | |1 = The length of the last packet was less than the Maximum Packet Size (EPMPS).
  63. * | | |Note: Write 1 to clear this bit to 0.
  64. * |[3] |TXPKIF |Data Packet Transmitted Interrupt
  65. * | | |0 = Not a data packet is transmitted from the endpoint to the host.
  66. * | | |1 = A data packet is transmitted from the endpoint to the host.
  67. * | | |Note: Write 1 to clear this bit to 0.
  68. * |[4] |RXPKIF |Data Packet Received Interrupt
  69. * | | |0 = No data packet is received from the host by the endpoint.
  70. * | | |1 = A data packet is received from the host by the endpoint.
  71. * | | |Note: Write 1 to clear this bit to 0.
  72. * |[5] |OUTTKIF |Data OUT Token Interrupt
  73. * | | |0 = A Data OUT token has not been received from the host.
  74. * | | |1 = A Data OUT token has been received from the host
  75. * | | |This bit also set by PING token (in high-speed only).
  76. * | | |Note: Write 1 to clear this bit to 0.
  77. * |[6] |INTKIF |Data IN Token Interrupt
  78. * | | |0 = Not Data IN token has been received from the host.
  79. * | | |1 = A Data IN token has been received from the host.
  80. * | | |Note: Write 1 to clear this bit to 0.
  81. * |[7] |PINGIF |PING Token Interrupt
  82. * | | |0 = A Data PING token has not been received from the host.
  83. * | | |1 = A Data PING token has been received from the host.
  84. * | | |Note: Write 1 to clear this bit to 0.
  85. * |[8] |NAKIF |USB NAK Sent
  86. * | | |0 = The last USB IN packet could be provided, and was acknowledged with an ACK.
  87. * | | |1 = The last USB IN packet could not be provided, and was acknowledged with a NAK.
  88. * | | |Note: Write 1 to clear this bit to 0.
  89. * |[9] |STALLIF |USB STALL Sent
  90. * | | |0 = The last USB packet could be accepted or provided because the endpoint was stalled, and was acknowledged with a STALL.
  91. * | | |1 = The last USB packet could not be accepted or provided because the endpoint was stalled, and was acknowledged with a STALL.
  92. * | | |Note: Write 1 to clear this bit to 0.
  93. * |[10] |NYETIF |NYET Sent
  94. * | | |0 = The space available in the RAM is sufficient to accommodate the next on coming data packet.
  95. * | | |1 = The space available in the RAM is not sufficient to accommodate the next on coming data packet.
  96. * | | |Note: Write 1 to clear this bit to 0.
  97. * |[11] |ERRIF |ERR Sent
  98. * | | |0 = No any error in the transaction.
  99. * | | |1 = There occurs any error in the transaction.
  100. * | | |Note: Write 1 to clear this bit to 0.
  101. * |[12] |SHORTRXIF |Bulk Out Short Packet Received
  102. * | | |0 = No bulk out short packet is received.
  103. * | | |1 = Received bulk out short packet (including zero length packet).
  104. * | | |Note: Write 1 to clear this bit to 0.
  105. * @var HSUSBD_EP_T::EPINTEN
  106. * Offset: 0x08 Endpoint n Interrupt Enable Register
  107. * ---------------------------------------------------------------------------------------------------
  108. * |Bits |Field |Descriptions
  109. * | :----: | :----: | :---- |
  110. * |[0] |BUFFULLIEN|Buffer Full Interrupt
  111. * | | |When set, this bit enables a local interrupt to be set when a buffer full condition is detected on the bus.
  112. * | | |0 = Buffer full interrupt Disabled.
  113. * | | |1 = Buffer full interrupt Enabled.
  114. * |[1] |BUFEMPTYIEN|Buffer Empty Interrupt
  115. * | | |When set, this bit enables a local interrupt to be set when a buffer empty condition is detected on the bus.
  116. * | | |0 = Buffer empty interrupt Disabled.
  117. * | | |1 = Buffer empty interrupt Enabled.
  118. * |[2] |SHORTTXIEN|Short Packet Transferred Interrupt Enable Bit
  119. * | | |When set, this bit enables a local interrupt to be set when a short data packet has been transferred to/from the host.
  120. * | | |0 = Short data packet interrupt Disabled.
  121. * | | |1 = Short data packet interrupt Enabled.
  122. * |[3] |TXPKIEN |Data Packet Transmitted Interrupt Enable Bit
  123. * | | |When set, this bit enables a local interrupt to be set when a data packet has been received from the host.
  124. * | | |0 = Data packet has been received from the host interrupt Disabled.
  125. * | | |1 = Data packet has been received from the host interrupt Enabled.
  126. * |[4] |RXPKIEN |Data Packet Received Interrupt Enable Bit
  127. * | | |When set, this bit enables a local interrupt to be set when a data packet has been transmitted to the host.
  128. * | | |0 = Data packet has been transmitted to the host interrupt Disabled.
  129. * | | |1 = Data packet has been transmitted to the host interrupt Enabled.
  130. * |[5] |OUTTKIEN |Data OUT Token Interrupt Enable Bit
  131. * | | |When set, this bit enables a local interrupt to be set when a Data OUT token has been received from the host.
  132. * | | |0 = Data OUT token interrupt Disabled.
  133. * | | |1 = Data OUT token interrupt Enabled.
  134. * |[6] |INTKIEN |Data IN Token Interrupt Enable Bit
  135. * | | |When set, this bit enables a local interrupt to be set when a Data IN token has been received from the host.
  136. * | | |0 = Data IN token interrupt Disabled.
  137. * | | |1 = Data IN token interrupt Enabled.
  138. * |[7] |PINGIEN |PING Token Interrupt Enable Bit
  139. * | | |When set, this bit enables a local interrupt to be set when a PING token has been received from the host.
  140. * | | |0 = PING token interrupt Disabled.
  141. * | | |1 = PING token interrupt Enabled.
  142. * |[8] |NAKIEN |USB NAK Sent Interrupt Enable Bit
  143. * | | |When set, this bit enables a local interrupt to be set when a NAK token is sent to the host.
  144. * | | |0 = NAK token interrupt Disabled.
  145. * | | |1 = NAK token interrupt Enabled.
  146. * |[9] |STALLIEN |USB STALL Sent Interrupt Enable Bit
  147. * | | |When set, this bit enables a local interrupt to be set when a stall token is sent to the host.
  148. * | | |0 = STALL token interrupt Disabled.
  149. * | | |1 = STALL token interrupt Enabled.
  150. * |[10] |NYETIEN |NYET Interrupt Enable Bit
  151. * | | |When set, this bit enables a local interrupt to be set whenever NYET condition occurs on the bus for this endpoint.
  152. * | | |0 = NYET condition interrupt Disabled.
  153. * | | |1 = NYET condition interrupt Enabled.
  154. * |[11] |ERRIEN |ERR Interrupt Enable Bit
  155. * | | |When set, this bit enables a local interrupt to be set whenever ERR condition occurs on the bus for this endpoint.
  156. * | | |0 = Error event interrupt Disabled.
  157. * | | |1 = Error event interrupt Enabled.
  158. * |[12] |SHORTRXIEN|Bulk Out Short Packet Interrupt Enable Bit
  159. * | | |When set, this bit enables a local interrupt to be set whenever bulk out short packet occurs on the bus for this endpoint.
  160. * | | |0 = Bulk out interrupt Disabled.
  161. * | | |1 = Bulk out interrupt Enabled.
  162. * @var HSUSBD_EP_T::EPDATCNT
  163. * Offset: 0x0C Endpoint n Data Available Count Register
  164. * ---------------------------------------------------------------------------------------------------
  165. * |Bits |Field |Descriptions
  166. * | :----: | :----: | :---- |
  167. * |[15:0] |DATCNT |Data Count
  168. * | | |For an IN endpoint (EPDIR(USBD_EPxCFG[3] is high.), this register returns the number of valid bytes in the IN endpoint packet buffer.
  169. * | | |For an OUT endpoint (EPDIR(USBD_EPxCFG[3] is low.), this register returns the number of received valid bytes in the Host OUT transfer.
  170. * |[30:16] |DMALOOP |DMA Loop
  171. * | | |This register is the remaining DMA loop to complete. Each loop means 32-byte transfer.
  172. * @var HSUSBD_EP_T::EPRSPCTL
  173. * Offset: 0x10 Endpoint n Response Control Register
  174. * ---------------------------------------------------------------------------------------------------
  175. * |Bits |Field |Descriptions
  176. * | :----: | :----: | :---- |
  177. * |[0] |FLUSH |Buffer Flush
  178. * | | |Writing 1 to this bit causes the packet buffer to be flushed and the corresponding EP_AVAIL register to be cleared
  179. * | | |This bit is self-clearing
  180. * | | |This bit should always be written after an configuration event.
  181. * | | |0 = The packet buffer is not flushed.
  182. * | | |1 = The packet buffer is flushed by user.
  183. * |[2:1] |MODE |Mode Control
  184. * | | |The two bits decide the operation mode of the in-endpoint.
  185. * | | |00: Auto-Validate Mode
  186. * | | |01: Manual-Validate Mode
  187. * | | |10: Fly Mode
  188. * | | |11: Reserved
  189. * | | |These bits are not valid for an out-endpoint
  190. * | | |The auto validate mode will be activated when the reserved mode is selected
  191. * |[3] |TOGGLE |Endpoint Toggle
  192. * | | |This bit is used to clear the endpoint data toggle bit
  193. * | | |Reading this bit returns the current state of the endpoint data toggle bit.
  194. * | | |The local CPU may use this bit to initialize the end-point's toggle in case of reception of a Set Interface request or a Clear Feature (ep_halt) request from the host
  195. * | | |Only when toggle bit is "1", this bit can be written into the inversed write data bit[3].
  196. * | | |0 = Not clear the endpoint data toggle bit.
  197. * | | |1 = Clear the endpoint data toggle bit.
  198. * |[4] |HALT |Endpoint Halt
  199. * | | |This bit is used to send a STALL handshake as response to the token from the host
  200. * | | |When an Endpoint Set Feature (ep_halt) is detected by the local CPU, it must write a '1' to this bit.
  201. * | | |0 = Not send a STALL handshake as response to the token from the host.
  202. * | | |1 = Send a STALL handshake as response to the token from the host.
  203. * |[5] |ZEROLEN |Zero Length
  204. * | | |This bit is used to send a zero-length packet response to an IN-token
  205. * | | |When this bit is set, a zero packet is sent to the host on reception of an IN-token
  206. * | | |This bit gets cleared once the zero length data packet is sent.
  207. * | | |0 = A zero packet is not sent to the host on reception of an IN-token.
  208. * | | |1 = A zero packet is sent to the host on reception of an IN-token.
  209. * |[6] |SHORTTXEN |Short Packet Transfer Enable
  210. * | | |This bit is applicable only in case of Auto-Validate Method
  211. * | | |This bit is set to validate any remaining data in the buffer which is not equal to the MPS of the endpoint, and happens to be the last transfer
  212. * | | |This bit gets cleared once the data packet is sent.
  213. * | | |0 = Not validate any remaining data in the buffer which is not equal to the MPS of the endpoint.
  214. * | | |1 = Validate any remaining data in the buffer which is not equal to the MPS of the endpoint.
  215. * |[7] |DISBUF |Buffer Disable Bit
  216. * | | |This bit is used to receive unknown size OUT short packet
  217. * | | |The received packet size is reference USBD_EPxDATCNT register.
  218. * | | |0 = Buffer Not Disabled when Bulk-OUT short packet is received.
  219. * | | |1 = Buffer Disabled when Bulk-OUT short packet is received.
  220. * @var HSUSBD_EP_T::EPMPS
  221. * Offset: 0x14 Endpoint n Maximum Packet Size Register
  222. * ---------------------------------------------------------------------------------------------------
  223. * |Bits |Field |Descriptions
  224. * | :----: | :----: | :---- |
  225. * |[10:0] |EPMPS |Endpoint Maximum Packet Size
  226. * | | |This field determines the Maximum Packet Size of the Endpoint.
  227. * @var HSUSBD_EP_T::EPTXCNT
  228. * Offset: 0x18 Endpoint n Transfer Count Register
  229. * ---------------------------------------------------------------------------------------------------
  230. * |Bits |Field |Descriptions
  231. * | :----: | :----: | :---- |
  232. * |[10:0] |TXCNT |Endpoint Transfer Count
  233. * | | |For IN endpoints, this field determines the total number of bytes to be sent to the host in case of manual validation method.
  234. * | | |For OUT endpoints, this field has no effect.
  235. * @var HSUSBD_EP_T::EPCFG
  236. * Offset: 0x1C Endpoint n Configuration Register
  237. * ---------------------------------------------------------------------------------------------------
  238. * |Bits |Field |Descriptions
  239. * | :----: | :----: | :---- |
  240. * |[0] |EPEN |Endpoint Valid
  241. * | | |When set, this bit enables this endpoint
  242. * | | |This bit has no effect on Endpoint 0, which is always enabled.
  243. * | | |0 = The endpoint Disabled.
  244. * | | |1 = The endpoint Enabled.
  245. * |[2:1] |EPTYPE |Endpoint Type
  246. * | | |This field selects the type of this endpoint. Endpoint 0 is forced to a Control type.
  247. * | | |00 = Reserved.
  248. * | | |01 = Bulk.
  249. * | | |10 = Interrupt.
  250. * | | |11 = Isochronous.
  251. * |[3] |EPDIR |Endpoint Direction
  252. * | | |0 = out-endpoint (Host OUT to Device).
  253. * | | |1 = in-endpoint (Host IN to Device).
  254. * | | |Note: A maximum of one OUT and IN endpoint is allowed for each endpoint number.
  255. * |[7:4] |EPNUM |Endpoint Number
  256. * | | |This field selects the number of the endpoint. Valid numbers 1 to 15.
  257. * | | |Note: Do not support two endpoints have same endpoint number.
  258. * @var HSUSBD_EP_T::EPBUFST
  259. * Offset: 0x20 Endpoint n RAM Start Address Register
  260. * ---------------------------------------------------------------------------------------------------
  261. * |Bits |Field |Descriptions
  262. * | :----: | :----: | :---- |
  263. * |[11:0] |SADDR |Endpoint Start Address
  264. * | | |This is the start-address of the RAM space allocated for the endpoint A~L.
  265. * @var HSUSBD_EP_T::EPBUFEND
  266. * Offset: 0x24 Endpoint n RAM End Address Register
  267. * ---------------------------------------------------------------------------------------------------
  268. * |Bits |Field |Descriptions
  269. * | :----: | :----: | :---- |
  270. * |[11:0] |EADDR |Endpoint End Address
  271. * | | |This is the end-address of the RAM space allocated for the endpoint A~L.
  272. */
  273. union
  274. {
  275. __IO uint32_t EPDAT;
  276. __IO uint8_t EPDAT_BYTE;
  277. }; /*!< [0x0000] Endpoint n Data Register */
  278. __IO uint32_t EPINTSTS; /*!< [0x0004] Endpoint n Interrupt Status Register */
  279. __IO uint32_t EPINTEN; /*!< [0x0008] Endpoint n Interrupt Enable Register */
  280. __I uint32_t EPDATCNT; /*!< [0x000c] Endpoint n Data Available Count Register */
  281. __IO uint32_t EPRSPCTL; /*!< [0x0010] Endpoint n Response Control Register */
  282. __IO uint32_t EPMPS; /*!< [0x0014] Endpoint n Maximum Packet Size Register */
  283. __IO uint32_t EPTXCNT; /*!< [0x0018] Endpoint n Transfer Count Register */
  284. __IO uint32_t EPCFG; /*!< [0x001c] Endpoint n Configuration Register */
  285. __IO uint32_t EPBUFST; /*!< [0x0020] Endpoint n RAM Start Address Register */
  286. __IO uint32_t EPBUFEND; /*!< [0x0024] Endpoint n RAM End Address Register */
  287. } HSUSBD_EP_T;
  288. typedef struct
  289. {
  290. /**
  291. * @var HSUSBD_T::GINTSTS
  292. * Offset: 0x00 Global Interrupt Status Register
  293. * ---------------------------------------------------------------------------------------------------
  294. * |Bits |Field |Descriptions
  295. * | :----: | :----: | :---- |
  296. * |[0] |USBIF |USB Interrupt
  297. * | | |This bit conveys the interrupt status for USB specific events endpoint
  298. * | | |When set, USB interrupt status register should be read to determine the cause of the interrupt.
  299. * | | |0 = No interrupt event occurred.
  300. * | | |1 = The related interrupt event is occurred.
  301. * |[1] |CEPIF |Control Endpoint Interrupt
  302. * | | |This bit conveys the interrupt status for control endpoint
  303. * | | |When set, Control-ep's interrupt status register should be read to determine the cause of the interrupt.
  304. * | | |0 = No interrupt event occurred.
  305. * | | |1 = The related interrupt event is occurred.
  306. * |[2] |EPAIF |Endpoint a Interrupt
  307. * | | |When set, the corresponding Endpoint A's interrupt status register should be read to determine the cause of the interrupt.
  308. * | | |0 = No interrupt event occurred.
  309. * | | |1 = The related interrupt event is occurred.
  310. * |[3] |EPBIF |Endpoint B Interrupt
  311. * | | |When set, the corresponding Endpoint B's interrupt status register should be read to determine the cause of the interrupt.
  312. * | | |0 = No interrupt event occurred.
  313. * | | |1 = The related interrupt event is occurred.
  314. * |[4] |EPCIF |Endpoint C Interrupt
  315. * | | |When set, the corresponding Endpoint C's interrupt status register should be read to determine the cause of the interrupt.
  316. * | | |0 = No interrupt event occurred.
  317. * | | |1 = The related interrupt event is occurred.
  318. * |[5] |EPDIF |Endpoint D Interrupt
  319. * | | |When set, the corresponding Endpoint D's interrupt status register should be read to determine the cause of the interrupt.
  320. * | | |0 = No interrupt event occurred.
  321. * | | |1 = The related interrupt event is occurred.
  322. * |[6] |EPEIF |Endpoint E Interrupt
  323. * | | |When set, the corresponding Endpoint E's interrupt status register should be read to determine the cause of the interrupt.
  324. * | | |0 = No interrupt event occurred.
  325. * | | |1 = The related interrupt event is occurred.
  326. * |[7] |EPFIF |Endpoint F Interrupt
  327. * | | |When set, the corresponding Endpoint F's interrupt status register should be read to determine the cause of the interrupt.
  328. * | | |0 = No interrupt event occurred.
  329. * | | |1 = The related interrupt event is occurred.
  330. * |[8] |EPGIF |Endpoint G Interrupt
  331. * | | |When set, the corresponding Endpoint G's interrupt status register should be read to determine the cause of the interrupt.
  332. * | | |0 = No interrupt event occurred.
  333. * | | |1 = The related interrupt event is occurred.
  334. * |[9] |EPHIF |Endpoint H Interrupt
  335. * | | |When set, the corresponding Endpoint H's interrupt status register should be read to determine the cause of the interrupt.
  336. * | | |0 = No interrupt event occurred.
  337. * | | |1 = The related interrupt event is occurred.
  338. * |[10] |EPIIF |Endpoint I Interrupt
  339. * | | |When set, the corresponding Endpoint I's interrupt status register should be read to determine the cause of the interrupt.
  340. * | | |0 = No interrupt event occurred.
  341. * | | |1 = The related interrupt event is occurred.
  342. * |[11] |EPJIF |Endpoint J Interrupt
  343. * | | |When set, the corresponding Endpoint J's interrupt status register should be read to determine the cause of the interrupt.
  344. * | | |0 = No interrupt event occurred.
  345. * | | |1 = The related interrupt event is occurred.
  346. * |[12] |EPKIF |Endpoint K Interrupt
  347. * | | |When set, the corresponding Endpoint K's interrupt status register should be read to determine the cause of the interrupt.
  348. * | | |0 = No interrupt event occurred.
  349. * | | |1 = The related interrupt event is occurred.
  350. * |[13] |EPLIF |Endpoint L Interrupt
  351. * | | |When set, the corresponding Endpoint L's interrupt status register should be read to determine the cause of the interrupt.
  352. * | | |0 = No interrupt event occurred.
  353. * | | |1 = The related interrupt event is occurred.
  354. * @var HSUSBD_T::GINTEN
  355. * Offset: 0x08 Global Interrupt Enable Register
  356. * ---------------------------------------------------------------------------------------------------
  357. * |Bits |Field |Descriptions
  358. * | :----: | :----: | :---- |
  359. * |[0] |USBIEN |USB Interrupt Enable Bit
  360. * | | |When set, this bit enables a local interrupt to be generated when a USB event occurs on the bus.
  361. * | | |0 = The related interrupt Disabled.
  362. * | | |1 = The related interrupt Enabled.
  363. * |[1] |CEPIEN |Control Endpoint Interrupt Enable Bit
  364. * | | |When set, this bit enables a local interrupt to be generated when an interrupt is pending for the control endpoint.
  365. * | | |0 = The related interrupt Disabled.
  366. * | | |1 = The related interrupt Enabled.
  367. * |[2] |EPAIEN |Interrupt Enable Control for Endpoint a
  368. * | | |When set, this bit enables a local interrupt to be generated when an interrupt is pending for the endpoint A.
  369. * | | |0 = The related interrupt Disabled.
  370. * | | |1 = The related interrupt Enabled.
  371. * |[3] |EPBIEN |Interrupt Enable Control for Endpoint B
  372. * | | |When set, this bit enables a local interrupt to be generated when an interrupt is pending for the endpoint B
  373. * | | |0 = The related interrupt Disabled.
  374. * | | |1 = The related interrupt Enabled.
  375. * |[4] |EPCIEN |Interrupt Enable Control for Endpoint C
  376. * | | |When set, this bit enables a local interrupt to be generated when an interrupt is pending for the endpoint C
  377. * | | |0 = The related interrupt Disabled.
  378. * | | |1 = The related interrupt Enabled.
  379. * |[5] |EPDIEN |Interrupt Enable Control for Endpoint D
  380. * | | |When set, this bit enables a local interrupt to be generated when an interrupt is pending for the endpoint D
  381. * | | |0 = The related interrupt Disabled.
  382. * | | |1 = The related interrupt Enabled.
  383. * |[6] |EPEIEN |Interrupt Enable Control for Endpoint E
  384. * | | |When set, this bit enables a local interrupt to be generated when an interrupt is pending for the endpoint E
  385. * | | |0 = The related interrupt Disabled.
  386. * | | |1 = The related interrupt Enabled.
  387. * |[7] |EPFIEN |Interrupt Enable Control for Endpoint F
  388. * | | |When set, this bit enables a local interrupt to be generated when an interrupt is pending for the endpoint F
  389. * | | |0 = The related interrupt Disabled.
  390. * | | |1 = The related interrupt Enabled.
  391. * |[8] |EPGIEN |Interrupt Enable Control for Endpoint G
  392. * | | |When set, this bit enables a local interrupt to be generated when an interrupt is pending for the endpoint G
  393. * | | |0 = The related interrupt Disabled.
  394. * | | |1 = The related interrupt Enabled.
  395. * |[9] |EPHIEN |Interrupt Enable Control for Endpoint H
  396. * | | |When set, this bit enables a local interrupt to be generated when an interrupt is pending for the endpoint H
  397. * | | |0 = The related interrupt Disabled.
  398. * | | |1 = The related interrupt Enabled.
  399. * |[10] |EPIIEN |Interrupt Enable Control for Endpoint I
  400. * | | |When set, this bit enables a local interrupt to be generated when an interrupt is pending for the endpoint I
  401. * | | |0 = The related interrupt Disabled.
  402. * | | |1 = The related interrupt Enabled.
  403. * |[11] |EPJIEN |Interrupt Enable Control for Endpoint J
  404. * | | |When set, this bit enables a local interrupt to be generated when an interrupt is pending for the endpoint J
  405. * | | |0 = The related interrupt Disabled.
  406. * | | |1 = The related interrupt Enabled.
  407. * |[12] |EPKIEN |Interrupt Enable Control for Endpoint K
  408. * | | |When set, this bit enables a local interrupt to be generated when an interrupt is pending for the endpoint K
  409. * | | |0 = The related interrupt Disabled.
  410. * | | |1 = The related interrupt Enabled.
  411. * |[13] |EPLIEN |Interrupt Enable Control for Endpoint L
  412. * | | |When set, this bit enables a local interrupt to be generated when an interrupt is pending for the endpoint L
  413. * | | |0 = The related interrupt Disabled.
  414. * | | |1 = The related interrupt Enabled.
  415. * @var HSUSBD_T::BUSINTSTS
  416. * Offset: 0x10 USB Bus Interrupt Status Register
  417. * ---------------------------------------------------------------------------------------------------
  418. * |Bits |Field |Descriptions
  419. * | :----: | :----: | :---- |
  420. * |[0] |SOFIF |SOF Receive Control
  421. * | | |This bit indicates when a start-of-frame packet has been received.
  422. * | | |0 = No start-of-frame packet has been received.
  423. * | | |1 = Start-of-frame packet has been received.
  424. * | | |Note: Write 1 to clear this bit to 0.
  425. * |[1] |RSTIF |Reset Status
  426. * | | |When set, this bit indicates that either the USB root port reset is end.
  427. * | | |0 = No USB root port reset is end.
  428. * | | |1 = USB root port reset is end.
  429. * | | |Note: Write 1 to clear this bit to 0.
  430. * |[2] |RESUMEIF |Resume
  431. * | | |When set, this bit indicates that a device resume has occurred.
  432. * | | |0 = No device resume has occurred.
  433. * | | |1 = Device resume has occurred.
  434. * | | |Note: Write 1 to clear this bit to 0.
  435. * |[3] |SUSPENDIF |Suspend Request
  436. * | | |This bit is set as default and it has to be cleared by writing '1' before the USB reset
  437. * | | |This bit is also set when a USB Suspend request is detected from the host.
  438. * | | |0 = No USB Suspend request is detected from the host.
  439. * | | |1= USB Suspend request is detected from the host.
  440. * | | |Note: Write 1 to clear this bit to 0.
  441. * |[4] |HISPDIF |High-speed Settle
  442. * | | |0 = No valid high-speed reset protocol is detected.
  443. * | | |1 = Valid high-speed reset protocol is over and the device has settled in high-speed.
  444. * | | |Note: Write 1 to clear this bit to 0.
  445. * |[5] |DMADONEIF |DMA Completion Interrupt
  446. * | | |0 = No DMA transfer over.
  447. * | | |1 = DMA transfer is over.
  448. * | | |Note: Write 1 to clear this bit to 0.
  449. * |[6] |PHYCLKVLDIF|Usable Clock Interrupt
  450. * | | |0 = Usable clock is not available.
  451. * | | |1 = Usable clock is available from the transceiver.
  452. * | | |Note: Write 1 to clear this bit to 0.
  453. * |[8] |VBUSDETIF |VBUS Detection Interrupt Status
  454. * | | |0 = No VBUS is plug-in.
  455. * | | |1 = VBUS is plug-in.
  456. * | | |Note: Write 1 to clear this bit to 0.
  457. * @var HSUSBD_T::BUSINTEN
  458. * Offset: 0x14 USB Bus Interrupt Enable Register
  459. * ---------------------------------------------------------------------------------------------------
  460. * |Bits |Field |Descriptions
  461. * | :----: | :----: | :---- |
  462. * |[0] |SOFIEN |SOF Interrupt
  463. * | | |This bit enables the SOF interrupt.
  464. * | | |0 = SOF interrupt Disabled.
  465. * | | |1 = SOF interrupt Enabled.
  466. * |[1] |RSTIEN |Reset Status
  467. * | | |This bit enables the USB-Reset interrupt.
  468. * | | |0 = USB-Reset interrupt Disabled.
  469. * | | |1 = USB-Reset interrupt Enabled.
  470. * |[2] |RESUMEIEN |Resume
  471. * | | |This bit enables the Resume interrupt.
  472. * | | |0 = Resume interrupt Disabled.
  473. * | | |1 = Resume interrupt Enabled.
  474. * |[3] |SUSPENDIEN|Suspend Request
  475. * | | |This bit enables the Suspend interrupt.
  476. * | | |0 = Suspend interrupt Disabled.
  477. * | | |1 = Suspend interrupt Enabled.
  478. * |[4] |HISPDIEN |High-speed Settle
  479. * | | |This bit enables the high-speed settle interrupt.
  480. * | | |0 = High-speed settle interrupt Disabled.
  481. * | | |1 = High-speed settle interrupt Enabled.
  482. * |[5] |DMADONEIEN|DMA Completion Interrupt
  483. * | | |This bit enables the DMA completion interrupt
  484. * | | |0 = DMA completion interrupt Disabled.
  485. * | | |1 = DMA completion interrupt Enabled.
  486. * |[6] |PHYCLKVLDIEN|Usable Clock Interrupt
  487. * | | |This bit enables the usable clock interrupt.
  488. * | | |0 = Usable clock interrupt Disabled.
  489. * | | |1 = Usable clock interrupt Enabled.
  490. * |[8] |VBUSDETIEN|VBUS Detection Interrupt Enable Bit
  491. * | | |This bit enables the VBUS floating detection interrupt.
  492. * | | |0 = VBUS floating detection interrupt Disabled.
  493. * | | |1 = VBUS floating detection interrupt Enabled.
  494. * @var HSUSBD_T::OPER
  495. * Offset: 0x18 USB Operational Register
  496. * ---------------------------------------------------------------------------------------------------
  497. * |Bits |Field |Descriptions
  498. * | :----: | :----: | :---- |
  499. * |[0] |RESUMEEN |Generate Resume
  500. * | | |0 = No Resume sequence to be initiated to the host.
  501. * | | |1 = A Resume sequence to be initiated to the host if device remote wakeup is enabled
  502. * | | |This bit is self-clearing.
  503. * |[1] |HISPDEN |USB High-speed
  504. * | | |0 = The USB device controller to suppress the chirp-sequence during reset protocol, thereby allowing the USB device controller to settle in full-speed, even though it is connected to a USB2.0 Host.
  505. * | | |1 = The USB device controller to initiate a chirp-sequence during reset protocol.
  506. * |[2] |CURSPD |USB Current Speed
  507. * | | |0 = The device has settled in Full Speed.
  508. * | | |1 = The USB device controller has settled in High-speed.
  509. * @var HSUSBD_T::FRAMECNT
  510. * Offset: 0x1C USB Frame Count Register
  511. * ---------------------------------------------------------------------------------------------------
  512. * |Bits |Field |Descriptions
  513. * | :----: | :----: | :---- |
  514. * |[2:0] |MFRAMECNT |Micro-frame Counter
  515. * | | |This field contains the micro-frame number for the frame number in the frame counter field.
  516. * |[13:3] |FRAMECNT |Frame Counter
  517. * | | |This field contains the frame count from the most recent start-of-frame packet.
  518. * @var HSUSBD_T::FADDR
  519. * Offset: 0x20 USB Function Address Register
  520. * ---------------------------------------------------------------------------------------------------
  521. * |Bits |Field |Descriptions
  522. * | :----: | :----: | :---- |
  523. * |[6:0] |FADDR |USB Function Address
  524. * | | |This field contains the current USB address of the device
  525. * | | |This field is cleared when a root port reset is detected
  526. * @var HSUSBD_T::TEST
  527. * Offset: 0x24 USB Test Mode Register
  528. * ---------------------------------------------------------------------------------------------------
  529. * |Bits |Field |Descriptions
  530. * | :----: | :----: | :---- |
  531. * |[2:0] |TESTMODE |Test Mode Selection
  532. * | | |000 = Normal Operation.
  533. * | | |001 = Test_J.
  534. * | | |010 = Test_K.
  535. * | | |011 = Test_SE0_NAK.
  536. * | | |100 = Test_Packet.
  537. * | | |101 = Test_Force_Enable.
  538. * | | |110 = Reserved.
  539. * | | |111 = Reserved.
  540. * | | |Note: This field is cleared when root port reset is detected.
  541. * @var HSUSBD_T::CEPDAT
  542. * Offset: 0x28 Control-Endpoint Data Buffer
  543. * ---------------------------------------------------------------------------------------------------
  544. * |Bits |Field |Descriptions
  545. * | :----: | :----: | :---- |
  546. * |[31:0] |DAT |Control-endpoint Data Buffer
  547. * | | |Control endpoint data buffer for the buffer transaction (read or write).
  548. * | | |Note: Only word access is supported.
  549. * @var HSUSBD_T::CEPDAT_BYTE
  550. * Offset: 0x28 Control-Endpoint Data Buffer
  551. * ---------------------------------------------------------------------------------------------------
  552. * |Bits |Field |Descriptions
  553. * | :----: | :----: | :---- |
  554. * |[7:0] |DAT |Control-endpoint Data Buffer
  555. * | | |Control endpoint data buffer for the buffer transaction (read or write).
  556. * | | |Note: Only byte access is supported.
  557. * @var HSUSBD_T::CEPCTL
  558. * Offset: 0x2C Control-Endpoint Control Register
  559. * ---------------------------------------------------------------------------------------------------
  560. * |Bits |Field |Descriptions
  561. * | :----: | :----: | :---- |
  562. * |[0] |NAKCLR |No Acknowledge Control
  563. * | | |This bit plays a crucial role in any control transfer.
  564. * | | |0 = The bit is being cleared by the local CPU by writing zero, the USB device controller will be responding with NAKs for the subsequent status phase
  565. * | | |This mechanism holds the host from moving to the next request, until the local CPU is also ready to process the next request.
  566. * | | |1 = This bit is set to one by the USB device controller, whenever a setup token is received
  567. * | | |The local CPU can take its own time to finish off any house-keeping work based on the request and then clear this bit.
  568. * | | |Note: Only when CPU writes data[1:0] is 2'b10 or 2'b00, this bit can be updated.
  569. * |[1] |STALLEN |Stall Enable Bit
  570. * | | |When this stall bit is set, the control endpoint sends a stall handshake in response to any in or out token thereafter
  571. * | | |This is typically used for response to invalid/unsupported requests
  572. * | | |When this bit is being set the NAK clear bit has to be cleared at the same time since the NAK clear bit has highest priority than STALL
  573. * | | |It is automatically cleared on receipt of a next setup-token
  574. * | | |So, the local CPU need not write again to clear this bit.
  575. * | | |0 = No sends a stall handshake in response to any in or out token thereafter.
  576. * | | |1 = The control endpoint sends a stall handshake in response to any in or out token thereafter.
  577. * | | |Note: Only when CPU writes data[1:0] is 2'b10 or 2'b00, this bit can be updated.
  578. * |[2] |ZEROLEN |Zero Packet Length
  579. * | | |This bit is valid for Auto Validation mode only.
  580. * | | |0 = No zero length packet to the host during Data stage to an IN token.
  581. * | | |1 = USB device controller can send a zero length packet to the host during Data stage to an IN token
  582. * | | |This bit gets cleared once the zero length data packet is sent
  583. * | | |So, the local CPU need not write again to clear this bit.
  584. * |[3] |FLUSH |CEP-flush Bit
  585. * | | |0 = No the packet buffer and its corresponding USBD_CEPDATCNT register to be cleared.
  586. * | | |1 = The packet buffer and its corresponding USBD_CEPDATCNT register to be cleared
  587. * | | |This bit is self-cleaning.
  588. * @var HSUSBD_T::CEPINTEN
  589. * Offset: 0x30 Control-Endpoint Interrupt Enable
  590. * ---------------------------------------------------------------------------------------------------
  591. * |Bits |Field |Descriptions
  592. * | :----: | :----: | :---- |
  593. * |[0] |SETUPTKIEN|Setup Token Interrupt Enable Bit
  594. * | | |0 = The SETUP token interrupt in Control Endpoint Disabled.
  595. * | | |1 = The SETUP token interrupt in Control Endpoint Enabled.
  596. * |[1] |SETUPPKIEN|Setup Packet Interrupt
  597. * | | |0 = The SETUP packet interrupt in Control Endpoint Disabled.
  598. * | | |1 = The SETUP packet interrupt in Control Endpoint Enabled.
  599. * |[2] |OUTTKIEN |Out Token Interrupt
  600. * | | |0 = The OUT token interrupt in Control Endpoint Disabled.
  601. * | | |1 = The OUT token interrupt in Control Endpoint Enabled.
  602. * |[3] |INTKIEN |In Token Interrupt
  603. * | | |0 = The IN token interrupt in Control Endpoint Disabled.
  604. * | | |1 = The IN token interrupt in Control Endpoint Enabled.
  605. * |[4] |PINGIEN |Ping Token Interrupt
  606. * | | |0 = The ping token interrupt in Control Endpoint Disabled.
  607. * | | |1 = The ping token interrupt Control Endpoint Enabled.
  608. * |[5] |TXPKIEN |Data Packet Transmitted Interrupt
  609. * | | |0 = The data packet transmitted interrupt in Control Endpoint Disabled.
  610. * | | |1 = The data packet transmitted interrupt in Control Endpoint Enabled.
  611. * |[6] |RXPKIEN |Data Packet Received Interrupt
  612. * | | |0 = The data received interrupt in Control Endpoint Disabled.
  613. * | | |1 = The data received interrupt in Control Endpoint Enabled.
  614. * |[7] |NAKIEN |NAK Sent Interrupt
  615. * | | |0 = The NAK sent interrupt in Control Endpoint Disabled.
  616. * | | |1 = The NAK sent interrupt in Control Endpoint Enabled.
  617. * |[8] |STALLIEN |STALL Sent Interrupt
  618. * | | |0 = The STALL sent interrupt in Control Endpoint Disabled.
  619. * | | |1 = The STALL sent interrupt in Control Endpoint Enabled.
  620. * |[9] |ERRIEN |USB Error Interrupt
  621. * | | |0 = The USB Error interrupt in Control Endpoint Disabled.
  622. * | | |1 = The USB Error interrupt in Control Endpoint Enabled.
  623. * |[10] |STSDONEIEN|Status Completion Interrupt
  624. * | | |0 = The Status Completion interrupt in Control Endpoint Disabled.
  625. * | | |1 = The Status Completion interrupt in Control Endpoint Enabled.
  626. * |[11] |BUFFULLIEN|Buffer Full Interrupt
  627. * | | |0 = The buffer full interrupt in Control Endpoint Disabled.
  628. * | | |1 = The buffer full interrupt in Control Endpoint Enabled.
  629. * |[12] |BUFEMPTYIEN|Buffer Empty Interrupt
  630. * | | |0 = The buffer empty interrupt in Control Endpoint Disabled.
  631. * | | |1= The buffer empty interrupt in Control Endpoint Enabled.
  632. * @var HSUSBD_T::CEPINTSTS
  633. * Offset: 0x34 Control-Endpoint Interrupt Status
  634. * ---------------------------------------------------------------------------------------------------
  635. * |Bits |Field |Descriptions
  636. * | :----: | :----: | :---- |
  637. * |[0] |SETUPTKIF |Setup Token Interrupt
  638. * | | |0 = Not a Setup token is received.
  639. * | | |1 = A Setup token is received. Writing 1 clears this status bit
  640. * | | |Note: Write 1 to clear this bit to 0.
  641. * |[1] |SETUPPKIF |Setup Packet Interrupt
  642. * | | |This bit must be cleared (by writing 1) before the next setup packet can be received
  643. * | | |If the bit is not cleared, then the successive setup packets will be overwritten in the setup packet buffer.
  644. * | | |0 = Not a Setup packet has been received from the host.
  645. * | | |1 = A Setup packet has been received from the host.
  646. * | | |Note: Write 1 to clear this bit to 0.
  647. * |[2] |OUTTKIF |Out Token Interrupt
  648. * | | |0 = The control-endpoint does not received an OUT token from the host.
  649. * | | |1 = The control-endpoint receives an OUT token from the host.
  650. * | | |Note: Write 1 to clear this bit to 0.
  651. * |[3] |INTKIF |in Token Interrupt
  652. * | | |0 = The control-endpoint does not received an IN token from the host.
  653. * | | |1 = The control-endpoint receives an IN token from the host.
  654. * | | |Note: Write 1 to clear this bit to 0.
  655. * |[4] |PINGIF |Ping Token Interrupt
  656. * | | |0 = The control-endpoint does not received a ping token from the host.
  657. * | | |1 = The control-endpoint receives a ping token from the host.
  658. * | | |Note: Write 1 to clear this bit to 0.
  659. * |[5] |TXPKIF |Data Packet Transmitted Interrupt
  660. * | | |0 = Not a data packet is successfully transmitted to the host in response to an IN-token and an ACK-token is received for the same.
  661. * | | |1 = A data packet is successfully transmitted to the host in response to an IN-token and an ACK-token is received for the same.
  662. * | | |Note: Write 1 to clear this bit to 0.
  663. * |[6] |RXPKIF |Data Packet Received Interrupt
  664. * | | |0 = Not a data packet is successfully received from the host for an OUT-token and an ACK is sent to the host.
  665. * | | |1 = A data packet is successfully received from the host for an OUT-token and an ACK is sent to the host.
  666. * | | |Note: Write 1 to clear this bit to 0.
  667. * |[7] |NAKIF |NAK Sent Interrupt
  668. * | | |0 = Not a NAK-token is sent in response to an IN/OUT token.
  669. * | | |1 = A NAK-token is sent in response to an IN/OUT token.
  670. * | | |Note: Write 1 to clear this bit to 0.
  671. * |[8] |STALLIF |STALL Sent Interrupt
  672. * | | |0 = Not a stall-token is sent in response to an IN/OUT token.
  673. * | | |1 = A stall-token is sent in response to an IN/OUT token.
  674. * | | |Note: Write 1 to clear this bit to 0.
  675. * |[9] |ERRIF |USB Error Interrupt
  676. * | | |0 = No error had occurred during the transaction.
  677. * | | |1 = An error had occurred during the transaction.
  678. * | | |Note: Write 1 to clear this bit to 0.
  679. * |[10] |STSDONEIF |Status Completion Interrupt
  680. * | | |0 = Not a USB transaction has completed successfully.
  681. * | | |1 = The status stage of a USB transaction has completed successfully.
  682. * | | |Note: Write 1 to clear this bit to 0.
  683. * |[11] |BUFFULLIF |Buffer Full Interrupt
  684. * | | |0 = The control-endpoint buffer is not full.
  685. * | | |1 = The control-endpoint buffer is full.
  686. * | | |Note: Write 1 to clear this bit to 0.
  687. * |[12] |BUFEMPTYIF|Buffer Empty Interrupt
  688. * | | |0 = The control-endpoint buffer is not empty.
  689. * | | |1 = The control-endpoint buffer is empty.
  690. * | | |Note: Write 1 to clear this bit to 0.
  691. * @var HSUSBD_T::CEPTXCNT
  692. * Offset: 0x38 Control-Endpoint In-transfer Data Count
  693. * ---------------------------------------------------------------------------------------------------
  694. * |Bits |Field |Descriptions
  695. * | :----: | :----: | :---- |
  696. * |[7:0] |TXCNT |In-transfer Data Count
  697. * | | |There is no mode selection for the control endpoint (but it operates like manual mode).The local-CPU has to fill the control-endpoint buffer with the data to be sent for an in-token and to write the count of bytes in this register
  698. * | | |When zero is written into this field, a zero length packet is sent to the host
  699. * | | |When the count written in the register is more than the MPS, the data sent will be of only MPS.
  700. * @var HSUSBD_T::CEPRXCNT
  701. * Offset: 0x3C Control-Endpoint Out-transfer Data Count
  702. * ---------------------------------------------------------------------------------------------------
  703. * |Bits |Field |Descriptions
  704. * | :----: | :----: | :---- |
  705. * |[7:0] |RXCNT |Out-transfer Data Count
  706. * | | |The USB device controller maintains the count of the data received in case of an out transfer, during the control transfer.
  707. * @var HSUSBD_T::CEPDATCNT
  708. * Offset: 0x40 Control-Endpoint data count
  709. * ---------------------------------------------------------------------------------------------------
  710. * |Bits |Field |Descriptions
  711. * | :----: | :----: | :---- |
  712. * |[15:0] |DATCNT |Control-endpoint Data Count
  713. * | | |The USB device controller maintains the count of the data of control-endpoint.
  714. * @var HSUSBD_T::SETUP1_0
  715. * Offset: 0x44 Setup1 & Setup0 bytes
  716. * ---------------------------------------------------------------------------------------------------
  717. * |Bits |Field |Descriptions
  718. * | :----: | :----: | :---- |
  719. * |[7:0] |SETUP0 |Setup Byte 0[7:0]
  720. * | | |This register provides byte 0 of the last setup packet received
  721. * | | |For a Standard Device Request, the following bmRequestType information is returned.
  722. * | | |Bit 7(Direction):
  723. * | | | 0: Host to device
  724. * | | | 1: Device to host
  725. * | | |Bit 6-5 (Type):
  726. * | | | 00: Standard
  727. * | | | 01: Class
  728. * | | | 10: Vendor
  729. * | | | 11: Reserved
  730. * | | |Bit 4-0 (Recipient)
  731. * | | | 00000: Device
  732. * | | | 00001: Interface
  733. * | | | 00010: Endpoint
  734. * | | | 00011: Other
  735. * | | | Others: Reserved
  736. * |[15:8] |SETUP1 |Setup Byte 1[15:8]
  737. * | | |This register provides byte 1 of the last setup packet received
  738. * | | |For a Standard Device Request, the following bRequest Code information is returned.
  739. * | | |00000000 = Get Status.
  740. * | | |00000001 = Clear Feature.
  741. * | | |00000010 = Reserved.
  742. * | | |00000011 = Set Feature.
  743. * | | |00000100 = Reserved.
  744. * | | |00000101 = Set Address.
  745. * | | |00000110 = Get Descriptor.
  746. * | | |00000111 = Set Descriptor.
  747. * | | |00001000 = Get Configuration.
  748. * | | |00001001 = Set Configuration.
  749. * | | |00001010 = Get Interface.
  750. * | | |00001011 = Set Interface.
  751. * | | |00001100 = Sync Frame.
  752. * @var HSUSBD_T::SETUP3_2
  753. * Offset: 0x48 Setup3 & Setup2 Bytes
  754. * ---------------------------------------------------------------------------------------------------
  755. * |Bits |Field |Descriptions
  756. * | :----: | :----: | :---- |
  757. * |[7:0] |SETUP2 |Setup Byte 2 [7:0]
  758. * | | |This register provides byte 2 of the last setup packet received
  759. * | | |For a Standard Device Request, the least significant byte of the wValue field is returned
  760. * |[15:8] |SETUP3 |Setup Byte 3 [15:8]
  761. * | | |This register provides byte 3 of the last setup packet received
  762. * | | |For a Standard Device Request, the most significant byte of the wValue field is returned.
  763. * @var HSUSBD_T::SETUP5_4
  764. * Offset: 0x4C Setup5 & Setup4 Bytes
  765. * ---------------------------------------------------------------------------------------------------
  766. * |Bits |Field |Descriptions
  767. * | :----: | :----: | :---- |
  768. * |[7:0] |SETUP4 |Setup Byte 4[7:0]
  769. * | | |This register provides byte 4 of the last setup packet received
  770. * | | |For a Standard Device Request, the least significant byte of the wIndex is returned.
  771. * |[15:8] |SETUP5 |Setup Byte 5[15:8]
  772. * | | |This register provides byte 5 of the last setup packet received
  773. * | | |For a Standard Device Request, the most significant byte of the wIndex field is returned.
  774. * @var HSUSBD_T::SETUP7_6
  775. * Offset: 0x50 Setup7 & Setup6 Bytes
  776. * ---------------------------------------------------------------------------------------------------
  777. * |Bits |Field |Descriptions
  778. * | :----: | :----: | :---- |
  779. * |[7:0] |SETUP6 |Setup Byte 6[7:0]
  780. * | | |This register provides byte 6 of the last setup packet received
  781. * | | |For a Standard Device Request, the least significant byte of the wLength field is returned.
  782. * |[15:8] |SETUP7 |Setup Byte 7[15:8]
  783. * | | |This register provides byte 7 of the last setup packet received
  784. * | | |For a Standard Device Request, the most significant byte of the wLength field is returned.
  785. * @var HSUSBD_T::CEPBUFST
  786. * Offset: 0x54 Control Endpoint RAM Start Address Register
  787. * ---------------------------------------------------------------------------------------------------
  788. * |Bits |Field |Descriptions
  789. * | :----: | :----: | :---- |
  790. * |[11:0] |SADDR |Control-endpoint Start Address
  791. * | | |This is the start-address of the RAM space allocated for the control-endpoint.
  792. * @var HSUSBD_T::CEPBUFEND
  793. * Offset: 0x58 Control Endpoint RAM End Address Register
  794. * ---------------------------------------------------------------------------------------------------
  795. * |Bits |Field |Descriptions
  796. * | :----: | :----: | :---- |
  797. * |[11:0] |EADDR |Control-endpoint End Address
  798. * | | |This is the end-address of the RAM space allocated for the control-endpoint.
  799. * @var HSUSBD_T::DMACTL
  800. * Offset: 0x5C DMA Control Status Register
  801. * ---------------------------------------------------------------------------------------------------
  802. * |Bits |Field |Descriptions
  803. * | :----: | :----: | :---- |
  804. * |[3:0] |EPNUM |DMA Endpoint Address Bits
  805. * | | |Used to define the Endpoint Address
  806. * |[4] |DMARD |DMA Operation
  807. * | | |0 : The operation is a DMA write (read from USB buffer)
  808. * | | |DMA will check endpoint data available count (USBD_EPxDATCNT) according to EPNM setting before to perform DMA write operation.
  809. * | | |1 : The operation is a DMA read (write to USB buffer).
  810. * |[5] |DMAEN |DMA Enable Bit
  811. * | | |0 : DMA function Disabled.
  812. * | | |1 : DMA function Enabled.
  813. * |[6] |SGEN |Scatter Gather Function Enable Bit
  814. * | | |0 : Scatter gather function Disabled.
  815. * | | |1 : Scatter gather function Enabled.
  816. * |[7] |DMARST |Reset DMA State Machine
  817. * | | |0 : No reset the DMA state machine.
  818. * | | |1 : Reset the DMA state machine.
  819. * |[8] |SVINEP |Serve IN Endpoint
  820. * | | |This bit is used to specify DMA serving endpoint-IN endpoint or OUT endpoint.
  821. * | | |0: DMA serves OUT endpoint
  822. * | | |1: DMA serves IN endpoint
  823. * @var HSUSBD_T::DMACNT
  824. * Offset: 0x60 DMA Count Register
  825. * ---------------------------------------------------------------------------------------------------
  826. * |Bits |Field |Descriptions
  827. * | :----: | :----: | :---- |
  828. * |[19:0] |DMACNT |DMA Transfer Count
  829. * | | |The transfer count of the DMA operation to be performed is written to this register.
  830. * @var HSUSBD_T::DMAADDR
  831. * Offset: 0x700 AHB DMA Address Register
  832. * ---------------------------------------------------------------------------------------------------
  833. * |Bits |Field |Descriptions
  834. * | :----: | :----: | :---- |
  835. * |[31:0] |DMAADDR |DMAADDR
  836. * | | |The register specifies the address from which the DMA has to read / write
  837. * | | |The address must WORD (32-bit) aligned.
  838. * @var HSUSBD_T::PHYCTL
  839. * Offset: 0x704 USB PHY Control Register
  840. * ---------------------------------------------------------------------------------------------------
  841. * |Bits |Field |Descriptions
  842. * | :----: | :----: | :---- |
  843. * |[8] |DPPUEN |DP Pull-up
  844. * | | |0 = Pull-up resistor on D+ Disabled.
  845. * | | |1 = Pull-up resistor on D+ Enabled.
  846. * |[9] |PHYEN |PHY Suspend Enable Bit
  847. * | | |0 = The USB PHY is suspend.
  848. * | | |1 = The USB PHY is not suspend.
  849. * |[24] |WKEN |Wake-up Enable Bit
  850. * | | |0 = The wake-up function Disabled.
  851. * | | |1 = The wake-up function Enabled.
  852. * |[31] |VBUSDET |VBUS Status
  853. * | | |0 = The VBUS is not detected yet.
  854. * | | |1 = The VBUS is detected.
  855. */
  856. __I uint32_t GINTSTS; /*!< [0x0000] Global Interrupt Status Register */
  857. /// @cond HIDDEN_SYMBOLS
  858. __I uint32_t RESERVE0[1];
  859. /// @endcond //HIDDEN_SYMBOLS
  860. __IO uint32_t GINTEN; /*!< [0x0008] Global Interrupt Enable Register */
  861. /// @cond HIDDEN_SYMBOLS
  862. __I uint32_t RESERVE1[1];
  863. /// @endcond //HIDDEN_SYMBOLS
  864. __IO uint32_t BUSINTSTS; /*!< [0x0010] USB Bus Interrupt Status Register */
  865. __IO uint32_t BUSINTEN; /*!< [0x0014] USB Bus Interrupt Enable Register */
  866. __IO uint32_t OPER; /*!< [0x0018] USB Operational Register */
  867. __I uint32_t FRAMECNT; /*!< [0x001c] USB Frame Count Register */
  868. __IO uint32_t FADDR; /*!< [0x0020] USB Function Address Register */
  869. __IO uint32_t TEST; /*!< [0x0024] USB Test Mode Register */
  870. union
  871. {
  872. __IO uint32_t CEPDAT;
  873. __IO uint8_t CEPDAT_BYTE;
  874. }; /*!< [0x0028] Control-Endpoint Data Buffer */
  875. __IO uint32_t CEPCTL; /*!< [0x002c] Control-Endpoint Control Register */
  876. __IO uint32_t CEPINTEN; /*!< [0x0030] Control-Endpoint Interrupt Enable */
  877. __IO uint32_t CEPINTSTS; /*!< [0x0034] Control-Endpoint Interrupt Status */
  878. __IO uint32_t CEPTXCNT; /*!< [0x0038] Control-Endpoint In-transfer Data Count */
  879. __I uint32_t CEPRXCNT; /*!< [0x003c] Control-Endpoint Out-transfer Data Count */
  880. __I uint32_t CEPDATCNT; /*!< [0x0040] Control-Endpoint data count */
  881. __I uint32_t SETUP1_0; /*!< [0x0044] Setup1 & Setup0 bytes */
  882. __I uint32_t SETUP3_2; /*!< [0x0048] Setup3 & Setup2 Bytes */
  883. __I uint32_t SETUP5_4; /*!< [0x004c] Setup5 & Setup4 Bytes */
  884. __I uint32_t SETUP7_6; /*!< [0x0050] Setup7 & Setup6 Bytes */
  885. __IO uint32_t CEPBUFST; /*!< [0x0054] Control Endpoint RAM Start Address Register */
  886. __IO uint32_t CEPBUFEND; /*!< [0x0058] Control Endpoint RAM End Address Register */
  887. __IO uint32_t DMACTL; /*!< [0x005c] DMA Control Status Register */
  888. __IO uint32_t DMACNT; /*!< [0x0060] DMA Count Register */
  889. HSUSBD_EP_T EP[12];
  890. /// @cond HIDDEN_SYMBOLS
  891. __I uint32_t RESERVE2[303];
  892. /// @endcond //HIDDEN_SYMBOLS
  893. __IO uint32_t DMAADDR; /*!< [0x0700] AHB DMA Address Register */
  894. __IO uint32_t PHYCTL; /*!< [0x0704] USB PHY Control Register */
  895. } HSUSBD_T;
  896. /**
  897. @addtogroup HSUSBD_CONST HSUSBD Bit Field Definition
  898. Constant Definitions for HSUSBD Controller
  899. @{ */
  900. #define HSUSBD_GINTSTS_USBIF_Pos (0) /*!< HSUSBD_T::GINTSTS: USBIF Position */
  901. #define HSUSBD_GINTSTS_USBIF_Msk (0x1ul << HSUSBD_GINTSTS_USBIF_Pos) /*!< HSUSBD_T::GINTSTS: USBIF Mask */
  902. #define HSUSBD_GINTSTS_CEPIF_Pos (1) /*!< HSUSBD_T::GINTSTS: CEPIF Position */
  903. #define HSUSBD_GINTSTS_CEPIF_Msk (0x1ul << HSUSBD_GINTSTS_CEPIF_Pos) /*!< HSUSBD_T::GINTSTS: CEPIF Mask */
  904. #define HSUSBD_GINTSTS_EPAIF_Pos (2) /*!< HSUSBD_T::GINTSTS: EPAIF Position */
  905. #define HSUSBD_GINTSTS_EPAIF_Msk (0x1ul << HSUSBD_GINTSTS_EPAIF_Pos) /*!< HSUSBD_T::GINTSTS: EPAIF Mask */
  906. #define HSUSBD_GINTSTS_EPBIF_Pos (3) /*!< HSUSBD_T::GINTSTS: EPBIF Position */
  907. #define HSUSBD_GINTSTS_EPBIF_Msk (0x1ul << HSUSBD_GINTSTS_EPBIF_Pos) /*!< HSUSBD_T::GINTSTS: EPBIF Mask */
  908. #define HSUSBD_GINTSTS_EPCIF_Pos (4) /*!< HSUSBD_T::GINTSTS: EPCIF Position */
  909. #define HSUSBD_GINTSTS_EPCIF_Msk (0x1ul << HSUSBD_GINTSTS_EPCIF_Pos) /*!< HSUSBD_T::GINTSTS: EPCIF Mask */
  910. #define HSUSBD_GINTSTS_EPDIF_Pos (5) /*!< HSUSBD_T::GINTSTS: EPDIF Position */
  911. #define HSUSBD_GINTSTS_EPDIF_Msk (0x1ul << HSUSBD_GINTSTS_EPDIF_Pos) /*!< HSUSBD_T::GINTSTS: EPDIF Mask */
  912. #define HSUSBD_GINTSTS_EPEIF_Pos (6) /*!< HSUSBD_T::GINTSTS: EPEIF Position */
  913. #define HSUSBD_GINTSTS_EPEIF_Msk (0x1ul << HSUSBD_GINTSTS_EPEIF_Pos) /*!< HSUSBD_T::GINTSTS: EPEIF Mask */
  914. #define HSUSBD_GINTSTS_EPFIF_Pos (7) /*!< HSUSBD_T::GINTSTS: EPFIF Position */
  915. #define HSUSBD_GINTSTS_EPFIF_Msk (0x1ul << HSUSBD_GINTSTS_EPFIF_Pos) /*!< HSUSBD_T::GINTSTS: EPFIF Mask */
  916. #define HSUSBD_GINTSTS_EPGIF_Pos (8) /*!< HSUSBD_T::GINTSTS: EPGIF Position */
  917. #define HSUSBD_GINTSTS_EPGIF_Msk (0x1ul << HSUSBD_GINTSTS_EPGIF_Pos) /*!< HSUSBD_T::GINTSTS: EPGIF Mask */
  918. #define HSUSBD_GINTSTS_EPHIF_Pos (9) /*!< HSUSBD_T::GINTSTS: EPHIF Position */
  919. #define HSUSBD_GINTSTS_EPHIF_Msk (0x1ul << HSUSBD_GINTSTS_EPHIF_Pos) /*!< HSUSBD_T::GINTSTS: EPHIF Mask */
  920. #define HSUSBD_GINTSTS_EPIIF_Pos (10) /*!< HSUSBD_T::GINTSTS: EPIIF Position */
  921. #define HSUSBD_GINTSTS_EPIIF_Msk (0x1ul << HSUSBD_GINTSTS_EPIIF_Pos) /*!< HSUSBD_T::GINTSTS: EPIIF Mask */
  922. #define HSUSBD_GINTSTS_EPJIF_Pos (11) /*!< HSUSBD_T::GINTSTS: EPJIF Position */
  923. #define HSUSBD_GINTSTS_EPJIF_Msk (0x1ul << HSUSBD_GINTSTS_EPJIF_Pos) /*!< HSUSBD_T::GINTSTS: EPJIF Mask */
  924. #define HSUSBD_GINTSTS_EPKIF_Pos (12) /*!< HSUSBD_T::GINTSTS: EPKIF Position */
  925. #define HSUSBD_GINTSTS_EPKIF_Msk (0x1ul << HSUSBD_GINTSTS_EPKIF_Pos) /*!< HSUSBD_T::GINTSTS: EPKIF Mask */
  926. #define HSUSBD_GINTSTS_EPLIF_Pos (13) /*!< HSUSBD_T::GINTSTS: EPLIF Position */
  927. #define HSUSBD_GINTSTS_EPLIF_Msk (0x1ul << HSUSBD_GINTSTS_EPLIF_Pos) /*!< HSUSBD_T::GINTSTS: EPLIF Mask */
  928. #define HSUSBD_GINTEN_USBIEN_Pos (0) /*!< HSUSBD_T::GINTEN: USBIEN Position */
  929. #define HSUSBD_GINTEN_USBIEN_Msk (0x1ul << HSUSBD_GINTEN_USBIEN_Pos) /*!< HSUSBD_T::GINTEN: USBIEN Mask */
  930. #define HSUSBD_GINTEN_CEPIEN_Pos (1) /*!< HSUSBD_T::GINTEN: CEPIEN Position */
  931. #define HSUSBD_GINTEN_CEPIEN_Msk (0x1ul << HSUSBD_GINTEN_CEPIEN_Pos) /*!< HSUSBD_T::GINTEN: CEPIEN Mask */
  932. #define HSUSBD_GINTEN_EPAIEN_Pos (2) /*!< HSUSBD_T::GINTEN: EPAIEN Position */
  933. #define HSUSBD_GINTEN_EPAIEN_Msk (0x1ul << HSUSBD_GINTEN_EPAIEN_Pos) /*!< HSUSBD_T::GINTEN: EPAIEN Mask */
  934. #define HSUSBD_GINTEN_EPBIEN_Pos (3) /*!< HSUSBD_T::GINTEN: EPBIEN Position */
  935. #define HSUSBD_GINTEN_EPBIEN_Msk (0x1ul << HSUSBD_GINTEN_EPBIEN_Pos) /*!< HSUSBD_T::GINTEN: EPBIEN Mask */
  936. #define HSUSBD_GINTEN_EPCIEN_Pos (4) /*!< HSUSBD_T::GINTEN: EPCIEN Position */
  937. #define HSUSBD_GINTEN_EPCIEN_Msk (0x1ul << HSUSBD_GINTEN_EPCIEN_Pos) /*!< HSUSBD_T::GINTEN: EPCIEN Mask */
  938. #define HSUSBD_GINTEN_EPDIEN_Pos (5) /*!< HSUSBD_T::GINTEN: EPDIEN Position */
  939. #define HSUSBD_GINTEN_EPDIEN_Msk (0x1ul << HSUSBD_GINTEN_EPDIEN_Pos) /*!< HSUSBD_T::GINTEN: EPDIEN Mask */
  940. #define HSUSBD_GINTEN_EPEIEN_Pos (6) /*!< HSUSBD_T::GINTEN: EPEIEN Position */
  941. #define HSUSBD_GINTEN_EPEIEN_Msk (0x1ul << HSUSBD_GINTEN_EPEIEN_Pos) /*!< HSUSBD_T::GINTEN: EPEIEN Mask */
  942. #define HSUSBD_GINTEN_EPFIEN_Pos (7) /*!< HSUSBD_T::GINTEN: EPFIEN Position */
  943. #define HSUSBD_GINTEN_EPFIEN_Msk (0x1ul << HSUSBD_GINTEN_EPFIEN_Pos) /*!< HSUSBD_T::GINTEN: EPFIEN Mask */
  944. #define HSUSBD_GINTEN_EPGIEN_Pos (8) /*!< HSUSBD_T::GINTEN: EPGIEN Position */
  945. #define HSUSBD_GINTEN_EPGIEN_Msk (0x1ul << HSUSBD_GINTEN_EPGIEN_Pos) /*!< HSUSBD_T::GINTEN: EPGIEN Mask */
  946. #define HSUSBD_GINTEN_EPHIEN_Pos (9) /*!< HSUSBD_T::GINTEN: EPHIEN Position */
  947. #define HSUSBD_GINTEN_EPHIEN_Msk (0x1ul << HSUSBD_GINTEN_EPHIEN_Pos) /*!< HSUSBD_T::GINTEN: EPHIEN Mask */
  948. #define HSUSBD_GINTEN_EPIIEN_Pos (10) /*!< HSUSBD_T::GINTEN: EPIIEN Position */
  949. #define HSUSBD_GINTEN_EPIIEN_Msk (0x1ul << HSUSBD_GINTEN_EPIIEN_Pos) /*!< HSUSBD_T::GINTEN: EPIIEN Mask */
  950. #define HSUSBD_GINTEN_EPJIEN_Pos (11) /*!< HSUSBD_T::GINTEN: EPJIEN Position */
  951. #define HSUSBD_GINTEN_EPJIEN_Msk (0x1ul << HSUSBD_GINTEN_EPJIEN_Pos) /*!< HSUSBD_T::GINTEN: EPJIEN Mask */
  952. #define HSUSBD_GINTEN_EPKIEN_Pos (12) /*!< HSUSBD_T::GINTEN: EPKIEN Position */
  953. #define HSUSBD_GINTEN_EPKIEN_Msk (0x1ul << HSUSBD_GINTEN_EPKIEN_Pos) /*!< HSUSBD_T::GINTEN: EPKIEN Mask */
  954. #define HSUSBD_GINTEN_EPLIEN_Pos (13) /*!< HSUSBD_T::GINTEN: EPLIEN Position */
  955. #define HSUSBD_GINTEN_EPLIEN_Msk (0x1ul << HSUSBD_GINTEN_EPLIEN_Pos) /*!< HSUSBD_T::GINTEN: EPLIEN Mask */
  956. #define HSUSBD_BUSINTSTS_SOFIF_Pos (0) /*!< HSUSBD_T::BUSINTSTS: SOFIF Position */
  957. #define HSUSBD_BUSINTSTS_SOFIF_Msk (0x1ul << HSUSBD_BUSINTSTS_SOFIF_Pos) /*!< HSUSBD_T::BUSINTSTS: SOFIF Mask */
  958. #define HSUSBD_BUSINTSTS_RSTIF_Pos (1) /*!< HSUSBD_T::BUSINTSTS: RSTIF Position */
  959. #define HSUSBD_BUSINTSTS_RSTIF_Msk (0x1ul << HSUSBD_BUSINTSTS_RSTIF_Pos) /*!< HSUSBD_T::BUSINTSTS: RSTIF Mask */
  960. #define HSUSBD_BUSINTSTS_RESUMEIF_Pos (2) /*!< HSUSBD_T::BUSINTSTS: RESUMEIF Position */
  961. #define HSUSBD_BUSINTSTS_RESUMEIF_Msk (0x1ul << HSUSBD_BUSINTSTS_RESUMEIF_Pos) /*!< HSUSBD_T::BUSINTSTS: RESUMEIF Mask */
  962. #define HSUSBD_BUSINTSTS_SUSPENDIF_Pos (3) /*!< HSUSBD_T::BUSINTSTS: SUSPENDIF Position*/
  963. #define HSUSBD_BUSINTSTS_SUSPENDIF_Msk (0x1ul << HSUSBD_BUSINTSTS_SUSPENDIF_Pos) /*!< HSUSBD_T::BUSINTSTS: SUSPENDIF Mask */
  964. #define HSUSBD_BUSINTSTS_HISPDIF_Pos (4) /*!< HSUSBD_T::BUSINTSTS: HISPDIF Position */
  965. #define HSUSBD_BUSINTSTS_HISPDIF_Msk (0x1ul << HSUSBD_BUSINTSTS_HISPDIF_Pos) /*!< HSUSBD_T::BUSINTSTS: HISPDIF Mask */
  966. #define HSUSBD_BUSINTSTS_DMADONEIF_Pos (5) /*!< HSUSBD_T::BUSINTSTS: DMADONEIF Position*/
  967. #define HSUSBD_BUSINTSTS_DMADONEIF_Msk (0x1ul << HSUSBD_BUSINTSTS_DMADONEIF_Pos) /*!< HSUSBD_T::BUSINTSTS: DMADONEIF Mask */
  968. #define HSUSBD_BUSINTSTS_PHYCLKVLDIF_Pos (6) /*!< HSUSBD_T::BUSINTSTS: PHYCLKVLDIF Position*/
  969. #define HSUSBD_BUSINTSTS_PHYCLKVLDIF_Msk (0x1ul << HSUSBD_BUSINTSTS_PHYCLKVLDIF_Pos) /*!< HSUSBD_T::BUSINTSTS: PHYCLKVLDIF Mask */
  970. #define HSUSBD_BUSINTSTS_VBUSDETIF_Pos (8) /*!< HSUSBD_T::BUSINTSTS: VBUSDETIF Position*/
  971. #define HSUSBD_BUSINTSTS_VBUSDETIF_Msk (0x1ul << HSUSBD_BUSINTSTS_VBUSDETIF_Pos) /*!< HSUSBD_T::BUSINTSTS: VBUSDETIF Mask */
  972. #define HSUSBD_BUSINTEN_SOFIEN_Pos (0) /*!< HSUSBD_T::BUSINTEN: SOFIEN Position */
  973. #define HSUSBD_BUSINTEN_SOFIEN_Msk (0x1ul << HSUSBD_BUSINTEN_SOFIEN_Pos) /*!< HSUSBD_T::BUSINTEN: SOFIEN Mask */
  974. #define HSUSBD_BUSINTEN_RSTIEN_Pos (1) /*!< HSUSBD_T::BUSINTEN: RSTIEN Position */
  975. #define HSUSBD_BUSINTEN_RSTIEN_Msk (0x1ul << HSUSBD_BUSINTEN_RSTIEN_Pos) /*!< HSUSBD_T::BUSINTEN: RSTIEN Mask */
  976. #define HSUSBD_BUSINTEN_RESUMEIEN_Pos (2) /*!< HSUSBD_T::BUSINTEN: RESUMEIEN Position */
  977. #define HSUSBD_BUSINTEN_RESUMEIEN_Msk (0x1ul << HSUSBD_BUSINTEN_RESUMEIEN_Pos) /*!< HSUSBD_T::BUSINTEN: RESUMEIEN Mask */
  978. #define HSUSBD_BUSINTEN_SUSPENDIEN_Pos (3) /*!< HSUSBD_T::BUSINTEN: SUSPENDIEN Position*/
  979. #define HSUSBD_BUSINTEN_SUSPENDIEN_Msk (0x1ul << HSUSBD_BUSINTEN_SUSPENDIEN_Pos) /*!< HSUSBD_T::BUSINTEN: SUSPENDIEN Mask */
  980. #define HSUSBD_BUSINTEN_HISPDIEN_Pos (4) /*!< HSUSBD_T::BUSINTEN: HISPDIEN Position */
  981. #define HSUSBD_BUSINTEN_HISPDIEN_Msk (0x1ul << HSUSBD_BUSINTEN_HISPDIEN_Pos) /*!< HSUSBD_T::BUSINTEN: HISPDIEN Mask */
  982. #define HSUSBD_BUSINTEN_DMADONEIEN_Pos (5) /*!< HSUSBD_T::BUSINTEN: DMADONEIEN Position*/
  983. #define HSUSBD_BUSINTEN_DMADONEIEN_Msk (0x1ul << HSUSBD_BUSINTEN_DMADONEIEN_Pos) /*!< HSUSBD_T::BUSINTEN: DMADONEIEN Mask */
  984. #define HSUSBD_BUSINTEN_PHYCLKVLDIEN_Pos (6) /*!< HSUSBD_T::BUSINTEN: PHYCLKVLDIEN Position*/
  985. #define HSUSBD_BUSINTEN_PHYCLKVLDIEN_Msk (0x1ul << HSUSBD_BUSINTEN_PHYCLKVLDIEN_Pos) /*!< HSUSBD_T::BUSINTEN: PHYCLKVLDIEN Mask */
  986. #define HSUSBD_BUSINTEN_VBUSDETIEN_Pos (8) /*!< HSUSBD_T::BUSINTEN: VBUSDETIEN Position*/
  987. #define HSUSBD_BUSINTEN_VBUSDETIEN_Msk (0x1ul << HSUSBD_BUSINTEN_VBUSDETIEN_Pos) /*!< HSUSBD_T::BUSINTEN: VBUSDETIEN Mask */
  988. #define HSUSBD_OPER_RESUMEEN_Pos (0) /*!< HSUSBD_T::OPER: RESUMEEN Position */
  989. #define HSUSBD_OPER_RESUMEEN_Msk (0x1ul << HSUSBD_OPER_RESUMEEN_Pos) /*!< HSUSBD_T::OPER: RESUMEEN Mask */
  990. #define HSUSBD_OPER_HISPDEN_Pos (1) /*!< HSUSBD_T::OPER: HISPDEN Position */
  991. #define HSUSBD_OPER_HISPDEN_Msk (0x1ul << HSUSBD_OPER_HISPDEN_Pos) /*!< HSUSBD_T::OPER: HISPDEN Mask */
  992. #define HSUSBD_OPER_CURSPD_Pos (2) /*!< HSUSBD_T::OPER: CURSPD Position */
  993. #define HSUSBD_OPER_CURSPD_Msk (0x1ul << HSUSBD_OPER_CURSPD_Pos) /*!< HSUSBD_T::OPER: CURSPD Mask */
  994. #define HSUSBD_FRAMECNT_MFRAMECNT_Pos (0) /*!< HSUSBD_T::FRAMECNT: MFRAMECNT Position */
  995. #define HSUSBD_FRAMECNT_MFRAMECNT_Msk (0x7ul << HSUSBD_FRAMECNT_MFRAMECNT_Pos) /*!< HSUSBD_T::FRAMECNT: MFRAMECNT Mask */
  996. #define HSUSBD_FRAMECNT_FRAMECNT_Pos (3) /*!< HSUSBD_T::FRAMECNT: FRAMECNT Position */
  997. #define HSUSBD_FRAMECNT_FRAMECNT_Msk (0x7fful << HSUSBD_FRAMECNT_FRAMECNT_Pos) /*!< HSUSBD_T::FRAMECNT: FRAMECNT Mask */
  998. #define HSUSBD_FADDR_FADDR_Pos (0) /*!< HSUSBD_T::FADDR: FADDR Position */
  999. #define HSUSBD_FADDR_FADDR_Msk (0x7ful << HSUSBD_FADDR_FADDR_Pos) /*!< HSUSBD_T::FADDR: FADDR Mask */
  1000. #define HSUSBD_TEST_TESTMODE_Pos (0) /*!< HSUSBD_T::TEST: TESTMODE Position */
  1001. #define HSUSBD_TEST_TESTMODE_Msk (0x7ul << HSUSBD_TEST_TESTMODE_Pos) /*!< HSUSBD_T::TEST: TESTMODE Mask */
  1002. #define HSUSBD_CEPDAT_DAT_Pos (0) /*!< HSUSBD_T::CEPDAT: DAT Position */
  1003. #define HSUSBD_CEPDAT_DAT_Msk (0xfffffffful << HSUSBD_CEPDAT_DAT_Pos) /*!< HSUSBD_T::CEPDAT: DAT Mask */
  1004. #define HSUSBD_CEPCTL_NAKCLR_Pos (0) /*!< HSUSBD_T::CEPCTL: NAKCLR Position */
  1005. #define HSUSBD_CEPCTL_NAKCLR_Msk (0x1ul << HSUSBD_CEPCTL_NAKCLR_Pos) /*!< HSUSBD_T::CEPCTL: NAKCLR Mask */
  1006. #define HSUSBD_CEPCTL_STALLEN_Pos (1) /*!< HSUSBD_T::CEPCTL: STALLEN Position */
  1007. #define HSUSBD_CEPCTL_STALLEN_Msk (0x1ul << HSUSBD_CEPCTL_STALLEN_Pos) /*!< HSUSBD_T::CEPCTL: STALLEN Mask */
  1008. #define HSUSBD_CEPCTL_ZEROLEN_Pos (2) /*!< HSUSBD_T::CEPCTL: ZEROLEN Position */
  1009. #define HSUSBD_CEPCTL_ZEROLEN_Msk (0x1ul << HSUSBD_CEPCTL_ZEROLEN_Pos) /*!< HSUSBD_T::CEPCTL: ZEROLEN Mask */
  1010. #define HSUSBD_CEPCTL_FLUSH_Pos (3) /*!< HSUSBD_T::CEPCTL: FLUSH Position */
  1011. #define HSUSBD_CEPCTL_FLUSH_Msk (0x1ul << HSUSBD_CEPCTL_FLUSH_Pos) /*!< HSUSBD_T::CEPCTL: FLUSH Mask */
  1012. #define HSUSBD_CEPINTEN_SETUPTKIEN_Pos (0) /*!< HSUSBD_T::CEPINTEN: SETUPTKIEN Position*/
  1013. #define HSUSBD_CEPINTEN_SETUPTKIEN_Msk (0x1ul << HSUSBD_CEPINTEN_SETUPTKIEN_Pos) /*!< HSUSBD_T::CEPINTEN: SETUPTKIEN Mask */
  1014. #define HSUSBD_CEPINTEN_SETUPPKIEN_Pos (1) /*!< HSUSBD_T::CEPINTEN: SETUPPKIEN Position*/
  1015. #define HSUSBD_CEPINTEN_SETUPPKIEN_Msk (0x1ul << HSUSBD_CEPINTEN_SETUPPKIEN_Pos) /*!< HSUSBD_T::CEPINTEN: SETUPPKIEN Mask */
  1016. #define HSUSBD_CEPINTEN_OUTTKIEN_Pos (2) /*!< HSUSBD_T::CEPINTEN: OUTTKIEN Position */
  1017. #define HSUSBD_CEPINTEN_OUTTKIEN_Msk (0x1ul << HSUSBD_CEPINTEN_OUTTKIEN_Pos) /*!< HSUSBD_T::CEPINTEN: OUTTKIEN Mask */
  1018. #define HSUSBD_CEPINTEN_INTKIEN_Pos (3) /*!< HSUSBD_T::CEPINTEN: INTKIEN Position */
  1019. #define HSUSBD_CEPINTEN_INTKIEN_Msk (0x1ul << HSUSBD_CEPINTEN_INTKIEN_Pos) /*!< HSUSBD_T::CEPINTEN: INTKIEN Mask */
  1020. #define HSUSBD_CEPINTEN_PINGIEN_Pos (4) /*!< HSUSBD_T::CEPINTEN: PINGIEN Position */
  1021. #define HSUSBD_CEPINTEN_PINGIEN_Msk (0x1ul << HSUSBD_CEPINTEN_PINGIEN_Pos) /*!< HSUSBD_T::CEPINTEN: PINGIEN Mask */
  1022. #define HSUSBD_CEPINTEN_TXPKIEN_Pos (5) /*!< HSUSBD_T::CEPINTEN: TXPKIEN Position */
  1023. #define HSUSBD_CEPINTEN_TXPKIEN_Msk (0x1ul << HSUSBD_CEPINTEN_TXPKIEN_Pos) /*!< HSUSBD_T::CEPINTEN: TXPKIEN Mask */
  1024. #define HSUSBD_CEPINTEN_RXPKIEN_Pos (6) /*!< HSUSBD_T::CEPINTEN: RXPKIEN Position */
  1025. #define HSUSBD_CEPINTEN_RXPKIEN_Msk (0x1ul << HSUSBD_CEPINTEN_RXPKIEN_Pos) /*!< HSUSBD_T::CEPINTEN: RXPKIEN Mask */
  1026. #define HSUSBD_CEPINTEN_NAKIEN_Pos (7) /*!< HSUSBD_T::CEPINTEN: NAKIEN Position */
  1027. #define HSUSBD_CEPINTEN_NAKIEN_Msk (0x1ul << HSUSBD_CEPINTEN_NAKIEN_Pos) /*!< HSUSBD_T::CEPINTEN: NAKIEN Mask */
  1028. #define HSUSBD_CEPINTEN_STALLIEN_Pos (8) /*!< HSUSBD_T::CEPINTEN: STALLIEN Position */
  1029. #define HSUSBD_CEPINTEN_STALLIEN_Msk (0x1ul << HSUSBD_CEPINTEN_STALLIEN_Pos) /*!< HSUSBD_T::CEPINTEN: STALLIEN Mask */
  1030. #define HSUSBD_CEPINTEN_ERRIEN_Pos (9) /*!< HSUSBD_T::CEPINTEN: ERRIEN Position */
  1031. #define HSUSBD_CEPINTEN_ERRIEN_Msk (0x1ul << HSUSBD_CEPINTEN_ERRIEN_Pos) /*!< HSUSBD_T::CEPINTEN: ERRIEN Mask */
  1032. #define HSUSBD_CEPINTEN_STSDONEIEN_Pos (10) /*!< HSUSBD_T::CEPINTEN: STSDONEIEN Position*/
  1033. #define HSUSBD_CEPINTEN_STSDONEIEN_Msk (0x1ul << HSUSBD_CEPINTEN_STSDONEIEN_Pos) /*!< HSUSBD_T::CEPINTEN: STSDONEIEN Mask */
  1034. #define HSUSBD_CEPINTEN_BUFFULLIEN_Pos (11) /*!< HSUSBD_T::CEPINTEN: BUFFULLIEN Position*/
  1035. #define HSUSBD_CEPINTEN_BUFFULLIEN_Msk (0x1ul << HSUSBD_CEPINTEN_BUFFULLIEN_Pos) /*!< HSUSBD_T::CEPINTEN: BUFFULLIEN Mask */
  1036. #define HSUSBD_CEPINTEN_BUFEMPTYIEN_Pos (12) /*!< HSUSBD_T::CEPINTEN: BUFEMPTYIEN Position*/
  1037. #define HSUSBD_CEPINTEN_BUFEMPTYIEN_Msk (0x1ul << HSUSBD_CEPINTEN_BUFEMPTYIEN_Pos) /*!< HSUSBD_T::CEPINTEN: BUFEMPTYIEN Mask */
  1038. #define HSUSBD_CEPINTSTS_SETUPTKIF_Pos (0) /*!< HSUSBD_T::CEPINTSTS: SETUPTKIF Position*/
  1039. #define HSUSBD_CEPINTSTS_SETUPTKIF_Msk (0x1ul << HSUSBD_CEPINTSTS_SETUPTKIF_Pos) /*!< HSUSBD_T::CEPINTSTS: SETUPTKIF Mask */
  1040. #define HSUSBD_CEPINTSTS_SETUPPKIF_Pos (1) /*!< HSUSBD_T::CEPINTSTS: SETUPPKIF Position*/
  1041. #define HSUSBD_CEPINTSTS_SETUPPKIF_Msk (0x1ul << HSUSBD_CEPINTSTS_SETUPPKIF_Pos) /*!< HSUSBD_T::CEPINTSTS: SETUPPKIF Mask */
  1042. #define HSUSBD_CEPINTSTS_OUTTKIF_Pos (2) /*!< HSUSBD_T::CEPINTSTS: OUTTKIF Position */
  1043. #define HSUSBD_CEPINTSTS_OUTTKIF_Msk (0x1ul << HSUSBD_CEPINTSTS_OUTTKIF_Pos) /*!< HSUSBD_T::CEPINTSTS: OUTTKIF Mask */
  1044. #define HSUSBD_CEPINTSTS_INTKIF_Pos (3) /*!< HSUSBD_T::CEPINTSTS: INTKIF Position */
  1045. #define HSUSBD_CEPINTSTS_INTKIF_Msk (0x1ul << HSUSBD_CEPINTSTS_INTKIF_Pos) /*!< HSUSBD_T::CEPINTSTS: INTKIF Mask */
  1046. #define HSUSBD_CEPINTSTS_PINGIF_Pos (4) /*!< HSUSBD_T::CEPINTSTS: PINGIF Position */
  1047. #define HSUSBD_CEPINTSTS_PINGIF_Msk (0x1ul << HSUSBD_CEPINTSTS_PINGIF_Pos) /*!< HSUSBD_T::CEPINTSTS: PINGIF Mask */
  1048. #define HSUSBD_CEPINTSTS_TXPKIF_Pos (5) /*!< HSUSBD_T::CEPINTSTS: TXPKIF Position */
  1049. #define HSUSBD_CEPINTSTS_TXPKIF_Msk (0x1ul << HSUSBD_CEPINTSTS_TXPKIF_Pos) /*!< HSUSBD_T::CEPINTSTS: TXPKIF Mask */
  1050. #define HSUSBD_CEPINTSTS_RXPKIF_Pos (6) /*!< HSUSBD_T::CEPINTSTS: RXPKIF Position */
  1051. #define HSUSBD_CEPINTSTS_RXPKIF_Msk (0x1ul << HSUSBD_CEPINTSTS_RXPKIF_Pos) /*!< HSUSBD_T::CEPINTSTS: RXPKIF Mask */
  1052. #define HSUSBD_CEPINTSTS_NAKIF_Pos (7) /*!< HSUSBD_T::CEPINTSTS: NAKIF Position */
  1053. #define HSUSBD_CEPINTSTS_NAKIF_Msk (0x1ul << HSUSBD_CEPINTSTS_NAKIF_Pos) /*!< HSUSBD_T::CEPINTSTS: NAKIF Mask */
  1054. #define HSUSBD_CEPINTSTS_STALLIF_Pos (8) /*!< HSUSBD_T::CEPINTSTS: STALLIF Position */
  1055. #define HSUSBD_CEPINTSTS_STALLIF_Msk (0x1ul << HSUSBD_CEPINTSTS_STALLIF_Pos) /*!< HSUSBD_T::CEPINTSTS: STALLIF Mask */
  1056. #define HSUSBD_CEPINTSTS_ERRIF_Pos (9) /*!< HSUSBD_T::CEPINTSTS: ERRIF Position */
  1057. #define HSUSBD_CEPINTSTS_ERRIF_Msk (0x1ul << HSUSBD_CEPINTSTS_ERRIF_Pos) /*!< HSUSBD_T::CEPINTSTS: ERRIF Mask */
  1058. #define HSUSBD_CEPINTSTS_STSDONEIF_Pos (10) /*!< HSUSBD_T::CEPINTSTS: STSDONEIF Position*/
  1059. #define HSUSBD_CEPINTSTS_STSDONEIF_Msk (0x1ul << HSUSBD_CEPINTSTS_STSDONEIF_Pos) /*!< HSUSBD_T::CEPINTSTS: STSDONEIF Mask */
  1060. #define HSUSBD_CEPINTSTS_BUFFULLIF_Pos (11) /*!< HSUSBD_T::CEPINTSTS: BUFFULLIF Position*/
  1061. #define HSUSBD_CEPINTSTS_BUFFULLIF_Msk (0x1ul << HSUSBD_CEPINTSTS_BUFFULLIF_Pos) /*!< HSUSBD_T::CEPINTSTS: BUFFULLIF Mask */
  1062. #define HSUSBD_CEPINTSTS_BUFEMPTYIF_Pos (12) /*!< HSUSBD_T::CEPINTSTS: BUFEMPTYIF Position*/
  1063. #define HSUSBD_CEPINTSTS_BUFEMPTYIF_Msk (0x1ul << HSUSBD_CEPINTSTS_BUFEMPTYIF_Pos) /*!< HSUSBD_T::CEPINTSTS: BUFEMPTYIF Mask */
  1064. #define HSUSBD_CEPTXCNT_TXCNT_Pos (0) /*!< HSUSBD_T::CEPTXCNT: TXCNT Position */
  1065. #define HSUSBD_CEPTXCNT_TXCNT_Msk (0xfful << HSUSBD_CEPTXCNT_TXCNT_Pos) /*!< HSUSBD_T::CEPTXCNT: TXCNT Mask */
  1066. #define HSUSBD_CEPRXCNT_RXCNT_Pos (0) /*!< HSUSBD_T::CEPRXCNT: RXCNT Position */
  1067. #define HSUSBD_CEPRXCNT_RXCNT_Msk (0xfful << HSUSBD_CEPRXCNT_RXCNT_Pos) /*!< HSUSBD_T::CEPRXCNT: RXCNT Mask */
  1068. #define HSUSBD_CEPDATCNT_DATCNT_Pos (0) /*!< HSUSBD_T::CEPDATCNT: DATCNT Position */
  1069. #define HSUSBD_CEPDATCNT_DATCNT_Msk (0xfffful << HSUSBD_CEPDATCNT_DATCNT_Pos) /*!< HSUSBD_T::CEPDATCNT: DATCNT Mask */
  1070. #define HSUSBD_SETUP1_0_SETUP0_Pos (0) /*!< HSUSBD_T::SETUP1_0: SETUP0 Position */
  1071. #define HSUSBD_SETUP1_0_SETUP0_Msk (0xfful << HSUSBD_SETUP1_0_SETUP0_Pos) /*!< HSUSBD_T::SETUP1_0: SETUP0 Mask */
  1072. #define HSUSBD_SETUP1_0_SETUP1_Pos (8) /*!< HSUSBD_T::SETUP1_0: SETUP1 Position */
  1073. #define HSUSBD_SETUP1_0_SETUP1_Msk (0xfful << HSUSBD_SETUP1_0_SETUP1_Pos) /*!< HSUSBD_T::SETUP1_0: SETUP1 Mask */
  1074. #define HSUSBD_SETUP3_2_SETUP2_Pos (0) /*!< HSUSBD_T::SETUP3_2: SETUP2 Position */
  1075. #define HSUSBD_SETUP3_2_SETUP2_Msk (0xfful << HSUSBD_SETUP3_2_SETUP2_Pos) /*!< HSUSBD_T::SETUP3_2: SETUP2 Mask */
  1076. #define HSUSBD_SETUP3_2_SETUP3_Pos (8) /*!< HSUSBD_T::SETUP3_2: SETUP3 Position */
  1077. #define HSUSBD_SETUP3_2_SETUP3_Msk (0xfful << HSUSBD_SETUP3_2_SETUP3_Pos) /*!< HSUSBD_T::SETUP3_2: SETUP3 Mask */
  1078. #define HSUSBD_SETUP5_4_SETUP4_Pos (0) /*!< HSUSBD_T::SETUP5_4: SETUP4 Position */
  1079. #define HSUSBD_SETUP5_4_SETUP4_Msk (0xfful << HSUSBD_SETUP5_4_SETUP4_Pos) /*!< HSUSBD_T::SETUP5_4: SETUP4 Mask */
  1080. #define HSUSBD_SETUP5_4_SETUP5_Pos (8) /*!< HSUSBD_T::SETUP5_4: SETUP5 Position */
  1081. #define HSUSBD_SETUP5_4_SETUP5_Msk (0xfful << HSUSBD_SETUP5_4_SETUP5_Pos) /*!< HSUSBD_T::SETUP5_4: SETUP5 Mask */
  1082. #define HSUSBD_SETUP7_6_SETUP6_Pos (0) /*!< HSUSBD_T::SETUP7_6: SETUP6 Position */
  1083. #define HSUSBD_SETUP7_6_SETUP6_Msk (0xfful << HSUSBD_SETUP7_6_SETUP6_Pos) /*!< HSUSBD_T::SETUP7_6: SETUP6 Mask */
  1084. #define HSUSBD_SETUP7_6_SETUP7_Pos (8) /*!< HSUSBD_T::SETUP7_6: SETUP7 Position */
  1085. #define HSUSBD_SETUP7_6_SETUP7_Msk (0xfful << HSUSBD_SETUP7_6_SETUP7_Pos) /*!< HSUSBD_T::SETUP7_6: SETUP7 Mask */
  1086. #define HSUSBD_CEPBUFST_SADDR_Pos (0) /*!< HSUSBD_T::CEPBUFST: SADDR Position */
  1087. #define HSUSBD_CEPBUFST_SADDR_Msk (0xffful << HSUSBD_CEPBUFST_SADDR_Pos) /*!< HSUSBD_T::CEPBUFST: SADDR Mask */
  1088. #define HSUSBD_CEPBUFEND_EADDR_Pos (0) /*!< HSUSBD_T::CEPBUFEND: EADDR Position */
  1089. #define HSUSBD_CEPBUFEND_EADDR_Msk (0xffful << HSUSBD_CEPBUFEND_EADDR_Pos) /*!< HSUSBD_T::CEPBUFEND: EADDR Mask */
  1090. #define HSUSBD_DMACTL_EPNUM_Pos (0) /*!< HSUSBD_T::DMACTL: EPNUM Position */
  1091. #define HSUSBD_DMACTL_EPNUM_Msk (0xful << HSUSBD_DMACTL_EPNUM_Pos) /*!< HSUSBD_T::DMACTL: EPNUM Mask */
  1092. #define HSUSBD_DMACTL_DMARD_Pos (4) /*!< HSUSBD_T::DMACTL: DMARD Position */
  1093. #define HSUSBD_DMACTL_DMARD_Msk (0x1ul << HSUSBD_DMACTL_DMARD_Pos) /*!< HSUSBD_T::DMACTL: DMARD Mask */
  1094. #define HSUSBD_DMACTL_DMAEN_Pos (5) /*!< HSUSBD_T::DMACTL: DMAEN Position */
  1095. #define HSUSBD_DMACTL_DMAEN_Msk (0x1ul << HSUSBD_DMACTL_DMAEN_Pos) /*!< HSUSBD_T::DMACTL: DMAEN Mask */
  1096. #define HSUSBD_DMACTL_SGEN_Pos (6) /*!< HSUSBD_T::DMACTL: SGEN Position */
  1097. #define HSUSBD_DMACTL_SGEN_Msk (0x1ul << HSUSBD_DMACTL_SGEN_Pos) /*!< HSUSBD_T::DMACTL: SGEN Mask */
  1098. #define HSUSBD_DMACTL_DMARST_Pos (7) /*!< HSUSBD_T::DMACTL: DMARST Position */
  1099. #define HSUSBD_DMACTL_DMARST_Msk (0x1ul << HSUSBD_DMACTL_DMARST_Pos) /*!< HSUSBD_T::DMACTL: DMARST Mask */
  1100. #define HSUSBD_DMACTL_SVINEP_Pos (8) /*!< HSUSBD_T::DMACTL: SVINEP Position */
  1101. #define HSUSBD_DMACTL_SVINEP_Msk (0x1ul << HSUSBD_DMACTL_SVINEP_Pos) /*!< HSUSBD_T::DMACTL: SVINEP Mask */
  1102. #define HSUSBD_DMACNT_DMACNT_Pos (0) /*!< HSUSBD_T::DMACNT: DMACNT Position */
  1103. #define HSUSBD_DMACNT_DMACNT_Msk (0xffffful << HSUSBD_DMACNT_DMACNT_Pos) /*!< HSUSBD_T::DMACNT: DMACNT Mask */
  1104. #define HSUSBD_EPDAT_EPDAT_Pos (0) /*!< HSUSBD_T::EPDAT: EPDAT Position */
  1105. #define HSUSBD_EPDAT_EPDAT_Msk (0xfffffffful << HSUSBD_EPDAT_EPDAT_Pos) /*!< HSUSBD_T::EPDAT: EPDAT Mask */
  1106. #define HSUSBD_EPINTSTS_BUFFULLIF_Pos (0) /*!< HSUSBD_T::EPINTSTS: BUFFULLIF Position */
  1107. #define HSUSBD_EPINTSTS_BUFFULLIF_Msk (0x1ul << HSUSBD_EPINTSTS_BUFFULLIF_Pos) /*!< HSUSBD_T::EPINTSTS: BUFFULLIF Mask */
  1108. #define HSUSBD_EPINTSTS_BUFEMPTYIF_Pos (1) /*!< HSUSBD_T::EPINTSTS: BUFEMPTYIF Position*/
  1109. #define HSUSBD_EPINTSTS_BUFEMPTYIF_Msk (0x1ul << HSUSBD_EPINTSTS_BUFEMPTYIF_Pos) /*!< HSUSBD_T::EPINTSTS: BUFEMPTYIF Mask */
  1110. #define HSUSBD_EPINTSTS_SHORTTXIF_Pos (2) /*!< HSUSBD_T::EPINTSTS: SHORTTXIF Position */
  1111. #define HSUSBD_EPINTSTS_SHORTTXIF_Msk (0x1ul << HSUSBD_EPINTSTS_SHORTTXIF_Pos) /*!< HSUSBD_T::EPINTSTS: SHORTTXIF Mask */
  1112. #define HSUSBD_EPINTSTS_TXPKIF_Pos (3) /*!< HSUSBD_T::EPINTSTS: TXPKIF Position */
  1113. #define HSUSBD_EPINTSTS_TXPKIF_Msk (0x1ul << HSUSBD_EPINTSTS_TXPKIF_Pos) /*!< HSUSBD_T::EPINTSTS: TXPKIF Mask */
  1114. #define HSUSBD_EPINTSTS_RXPKIF_Pos (4) /*!< HSUSBD_T::EPINTSTS: RXPKIF Position */
  1115. #define HSUSBD_EPINTSTS_RXPKIF_Msk (0x1ul << HSUSBD_EPINTSTS_RXPKIF_Pos) /*!< HSUSBD_T::EPINTSTS: RXPKIF Mask */
  1116. #define HSUSBD_EPINTSTS_OUTTKIF_Pos (5) /*!< HSUSBD_T::EPINTSTS: OUTTKIF Position */
  1117. #define HSUSBD_EPINTSTS_OUTTKIF_Msk (0x1ul << HSUSBD_EPINTSTS_OUTTKIF_Pos) /*!< HSUSBD_T::EPINTSTS: OUTTKIF Mask */
  1118. #define HSUSBD_EPINTSTS_INTKIF_Pos (6) /*!< HSUSBD_T::EPINTSTS: INTKIF Position */
  1119. #define HSUSBD_EPINTSTS_INTKIF_Msk (0x1ul << HSUSBD_EPINTSTS_INTKIF_Pos) /*!< HSUSBD_T::EPINTSTS: INTKIF Mask */
  1120. #define HSUSBD_EPINTSTS_PINGIF_Pos (7) /*!< HSUSBD_T::EPINTSTS: PINGIF Position */
  1121. #define HSUSBD_EPINTSTS_PINGIF_Msk (0x1ul << HSUSBD_EPINTSTS_PINGIF_Pos) /*!< HSUSBD_T::EPINTSTS: PINGIF Mask */
  1122. #define HSUSBD_EPINTSTS_NAKIF_Pos (8) /*!< HSUSBD_T::EPINTSTS: NAKIF Position */
  1123. #define HSUSBD_EPINTSTS_NAKIF_Msk (0x1ul << HSUSBD_EPINTSTS_NAKIF_Pos) /*!< HSUSBD_T::EPINTSTS: NAKIF Mask */
  1124. #define HSUSBD_EPINTSTS_STALLIF_Pos (9) /*!< HSUSBD_T::EPINTSTS: STALLIF Position */
  1125. #define HSUSBD_EPINTSTS_STALLIF_Msk (0x1ul << HSUSBD_EPINTSTS_STALLIF_Pos) /*!< HSUSBD_T::EPINTSTS: STALLIF Mask */
  1126. #define HSUSBD_EPINTSTS_NYETIF_Pos (10) /*!< HSUSBD_T::EPINTSTS: NYETIF Position */
  1127. #define HSUSBD_EPINTSTS_NYETIF_Msk (0x1ul << HSUSBD_EPINTSTS_NYETIF_Pos) /*!< HSUSBD_T::EPINTSTS: NYETIF Mask */
  1128. #define HSUSBD_EPINTSTS_ERRIF_Pos (11) /*!< HSUSBD_T::EPINTSTS: ERRIF Position */
  1129. #define HSUSBD_EPINTSTS_ERRIF_Msk (0x1ul << HSUSBD_EPINTSTS_ERRIF_Pos) /*!< HSUSBD_T::EPINTSTS: ERRIF Mask */
  1130. #define HSUSBD_EPINTSTS_SHORTRXIF_Pos (12) /*!< HSUSBD_T::EPINTSTS: SHORTRXIF Position */
  1131. #define HSUSBD_EPINTSTS_SHORTRXIF_Msk (0x1ul << HSUSBD_EPINTSTS_SHORTRXIF_Pos) /*!< HSUSBD_T::EPINTSTS: SHORTRXIF Mask */
  1132. #define HSUSBD_EPINTEN_BUFFULLIEN_Pos (0) /*!< HSUSBD_T::EPINTEN: BUFFULLIEN Position */
  1133. #define HSUSBD_EPINTEN_BUFFULLIEN_Msk (0x1ul << HSUSBD_EPINTEN_BUFFULLIEN_Pos) /*!< HSUSBD_T::EPINTEN: BUFFULLIEN Mask */
  1134. #define HSUSBD_EPINTEN_BUFEMPTYIEN_Pos (1) /*!< HSUSBD_T::EPINTEN: BUFEMPTYIEN Position*/
  1135. #define HSUSBD_EPINTEN_BUFEMPTYIEN_Msk (0x1ul << HSUSBD_EPINTEN_BUFEMPTYIEN_Pos) /*!< HSUSBD_T::EPINTEN: BUFEMPTYIEN Mask */
  1136. #define HSUSBD_EPINTEN_SHORTTXIEN_Pos (2) /*!< HSUSBD_T::EPINTEN: SHORTTXIEN Position */
  1137. #define HSUSBD_EPINTEN_SHORTTXIEN_Msk (0x1ul << HSUSBD_EPINTEN_SHORTTXIEN_Pos) /*!< HSUSBD_T::EPINTEN: SHORTTXIEN Mask */
  1138. #define HSUSBD_EPINTEN_TXPKIEN_Pos (3) /*!< HSUSBD_T::EPINTEN: TXPKIEN Position */
  1139. #define HSUSBD_EPINTEN_TXPKIEN_Msk (0x1ul << HSUSBD_EPINTEN_TXPKIEN_Pos) /*!< HSUSBD_T::EPINTEN: TXPKIEN Mask */
  1140. #define HSUSBD_EPINTEN_RXPKIEN_Pos (4) /*!< HSUSBD_T::EPINTEN: RXPKIEN Position */
  1141. #define HSUSBD_EPINTEN_RXPKIEN_Msk (0x1ul << HSUSBD_EPINTEN_RXPKIEN_Pos) /*!< HSUSBD_T::EPINTEN: RXPKIEN Mask */
  1142. #define HSUSBD_EPINTEN_OUTTKIEN_Pos (5) /*!< HSUSBD_T::EPINTEN: OUTTKIEN Position */
  1143. #define HSUSBD_EPINTEN_OUTTKIEN_Msk (0x1ul << HSUSBD_EPINTEN_OUTTKIEN_Pos) /*!< HSUSBD_T::EPINTEN: OUTTKIEN Mask */
  1144. #define HSUSBD_EPINTEN_INTKIEN_Pos (6) /*!< HSUSBD_T::EPINTEN: INTKIEN Position */
  1145. #define HSUSBD_EPINTEN_INTKIEN_Msk (0x1ul << HSUSBD_EPINTEN_INTKIEN_Pos) /*!< HSUSBD_T::EPINTEN: INTKIEN Mask */
  1146. #define HSUSBD_EPINTEN_PINGIEN_Pos (7) /*!< HSUSBD_T::EPINTEN: PINGIEN Position */
  1147. #define HSUSBD_EPINTEN_PINGIEN_Msk (0x1ul << HSUSBD_EPINTEN_PINGIEN_Pos) /*!< HSUSBD_T::EPINTEN: PINGIEN Mask */
  1148. #define HSUSBD_EPINTEN_NAKIEN_Pos (8) /*!< HSUSBD_T::EPINTEN: NAKIEN Position */
  1149. #define HSUSBD_EPINTEN_NAKIEN_Msk (0x1ul << HSUSBD_EPINTEN_NAKIEN_Pos) /*!< HSUSBD_T::EPINTEN: NAKIEN Mask */
  1150. #define HSUSBD_EPINTEN_STALLIEN_Pos (9) /*!< HSUSBD_T::EPINTEN: STALLIEN Position */
  1151. #define HSUSBD_EPINTEN_STALLIEN_Msk (0x1ul << HSUSBD_EPINTEN_STALLIEN_Pos) /*!< HSUSBD_T::EPINTEN: STALLIEN Mask */
  1152. #define HSUSBD_EPINTEN_NYETIEN_Pos (10) /*!< HSUSBD_T::EPINTEN: NYETIEN Position */
  1153. #define HSUSBD_EPINTEN_NYETIEN_Msk (0x1ul << HSUSBD_EPINTEN_NYETIEN_Pos) /*!< HSUSBD_T::EPINTEN: NYETIEN Mask */
  1154. #define HSUSBD_EPINTEN_ERRIEN_Pos (11) /*!< HSUSBD_T::EPINTEN: ERRIEN Position */
  1155. #define HSUSBD_EPINTEN_ERRIEN_Msk (0x1ul << HSUSBD_EPINTEN_ERRIEN_Pos) /*!< HSUSBD_T::EPINTEN: ERRIEN Mask */
  1156. #define HSUSBD_EPINTEN_SHORTRXIEN_Pos (12) /*!< HSUSBD_T::EPINTEN: SHORTRXIEN Position */
  1157. #define HSUSBD_EPINTEN_SHORTRXIEN_Msk (0x1ul << HSUSBD_EPINTEN_SHORTRXIEN_Pos) /*!< HSUSBD_T::EPINTEN: SHORTRXIEN Mask */
  1158. #define HSUSBD_EPDATCNT_DATCNT_Pos (0) /*!< HSUSBD_T::EPDATCNT: DATCNT Position */
  1159. #define HSUSBD_EPDATCNT_DATCNT_Msk (0xfffful << HSUSBD_EPDATCNT_DATCNT_Pos) /*!< HSUSBD_T::EPDATCNT: DATCNT Mask */
  1160. #define HSUSBD_EPDATCNT_DMALOOP_Pos (16) /*!< HSUSBD_T::EPDATCNT: DMALOOP Position */
  1161. #define HSUSBD_EPDATCNT_DMALOOP_Msk (0x7ffful << HSUSBD_EPDATCNT_DMALOOP_Pos) /*!< HSUSBD_T::EPDATCNT: DMALOOP Mask */
  1162. #define HSUSBD_EPRSPCTL_FLUSH_Pos (0) /*!< HSUSBD_T::EPRSPCTL: FLUSH Position */
  1163. #define HSUSBD_EPRSPCTL_FLUSH_Msk (0x1ul << HSUSBD_EPRSPCTL_FLUSH_Pos) /*!< HSUSBD_T::EPRSPCTL: FLUSH Mask */
  1164. #define HSUSBD_EPRSPCTL_MODE_Pos (1) /*!< HSUSBD_T::EPRSPCTL: MODE Position */
  1165. #define HSUSBD_EPRSPCTL_MODE_Msk (0x3ul << HSUSBD_EPRSPCTL_MODE_Pos) /*!< HSUSBD_T::EPRSPCTL: MODE Mask */
  1166. #define HSUSBD_EPRSPCTL_TOGGLE_Pos (3) /*!< HSUSBD_T::EPRSPCTL: TOGGLE Position */
  1167. #define HSUSBD_EPRSPCTL_TOGGLE_Msk (0x1ul << HSUSBD_EPRSPCTL_TOGGLE_Pos) /*!< HSUSBD_T::EPRSPCTL: TOGGLE Mask */
  1168. #define HSUSBD_EPRSPCTL_HALT_Pos (4) /*!< HSUSBD_T::EPRSPCTL: HALT Position */
  1169. #define HSUSBD_EPRSPCTL_HALT_Msk (0x1ul << HSUSBD_EPRSPCTL_HALT_Pos) /*!< HSUSBD_T::EPRSPCTL: HALT Mask */
  1170. #define HSUSBD_EPRSPCTL_ZEROLEN_Pos (5) /*!< HSUSBD_T::EPRSPCTL: ZEROLEN Position */
  1171. #define HSUSBD_EPRSPCTL_ZEROLEN_Msk (0x1ul << HSUSBD_EPRSPCTL_ZEROLEN_Pos) /*!< HSUSBD_T::EPRSPCTL: ZEROLEN Mask */
  1172. #define HSUSBD_EPRSPCTL_SHORTTXEN_Pos (6) /*!< HSUSBD_T::EPRSPCTL: SHORTTXEN Position */
  1173. #define HSUSBD_EPRSPCTL_SHORTTXEN_Msk (0x1ul << HSUSBD_EPRSPCTL_SHORTTXEN_Pos) /*!< HSUSBD_T::EPRSPCTL: SHORTTXEN Mask */
  1174. #define HSUSBD_EPRSPCTL_DISBUF_Pos (7) /*!< HSUSBD_T::EPRSPCTL: DISBUF Position */
  1175. #define HSUSBD_EPRSPCTL_DISBUF_Msk (0x1ul << HSUSBD_EPRSPCTL_DISBUF_Pos) /*!< HSUSBD_T::EPRSPCTL: DISBUF Mask */
  1176. #define HSUSBD_EPMPS_EPMPS_Pos (0) /*!< HSUSBD_T::EPMPS: EPMPS Position */
  1177. #define HSUSBD_EPMPS_EPMPS_Msk (0x7fful << HSUSBD_EPMPS_EPMPS_Pos) /*!< HSUSBD_T::EPMPS: EPMPS Mask */
  1178. #define HSUSBD_EPTXCNT_TXCNT_Pos (0) /*!< HSUSBD_T::EPTXCNT: TXCNT Position */
  1179. #define HSUSBD_EPTXCNT_TXCNT_Msk (0x7fful << HSUSBD_EPTXCNT_TXCNT_Pos) /*!< HSUSBD_T::EPTXCNT: TXCNT Mask */
  1180. #define HSUSBD_EPCFG_EPEN_Pos (0) /*!< HSUSBD_T::EPCFG: EPEN Position */
  1181. #define HSUSBD_EPCFG_EPEN_Msk (0x1ul << HSUSBD_EPCFG_EPEN_Pos) /*!< HSUSBD_T::EPCFG: EPEN Mask */
  1182. #define HSUSBD_EPCFG_EPTYPE_Pos (1) /*!< HSUSBD_T::EPCFG: EPTYPE Position */
  1183. #define HSUSBD_EPCFG_EPTYPE_Msk (0x3ul << HSUSBD_EPCFG_EPTYPE_Pos) /*!< HSUSBD_T::EPCFG: EPTYPE Mask */
  1184. #define HSUSBD_EPCFG_EPDIR_Pos (3) /*!< HSUSBD_T::EPCFG: EPDIR Position */
  1185. #define HSUSBD_EPCFG_EPDIR_Msk (0x1ul << HSUSBD_EPCFG_EPDIR_Pos) /*!< HSUSBD_T::EPCFG: EPDIR Mask */
  1186. #define HSUSBD_EPCFG_EPNUM_Pos (4) /*!< HSUSBD_T::EPCFG: EPNUM Position */
  1187. #define HSUSBD_EPCFG_EPNUM_Msk (0xful << HSUSBD_EPCFG_EPNUM_Pos) /*!< HSUSBD_T::EPCFG: EPNUM Mask */
  1188. #define HSUSBD_EPBUFST_SADDR_Pos (0) /*!< HSUSBD_T::EPBUFST: SADDR Position */
  1189. #define HSUSBD_EPBUFST_SADDR_Msk (0xffful << HSUSBD_EPBUFST_SADDR_Pos) /*!< HSUSBD_T::EPBUFST: SADDR Mask */
  1190. #define HSUSBD_EPBUFEND_EADDR_Pos (0) /*!< HSUSBD_T::EPBUFEND: EADDR Position */
  1191. #define HSUSBD_EPBUFEND_EADDR_Msk (0xffful << HSUSBD_EPBUFEND_EADDR_Pos) /*!< HSUSBD_T::EPBUFEND: EADDR Mask */
  1192. #define HSUSBD_DMAADDR_DMAADDR_Pos (0) /*!< HSUSBD_T::DMAADDR: DMAADDR Position */
  1193. #define HSUSBD_DMAADDR_DMAADDR_Msk (0xfffffffful << HSUSBD_DMAADDR_DMAADDR_Pos) /*!< HSUSBD_T::DMAADDR: DMAADDR Mask */
  1194. #define HSUSBD_PHYCTL_DPPUEN_Pos (8) /*!< HSUSBD_T::PHYCTL: DPPUEN Position */
  1195. #define HSUSBD_PHYCTL_DPPUEN_Msk (0x1ul << HSUSBD_PHYCTL_DPPUEN_Pos) /*!< HSUSBD_T::PHYCTL: DPPUEN Mask */
  1196. #define HSUSBD_PHYCTL_PHYEN_Pos (9) /*!< HSUSBD_T::PHYCTL: PHYEN Position */
  1197. #define HSUSBD_PHYCTL_PHYEN_Msk (0x1ul << HSUSBD_PHYCTL_PHYEN_Pos) /*!< HSUSBD_T::PHYCTL: PHYEN Mask */
  1198. #define HSUSBD_PHYCTL_WKEN_Pos (24) /*!< HSUSBD_T::PHYCTL: WKEN Position */
  1199. #define HSUSBD_PHYCTL_WKEN_Msk (0x1ul << HSUSBD_PHYCTL_WKEN_Pos) /*!< HSUSBD_T::PHYCTL: WKEN Mask */
  1200. #define HSUSBD_PHYCTL_VBUSDET_Pos (31) /*!< HSUSBD_T::PHYCTL: VBUSDET Position */
  1201. #define HSUSBD_PHYCTL_VBUSDET_Msk (0x1ul << HSUSBD_PHYCTL_VBUSDET_Pos) /*!< HSUSBD_T::PHYCTL: VBUSDET Mask */
  1202. /**@}*/ /* HSUSBD_CONST */
  1203. /**@}*/ /* end of HSUSBD register group */
  1204. /**@}*/ /* end of REGISTER group */
  1205. #if defined ( __CC_ARM )
  1206. #pragma no_anon_unions
  1207. #endif
  1208. #endif /* __HSUSBD_REG_H__ */