hw_lcd.h 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575
  1. //*****************************************************************************
  2. //
  3. // hw_lcd.h - Defines and macros used when accessing the LCD controller.
  4. //
  5. // Copyright (c) 2011-2014 Texas Instruments Incorporated. All rights reserved.
  6. // Software License Agreement
  7. //
  8. // Redistribution and use in source and binary forms, with or without
  9. // modification, are permitted provided that the following conditions
  10. // are met:
  11. //
  12. // Redistributions of source code must retain the above copyright
  13. // notice, this list of conditions and the following disclaimer.
  14. //
  15. // Redistributions in binary form must reproduce the above copyright
  16. // notice, this list of conditions and the following disclaimer in the
  17. // documentation and/or other materials provided with the
  18. // distribution.
  19. //
  20. // Neither the name of Texas Instruments Incorporated nor the names of
  21. // its contributors may be used to endorse or promote products derived
  22. // from this software without specific prior written permission.
  23. //
  24. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  25. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  26. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  27. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  28. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  29. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  30. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  31. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  32. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  33. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  34. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  35. //
  36. // This is part of revision 2.1.0.12573 of the Tiva Firmware Development Package.
  37. //
  38. //*****************************************************************************
  39. #ifndef __HW_LCD_H__
  40. #define __HW_LCD_H__
  41. //*****************************************************************************
  42. //
  43. // The following are defines for the LCD register offsets.
  44. //
  45. //*****************************************************************************
  46. #define LCD_O_PID 0x00000000 // LCD PID Register Format
  47. #define LCD_O_CTL 0x00000004 // LCD Control
  48. #define LCD_O_LIDDCTL 0x0000000C // LCD LIDD Control
  49. #define LCD_O_LIDDCS0CFG 0x00000010 // LCD LIDD CS0 Configuration
  50. #define LCD_O_LIDDCS0ADDR 0x00000014 // LIDD CS0 Read/Write Address
  51. #define LCD_O_LIDDCS0DATA 0x00000018 // LIDD CS0 Data Read/Write
  52. // Initiation
  53. #define LCD_O_LIDDCS1CFG 0x0000001C // LIDD CS1 Configuration
  54. #define LCD_O_LIDDCS1ADDR 0x00000020 // LIDD CS1 Address Read/Write
  55. // Initiation
  56. #define LCD_O_LIDDCS1DATA 0x00000024 // LIDD CS1 Data Read/Write
  57. // Initiation
  58. #define LCD_O_RASTRCTL 0x00000028 // LCD Raster Control
  59. #define LCD_O_RASTRTIM0 0x0000002C // LCD Raster Timing 0
  60. #define LCD_O_RASTRTIM1 0x00000030 // LCD Raster Timing 1
  61. #define LCD_O_RASTRTIM2 0x00000034 // LCD Raster Timing 2
  62. #define LCD_O_RASTRSUBP1 0x00000038 // LCD Raster Subpanel Display 1
  63. #define LCD_O_RASTRSUBP2 0x0000003C // LCD Raster Subpanel Display 2
  64. #define LCD_O_DMACTL 0x00000040 // LCD DMA Control
  65. #define LCD_O_DMABAFB0 0x00000044 // LCD DMA Frame Buffer 0 Base
  66. // Address
  67. #define LCD_O_DMACAFB0 0x00000048 // LCD DMA Frame Buffer 0 Ceiling
  68. // Address
  69. #define LCD_O_DMABAFB1 0x0000004C // LCD DMA Frame Buffer 1 Base
  70. // Address
  71. #define LCD_O_DMACAFB1 0x00000050 // LCD DMA Frame Buffer 1 Ceiling
  72. // Address
  73. #define LCD_O_SYSCFG 0x00000054 // LCD System Configuration
  74. // Register
  75. #define LCD_O_RISSET 0x00000058 // LCD Interrupt Raw Status and Set
  76. // Register
  77. #define LCD_O_MISCLR 0x0000005C // LCD Interrupt Status and Clear
  78. #define LCD_O_IM 0x00000060 // LCD Interrupt Mask
  79. #define LCD_O_IENC 0x00000064 // LCD Interrupt Enable Clear
  80. #define LCD_O_CLKEN 0x0000006C // LCD Clock Enable
  81. #define LCD_O_CLKRESET 0x00000070 // LCD Clock Resets
  82. //*****************************************************************************
  83. //
  84. // The following are defines for the bit fields in the LCD_O_PID register.
  85. //
  86. //*****************************************************************************
  87. #define LCD_PID_MAJOR_M 0x00000700 // Major Release Number
  88. #define LCD_PID_MINOR_M 0x0000003F // Minor Release Number
  89. #define LCD_PID_MAJOR_S 8
  90. #define LCD_PID_MINOR_S 0
  91. //*****************************************************************************
  92. //
  93. // The following are defines for the bit fields in the LCD_O_CTL register.
  94. //
  95. //*****************************************************************************
  96. #define LCD_CTL_CLKDIV_M 0x0000FF00 // Clock Divisor
  97. #define LCD_CTL_UFLOWRST 0x00000002 // Underflow Restart
  98. #define LCD_CTL_LCDMODE 0x00000001 // LCD Mode Select
  99. #define LCD_CTL_CLKDIV_S 8
  100. //*****************************************************************************
  101. //
  102. // The following are defines for the bit fields in the LCD_O_LIDDCTL register.
  103. //
  104. //*****************************************************************************
  105. #define LCD_LIDDCTL_DMACS 0x00000200 // CS0/CS1 Select for LIDD DMA
  106. // Writes
  107. #define LCD_LIDDCTL_DMAEN 0x00000100 // LIDD DMA Enable
  108. #define LCD_LIDDCTL_CS1E1 0x00000080 // Chip Select 1 (CS1)/Enable 1(E1)
  109. // Polarity Control
  110. #define LCD_LIDDCTL_CS0E0 0x00000040 // Chip Select 0 (CS0)/Enable 0
  111. // (E0) Polarity Control
  112. #define LCD_LIDDCTL_WRDIRINV 0x00000020 // Write Strobe (WR) /Direction
  113. // (DIR) Polarity Control
  114. #define LCD_LIDDCTL_RDEN 0x00000010 // Read Strobe (RD) /Direct Enable
  115. // (EN) Polarity Control
  116. #define LCD_LIDDCTL_ALE 0x00000008 // Address Latch Enable (ALE)
  117. // Polarity Control
  118. #define LCD_LIDDCTL_MODE_M 0x00000007 // LIDD Mode Select
  119. #define LCD_LIDDCTL_MODE_SYNCM68 \
  120. 0x00000000 // Synchronous Motorola 6800 Mode
  121. #define LCD_LIDDCTL_MODE_ASYNCM68 \
  122. 0x00000001 // Asynchronous Motorola 6800 Mode
  123. #define LCD_LIDDCTL_MODE_SYNCM80 \
  124. 0x00000002 // Synchronous Intel 8080 mode
  125. #define LCD_LIDDCTL_MODE_ASYNCM80 \
  126. 0x00000003 // Asynchronous Intel 8080 mode
  127. #define LCD_LIDDCTL_MODE_ASYNCHIT \
  128. 0x00000004 // Asynchronous Hitachi mode
  129. //*****************************************************************************
  130. //
  131. // The following are defines for the bit fields in the LCD_O_LIDDCS0CFG
  132. // register.
  133. //
  134. //*****************************************************************************
  135. #define LCD_LIDDCS0CFG_WRSU_M 0xF8000000 // Write Strobe (WR) Set-Up Cycles
  136. #define LCD_LIDDCS0CFG_WRDUR_M 0x07E00000 // Write Strobe (WR) Duration
  137. // Cycles
  138. #define LCD_LIDDCS0CFG_WRHOLD_M 0x001E0000 // Write Strobe (WR) Hold cycles
  139. #define LCD_LIDDCS0CFG_RDSU_M 0x0001F000 // Read Strobe (RD) Set-Up cycles
  140. #define LCD_LIDDCS0CFG_RDDUR_M 0x00000FC0 // Read Strobe (RD) Duration cycles
  141. #define LCD_LIDDCS0CFG_RDHOLD_M 0x0000003C // Read Strobe (RD) Hold cycles
  142. #define LCD_LIDDCS0CFG_GAP_M 0x00000003 // Field value defines the number
  143. // of LCDMCLK cycles (GAP +1)
  144. // between the end of one CS0
  145. // (LCDAC) device access and the
  146. // start of another CS0 (LCDAC)
  147. // device access unless the two
  148. // accesses are both reads
  149. #define LCD_LIDDCS0CFG_WRSU_S 27
  150. #define LCD_LIDDCS0CFG_WRDUR_S 21
  151. #define LCD_LIDDCS0CFG_WRHOLD_S 17
  152. #define LCD_LIDDCS0CFG_RDSU_S 12
  153. #define LCD_LIDDCS0CFG_RDDUR_S 6
  154. #define LCD_LIDDCS0CFG_RDHOLD_S 2
  155. #define LCD_LIDDCS0CFG_GAP_S 0
  156. //*****************************************************************************
  157. //
  158. // The following are defines for the bit fields in the LCD_O_LIDDCS0ADDR
  159. // register.
  160. //
  161. //*****************************************************************************
  162. #define LCD_LIDDCS0ADDR_CS0ADDR_M \
  163. 0x0000FFFF // LCD Address
  164. #define LCD_LIDDCS0ADDR_CS0ADDR_S \
  165. 0
  166. //*****************************************************************************
  167. //
  168. // The following are defines for the bit fields in the LCD_O_LIDDCS0DATA
  169. // register.
  170. //
  171. //*****************************************************************************
  172. #define LCD_LIDDCS0DATA_CS0DATA_M \
  173. 0x0000FFFF // LCD Data Read/Write
  174. #define LCD_LIDDCS0DATA_CS0DATA_S \
  175. 0
  176. //*****************************************************************************
  177. //
  178. // The following are defines for the bit fields in the LCD_O_LIDDCS1CFG
  179. // register.
  180. //
  181. //*****************************************************************************
  182. #define LCD_LIDDCS1CFG_WRSU_M 0xF8000000 // Write Strobe (WR) Set-Up Cycles
  183. #define LCD_LIDDCS1CFG_WRDUR_M 0x07E00000 // Write Strobe (WR) Duration
  184. // Cycles
  185. #define LCD_LIDDCS1CFG_WRHOLD_M 0x001E0000 // Write Strobe (WR) Hold cycles
  186. #define LCD_LIDDCS1CFG_RDSU_M 0x0001F000 // Read Strobe (RD) Set-Up cycles
  187. #define LCD_LIDDCS1CFG_RDDUR_M 0x00000FC0 // Read Strobe (RD) Duration cycles
  188. #define LCD_LIDDCS1CFG_RDHOLD_M 0x0000003C // Read Strobe (RD) Hold cycles
  189. #define LCD_LIDDCS1CFG_GAP_M 0x00000003 // Field value defines the number
  190. // of LCDMCLK cycles (GAP + 1)
  191. // between the end of one CS1
  192. // (LCDAC) device access and the
  193. // start of another CS0 (LCDAC)
  194. // device access unless the two
  195. // accesses are both reads
  196. #define LCD_LIDDCS1CFG_WRSU_S 27
  197. #define LCD_LIDDCS1CFG_WRDUR_S 21
  198. #define LCD_LIDDCS1CFG_WRHOLD_S 17
  199. #define LCD_LIDDCS1CFG_RDSU_S 12
  200. #define LCD_LIDDCS1CFG_RDDUR_S 6
  201. #define LCD_LIDDCS1CFG_RDHOLD_S 2
  202. #define LCD_LIDDCS1CFG_GAP_S 0
  203. //*****************************************************************************
  204. //
  205. // The following are defines for the bit fields in the LCD_O_LIDDCS1ADDR
  206. // register.
  207. //
  208. //*****************************************************************************
  209. #define LCD_LIDDCS1ADDR_CS1ADDR_M \
  210. 0x0000FFFF // LCD Address Bus
  211. #define LCD_LIDDCS1ADDR_CS1ADDR_S \
  212. 0
  213. //*****************************************************************************
  214. //
  215. // The following are defines for the bit fields in the LCD_O_LIDDCS1DATA
  216. // register.
  217. //
  218. //*****************************************************************************
  219. #define LCD_LIDDCS1DATA_CS0DATA_M \
  220. 0x0000FFFF // LCD Data Read/Write Initiation
  221. #define LCD_LIDDCS1DATA_CS0DATA_S \
  222. 0
  223. //*****************************************************************************
  224. //
  225. // The following are defines for the bit fields in the LCD_O_RASTRCTL register.
  226. //
  227. //*****************************************************************************
  228. #define LCD_RASTRCTL_TFT24UPCK 0x04000000 // 24-bit TFT Mode Packing
  229. #define LCD_RASTRCTL_TFT24 0x02000000 // 24-Bit TFT Mode
  230. #define LCD_RASTRCTL_FRMBUFSZ 0x01000000 // Frame Buffer Select
  231. #define LCD_RASTRCTL_TFTMAP 0x00800000 // TFT Mode Alternate Signal
  232. // Mapping for Palettized
  233. // Framebuffer
  234. #define LCD_RASTRCTL_NIBMODE 0x00400000 // Nibble Mode
  235. #define LCD_RASTRCTL_PALMODE_M 0x00300000 // Pallette Loading Mode
  236. #define LCD_RASTRCTL_PALMODE_PALDAT \
  237. 0x00000000 // Palette and data loading, reset
  238. // value
  239. #define LCD_RASTRCTL_PALMODE_PAL \
  240. 0x00100000 // Palette loading only
  241. #define LCD_RASTRCTL_PALMODE_DAT \
  242. 0x00200000 // Data loading only
  243. #define LCD_RASTRCTL_REQDLY_M 0x000FF000 // Palette Loading Delay
  244. #define LCD_RASTRCTL_MONO8B 0x00000200 // Mono 8-Bit
  245. #define LCD_RASTRCTL_RDORDER 0x00000100 // Raster Data Order Select
  246. #define LCD_RASTRCTL_LCDTFT 0x00000080 // LCD TFT
  247. #define LCD_RASTRCTL_LCDBW 0x00000002 // LCD Monochrome
  248. #define LCD_RASTRCTL_LCDEN 0x00000001 // LCD Controller Enable for Raster
  249. // Operations
  250. #define LCD_RASTRCTL_REQDLY_S 12
  251. //*****************************************************************************
  252. //
  253. // The following are defines for the bit fields in the LCD_O_RASTRTIM0
  254. // register.
  255. //
  256. //*****************************************************************************
  257. #define LCD_RASTRTIM0_HBP_M 0xFF000000 // Horizontal Back Porch Lowbits
  258. #define LCD_RASTRTIM0_HFP_M 0x00FF0000 // Horizontal Front Porch Lowbits
  259. #define LCD_RASTRTIM0_HSW_M 0x0000FC00 // Horizontal Sync Pulse Width
  260. // Lowbits
  261. #define LCD_RASTRTIM0_PPL_M 0x000003F0 // Pixels-per-line LSB[9:4]
  262. #define LCD_RASTRTIM0_MSBPPL 0x00000008 // Pixels-per-line MSB[10]
  263. #define LCD_RASTRTIM0_HBP_S 24
  264. #define LCD_RASTRTIM0_HFP_S 16
  265. #define LCD_RASTRTIM0_HSW_S 10
  266. #define LCD_RASTRTIM0_PPL_S 4
  267. #define LCD_RASTRTIM0_MSBPPL_S 3
  268. //*****************************************************************************
  269. //
  270. // The following are defines for the bit fields in the LCD_O_RASTRTIM1
  271. // register.
  272. //
  273. //*****************************************************************************
  274. #define LCD_RASTRTIM1_VBP_M 0xFF000000 // Vertical Back Porch
  275. #define LCD_RASTRTIM1_VFP_M 0x00FF0000 // Vertical Front Porch
  276. #define LCD_RASTRTIM1_VSW_M 0x0000FC00 // Vertical Sync Width Pulse
  277. #define LCD_RASTRTIM1_LPP_M 0x000003FF // Lines Per Panel
  278. #define LCD_RASTRTIM1_VBP_S 24
  279. #define LCD_RASTRTIM1_VFP_S 16
  280. #define LCD_RASTRTIM1_VSW_S 10
  281. #define LCD_RASTRTIM1_LPP_S 0
  282. //*****************************************************************************
  283. //
  284. // The following are defines for the bit fields in the LCD_O_RASTRTIM2
  285. // register.
  286. //
  287. //*****************************************************************************
  288. #define LCD_RASTRTIM2_HSW_M 0x78000000 // Bits 9:6 of the horizontal sync
  289. // width field
  290. #define LCD_RASTRTIM2_MSBLPP 0x04000000 // MSB of Lines Per Panel
  291. #define LCD_RASTRTIM2_PXLCLKCTL 0x02000000 // Hsync/Vsync Pixel Clock Control
  292. // On/Off
  293. #define LCD_RASTRTIM2_PSYNCRF 0x01000000 // Program HSYNC/VSYNC Rise or Fall
  294. #define LCD_RASTRTIM2_INVOE 0x00800000 // Invert Output Enable
  295. #define LCD_RASTRTIM2_INVPXLCLK 0x00400000 // Invert Pixel Clock
  296. #define LCD_RASTRTIM2_IHS 0x00200000 // Invert Hysync
  297. #define LCD_RASTRTIM2_IVS 0x00100000 // Invert Vsync
  298. #define LCD_RASTRTIM2_ACBI_M 0x000F0000 // AC Bias Pins Transitions per
  299. // Interrupt
  300. #define LCD_RASTRTIM2_ACBF_M 0x0000FF00 // AC Bias Pin Frequency
  301. #define LCD_RASTRTIM2_MSBHBP_M 0x00000030 // Bits 9:8 of the horizontal back
  302. // porch field
  303. #define LCD_RASTRTIM2_MSBHFP_M 0x00000003 // Bits 9:8 of the horizontal front
  304. // porch field
  305. #define LCD_RASTRTIM2_HSW_S 27
  306. #define LCD_RASTRTIM2_MSBLPP_S 26
  307. #define LCD_RASTRTIM2_ACBI_S 16
  308. #define LCD_RASTRTIM2_ACBF_S 8
  309. #define LCD_RASTRTIM2_MSBHBP_S 4
  310. #define LCD_RASTRTIM2_MSBHFP_S 0
  311. //*****************************************************************************
  312. //
  313. // The following are defines for the bit fields in the LCD_O_RASTRSUBP1
  314. // register.
  315. //
  316. //*****************************************************************************
  317. #define LCD_RASTRSUBP1_SPEN 0x80000000 // Sub Panel Enable
  318. #define LCD_RASTRSUBP1_HOLS 0x20000000 // High or Low Signal
  319. #define LCD_RASTRSUBP1_LPPT_M 0x03FF0000 // Line Per Panel Threshold
  320. #define LCD_RASTRSUBP1_DPDLSB_M 0x0000FFFF // Default Pixel Data LSB[15:0]
  321. #define LCD_RASTRSUBP1_LPPT_S 16
  322. #define LCD_RASTRSUBP1_DPDLSB_S 0
  323. //*****************************************************************************
  324. //
  325. // The following are defines for the bit fields in the LCD_O_RASTRSUBP2
  326. // register.
  327. //
  328. //*****************************************************************************
  329. #define LCD_RASTRSUBP2_LPPTMSB 0x00000100 // Lines Per Panel Threshold Bit 10
  330. #define LCD_RASTRSUBP2_DPDMSB_M 0x000000FF // Default Pixel Data MSB [23:16]
  331. #define LCD_RASTRSUBP2_DPDMSB_S 0
  332. //*****************************************************************************
  333. //
  334. // The following are defines for the bit fields in the LCD_O_DMACTL register.
  335. //
  336. //*****************************************************************************
  337. #define LCD_DMACTL_FIFORDY_M 0x00000700 // DMA FIFO threshold
  338. #define LCD_DMACTL_FIFORDY_8 0x00000000 // 8 words
  339. #define LCD_DMACTL_FIFORDY_16 0x00000100 // 16 words
  340. #define LCD_DMACTL_FIFORDY_32 0x00000200 // 32 words
  341. #define LCD_DMACTL_FIFORDY_64 0x00000300 // 64 words
  342. #define LCD_DMACTL_FIFORDY_128 0x00000400 // 128 words
  343. #define LCD_DMACTL_FIFORDY_256 0x00000500 // 256 words
  344. #define LCD_DMACTL_FIFORDY_512 0x00000600 // 512 words
  345. #define LCD_DMACTL_BURSTSZ_M 0x00000070 // Burst Size setting for DMA
  346. // transfers (all DMA transfers are
  347. // 32 bits wide):
  348. #define LCD_DMACTL_BURSTSZ_4 0x00000020 // burst size of 4
  349. #define LCD_DMACTL_BURSTSZ_8 0x00000030 // burst size of 8
  350. #define LCD_DMACTL_BURSTSZ_16 0x00000040 // burst size of 16
  351. #define LCD_DMACTL_BYTESWAP 0x00000008 // This bit controls the bytelane
  352. // ordering of the data on the
  353. // output of the DMA module
  354. #define LCD_DMACTL_BIGDEND 0x00000002 // Big Endian Enable
  355. #define LCD_DMACTL_FMODE 0x00000001 // Frame Mode
  356. //*****************************************************************************
  357. //
  358. // The following are defines for the bit fields in the LCD_O_DMABAFB0 register.
  359. //
  360. //*****************************************************************************
  361. #define LCD_DMABAFB0_FB0BA_M 0xFFFFFFFC // Frame Buffer 0 Base Address
  362. // pointer
  363. #define LCD_DMABAFB0_FB0BA_S 2
  364. //*****************************************************************************
  365. //
  366. // The following are defines for the bit fields in the LCD_O_DMACAFB0 register.
  367. //
  368. //*****************************************************************************
  369. #define LCD_DMACAFB0_FB0CA_M 0xFFFFFFFC // Frame Buffer 0 Ceiling Address
  370. // pointer
  371. #define LCD_DMACAFB0_FB0CA_S 2
  372. //*****************************************************************************
  373. //
  374. // The following are defines for the bit fields in the LCD_O_DMABAFB1 register.
  375. //
  376. //*****************************************************************************
  377. #define LCD_DMABAFB1_FB1BA_M 0xFFFFFFFC // Frame Buffer 1 Base Address
  378. // pointer
  379. #define LCD_DMABAFB1_FB1BA_S 2
  380. //*****************************************************************************
  381. //
  382. // The following are defines for the bit fields in the LCD_O_DMACAFB1 register.
  383. //
  384. //*****************************************************************************
  385. #define LCD_DMACAFB1_FB1CA_M 0xFFFFFFFC // Frame Buffer 1 Ceiling Address
  386. // pointer
  387. #define LCD_DMACAFB1_FB1CA_S 2
  388. //*****************************************************************************
  389. //
  390. // The following are defines for the bit fields in the LCD_O_SYSCFG register.
  391. //
  392. //*****************************************************************************
  393. #define LCD_SYSCFG_STDBY_M 0x00000030 // Standby Mode
  394. #define LCD_SYSCFG_STDBY_FORCE 0x00000000 // Force-standby mode: local
  395. // initiator is unconditionally
  396. // placed in standby state. Backup
  397. // mode, for debug only
  398. #define LCD_SYSCFG_STDBY_NONE 0x00000010 // No-standby mode: local initiator
  399. // is unconditionally placed out of
  400. // standby state. Backup mode, for
  401. // debug only
  402. #define LCD_SYSCFG_STDBY_SMART 0x00000020 // Smart-standby mode: local
  403. // initiator standby status depends
  404. // on local conditions, that is,
  405. // the module's functional
  406. // requirement from the initiator.
  407. // IP module shall not generate
  408. // (initiator-related) wakeup
  409. // events
  410. #define LCD_SYSCFG_IDLEMODE_M 0x0000000C // Idle Mode
  411. #define LCD_SYSCFG_IDLEMODE_FORCE \
  412. 0x00000000 // Force-idle mode: local target's
  413. // idle state follows
  414. // (acknowledges) the system's idle
  415. // requests unconditionally, that
  416. // is, regardless of the IP
  417. // module's internal requirements.
  418. // Backup mode, for debug only
  419. #define LCD_SYSCFG_IDLEMODE_NONE \
  420. 0x00000004 // No-idle mode: local target never
  421. // enters idle state. Backup mode,
  422. // for debug only
  423. #define LCD_SYSCFG_IDLEMODE_SMART \
  424. 0x00000008 // Smart-idle mode: local target's
  425. // idle state eventually follows
  426. // (acknowledges) the system's idle
  427. // requests, depending on the IP
  428. // module's internal requirements.
  429. // IP module shall not generate
  430. // (IRQ- or DMA-requestrelated)
  431. // wakeup events
  432. //*****************************************************************************
  433. //
  434. // The following are defines for the bit fields in the LCD_O_RISSET register.
  435. //
  436. //*****************************************************************************
  437. #define LCD_RISSET_EOF1 0x00000200 // DMA End-of-Frame 1 Raw Interrupt
  438. // Status and Set
  439. #define LCD_RISSET_EOF0 0x00000100 // DMA End-of-Frame 0 Raw Interrupt
  440. // Status and Set
  441. #define LCD_RISSET_PALLOAD 0x00000040 // DMA Palette Loaded Raw Interrupt
  442. // Status and Set
  443. #define LCD_RISSET_FIFOU 0x00000020 // DMA FIFO Underflow Raw Interrupt
  444. // Status and Set
  445. #define LCD_RISSET_ACBS 0x00000008 // AC Bias Count Raw Interrupt
  446. // Status and Set
  447. #define LCD_RISSET_SYNCS 0x00000004 // Frame Synchronization Lost Raw
  448. // Interrupt Status and Set
  449. #define LCD_RISSET_RRASTRDONE 0x00000002 // Raster Mode Frame Done interrupt
  450. #define LCD_RISSET_DONE 0x00000001 // Raster or LIDD Frame Done
  451. // (shared, depends on whether
  452. // Raster or LIDD mode enabled) Raw
  453. // Interrupt Status and Set
  454. //*****************************************************************************
  455. //
  456. // The following are defines for the bit fields in the LCD_O_MISCLR register.
  457. //
  458. //*****************************************************************************
  459. #define LCD_MISCLR_EOF1 0x00000200 // DMA End-of-Frame 1 Enabled
  460. // Interrupt and Clear
  461. #define LCD_MISCLR_EOF0 0x00000100 // DMA End-of-Frame 0 Raw Interrupt
  462. // and Clear
  463. #define LCD_MISCLR_PALLOAD 0x00000040 // DMA Palette Loaded Enabled
  464. // Interrupt and Clear
  465. #define LCD_MISCLR_FIFOU 0x00000020 // DMA FIFO Underflow Enabled
  466. // Interrupt and Clear
  467. #define LCD_MISCLR_ACBS 0x00000008 // AC Bias Count Enabled Interrupt
  468. // and Clear
  469. #define LCD_MISCLR_SYNCS 0x00000004 // Frame Synchronization Lost
  470. // Enabled Interrupt and Clear
  471. #define LCD_MISCLR_RRASTRDONE 0x00000002 // Raster Mode Frame Done interrupt
  472. #define LCD_MISCLR_DONE 0x00000001 // Raster or LIDD Frame Done
  473. // (shared, depends on whether
  474. // Raster or LIDD mode enabled)
  475. // Enabled Interrupt and Clear
  476. //*****************************************************************************
  477. //
  478. // The following are defines for the bit fields in the LCD_O_IM register.
  479. //
  480. //*****************************************************************************
  481. #define LCD_IM_EOF1 0x00000200 // DMA End-of-Frame 1 Interrupt
  482. // Enable Set
  483. #define LCD_IM_EOF0 0x00000100 // DMA End-of-Frame 0 Interrupt
  484. // Enable Set
  485. #define LCD_IM_PALLOAD 0x00000040 // DMA Palette Loaded Interrupt
  486. // Enable Set
  487. #define LCD_IM_FIFOU 0x00000020 // DMA FIFO Underflow Interrupt
  488. // Enable Set
  489. #define LCD_IM_ACBS 0x00000008 // AC Bias Count Interrupt Enable
  490. // Set
  491. #define LCD_IM_SYNCS 0x00000004 // Frame Synchronization Lost
  492. // Interrupt Enable Set
  493. #define LCD_IM_RRASTRDONE 0x00000002 // Raster Mode Frame Done Interrupt
  494. // Enable Set
  495. #define LCD_IM_DONE 0x00000001 // Raster or LIDD Frame Done
  496. // (shared, depends on whether
  497. // Raster or LIDD mode enabled)
  498. // Interrupt Enable Set
  499. //*****************************************************************************
  500. //
  501. // The following are defines for the bit fields in the LCD_O_IENC register.
  502. //
  503. //*****************************************************************************
  504. #define LCD_IENC_EOF1 0x00000200 // DMA End-of-Frame 1 Interrupt
  505. // Enable Clear
  506. #define LCD_IENC_EOF0 0x00000100 // DMA End-of-Frame 0 Interrupt
  507. // Enable Clear
  508. #define LCD_IENC_PALLOAD 0x00000040 // DMA Palette Loaded Interrupt
  509. // Enable Clear
  510. #define LCD_IENC_FIFOU 0x00000020 // DMA FIFO Underflow Interrupt
  511. // Enable Clear
  512. #define LCD_IENC_ACBS 0x00000008 // AC Bias Count Interrupt Enable
  513. // Clear
  514. #define LCD_IENC_SYNCS 0x00000004 // Frame Synchronization Lost
  515. // Interrupt Enable Clear
  516. #define LCD_IENC_RRASTRDONE 0x00000002 // Raster Mode Frame Done Interrupt
  517. // Enable Clear
  518. #define LCD_IENC_DONE 0x00000001 // Raster or LIDD Frame Done
  519. // (shared, depends on whether
  520. // Raster or LIDD mode enabled)
  521. // Interrupt Enable Clear
  522. //*****************************************************************************
  523. //
  524. // The following are defines for the bit fields in the LCD_O_CLKEN register.
  525. //
  526. //*****************************************************************************
  527. #define LCD_CLKEN_DMA 0x00000004 // DMA Clock Enable
  528. #define LCD_CLKEN_LIDD 0x00000002 // LIDD Submodule Clock Enable
  529. #define LCD_CLKEN_CORE 0x00000001 // LCD Core Clock Enable
  530. //*****************************************************************************
  531. //
  532. // The following are defines for the bit fields in the LCD_O_CLKRESET register.
  533. //
  534. //*****************************************************************************
  535. #define LCD_CLKRESET_MAIN 0x00000008 // Software Reset for the entire
  536. // LCD module
  537. #define LCD_CLKRESET_DMA 0x00000004 // Software Reset for the DMA
  538. // submodule
  539. #define LCD_CLKRESET_LIDD 0x00000002 // Software Reset for the LIDD
  540. // submodule (character displays)
  541. #define LCD_CLKRESET_CORE 0x00000001 // Software Reset for the Core,
  542. // which encompasses the Raster
  543. // Active Matrix and Passive Matrix
  544. // logic
  545. #endif // __HW_LCD_H__