1
0

hw_lpc.h 56 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974
  1. //*****************************************************************************
  2. //
  3. // hw_lpc.h - Macros used when accessing the LPC hardware.
  4. //
  5. // Copyright (c) 2010-2011 Texas Instruments Incorporated. All rights reserved.
  6. // Software License Agreement
  7. //
  8. // Texas Instruments (TI) is supplying this software for use solely and
  9. // exclusively on TI's microcontroller products. The software is owned by
  10. // TI and/or its suppliers, and is protected under applicable copyright
  11. // laws. You may not combine this software with "viral" open-source
  12. // software in order to form a larger program.
  13. //
  14. // THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
  15. // NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
  16. // NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  17. // A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
  18. // CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
  19. // DAMAGES, FOR ANY REASON WHATSOEVER.
  20. //
  21. // This is part of revision 8264 of the Stellaris Firmware Development Package.
  22. //
  23. //*****************************************************************************
  24. #ifndef __HW_LPC_H__
  25. #define __HW_LPC_H__
  26. //*****************************************************************************
  27. //
  28. // The following are defines for the LPC register addresses.
  29. //
  30. //*****************************************************************************
  31. #define LPC_O_CTL 0x00000000 // LPC Control
  32. #define LPC_O_STS 0x00000004 // LPC Status
  33. #define LPC_O_IRQCTL 0x00000008 // LPC IRQ Control
  34. #define LPC_O_IRQST 0x0000000C // LPC IRQ Status
  35. #define LPC_O_CH0CTL 0x00000010 // LPC Channel 0 Control
  36. #define LPC_O_CH0ST 0x00000014 // LPC Channel 0 Status
  37. #define LPC_O_CH0ADR 0x00000018 // LPC Channel 0 Address
  38. #define LPC_O_CH1CTL 0x00000020 // LPC Channel 1 Control
  39. #define LPC_O_CH1ST 0x00000024 // LPC Channel 1 Status
  40. #define LPC_O_CH1ADR 0x00000028 // LPC Channel 1 Address
  41. #define LPC_O_CH2CTL 0x00000030 // LPC Channel 2 Control
  42. #define LPC_O_CH2ST 0x00000034 // LPC Channel 2 Status
  43. #define LPC_O_CH2ADR 0x00000038 // LPC Channel 2 Address
  44. #define LPC_O_CH3CTL 0x00000040 // LPC Channel 3 Control
  45. #define LPC_O_CH3ST 0x00000044 // LPC Channel 3 Status
  46. #define LPC_O_CH3ADR 0x00000048 // LPC Channel 3 Address
  47. #define LPC_O_CH4CTL 0x00000050 // LPC Channel 4 Control
  48. #define LPC_O_CH4ST 0x00000054 // LPC Channel 4 Status
  49. #define LPC_O_CH4ADR 0x00000058 // LPC Channel 4 Address
  50. #define LPC_O_CH5CTL 0x00000060 // LPC Channel 5 Control
  51. #define LPC_O_CH5ST 0x00000064 // LPC Channel 5 Status
  52. #define LPC_O_CH5ADR 0x00000068 // LPC Channel 5 Address
  53. #define LPC_O_CH6CTL 0x00000070 // LPC Channel 6 Control
  54. #define LPC_O_CH6ST 0x00000074 // LPC Channel 6 Status
  55. #define LPC_O_CH6ADR 0x00000078 // LPC Channel 6 Address
  56. #define LPC_O_CH7CTL 0x00000080 // LPC Channel 7 / COMx Control
  57. #define LPC_O_CH7ST 0x00000084 // LPC Channel 7 / COMx Status
  58. #define LPC_O_CH7ADR 0x00000088 // LPC Channel 7 / COMx Address
  59. #define LPC_O_STSADDR 0x000000A0 // LPC Status Block Address
  60. #define LPC_O_IM 0x00000100 // LPC Interrupt Mask
  61. #define LPC_O_RIS 0x00000104 // LPC Raw Interrupt Status
  62. #define LPC_O_MIS 0x00000108 // LPC Masked Interrupt Status
  63. #define LPC_O_IC 0x0000010C // LPC Interrupt Clear
  64. #define LPC_O_DMACX 0x00000120 // LPC DMA and COMx Control
  65. #define LPC_O_POOL 0x00000400 // LPC Register Pool
  66. #define LPC_O_PP 0x00000FC0 // LPC Peripheral Properties
  67. //*****************************************************************************
  68. //
  69. // The following are defines for the bit fields in the LPC_O_CTL register.
  70. //
  71. //*****************************************************************************
  72. #define LPC_CTL_SCICNT_M 0x00000C00 // LPC0SCI Pulse Length
  73. #define LPC_CTL_SCICNT_0 0x00000000 // No pulse occurs on the LPC0SCI
  74. // pin
  75. #define LPC_CTL_SCICNT_2 0x00000400 // The pulse on the LPC0SCI pin is
  76. // 2 LPC0CLK periods
  77. #define LPC_CTL_SCICNT_4 0x00000800 // The pulse on the LPC0SCI pin is
  78. // 4 LPC0CLK periods
  79. #define LPC_CTL_SCICNT_8 0x00000C00 // The pulse on the LPC0SCI pin is
  80. // 8 LPC0CLK periods
  81. #define LPC_CTL_SCI 0x00000200 // Start SCI Pulse
  82. #define LPC_CTL_WAKE 0x00000100 // Restart the LPC Bus
  83. #define LPC_CTL_CE7 0x00000080 // Enable Channel 7
  84. #define LPC_CTL_CE6 0x00000040 // Enable Channel 6
  85. #define LPC_CTL_CE5 0x00000020 // Enable Channel 5
  86. #define LPC_CTL_CE4 0x00000010 // Enable Channel 4
  87. #define LPC_CTL_CE3 0x00000008 // Enable Channel 3
  88. #define LPC_CTL_CE2 0x00000004 // Enable Channel 2
  89. #define LPC_CTL_CE1 0x00000002 // Enable Channel 1
  90. #define LPC_CTL_CE0 0x00000001 // Enable Channel 0
  91. //*****************************************************************************
  92. //
  93. // The following are defines for the bit fields in the LPC_O_STS register.
  94. //
  95. //*****************************************************************************
  96. #define LPC_STS_CHCNT_M 0x00700000 // Number of Channels
  97. #define LPC_STS_POOLSZ_M 0x00070000 // Register Pool Size
  98. #define LPC_STS_POOLSZ_256 0x00010000 // 256 bytes
  99. #define LPC_STS_POOLSZ_512 0x00020000 // 512 bytes
  100. #define LPC_STS_POOLSZ_768 0x00030000 // 768 bytes
  101. #define LPC_STS_POOLSZ_1024 0x00040000 // 1024 bytes
  102. #define LPC_STS_RST 0x00000400 // LPC is in Reset
  103. #define LPC_STS_BUSY 0x00000200 // LPC is Busy
  104. #define LPC_STS_SLEEP 0x00000100 // LPC is in Sleep Mode
  105. #define LPC_STS_CA7 0x00000080 // Channel 7 Active
  106. #define LPC_STS_CA6 0x00000040 // Channel 6 Active
  107. #define LPC_STS_CA5 0x00000020 // Channel 5 Active
  108. #define LPC_STS_CA4 0x00000010 // Channel 4 Active
  109. #define LPC_STS_CA3 0x00000008 // Channel 3 Active
  110. #define LPC_STS_CA2 0x00000004 // Channel 2 Active
  111. #define LPC_STS_CA1 0x00000002 // Channel 1 Active
  112. #define LPC_STS_CA0 0x00000001 // Channel 0 Active
  113. #define LPC_STS_CHCNT_S 20
  114. //*****************************************************************************
  115. //
  116. // The following are defines for the bit fields in the LPC_O_IRQCTL register.
  117. //
  118. //*****************************************************************************
  119. #define LPC_IRQCTL_I15 0x80000000 // Manual IRQ15 State
  120. #define LPC_IRQCTL_I14 0x40000000 // Manual IRQ14 State
  121. #define LPC_IRQCTL_I13 0x20000000 // Manual IRQ13 State
  122. #define LPC_IRQCTL_I12 0x10000000 // Manual IRQ12 State
  123. #define LPC_IRQCTL_I11 0x08000000 // Manual IRQ11 State
  124. #define LPC_IRQCTL_I10 0x04000000 // Manual IRQ10 State
  125. #define LPC_IRQCTL_I9 0x02000000 // Manual IRQ9 State
  126. #define LPC_IRQCTL_I8 0x01000000 // Manual IRQ8 State
  127. #define LPC_IRQCTL_I7 0x00800000 // Manual IRQ7 State
  128. #define LPC_IRQCTL_I6 0x00400000 // Manual IRQ6 State
  129. #define LPC_IRQCTL_I5 0x00200000 // Manual IRQ5 State
  130. #define LPC_IRQCTL_I4 0x00100000 // Manual IRQ4 State
  131. #define LPC_IRQCTL_I3 0x00080000 // Manual IRQ3 State
  132. #define LPC_IRQCTL_I2 0x00040000 // Manual IRQ2 State
  133. #define LPC_IRQCTL_I1 0x00020000 // Manual IRQ1 State
  134. #define LPC_IRQCTL_AH 0x00010000 // Active High Control
  135. #define LPC_IRQCTL_PULSE 0x00000004 // Pulse IRQ States
  136. #define LPC_IRQCTL_ONCHG 0x00000002 // Initiate on Change
  137. #define LPC_IRQCTL_SND 0x00000001 // Initiate Immediately
  138. //*****************************************************************************
  139. //
  140. // The following are defines for the bit fields in the LPC_O_IRQST register.
  141. //
  142. //*****************************************************************************
  143. #define LPC_IRQST_I15 0x80000000 // Host IRQ15 State
  144. #define LPC_IRQST_I14 0x40000000 // IRQ14 State
  145. #define LPC_IRQST_I13 0x20000000 // IRQ13 State
  146. #define LPC_IRQST_I12 0x10000000 // IRQ12 State
  147. #define LPC_IRQST_I11 0x08000000 // IRQ11 State
  148. #define LPC_IRQST_I10 0x04000000 // IRQ10 State
  149. #define LPC_IRQST_I9 0x02000000 // IRQ9 State
  150. #define LPC_IRQST_I8 0x01000000 // IRQ8 State
  151. #define LPC_IRQST_I7 0x00800000 // IRQ7 State
  152. #define LPC_IRQST_I6 0x00400000 // IRQ6 State
  153. #define LPC_IRQST_I5 0x00200000 // IRQ5 State
  154. #define LPC_IRQST_I4 0x00100000 // IRQ4 State
  155. #define LPC_IRQST_I3 0x00080000 // IRQ3 State
  156. #define LPC_IRQST_I2 0x00040000 // IRQ2 State
  157. #define LPC_IRQST_I1 0x00020000 // IRQ1 State
  158. #define LPC_IRQST_I0 0x00010000 // IRQ0 State
  159. #define LPC_IRQST_SIRQ 0x00000004 // Pulse IRQ States
  160. #define LPC_IRQST_CONT 0x00000001 // Initiate Immediately
  161. //*****************************************************************************
  162. //
  163. // The following are defines for the bit fields in the LPC_O_CH0CTL register.
  164. //
  165. //*****************************************************************************
  166. #define LPC_CH0CTL_IRQSEL2_M 0xF0000000 // IRQ Select 2
  167. #define LPC_CH0CTL_IRQSEL1_M 0x0F000000 // IRQ Select 1
  168. #define LPC_CH0CTL_IRQSEL0_M 0x00F00000 // IRQ Select 0
  169. #define LPC_CH0CTL_IRQEN2 0x00080000 // IRQ Enable 2
  170. #define LPC_CH0CTL_CX 0x00080000 // IRQ Enable 2
  171. #define LPC_CH0CTL_IRQEN1 0x00040000 // IRQ Enable 1
  172. #define LPC_CH0CTL_IRQEN0_M 0x00030000 // IRQ Enable 0
  173. #define LPC_CH0CTL_IRQEN0_DIS 0x00000000 // Trigger disabled
  174. #define LPC_CH0CTL_IRQEN0_TRIG1 0x00010000 // Trigger 1
  175. #define LPC_CH0CTL_IRQEN0_TRIG2 0x00020000 // Trigger 2
  176. #define LPC_CH0CTL_IRQEN0_TRIG3 0x00030000 // Trigger 3
  177. #define LPC_CH0CTL_ARBDIS 0x00008000 // Arbitration Disabled
  178. #define LPC_CH0CTL_OFFSET_M 0x00003FE0 // Base Offset in Register Pool
  179. #define LPC_CH0CTL_AMASK_M 0x0000001C // Address Mask for Ranges
  180. #define LPC_CH0CTL_AMASK_4 0x00000000 // Address mask of 0x3; mailbox
  181. // size of 4 bytes for an endpoint
  182. // range or used for single
  183. // endpoints
  184. #define LPC_CH0CTL_AMASK_8 0x00000004 // Address mask of 0x7; mailbox
  185. // size of 8 bytes
  186. #define LPC_CH0CTL_AMASK_16 0x00000008 // Address mask of 0xF; mailbox
  187. // size of 16 bytes
  188. #define LPC_CH0CTL_AMASK_32 0x0000000C // Address mask of 0x1F; mailbox
  189. // size of 32 bytes
  190. #define LPC_CH0CTL_AMASK_64 0x00000010 // Address mask of 0x3F; mailbox
  191. // size of 64 bytes
  192. #define LPC_CH0CTL_AMASK_128 0x00000014 // Address mask of 0x7F; mailbox
  193. // size of 128 bytes
  194. #define LPC_CH0CTL_AMASK_256 0x00000018 // Address mask of 0xFF; mailbox
  195. // size of 256 bytes
  196. #define LPC_CH0CTL_AMASK_512 0x0000001C // Address mask of 0x1FF; mailbox
  197. // size of 512 bytes
  198. #define LPC_CH0CTL_TYPE 0x00000001 // Channel Type
  199. #define LPC_CH0CTL_IRQSEL2_S 28
  200. #define LPC_CH0CTL_IRQSEL1_S 24
  201. #define LPC_CH0CTL_IRQSEL0_S 20
  202. #define LPC_CH0CTL_OFFSET_S 5
  203. //*****************************************************************************
  204. //
  205. // The following are defines for the bit fields in the LPC_O_CH0ST register.
  206. //
  207. //*****************************************************************************
  208. #define LPC_CH0ST_USER_M 0x00001F00 // User Data
  209. #define LPC_CH0ST_LASTHW 0x00000080 // Last Host Write
  210. #define LPC_CH0ST_HW1ST 0x00000040 // First Host Write
  211. #define LPC_CH0ST_LASTSW 0x00000020 // Last Slave Write
  212. #define LPC_CH0ST_SW1ST 0x00000010 // First Slave Write
  213. #define LPC_CH0ST_CMD 0x00000008 // Command or Data
  214. #define LPC_CH0ST_FRMH 0x00000002 // From-Host Transaction
  215. #define LPC_CH0ST_TOH 0x00000001 // To-Host Transaction
  216. #define LPC_CH0ST_USER_S 8
  217. //*****************************************************************************
  218. //
  219. // The following are defines for the bit fields in the LPC_O_CH0ADR register.
  220. //
  221. //*****************************************************************************
  222. #define LPC_CH0ADR_ADDRH_M 0xFFFF0000 // Upper Address Match
  223. #define LPC_CH0ADR_ADDRL_M 0x0000FFF8 // Lower Address Match
  224. #define LPC_CH0ADR_ADDRL1 0x00000002 // Endpoint Match Bit 1
  225. #define LPC_CH0ADR_ADDRH_S 16
  226. #define LPC_CH0ADR_ADDRL_S 3
  227. //*****************************************************************************
  228. //
  229. // The following are defines for the bit fields in the LPC_O_CH1CTL register.
  230. //
  231. //*****************************************************************************
  232. #define LPC_CH1CTL_IRQSEL2_M 0xF0000000 // IRQ Select 2
  233. #define LPC_CH1CTL_IRQSEL1_M 0x0F000000 // IRQ Select 1
  234. #define LPC_CH1CTL_IRQSEL0_M 0x00F00000 // IRQ Select 0
  235. #define LPC_CH1CTL_IRQEN2 0x00080000 // IRQ Enable 2
  236. #define LPC_CH1CTL_CX 0x00080000 // IRQ Enable 2
  237. #define LPC_CH1CTL_IRQEN1 0x00040000 // IRQ Enable 1
  238. #define LPC_CH1CTL_IRQEN0_M 0x00030000 // IRQ Enable 0
  239. #define LPC_CH1CTL_IRQEN0_DIS 0x00000000 // Trigger disabled
  240. #define LPC_CH1CTL_IRQEN0_TRIG1 0x00010000 // Trigger 1
  241. #define LPC_CH1CTL_IRQEN0_TRGI2 0x00020000 // Trigger 2
  242. #define LPC_CH1CTL_IRQEN0_TRGI3 0x00030000 // Trigger 3
  243. #define LPC_CH1CTL_ARBDIS 0x00008000 // Arbitration Disabled
  244. #define LPC_CH1CTL_OFFSET_M 0x00003FE0 // Base Offset in Register Pool
  245. #define LPC_CH1CTL_AMASK_M 0x0000001C // Address Mask for Ranges
  246. #define LPC_CH1CTL_AMASK_4 0x00000000 // Address mask of 0x3; mailbox
  247. // size of 4 bytes for an endpoint
  248. // range or used for single
  249. // endpoints
  250. #define LPC_CH1CTL_AMASK_8 0x00000004 // Address mask of 0x7; mailbox
  251. // size of 8 bytes
  252. #define LPC_CH1CTL_AMASK_16 0x00000008 // Address mask of 0xF; mailbox
  253. // size of 16 bytes
  254. #define LPC_CH1CTL_AMASK_32 0x0000000C // Address mask of 0x1F; mailbox
  255. // size of 32 bytes
  256. #define LPC_CH1CTL_AMASK_64 0x00000010 // Address mask of 0x3F; mailbox
  257. // size of 64 bytes
  258. #define LPC_CH1CTL_AMASK_128 0x00000014 // Address mask of 0x7F; mailbox
  259. // size of 128 bytes
  260. #define LPC_CH1CTL_AMASK_256 0x00000018 // Address mask of 0xFF; mailbox
  261. // size of 256 bytes
  262. #define LPC_CH1CTL_AMASK_512 0x0000001C // Address mask of 0x1FF; mailbox
  263. // size of 512 bytes
  264. #define LPC_CH1CTL_TYPE 0x00000001 // Channel Type
  265. #define LPC_CH1CTL_IRQSEL2_S 28
  266. #define LPC_CH1CTL_IRQSEL1_S 24
  267. #define LPC_CH1CTL_IRQSEL0_S 20
  268. #define LPC_CH1CTL_OFFSET_S 5
  269. //*****************************************************************************
  270. //
  271. // The following are defines for the bit fields in the LPC_O_CH1ST register.
  272. //
  273. //*****************************************************************************
  274. #define LPC_CH1ST_USER_M 0x00001F00 // User Data
  275. #define LPC_CH1ST_LASTHW 0x00000080 // Last Host Write
  276. #define LPC_CH1ST_HW1ST 0x00000040 // First Host Write
  277. #define LPC_CH1ST_LASTSW 0x00000020 // Last Slave Write
  278. #define LPC_CH1ST_SW1ST 0x00000010 // First Slave Write
  279. #define LPC_CH1ST_CMD 0x00000008 // Command or Data
  280. #define LPC_CH1ST_FRMH 0x00000002 // From-Host Transaction
  281. #define LPC_CH1ST_TOH 0x00000001 // To-Host Transaction
  282. #define LPC_CH1ST_USER_S 8
  283. //*****************************************************************************
  284. //
  285. // The following are defines for the bit fields in the LPC_O_CH1ADR register.
  286. //
  287. //*****************************************************************************
  288. #define LPC_CH1ADR_ADDRH_M 0xFFFF0000 // Upper Address Match
  289. #define LPC_CH1ADR_ADDRL_M 0x0000FFF8 // Lower Address Match
  290. #define LPC_CH1ADR_ADDRL1 0x00000002 // Endpoint Match Bit 1
  291. #define LPC_CH1ADR_ADDRH_S 16
  292. #define LPC_CH1ADR_ADDRL_S 3
  293. //*****************************************************************************
  294. //
  295. // The following are defines for the bit fields in the LPC_O_CH2CTL register.
  296. //
  297. //*****************************************************************************
  298. #define LPC_CH2CTL_IRQSEL2_M 0xF0000000 // IRQ Select 2
  299. #define LPC_CH2CTL_IRQSEL1_M 0x0F000000 // IRQ Select 1
  300. #define LPC_CH2CTL_IRQSEL0_M 0x00F00000 // IRQ Select 0
  301. #define LPC_CH2CTL_CX 0x00080000 // IRQ Enable 2
  302. #define LPC_CH2CTL_IRQEN2 0x00080000 // IRQ Enable 2
  303. #define LPC_CH2CTL_IRQEN1 0x00040000 // IRQ Enable 1
  304. #define LPC_CH2CTL_IRQEN0_M 0x00030000 // IRQ Enable 0
  305. #define LPC_CH2CTL_IRQEN0_DIS 0x00000000 // Trigger disabled
  306. #define LPC_CH2CTL_IRQEN0_TRIG1 0x00010000 // Trigger 1
  307. #define LPC_CH2CTL_IRQEN0_TRIG2 0x00020000 // Trigger 2
  308. #define LPC_CH2CTL_IRQEN0_TRIG3 0x00030000 // Trigger 3
  309. #define LPC_CH2CTL_ARBDIS 0x00008000 // Arbitration Disabled
  310. #define LPC_CH2CTL_OFFSET_M 0x00003FE0 // Base Offset in Register Pool
  311. #define LPC_CH2CTL_AMASK_M 0x0000001C // Address Mask for Ranges
  312. #define LPC_CH2CTL_AMASK_4 0x00000000 // Address mask of 0x3; mailbox
  313. // size of 4 bytes for an endpoint
  314. // range or used for single
  315. // endpoints
  316. #define LPC_CH2CTL_AMASK_8 0x00000004 // Address mask of 0x7; mailbox
  317. // size of 8 bytes
  318. #define LPC_CH2CTL_AMASK_16 0x00000008 // Address mask of 0xF; mailbox
  319. // size of 16 bytes
  320. #define LPC_CH2CTL_AMASK_32 0x0000000C // Address mask of 0x1F; mailbox
  321. // size of 32 bytes
  322. #define LPC_CH2CTL_AMASK_64 0x00000010 // Address mask of 0x3F; mailbox
  323. // size of 64 bytes
  324. #define LPC_CH2CTL_AMASK_128 0x00000014 // Address mask of 0x7F; mailbox
  325. // size of 128 bytes
  326. #define LPC_CH2CTL_AMASK_256 0x00000018 // Address mask of 0xFF; mailbox
  327. // size of 256 bytes
  328. #define LPC_CH2CTL_AMASK_512 0x0000001C // Address mask of 0x1FF; mailbox
  329. // size of 512 bytes
  330. #define LPC_CH2CTL_TYPE 0x00000001 // Channel Type
  331. #define LPC_CH2CTL_IRQSEL2_S 28
  332. #define LPC_CH2CTL_IRQSEL1_S 24
  333. #define LPC_CH2CTL_IRQSEL0_S 20
  334. #define LPC_CH2CTL_OFFSET_S 5
  335. //*****************************************************************************
  336. //
  337. // The following are defines for the bit fields in the LPC_O_CH2ST register.
  338. //
  339. //*****************************************************************************
  340. #define LPC_CH2ST_USER_M 0x00001F00 // User Data
  341. #define LPC_CH2ST_LASTHW 0x00000080 // Last Host Write
  342. #define LPC_CH2ST_HW1ST 0x00000040 // First Host Write
  343. #define LPC_CH2ST_LASTSW 0x00000020 // Last Slave Write
  344. #define LPC_CH2ST_SW1ST 0x00000010 // First Slave Write
  345. #define LPC_CH2ST_CMD 0x00000008 // Command or Data
  346. #define LPC_CH2ST_FRMH 0x00000002 // From-Host Transaction
  347. #define LPC_CH2ST_TOH 0x00000001 // To-Host Transaction
  348. #define LPC_CH2ST_USER_S 8
  349. //*****************************************************************************
  350. //
  351. // The following are defines for the bit fields in the LPC_O_CH2ADR register.
  352. //
  353. //*****************************************************************************
  354. #define LPC_CH2ADR_ADDRH_M 0xFFFF0000 // Upper Address Match
  355. #define LPC_CH2ADR_ADDRL_M 0x0000FFF8 // Lower Address Match
  356. #define LPC_CH2ADR_ADDRL1 0x00000002 // Endpoint Match Bit 1
  357. #define LPC_CH2ADR_ADDRH_S 16
  358. #define LPC_CH2ADR_ADDRL_S 3
  359. //*****************************************************************************
  360. //
  361. // The following are defines for the bit fields in the LPC_O_CH3CTL register.
  362. //
  363. //*****************************************************************************
  364. #define LPC_CH3CTL_IRQSEL2_M 0xF0000000 // IRQ Select 2
  365. #define LPC_CH3CTL_IRQSEL1_M 0x0F000000 // IRQ Select 1
  366. #define LPC_CH3CTL_IRQSEL0_M 0x00F00000 // IRQ Select 0
  367. #define LPC_CH3CTL_IRQEN2 0x00080000 // IRQ Enable 2
  368. #define LPC_CH3CTL_CX 0x00080000 // IRQ Enable 2
  369. #define LPC_CH3CTL_IRQEN1 0x00040000 // IRQ Enable 1
  370. #define LPC_CH3CTL_IRQEN0_M 0x00030000 // IRQ Enable 0
  371. #define LPC_CH3CTL_IRQEN0_DIS 0x00000000 // Trigger disabled
  372. #define LPC_CH3CTL_IRQEN0_TRIG1 0x00010000 // Trigger 1
  373. #define LPC_CH3CTL_IRQEN0_TRIG2 0x00020000 // Trigger 2
  374. #define LPC_CH3CTL_IRQEN0_TRIG3 0x00030000 // Trigger 3
  375. #define LPC_CH3CTL_ARBDIS 0x00008000 // Arbitration Disabled
  376. #define LPC_CH3CTL_OFFSET_M 0x00003FE0 // Base Offset in Register Pool
  377. #define LPC_CH3CTL_AMASK_M 0x0000001C // Address Mask for Ranges
  378. #define LPC_CH3CTL_AMASK_4 0x00000000 // Address mask of 0x3; mailbox
  379. // size of 4 bytes for an endpoint
  380. // range or used for single
  381. // endpoints
  382. #define LPC_CH3CTL_AMASK_8 0x00000004 // Address mask of 0x7; mailbox
  383. // size of 8 bytes
  384. #define LPC_CH3CTL_AMASK_16 0x00000008 // Address mask of 0xF; mailbox
  385. // size of 16 bytes
  386. #define LPC_CH3CTL_AMASK_32 0x0000000C // Address mask of 0x1F; mailbox
  387. // size of 32 bytes
  388. #define LPC_CH3CTL_AMASK_64 0x00000010 // Address mask of 0x3F; mailbox
  389. // size of 64 bytes
  390. #define LPC_CH3CTL_AMASK_128 0x00000014 // Address mask of 0x7F; mailbox
  391. // size of 128 bytes
  392. #define LPC_CH3CTL_AMASK_256 0x00000018 // Address mask of 0xFF; mailbox
  393. // size of 256 bytes
  394. #define LPC_CH3CTL_AMASK_512 0x0000001C // Address mask of 0x1FF; mailbox
  395. // size of 512 bytes
  396. #define LPC_CH3CTL_TYPE 0x00000001 // Channel Type
  397. #define LPC_CH3CTL_IRQSEL2_S 28
  398. #define LPC_CH3CTL_IRQSEL1_S 24
  399. #define LPC_CH3CTL_IRQSEL0_S 20
  400. #define LPC_CH3CTL_OFFSET_S 5
  401. //*****************************************************************************
  402. //
  403. // The following are defines for the bit fields in the LPC_O_CH3ST register.
  404. //
  405. //*****************************************************************************
  406. #define LPC_CH3ST_USER_M 0x00001F00 // User Data
  407. #define LPC_CH3ST_LASTHW 0x00000080 // Last Host Write
  408. #define LPC_CH3ST_HW1ST 0x00000040 // First Host Write
  409. #define LPC_CH3ST_LASTSW 0x00000020 // Last Slave Write
  410. #define LPC_CH3ST_SW1ST 0x00000010 // First Slave Write
  411. #define LPC_CH3ST_CMD 0x00000008 // Command or Data
  412. #define LPC_CH3ST_FRMH 0x00000002 // From-Host Transaction
  413. #define LPC_CH3ST_TOH 0x00000001 // To-Host Transaction
  414. #define LPC_CH3ST_USER_S 8
  415. //*****************************************************************************
  416. //
  417. // The following are defines for the bit fields in the LPC_O_CH3ADR register.
  418. //
  419. //*****************************************************************************
  420. #define LPC_CH3ADR_ADDRH_M 0xFFFF0000 // Upper Address Match
  421. #define LPC_CH3ADR_ADDRL_M 0x0000FFF8 // Lower Address Match
  422. #define LPC_CH3ADR_ADDRL1 0x00000002 // Endpoint Match Bit 1
  423. #define LPC_CH3ADR_ADDRH_S 16
  424. #define LPC_CH3ADR_ADDRL_S 3
  425. //*****************************************************************************
  426. //
  427. // The following are defines for the bit fields in the LPC_O_CH4CTL register.
  428. //
  429. //*****************************************************************************
  430. #define LPC_CH4CTL_IRQSEL2_M 0xF0000000 // IRQ Select 2
  431. #define LPC_CH4CTL_IRQSEL1_M 0x0F000000 // IRQ Select 1
  432. #define LPC_CH4CTL_IRQSEL0_M 0x00F00000 // IRQ Select 0
  433. #define LPC_CH4CTL_CX 0x00080000 // IRQ Enable 2
  434. #define LPC_CH4CTL_IRQEN2 0x00080000 // IRQ Enable 2
  435. #define LPC_CH4CTL_IRQEN1 0x00040000 // IRQ Enable 1
  436. #define LPC_CH4CTL_IRQEN0_M 0x00030000 // IRQ Enable 0
  437. #define LPC_CH4CTL_IRQEN0_DIS 0x00000000 // Trigger disabled
  438. #define LPC_CH4CTL_IRQEN0_TRIG1 0x00010000 // Trigger 1
  439. #define LPC_CH4CTL_IRQEN0_TRIG2 0x00020000 // Trigger 2
  440. #define LPC_CH4CTL_IRQEN0_TRIG3 0x00030000 // Trigger 3
  441. #define LPC_CH4CTL_ARBDIS 0x00008000 // Arbitration Disabled
  442. #define LPC_CH4CTL_OFFSET_M 0x00003FE0 // Base Offset in Register Pool
  443. #define LPC_CH4CTL_AMASK_M 0x0000001C // Address Mask for Ranges
  444. #define LPC_CH4CTL_AMASK_4 0x00000000 // Address mask of 0x3; mailbox
  445. // size of 4 bytes for an endpoint
  446. // range or used for single
  447. // endpoints
  448. #define LPC_CH4CTL_AMASK_8 0x00000004 // Address mask of 0x7; mailbox
  449. // size of 8 bytes
  450. #define LPC_CH4CTL_AMASK_16 0x00000008 // Address mask of 0xF; mailbox
  451. // size of 16 bytes
  452. #define LPC_CH4CTL_AMASK_32 0x0000000C // Address mask of 0x1F; mailbox
  453. // size of 32 bytes
  454. #define LPC_CH4CTL_AMASK_64 0x00000010 // Address mask of 0x3F; mailbox
  455. // size of 64 bytes
  456. #define LPC_CH4CTL_AMASK_128 0x00000014 // Address mask of 0x7F; mailbox
  457. // size of 128 bytes
  458. #define LPC_CH4CTL_AMASK_256 0x00000018 // Address mask of 0xFF; mailbox
  459. // size of 256 bytes
  460. #define LPC_CH4CTL_AMASK_512 0x0000001C // Address mask of 0x1FF; mailbox
  461. // size of 512 bytes
  462. #define LPC_CH4CTL_TYPE 0x00000001 // Channel Type
  463. #define LPC_CH4CTL_IRQSEL2_S 28
  464. #define LPC_CH4CTL_IRQSEL1_S 24
  465. #define LPC_CH4CTL_IRQSEL0_S 20
  466. #define LPC_CH4CTL_OFFSET_S 5
  467. //*****************************************************************************
  468. //
  469. // The following are defines for the bit fields in the LPC_O_CH4ST register.
  470. //
  471. //*****************************************************************************
  472. #define LPC_CH4ST_USER_M 0x00001F00 // User Data
  473. #define LPC_CH4ST_LASTHW 0x00000080 // Last Host Write
  474. #define LPC_CH4ST_HW1ST 0x00000040 // First Host Write
  475. #define LPC_CH4ST_LASTSW 0x00000020 // Last Slave Write
  476. #define LPC_CH4ST_SW1ST 0x00000010 // First Slave Write
  477. #define LPC_CH4ST_CMD 0x00000008 // Command or Data
  478. #define LPC_CH4ST_FRMH 0x00000002 // From-Host Transaction
  479. #define LPC_CH4ST_TOH 0x00000001 // To-Host Transaction
  480. #define LPC_CH4ST_USER_S 8
  481. //*****************************************************************************
  482. //
  483. // The following are defines for the bit fields in the LPC_O_CH4ADR register.
  484. //
  485. //*****************************************************************************
  486. #define LPC_CH4ADR_ADDRH_M 0xFFFF0000 // Upper Address Match
  487. #define LPC_CH4ADR_ADDRL_M 0x0000FFF8 // Lower Address Match
  488. #define LPC_CH4ADR_ADDRH_S 16
  489. #define LPC_CH4ADR_ADDRL_S 3
  490. //*****************************************************************************
  491. //
  492. // The following are defines for the bit fields in the LPC_O_CH5CTL register.
  493. //
  494. //*****************************************************************************
  495. #define LPC_CH5CTL_IRQSEL2_M 0xF0000000 // IRQ Select 2
  496. #define LPC_CH5CTL_IRQSEL1_M 0x0F000000 // IRQ Select 1
  497. #define LPC_CH5CTL_IRQSEL0_M 0x00F00000 // IRQ Select 0
  498. #define LPC_CH5CTL_IRQEN2 0x00080000 // IRQ Enable 2
  499. #define LPC_CH5CTL_CX 0x00080000 // IRQ Enable 2
  500. #define LPC_CH5CTL_IRQEN1 0x00040000 // IRQ Enable 1
  501. #define LPC_CH5CTL_IRQEN0_M 0x00030000 // IRQ Enable 0
  502. #define LPC_CH5CTL_IRQEN0_DIS 0x00000000 // Trigger disabled
  503. #define LPC_CH5CTL_IRQEN0_TRIG1 0x00010000 // Trigger 1
  504. #define LPC_CH5CTL_IRQEN0_TRIG2 0x00020000 // Trigger 2
  505. #define LPC_CH5CTL_IRQEN0_TRIG3 0x00030000 // Trigger 3
  506. #define LPC_CH5CTL_ARBDIS 0x00008000 // Arbitration Disabled
  507. #define LPC_CH5CTL_OFFSET_M 0x00003FE0 // Base Offset in Register Pool
  508. #define LPC_CH5CTL_AMASK_M 0x0000001C // Address Mask for Ranges
  509. #define LPC_CH5CTL_AMASK_4 0x00000000 // Address mask of 0x3; mailbox
  510. // size of 4 bytes for an endpoint
  511. // range or used for single
  512. // endpoints
  513. #define LPC_CH5CTL_AMASK_8 0x00000004 // Address mask of 0x7; mailbox
  514. // size of 8 bytes
  515. #define LPC_CH5CTL_AMASK_16 0x00000008 // Address mask of 0xF; mailbox
  516. // size of 16 bytes
  517. #define LPC_CH5CTL_AMASK_32 0x0000000C // Address mask of 0x1F; mailbox
  518. // size of 32 bytes
  519. #define LPC_CH5CTL_AMASK_64 0x00000010 // Address mask of 0x3F; mailbox
  520. // size of 64 bytes
  521. #define LPC_CH5CTL_AMASK_128 0x00000014 // Address mask of 0x7F; mailbox
  522. // size of 128 bytes
  523. #define LPC_CH5CTL_AMASK_256 0x00000018 // Address mask of 0xFF; mailbox
  524. // size of 256 bytes
  525. #define LPC_CH5CTL_AMASK_512 0x0000001C // Address mask of 0x1FF; mailbox
  526. // size of 512 bytes
  527. #define LPC_CH5CTL_TYPE 0x00000001 // Channel Type
  528. #define LPC_CH5CTL_IRQSEL2_S 28
  529. #define LPC_CH5CTL_IRQSEL1_S 24
  530. #define LPC_CH5CTL_IRQSEL0_S 20
  531. #define LPC_CH5CTL_OFFSET_S 5
  532. //*****************************************************************************
  533. //
  534. // The following are defines for the bit fields in the LPC_O_CH5ST register.
  535. //
  536. //*****************************************************************************
  537. #define LPC_CH5ST_USER_M 0x00001F00 // User Data
  538. #define LPC_CH5ST_LASTHW 0x00000080 // Last Host Write
  539. #define LPC_CH5ST_HW1ST 0x00000040 // First Host Write
  540. #define LPC_CH5ST_LASTSW 0x00000020 // Last Slave Write
  541. #define LPC_CH5ST_SW1ST 0x00000010 // First Slave Write
  542. #define LPC_CH5ST_CMD 0x00000008 // Command or Data
  543. #define LPC_CH5ST_FRMH 0x00000002 // From-Host Transaction
  544. #define LPC_CH5ST_TOH 0x00000001 // To-Host Transaction
  545. #define LPC_CH5ST_USER_S 8
  546. //*****************************************************************************
  547. //
  548. // The following are defines for the bit fields in the LPC_O_CH5ADR register.
  549. //
  550. //*****************************************************************************
  551. #define LPC_CH5ADR_ADDRH_M 0xFFFF0000 // Upper Address Match
  552. #define LPC_CH5ADR_ADDRL_M 0x0000FFF8 // Lower Address Match
  553. #define LPC_CH5ADR_ADDRH_S 16
  554. #define LPC_CH5ADR_ADDRL_S 3
  555. //*****************************************************************************
  556. //
  557. // The following are defines for the bit fields in the LPC_O_CH6CTL register.
  558. //
  559. //*****************************************************************************
  560. #define LPC_CH6CTL_IRQSEL2_M 0xF0000000 // IRQ Select 2
  561. #define LPC_CH6CTL_IRQSEL1_M 0x0F000000 // IRQ Select 1
  562. #define LPC_CH6CTL_IRQSEL0_M 0x00F00000 // IRQ Select 0
  563. #define LPC_CH6CTL_CX 0x00080000 // IRQ Enable 2
  564. #define LPC_CH6CTL_IRQEN2 0x00080000 // IRQ Enable 2
  565. #define LPC_CH6CTL_IRQEN1 0x00040000 // IRQ Enable 1
  566. #define LPC_CH6CTL_IRQEN0_M 0x00030000 // IRQ Enable 0
  567. #define LPC_CH6CTL_IRQEN0_DIS 0x00000000 // Trigger disabled
  568. #define LPC_CH6CTL_IRQEN0_TRIG1 0x00010000 // Trigger 1
  569. #define LPC_CH6CTL_IRQEN0_TRIG2 0x00020000 // Trigger 2
  570. #define LPC_CH6CTL_IRQEN0_TRIG3 0x00030000 // Trigger 3
  571. #define LPC_CH6CTL_ARBDIS 0x00008000 // Arbitration Disabled
  572. #define LPC_CH6CTL_OFFSET_M 0x00003FE0 // Base Offset in Register Pool
  573. #define LPC_CH6CTL_AMASK_M 0x0000001C // Address Mask for Ranges
  574. #define LPC_CH6CTL_AMASK_4 0x00000000 // Address mask of 0x3; mailbox
  575. // size of 4 bytes for an endpoint
  576. // range or used for single
  577. // endpoints
  578. #define LPC_CH6CTL_AMASK_8 0x00000004 // Address mask of 0x7; mailbox
  579. // size of 8 bytes
  580. #define LPC_CH6CTL_AMASK_16 0x00000008 // Address mask of 0xF; mailbox
  581. // size of 16 bytes
  582. #define LPC_CH6CTL_AMASK_32 0x0000000C // Address mask of 0x1F; mailbox
  583. // size of 32 bytes
  584. #define LPC_CH6CTL_AMASK_64 0x00000010 // Address mask of 0x3F; mailbox
  585. // size of 64 bytes
  586. #define LPC_CH6CTL_AMASK_128 0x00000014 // Address mask of 0x7F; mailbox
  587. // size of 128 bytes
  588. #define LPC_CH6CTL_AMASK_256 0x00000018 // Address mask of 0xFF; mailbox
  589. // size of 256 bytes
  590. #define LPC_CH6CTL_AMASK_512 0x0000001C // Address mask of 0x1FF; mailbox
  591. // size of 512 bytes
  592. #define LPC_CH6CTL_TYPE 0x00000001 // Channel Type
  593. #define LPC_CH6CTL_IRQSEL2_S 28
  594. #define LPC_CH6CTL_IRQSEL1_S 24
  595. #define LPC_CH6CTL_IRQSEL0_S 20
  596. #define LPC_CH6CTL_OFFSET_S 5
  597. //*****************************************************************************
  598. //
  599. // The following are defines for the bit fields in the LPC_O_CH6ST register.
  600. //
  601. //*****************************************************************************
  602. #define LPC_CH6ST_USER_M 0x00001F00 // User Data
  603. #define LPC_CH6ST_LASTHW 0x00000080 // Last Host Write
  604. #define LPC_CH6ST_HW1ST 0x00000040 // First Host Write
  605. #define LPC_CH6ST_LASTSW 0x00000020 // Last Slave Write
  606. #define LPC_CH6ST_SW1ST 0x00000010 // First Slave Write
  607. #define LPC_CH6ST_CMD 0x00000008 // Command or Data
  608. #define LPC_CH6ST_FRMH 0x00000002 // From-Host Transaction
  609. #define LPC_CH6ST_TOH 0x00000001 // To-Host Transaction
  610. #define LPC_CH6ST_USER_S 8
  611. //*****************************************************************************
  612. //
  613. // The following are defines for the bit fields in the LPC_O_CH6ADR register.
  614. //
  615. //*****************************************************************************
  616. #define LPC_CH6ADR_ADDRH_M 0xFFFF0000 // Upper Address Match
  617. #define LPC_CH6ADR_ADDRL_M 0x0000FFF8 // Lower Address Match
  618. #define LPC_CH6ADR_ADDRH_S 16
  619. #define LPC_CH6ADR_ADDRL_S 3
  620. //*****************************************************************************
  621. //
  622. // The following are defines for the bit fields in the LPC_O_CH7CTL register.
  623. //
  624. //*****************************************************************************
  625. #define LPC_CH7CTL_IRQSEL2_M 0xF0000000 // IRQ Select 2
  626. #define LPC_CH7CTL_IRQSEL1_M 0x0F000000 // IRQ Select 1
  627. #define LPC_CH7CTL_IRQSEL0_M 0x00F00000 // IRQ Select 0
  628. #define LPC_CH7CTL_CX 0x00080000 // IRQ Enable 2
  629. #define LPC_CH7CTL_IRQEN2 0x00080000 // IRQ Enable 2
  630. #define LPC_CH7CTL_IRQEN1 0x00040000 // IRQ Enable 1
  631. #define LPC_CH7CTL_IRQEN0_M 0x00030000 // IRQ Enable 0
  632. #define LPC_CH7CTL_IRQEN0_AUTO 0x00000000 // The automatic IRQ trigger is
  633. // disabled
  634. #define LPC_CH7CTL_IRQEN0_MST 0x00010000 // If TYPE is set, the IRQ selected
  635. // by IRQSEL0 is triggered when the
  636. // master wins arbitration (the
  637. // HW1ST bit is set)
  638. #define LPC_CH7CTL_IRQEN0_SLV 0x00020000 // If TYPE is set, the IRQ selected
  639. // by IRQSEL0 is triggered when the
  640. // slave wins arbitration (the
  641. // SW1ST bit is set)
  642. #define LPC_CH7CTL_IRQEN0_TRIG3 0x00030000 // Trigger 3
  643. #define LPC_CH7CTL_ARBDIS 0x00008000 // Arbitration Disabled
  644. #define LPC_CH7CTL_OFFSET_M 0x00003FE0 // Base Offset in Register Pool
  645. #define LPC_CH7CTL_AMASK_M 0x0000001C // Address Mask for Ranges
  646. #define LPC_CH7CTL_AMASK_4 0x00000000 // Address mask of 0x3; mailbox
  647. // size of 4 bytes for an endpoint
  648. // range or used for single
  649. // endpoints
  650. #define LPC_CH7CTL_AMASK_8 0x00000004 // Address mask of 0x7; mailbox
  651. // size of 8 bytes
  652. #define LPC_CH7CTL_AMASK_16 0x00000008 // Address mask of 0xF; mailbox
  653. // size of 16 bytes
  654. #define LPC_CH7CTL_AMASK_32 0x0000000C // Address mask of 0x1F; mailbox
  655. // size of 32 bytes
  656. #define LPC_CH7CTL_AMASK_64 0x00000010 // Address mask of 0x3F; mailbox
  657. // size of 64 bytes
  658. #define LPC_CH7CTL_AMASK_128 0x00000014 // Address mask of 0x7F; mailbox
  659. // size of 128 bytes
  660. #define LPC_CH7CTL_AMASK_256 0x00000018 // Address mask of 0xFF; mailbox
  661. // size of 256 bytes
  662. #define LPC_CH7CTL_AMASK_512 0x0000001C // Address mask of 0x1FF; mailbox
  663. // size of 512 bytes
  664. #define LPC_CH7CTL_TYPE 0x00000001 // Channel Type
  665. #define LPC_CH7CTL_IRQSEL2_S 28
  666. #define LPC_CH7CTL_IRQSEL1_S 24
  667. #define LPC_CH7CTL_IRQSEL0_S 20
  668. #define LPC_CH7CTL_OFFSET_S 5
  669. //*****************************************************************************
  670. //
  671. // The following are defines for the bit fields in the LPC_O_CH7ST register.
  672. //
  673. //*****************************************************************************
  674. #define LPC_CH7ST_USER_M 0x00001F00 // User Data
  675. #define LPC_CH7ST_LASTHW 0x00000080 // Last Host Write
  676. #define LPC_CH7ST_HW1ST 0x00000040 // Host Wrote First
  677. #define LPC_CH7ST_LASTSW 0x00000020 // Last Slave Write
  678. #define LPC_CH7ST_SW1ST 0x00000010 // Slave Wrote First
  679. #define LPC_CH7ST_CMD 0x00000008 // Command or Data
  680. #define LPC_CH7ST_FRMH 0x00000002 // From-Host Transaction
  681. #define LPC_CH7ST_TOH 0x00000001 // To-Host Transaction
  682. #define LPC_CH7ST_USER_S 8
  683. //*****************************************************************************
  684. //
  685. // The following are defines for the bit fields in the LPC_O_CH7ADR register.
  686. //
  687. //*****************************************************************************
  688. #define LPC_CH7ADR_ADDRH_M 0xFFFF0000 // Upper Address Match
  689. #define LPC_CH7ADR_ADDRL_M 0x0000FFF8 // Lower Address Match
  690. #define LPC_CH7ADR_ADDRH_S 16
  691. #define LPC_CH7ADR_ADDRL_S 3
  692. //*****************************************************************************
  693. //
  694. // The following are defines for the bit fields in the LPC_O_STSADDR register.
  695. //
  696. //*****************************************************************************
  697. #define LPC_STSADDR_ADDRH_M 0xFFFF0000 // Upper Address Match
  698. #define LPC_STSADDR_ADDRL_M 0x0000FFF8 // Lower Address Match
  699. #define LPC_STSADDR_ENA 0x00000001 // Enable Status Block
  700. #define LPC_STSADDR_ADDRH_S 16
  701. #define LPC_STSADDR_ADDRL_S 3
  702. //*****************************************************************************
  703. //
  704. // The following are defines for the bit fields in the LPC_O_IM register.
  705. //
  706. //*****************************************************************************
  707. #define LPC_IM_RSTIM 0x80000000 // Reset State Interrupt Mask
  708. #define LPC_IM_SLEEPIM 0x40000000 // Sleep State Interrupt Mask
  709. #define LPC_IM_COMXIM 0x20000000 // COMx Interrupt Mask
  710. #define LPC_IM_SIRQIM 0x10000000 // SERIRQ Frame Complete Interrupt
  711. // Mask
  712. #define LPC_IM_CH6IM3 0x08000000 // Channel 6 Interrupt Mask 3
  713. #define LPC_IM_CH6IM2 0x04000000 // Channel 6 Interrupt Mask 2
  714. #define LPC_IM_CH6IM1 0x02000000 // Channel 6 Interrupt Mask 1
  715. #define LPC_IM_CH6IM0 0x01000000 // Channel 6 Interrupt Mask 0
  716. #define LPC_IM_CH5IM3 0x00800000 // Channel 5 Interrupt Mask 3
  717. #define LPC_IM_CH5IM2 0x00400000 // Channel 5 Interrupt Mask 2
  718. #define LPC_IM_CH5IM1 0x00200000 // Channel 5 Interrupt Mask 1
  719. #define LPC_IM_CH5IM0 0x00100000 // Channel 5 Interrupt Mask 0
  720. #define LPC_IM_CH4IM3 0x00080000 // Channel 4 Interrupt Mask 3
  721. #define LPC_IM_CH4IM2 0x00040000 // Channel 4 Interrupt Mask 2
  722. #define LPC_IM_CH4IM1 0x00020000 // Channel 4 Interrupt Mask 1
  723. #define LPC_IM_CH4IM0 0x00010000 // Channel 4 Interrupt Mask 0
  724. #define LPC_IM_CH3IM3 0x00008000 // Channel 3 Interrupt Mask 3
  725. #define LPC_IM_CH3IM2 0x00004000 // Channel 3 Interrupt Mask 2
  726. #define LPC_IM_CH3IM1 0x00002000 // Channel 3 Interrupt Mask 1
  727. #define LPC_IM_CH3IM0 0x00001000 // Channel 3 Interrupt Mask 0
  728. #define LPC_IM_CH2IM3 0x00000800 // Channel 2 Interrupt Mask 3
  729. #define LPC_IM_CH2IM2 0x00000400 // Channel 2 Interrupt Mask 2
  730. #define LPC_IM_CH2IM1 0x00000200 // Channel 2 Interrupt Mask 1
  731. #define LPC_IM_CH2IM0 0x00000100 // Channel 2 Interrupt Mask 0
  732. #define LPC_IM_CH1IM3 0x00000080 // Channel 1 Interrupt Mask 3
  733. #define LPC_IM_CH1IM2 0x00000040 // Channel 1 Interrupt Mask 2
  734. #define LPC_IM_CH1IM1 0x00000020 // Channel 1 Interrupt Mask 1
  735. #define LPC_IM_CH1IM0 0x00000010 // Channel 1 Interrupt Mask 0
  736. #define LPC_IM_CH0IM3 0x00000008 // Channel 0 Interrupt Mask 3
  737. #define LPC_IM_CH0IM2 0x00000004 // Channel 0 Interrupt Mask 2
  738. #define LPC_IM_CH0IM1 0x00000002 // Channel 0 Interrupt Mask 1
  739. #define LPC_IM_CH0IM0 0x00000001 // Channel 0 Interrupt Mask 0
  740. //*****************************************************************************
  741. //
  742. // The following are defines for the bit fields in the LPC_O_RIS register.
  743. //
  744. //*****************************************************************************
  745. #define LPC_RIS_RSTRIS 0x80000000 // Reset State Raw Interrupt Status
  746. #define LPC_RIS_SLEEPRIS 0x40000000 // Sleep State Raw Interrupt Status
  747. #define LPC_RIS_COMXRIS 0x20000000 // COMx Raw Interrupt Status
  748. #define LPC_RIS_SIRQRIS 0x10000000 // SERIRQ Frame Complete Raw
  749. // Interrupt Status
  750. #define LPC_RIS_CH6RIS3 0x08000000 // Channel 6 Raw Interrupt Status 3
  751. #define LPC_RIS_CH6RIS2 0x04000000 // Channel 6 Raw Interrupt Status 2
  752. #define LPC_RIS_CH6RIS1 0x02000000 // Channel 6 Raw Interrupt Status 1
  753. #define LPC_RIS_CH6RIS0 0x01000000 // Channel 6 Raw Interrupt Status 0
  754. #define LPC_RIS_CH5RIS3 0x00800000 // Channel 5 Raw Interrupt Status 3
  755. #define LPC_RIS_CH5RIS2 0x00400000 // Channel 5 Raw Interrupt Status 2
  756. #define LPC_RIS_CH5RIS1 0x00200000 // Channel 5 Raw Interrupt Status 1
  757. #define LPC_RIS_CH5RIS0 0x00100000 // Channel 5 Raw Interrupt Status 0
  758. #define LPC_RIS_CH4RIS3 0x00080000 // Channel 4 Raw Interrupt Status 3
  759. #define LPC_RIS_CH4RIS2 0x00040000 // Channel 4 Raw Interrupt Status 2
  760. #define LPC_RIS_CH4RIS1 0x00020000 // Channel 4 Raw Interrupt Status 1
  761. #define LPC_RIS_CH4RIS0 0x00010000 // Channel 4 Raw Interrupt Status 0
  762. #define LPC_RIS_CH3RIS3 0x00008000 // Channel 3 Raw Interrupt Status 3
  763. #define LPC_RIS_CH3RIS2 0x00004000 // Channel 3 Raw Interrupt Status 2
  764. #define LPC_RIS_CH3RIS1 0x00002000 // Channel 3 Raw Interrupt Status 1
  765. #define LPC_RIS_CH3RIS0 0x00001000 // Channel 3 Raw Interrupt Status 0
  766. #define LPC_RIS_CH2RIS3 0x00000800 // Channel 2 Raw Interrupt Status 3
  767. #define LPC_RIS_CH2RIS2 0x00000400 // Channel 2 Raw Interrupt Status 2
  768. #define LPC_RIS_CH2RIS1 0x00000200 // Channel 2 Raw Interrupt Status 1
  769. #define LPC_RIS_CH2RIS0 0x00000100 // Channel 2 Raw Interrupt Status 0
  770. #define LPC_RIS_CH1RIS3 0x00000080 // Channel 1 Raw Interrupt Status 3
  771. #define LPC_RIS_CH1RIS2 0x00000040 // Channel 1 Raw Interrupt Status 2
  772. #define LPC_RIS_CH1RIS1 0x00000020 // Channel 1 Raw Interrupt Status 1
  773. #define LPC_RIS_CH1RIS0 0x00000010 // Channel 1 Raw Interrupt Status 0
  774. #define LPC_RIS_CH0RIS3 0x00000008 // Channel 0 Raw Interrupt Status 3
  775. #define LPC_RIS_CH0RIS2 0x00000004 // Channel 0 Raw Interrupt Status 2
  776. #define LPC_RIS_CH0RIS1 0x00000002 // Channel 0 Raw Interrupt Status 1
  777. #define LPC_RIS_CH0RIS0 0x00000001 // Channel 0 Raw Interrupt Status 0
  778. //*****************************************************************************
  779. //
  780. // The following are defines for the bit fields in the LPC_O_MIS register.
  781. //
  782. //*****************************************************************************
  783. #define LPC_MIS_RSTMIS 0x80000000 // Reset State Masked Interrupt
  784. // Status
  785. #define LPC_MIS_SLEEPMIS 0x40000000 // Sleep State Masked Interrupt
  786. // Status
  787. #define LPC_MIS_COMXMIS 0x20000000 // COMx Masked Interrupt Status
  788. #define LPC_MIS_SIRQMIS 0x10000000 // SERIRQ Frame Complete Masked
  789. // Interrupt Status
  790. #define LPC_MIS_CH6MIS3 0x08000000 // Channel 6 Masked Interrupt
  791. // Status 3
  792. #define LPC_MIS_CH6MIS2 0x04000000 // Channel 6 Masked Interrupt
  793. // Status 2
  794. #define LPC_MIS_CH6MIS1 0x02000000 // Channel 6 Masked Interrupt
  795. // Status 1
  796. #define LPC_MIS_CH6MIS0 0x01000000 // Channel 6 Masked Interrupt
  797. // Status 0
  798. #define LPC_MIS_CH5MIS3 0x00800000 // Channel 5 Masked Interrupt
  799. // Status 3
  800. #define LPC_MIS_CH5MIS2 0x00400000 // Channel 5 Masked Interrupt
  801. // Status 2
  802. #define LPC_MIS_CH5MIS1 0x00200000 // Channel 5 Masked Interrupt
  803. // Status 1
  804. #define LPC_MIS_CH5MIS0 0x00100000 // Channel 5 Masked Interrupt
  805. // Status 0
  806. #define LPC_MIS_CH4MIS3 0x00080000 // Channel 4 Masked Interrupt
  807. // Status 3
  808. #define LPC_MIS_CH4MIS2 0x00040000 // Channel 4 Masked Interrupt
  809. // Status 2
  810. #define LPC_MIS_CH4MIS1 0x00020000 // Channel 4 Masked Interrupt
  811. // Status 1
  812. #define LPC_MIS_CH4MIS0 0x00010000 // Channel 4 Masked Interrupt
  813. // Status 0
  814. #define LPC_MIS_CH3MIS3 0x00008000 // Channel 3 Masked Interrupt
  815. // Status 3
  816. #define LPC_MIS_CH3MIS2 0x00004000 // Channel 3 Masked Interrupt
  817. // Status 2
  818. #define LPC_MIS_CH3MIS1 0x00002000 // Channel 3 Masked Interrupt
  819. // Status 1
  820. #define LPC_MIS_CH3MIS0 0x00001000 // Channel 3 Masked Interrupt
  821. // Status 0
  822. #define LPC_MIS_CH2MIS3 0x00000800 // Channel 2 Masked Interrupt
  823. // Status 3
  824. #define LPC_MIS_CH2MIS2 0x00000400 // Channel 2 Masked Interrupt
  825. // Status 2
  826. #define LPC_MIS_CH2MIS1 0x00000200 // Channel 2 Masked Interrupt
  827. // Status 1
  828. #define LPC_MIS_CH2MIS0 0x00000100 // Channel 2 Masked Interrupt
  829. // Status 0
  830. #define LPC_MIS_CH1MIS3 0x00000080 // Channel 1 Masked Interrupt
  831. // Status 3
  832. #define LPC_MIS_CH1MIS2 0x00000040 // Channel 1 Masked Interrupt
  833. // Status 2
  834. #define LPC_MIS_CH1MIS1 0x00000020 // Channel 1 Masked Interrupt
  835. // Status 1
  836. #define LPC_MIS_CH1MIS0 0x00000010 // Channel 1 Masked Interrupt
  837. // Status 0
  838. #define LPC_MIS_CH0MIS3 0x00000008 // Channel 0 Masked Interrupt
  839. // Status 3
  840. #define LPC_MIS_CH0MIS2 0x00000004 // Channel 0 Masked Interrupt
  841. // Status 2
  842. #define LPC_MIS_CH0MIS1 0x00000002 // Channel 0 Masked Interrupt
  843. // Status 1
  844. #define LPC_MIS_CH0MIS0 0x00000001 // Channel 0 Masked Interrupt
  845. // Status 0
  846. //*****************************************************************************
  847. //
  848. // The following are defines for the bit fields in the LPC_O_IC register.
  849. //
  850. //*****************************************************************************
  851. #define LPC_IC_RSTIC 0x80000000 // Reset State Interrupt Clear
  852. #define LPC_IC_SLEEPIC 0x40000000 // Sleep State Interrupt Clear
  853. #define LPC_IC_COMXIC 0x20000000 // COMx Interrupt Clear
  854. #define LPC_IC_SIRQRIC 0x10000000 // SERIRQ Frame Complete Interrupt
  855. // Clear
  856. #define LPC_IC_CH6IC3 0x08000000 // Channel 6 Interrupt Clear 3
  857. #define LPC_IC_CH6IC2 0x04000000 // Channel 6 Interrupt Clear 2
  858. #define LPC_IC_CH6IC1 0x02000000 // Channel 6 Interrupt Clear 1
  859. #define LPC_IC_CH6IC0 0x01000000 // Channel 6 Interrupt Clear 0
  860. #define LPC_IC_CH5IC3 0x00800000 // Channel 5 Interrupt Clear 3
  861. #define LPC_IC_CH5IC2 0x00400000 // Channel 5 Interrupt Clear 2
  862. #define LPC_IC_CH5IC1 0x00200000 // Channel 5 Interrupt Clear 1
  863. #define LPC_IC_CH5IC0 0x00100000 // Channel 5 Interrupt Clear 0
  864. #define LPC_IC_CH4IC3 0x00080000 // Channel 4 Interrupt Clear 3
  865. #define LPC_IC_CH4IC2 0x00040000 // Channel 4 Interrupt Clear 2
  866. #define LPC_IC_CH4IC1 0x00020000 // Channel 4 Interrupt Clear 1
  867. #define LPC_IC_CH4IC0 0x00010000 // Channel 4 Interrupt Clear 0
  868. #define LPC_IC_CH3IC3 0x00008000 // Channel 3 Interrupt Clear 3
  869. #define LPC_IC_CH3IC2 0x00004000 // Channel 3 Interrupt Clear 2
  870. #define LPC_IC_CH3IC1 0x00002000 // Channel 3 Interrupt Clear 1
  871. #define LPC_IC_CH3IC0 0x00001000 // Channel 3 Interrupt Clear 0
  872. #define LPC_IC_CH2IC3 0x00000800 // Channel 2 Interrupt Clear 3
  873. #define LPC_IC_CH2IC2 0x00000400 // Channel 2 Interrupt Clear 2
  874. #define LPC_IC_CH2IC1 0x00000200 // Channel 2 Interrupt Clear 1
  875. #define LPC_IC_CH2IC0 0x00000100 // Channel 2 Interrupt Clear 0
  876. #define LPC_IC_CH1IC3 0x00000080 // Channel 1 Interrupt Clear 3
  877. #define LPC_IC_CH1IC2 0x00000040 // Channel 1 Interrupt Clear 2
  878. #define LPC_IC_CH1IC1 0x00000020 // Channel 1 Interrupt Clear 1
  879. #define LPC_IC_CH1IC0 0x00000010 // Channel 1 Interrupt Clear 0
  880. #define LPC_IC_CH0IC3 0x00000008 // Channel 0 Interrupt Clear 3
  881. #define LPC_IC_CH0IC2 0x00000004 // Channel 0 Interrupt Clear 2
  882. #define LPC_IC_CH0IC1 0x00000002 // Channel 0 Interrupt Clear 1
  883. #define LPC_IC_CH0IC0 0x00000001 // Channel 0 Interrupt Clear 0
  884. //*****************************************************************************
  885. //
  886. // The following are defines for the bit fields in the LPC_O_DMACX register.
  887. //
  888. //*****************************************************************************
  889. #define LPC_DMACX_CXRES 0x02000000 // Raw Event State for COMx
  890. #define LPC_DMACX_CXTXRES 0x01000000 // Raw Event State for COMx TX
  891. #define LPC_DMACX_CXRXRES 0x00800000 // Raw Event State for COMx RX
  892. #define LPC_DMACX_CXEM 0x00200000 // Event Mask for COMx
  893. #define LPC_DMACX_CXTXEM 0x00100000 // Event Mask for COMx TX
  894. #define LPC_DMACX_CXRXEM 0x00080000 // Event Mask for COMx RX
  895. #define LPC_DMACX_CXACT_M 0x00060000 // COMx Action
  896. #define LPC_DMACX_CXACT_FRMHNML 0x00000000 // Treat as normal FRMH model and
  897. // let be full (and so marked as
  898. // full)
  899. #define LPC_DMACX_CXACT_FRMHIGN 0x00020000 // Ignore FRMH bytes and continue
  900. // to mark FRMH as empty
  901. #define LPC_DMACX_CXACT_FRMHDMA 0x00040000 // COMx DMA on FRMH byte (e.g. to
  902. // memory)
  903. #define LPC_DMACX_CXACT_UARTDMA 0x00060000 // COMx DMA model with UART
  904. #define LPC_DMACX_COMX 0x00010000 // COMx Handling
  905. #define LPC_DMACX_C3W 0x00000080 // Write Control for Channel 3
  906. #define LPC_DMACX_C3R 0x00000040 // Read Control for Channel 3
  907. #define LPC_DMACX_C2W 0x00000020 // Write Control for Channel 2
  908. #define LPC_DMACX_C2R 0x00000010 // Read Control for Channel 2
  909. #define LPC_DMACX_C1W 0x00000008 // Write Control for Channel 1
  910. #define LPC_DMACX_C1R 0x00000004 // Read Control for Channel 1
  911. #define LPC_DMACX_C0W 0x00000002 // Write Control for Channel 0
  912. #define LPC_DMACX_C0R 0x00000001 // Read Control for Channel 0
  913. //*****************************************************************************
  914. //
  915. // The following are defines for the bit fields in the LPC_O_POOL register.
  916. //
  917. //*****************************************************************************
  918. #define LPC_POOL_BYTE3_M 0xFF000000 // Byte 3
  919. #define LPC_POOL_BYTE2_M 0x00FF0000 // Byte 2
  920. #define LPC_POOL_BYTE1_M 0x0000FF00 // Byte 1
  921. #define LPC_POOL_BYTE0_M 0x000000FF // Byte 0
  922. #define LPC_POOL_BYTE3_S 24
  923. #define LPC_POOL_BYTE2_S 16
  924. #define LPC_POOL_BYTE1_S 8
  925. #define LPC_POOL_BYTE0_S 0
  926. //*****************************************************************************
  927. //
  928. // The following are defines for the bit fields in the LPC_O_PP register.
  929. //
  930. //*****************************************************************************
  931. #define LPC_PP_COMX 0x00000010 // COMx Support Available
  932. #define LPC_PP_CHANCNT_M 0x0000000F // Number of Channels (Excluding
  933. // COMx)
  934. #define LPC_PP_CHANCNT_S 0
  935. #endif // __HW_LPC_H__