hw_uart.h 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510
  1. //*****************************************************************************
  2. //
  3. // hw_uart.h - Macros and defines used when accessing the UART hardware.
  4. //
  5. // Copyright (c) 2005-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_UART_H__
  25. #define __HW_UART_H__
  26. //*****************************************************************************
  27. //
  28. // The following are defines for the UART register offsets.
  29. //
  30. //*****************************************************************************
  31. #define UART_O_DR 0x00000000 // UART Data
  32. #define UART_O_RSR 0x00000004 // UART Receive Status/Error Clear
  33. #define UART_O_ECR 0x00000004 // UART Receive Status/Error Clear
  34. #define UART_O_FR 0x00000018 // UART Flag
  35. #define UART_O_ILPR 0x00000020 // UART IrDA Low-Power Register
  36. #define UART_O_IBRD 0x00000024 // UART Integer Baud-Rate Divisor
  37. #define UART_O_FBRD 0x00000028 // UART Fractional Baud-Rate
  38. // Divisor
  39. #define UART_O_LCRH 0x0000002C // UART Line Control
  40. #define UART_O_CTL 0x00000030 // UART Control
  41. #define UART_O_IFLS 0x00000034 // UART Interrupt FIFO Level Select
  42. #define UART_O_IM 0x00000038 // UART Interrupt Mask
  43. #define UART_O_RIS 0x0000003C // UART Raw Interrupt Status
  44. #define UART_O_MIS 0x00000040 // UART Masked Interrupt Status
  45. #define UART_O_ICR 0x00000044 // UART Interrupt Clear
  46. #define UART_O_DMACTL 0x00000048 // UART DMA Control
  47. #define UART_O_LCTL 0x00000090 // UART LIN Control
  48. #define UART_O_LSS 0x00000094 // UART LIN Snap Shot
  49. #define UART_O_LTIM 0x00000098 // UART LIN Timer
  50. #define UART_O_9BITADDR 0x000000A4 // UART 9-Bit Self Address
  51. #define UART_O_9BITAMASK 0x000000A8 // UART 9-Bit Self Address Mask
  52. #define UART_O_PP 0x00000FC0 // UART Peripheral Properties
  53. #define UART_O_CC 0x00000FC8 // UART Clock Configuration
  54. //*****************************************************************************
  55. //
  56. // The following are defines for the bit fields in the UART_O_DR register.
  57. //
  58. //*****************************************************************************
  59. #define UART_DR_OE 0x00000800 // UART Overrun Error
  60. #define UART_DR_BE 0x00000400 // UART Break Error
  61. #define UART_DR_PE 0x00000200 // UART Parity Error
  62. #define UART_DR_FE 0x00000100 // UART Framing Error
  63. #define UART_DR_DATA_M 0x000000FF // Data Transmitted or Received
  64. #define UART_DR_DATA_S 0
  65. //*****************************************************************************
  66. //
  67. // The following are defines for the bit fields in the UART_O_RSR register.
  68. //
  69. //*****************************************************************************
  70. #define UART_RSR_OE 0x00000008 // UART Overrun Error
  71. #define UART_RSR_BE 0x00000004 // UART Break Error
  72. #define UART_RSR_PE 0x00000002 // UART Parity Error
  73. #define UART_RSR_FE 0x00000001 // UART Framing Error
  74. //*****************************************************************************
  75. //
  76. // The following are defines for the bit fields in the UART_O_ECR register.
  77. //
  78. //*****************************************************************************
  79. #define UART_ECR_DATA_M 0x000000FF // Error Clear
  80. #define UART_ECR_DATA_S 0
  81. //*****************************************************************************
  82. //
  83. // The following are defines for the bit fields in the UART_O_FR register.
  84. //
  85. //*****************************************************************************
  86. #define UART_FR_RI 0x00000100 // Ring Indicator
  87. #define UART_FR_TXFE 0x00000080 // UART Transmit FIFO Empty
  88. #define UART_FR_RXFF 0x00000040 // UART Receive FIFO Full
  89. #define UART_FR_TXFF 0x00000020 // UART Transmit FIFO Full
  90. #define UART_FR_RXFE 0x00000010 // UART Receive FIFO Empty
  91. #define UART_FR_BUSY 0x00000008 // UART Busy
  92. #define UART_FR_DCD 0x00000004 // Data Carrier Detect
  93. #define UART_FR_DSR 0x00000002 // Data Set Ready
  94. #define UART_FR_CTS 0x00000001 // Clear To Send
  95. //*****************************************************************************
  96. //
  97. // The following are defines for the bit fields in the UART_O_ILPR register.
  98. //
  99. //*****************************************************************************
  100. #define UART_ILPR_ILPDVSR_M 0x000000FF // IrDA Low-Power Divisor
  101. #define UART_ILPR_ILPDVSR_S 0
  102. //*****************************************************************************
  103. //
  104. // The following are defines for the bit fields in the UART_O_IBRD register.
  105. //
  106. //*****************************************************************************
  107. #define UART_IBRD_DIVINT_M 0x0000FFFF // Integer Baud-Rate Divisor
  108. #define UART_IBRD_DIVINT_S 0
  109. //*****************************************************************************
  110. //
  111. // The following are defines for the bit fields in the UART_O_FBRD register.
  112. //
  113. //*****************************************************************************
  114. #define UART_FBRD_DIVFRAC_M 0x0000003F // Fractional Baud-Rate Divisor
  115. #define UART_FBRD_DIVFRAC_S 0
  116. //*****************************************************************************
  117. //
  118. // The following are defines for the bit fields in the UART_O_LCRH register.
  119. //
  120. //*****************************************************************************
  121. #define UART_LCRH_SPS 0x00000080 // UART Stick Parity Select
  122. #define UART_LCRH_WLEN_M 0x00000060 // UART Word Length
  123. #define UART_LCRH_WLEN_5 0x00000000 // 5 bits (default)
  124. #define UART_LCRH_WLEN_6 0x00000020 // 6 bits
  125. #define UART_LCRH_WLEN_7 0x00000040 // 7 bits
  126. #define UART_LCRH_WLEN_8 0x00000060 // 8 bits
  127. #define UART_LCRH_FEN 0x00000010 // UART Enable FIFOs
  128. #define UART_LCRH_STP2 0x00000008 // UART Two Stop Bits Select
  129. #define UART_LCRH_EPS 0x00000004 // UART Even Parity Select
  130. #define UART_LCRH_PEN 0x00000002 // UART Parity Enable
  131. #define UART_LCRH_BRK 0x00000001 // UART Send Break
  132. //*****************************************************************************
  133. //
  134. // The following are defines for the bit fields in the UART_O_CTL register.
  135. //
  136. //*****************************************************************************
  137. #define UART_CTL_CTSEN 0x00008000 // Enable Clear To Send
  138. #define UART_CTL_RTSEN 0x00004000 // Enable Request to Send
  139. #define UART_CTL_RTS 0x00000800 // Request to Send
  140. #define UART_CTL_DTR 0x00000400 // Data Terminal Ready
  141. #define UART_CTL_RXE 0x00000200 // UART Receive Enable
  142. #define UART_CTL_TXE 0x00000100 // UART Transmit Enable
  143. #define UART_CTL_LBE 0x00000080 // UART Loop Back Enable
  144. #define UART_CTL_LIN 0x00000040 // LIN Mode Enable
  145. #define UART_CTL_HSE 0x00000020 // High-Speed Enable
  146. #define UART_CTL_EOT 0x00000010 // End of Transmission
  147. #define UART_CTL_SMART 0x00000008 // ISO 7816 Smart Card Support
  148. #define UART_CTL_SIRLP 0x00000004 // UART SIR Low-Power Mode
  149. #define UART_CTL_SIREN 0x00000002 // UART SIR Enable
  150. #define UART_CTL_UARTEN 0x00000001 // UART Enable
  151. //*****************************************************************************
  152. //
  153. // The following are defines for the bit fields in the UART_O_IFLS register.
  154. //
  155. //*****************************************************************************
  156. #define UART_IFLS_RX_M 0x00000038 // UART Receive Interrupt FIFO
  157. // Level Select
  158. #define UART_IFLS_RX1_8 0x00000000 // RX FIFO >= 1/8 full
  159. #define UART_IFLS_RX2_8 0x00000008 // RX FIFO >= 1/4 full
  160. #define UART_IFLS_RX4_8 0x00000010 // RX FIFO >= 1/2 full (default)
  161. #define UART_IFLS_RX6_8 0x00000018 // RX FIFO >= 3/4 full
  162. #define UART_IFLS_RX7_8 0x00000020 // RX FIFO >= 7/8 full
  163. #define UART_IFLS_TX_M 0x00000007 // UART Transmit Interrupt FIFO
  164. // Level Select
  165. #define UART_IFLS_TX1_8 0x00000000 // TX FIFO <= 1/8 full
  166. #define UART_IFLS_TX2_8 0x00000001 // TX FIFO <= 1/4 full
  167. #define UART_IFLS_TX4_8 0x00000002 // TX FIFO <= 1/2 full (default)
  168. #define UART_IFLS_TX6_8 0x00000003 // TX FIFO <= 3/4 full
  169. #define UART_IFLS_TX7_8 0x00000004 // TX FIFO <= 7/8 full
  170. //*****************************************************************************
  171. //
  172. // The following are defines for the bit fields in the UART_O_IM register.
  173. //
  174. //*****************************************************************************
  175. #define UART_IM_LME5IM 0x00008000 // LIN Mode Edge 5 Interrupt Mask
  176. #define UART_IM_LME1IM 0x00004000 // LIN Mode Edge 1 Interrupt Mask
  177. #define UART_IM_LMSBIM 0x00002000 // LIN Mode Sync Break Interrupt
  178. // Mask
  179. #define UART_IM_9BITIM 0x00001000 // 9-Bit Mode Interrupt Mask
  180. #define UART_IM_OEIM 0x00000400 // UART Overrun Error Interrupt
  181. // Mask
  182. #define UART_IM_BEIM 0x00000200 // UART Break Error Interrupt Mask
  183. #define UART_IM_PEIM 0x00000100 // UART Parity Error Interrupt Mask
  184. #define UART_IM_FEIM 0x00000080 // UART Framing Error Interrupt
  185. // Mask
  186. #define UART_IM_RTIM 0x00000040 // UART Receive Time-Out Interrupt
  187. // Mask
  188. #define UART_IM_TXIM 0x00000020 // UART Transmit Interrupt Mask
  189. #define UART_IM_RXIM 0x00000010 // UART Receive Interrupt Mask
  190. #define UART_IM_DSRMIM 0x00000008 // UART Data Set Ready Modem
  191. // Interrupt Mask
  192. #define UART_IM_DCDMIM 0x00000004 // UART Data Carrier Detect Modem
  193. // Interrupt Mask
  194. #define UART_IM_CTSMIM 0x00000002 // UART Clear to Send Modem
  195. // Interrupt Mask
  196. #define UART_IM_RIMIM 0x00000001 // UART Ring Indicator Modem
  197. // Interrupt Mask
  198. //*****************************************************************************
  199. //
  200. // The following are defines for the bit fields in the UART_O_RIS register.
  201. //
  202. //*****************************************************************************
  203. #define UART_RIS_LME5RIS 0x00008000 // LIN Mode Edge 5 Raw Interrupt
  204. // Status
  205. #define UART_RIS_LME1RIS 0x00004000 // LIN Mode Edge 1 Raw Interrupt
  206. // Status
  207. #define UART_RIS_LMSBRIS 0x00002000 // LIN Mode Sync Break Raw
  208. // Interrupt Status
  209. #define UART_RIS_9BITRIS 0x00001000 // 9-Bit Mode Raw Interrupt Status
  210. #define UART_RIS_OERIS 0x00000400 // UART Overrun Error Raw Interrupt
  211. // Status
  212. #define UART_RIS_BERIS 0x00000200 // UART Break Error Raw Interrupt
  213. // Status
  214. #define UART_RIS_PERIS 0x00000100 // UART Parity Error Raw Interrupt
  215. // Status
  216. #define UART_RIS_FERIS 0x00000080 // UART Framing Error Raw Interrupt
  217. // Status
  218. #define UART_RIS_RTRIS 0x00000040 // UART Receive Time-Out Raw
  219. // Interrupt Status
  220. #define UART_RIS_TXRIS 0x00000020 // UART Transmit Raw Interrupt
  221. // Status
  222. #define UART_RIS_RXRIS 0x00000010 // UART Receive Raw Interrupt
  223. // Status
  224. #define UART_RIS_DSRRIS 0x00000008 // UART Data Set Ready Modem Raw
  225. // Interrupt Status
  226. #define UART_RIS_DCDRIS 0x00000004 // UART Data Carrier Detect Modem
  227. // Raw Interrupt Status
  228. #define UART_RIS_CTSRIS 0x00000002 // UART Clear to Send Modem Raw
  229. // Interrupt Status
  230. #define UART_RIS_RIRIS 0x00000001 // UART Ring Indicator Modem Raw
  231. // Interrupt Status
  232. //*****************************************************************************
  233. //
  234. // The following are defines for the bit fields in the UART_O_MIS register.
  235. //
  236. //*****************************************************************************
  237. #define UART_MIS_LME5MIS 0x00008000 // LIN Mode Edge 5 Masked Interrupt
  238. // Status
  239. #define UART_MIS_LME1MIS 0x00004000 // LIN Mode Edge 1 Masked Interrupt
  240. // Status
  241. #define UART_MIS_LMSBMIS 0x00002000 // LIN Mode Sync Break Masked
  242. // Interrupt Status
  243. #define UART_MIS_9BITMIS 0x00001000 // 9-Bit Mode Masked Interrupt
  244. // Status
  245. #define UART_MIS_OEMIS 0x00000400 // UART Overrun Error Masked
  246. // Interrupt Status
  247. #define UART_MIS_BEMIS 0x00000200 // UART Break Error Masked
  248. // Interrupt Status
  249. #define UART_MIS_PEMIS 0x00000100 // UART Parity Error Masked
  250. // Interrupt Status
  251. #define UART_MIS_FEMIS 0x00000080 // UART Framing Error Masked
  252. // Interrupt Status
  253. #define UART_MIS_RTMIS 0x00000040 // UART Receive Time-Out Masked
  254. // Interrupt Status
  255. #define UART_MIS_TXMIS 0x00000020 // UART Transmit Masked Interrupt
  256. // Status
  257. #define UART_MIS_RXMIS 0x00000010 // UART Receive Masked Interrupt
  258. // Status
  259. #define UART_MIS_DSRMIS 0x00000008 // UART Data Set Ready Modem Masked
  260. // Interrupt Status
  261. #define UART_MIS_DCDMIS 0x00000004 // UART Data Carrier Detect Modem
  262. // Masked Interrupt Status
  263. #define UART_MIS_CTSMIS 0x00000002 // UART Clear to Send Modem Masked
  264. // Interrupt Status
  265. #define UART_MIS_RIMIS 0x00000001 // UART Ring Indicator Modem Masked
  266. // Interrupt Status
  267. //*****************************************************************************
  268. //
  269. // The following are defines for the bit fields in the UART_O_ICR register.
  270. //
  271. //*****************************************************************************
  272. #define UART_ICR_LME5IC 0x00008000 // LIN Mode Edge 5 Interrupt Clear
  273. #define UART_ICR_LME1IC 0x00004000 // LIN Mode Edge 1 Interrupt Clear
  274. #define UART_ICR_LMSBIC 0x00002000 // LIN Mode Sync Break Interrupt
  275. // Clear
  276. #define UART_ICR_9BITIC 0x00001000 // 9-Bit Mode Interrupt Clear
  277. #define UART_ICR_OEIC 0x00000400 // Overrun Error Interrupt Clear
  278. #define UART_ICR_BEIC 0x00000200 // Break Error Interrupt Clear
  279. #define UART_ICR_PEIC 0x00000100 // Parity Error Interrupt Clear
  280. #define UART_ICR_FEIC 0x00000080 // Framing Error Interrupt Clear
  281. #define UART_ICR_RTIC 0x00000040 // Receive Time-Out Interrupt Clear
  282. #define UART_ICR_TXIC 0x00000020 // Transmit Interrupt Clear
  283. #define UART_ICR_RXIC 0x00000010 // Receive Interrupt Clear
  284. #define UART_ICR_DSRMIC 0x00000008 // UART Data Set Ready Modem
  285. // Interrupt Clear
  286. #define UART_ICR_DCDMIC 0x00000004 // UART Data Carrier Detect Modem
  287. // Interrupt Clear
  288. #define UART_ICR_CTSMIC 0x00000002 // UART Clear to Send Modem
  289. // Interrupt Clear
  290. #define UART_ICR_RIMIC 0x00000001 // UART Ring Indicator Modem
  291. // Interrupt Clear
  292. //*****************************************************************************
  293. //
  294. // The following are defines for the bit fields in the UART_O_DMACTL register.
  295. //
  296. //*****************************************************************************
  297. #define UART_DMACTL_DMAERR 0x00000004 // DMA on Error
  298. #define UART_DMACTL_TXDMAE 0x00000002 // Transmit DMA Enable
  299. #define UART_DMACTL_RXDMAE 0x00000001 // Receive DMA Enable
  300. //*****************************************************************************
  301. //
  302. // The following are defines for the bit fields in the UART_O_LCTL register.
  303. //
  304. //*****************************************************************************
  305. #define UART_LCTL_BLEN_M 0x00000030 // Sync Break Length
  306. #define UART_LCTL_BLEN_13T 0x00000000 // Sync break length is 13T bits
  307. // (default)
  308. #define UART_LCTL_BLEN_14T 0x00000010 // Sync break length is 14T bits
  309. #define UART_LCTL_BLEN_15T 0x00000020 // Sync break length is 15T bits
  310. #define UART_LCTL_BLEN_16T 0x00000030 // Sync break length is 16T bits
  311. #define UART_LCTL_MASTER 0x00000001 // LIN Master Enable
  312. //*****************************************************************************
  313. //
  314. // The following are defines for the bit fields in the UART_O_LSS register.
  315. //
  316. //*****************************************************************************
  317. #define UART_LSS_TSS_M 0x0000FFFF // Timer Snap Shot
  318. #define UART_LSS_TSS_S 0
  319. //*****************************************************************************
  320. //
  321. // The following are defines for the bit fields in the UART_O_LTIM register.
  322. //
  323. //*****************************************************************************
  324. #define UART_LTIM_TIMER_M 0x0000FFFF // Timer Value
  325. #define UART_LTIM_TIMER_S 0
  326. //*****************************************************************************
  327. //
  328. // The following are defines for the bit fields in the UART_O_9BITADDR
  329. // register.
  330. //
  331. //*****************************************************************************
  332. #define UART_9BITADDR_9BITEN 0x00008000 // Enable 9-Bit Mode
  333. #define UART_9BITADDR_ADDR_M 0x000000FF // Self Address for 9-Bit Mode
  334. #define UART_9BITADDR_ADDR_S 0
  335. //*****************************************************************************
  336. //
  337. // The following are defines for the bit fields in the UART_O_9BITAMASK
  338. // register.
  339. //
  340. //*****************************************************************************
  341. #define UART_9BITAMASK_RANGE_M 0x0000FF00 // Self Address Range for 9-Bit
  342. // Mode
  343. #define UART_9BITAMASK_MASK_M 0x000000FF // Self Address Mask for 9-Bit Mode
  344. #define UART_9BITAMASK_RANGE_S 8
  345. #define UART_9BITAMASK_MASK_S 0
  346. //*****************************************************************************
  347. //
  348. // The following are defines for the bit fields in the UART_O_PP register.
  349. //
  350. //*****************************************************************************
  351. #define UART_PP_NB 0x00000002 // 9-Bit Support
  352. #define UART_PP_SC 0x00000001 // Smart Card Support
  353. //*****************************************************************************
  354. //
  355. // The following are defines for the bit fields in the UART_O_CC register.
  356. //
  357. //*****************************************************************************
  358. #define UART_CC_CS_M 0x0000000F // UART Baud Clock Source
  359. #define UART_CC_CS_SYSCLK 0x00000000 // The system clock (default)
  360. #define UART_CC_CS_PIOSC 0x00000001 // PIOSC
  361. //*****************************************************************************
  362. //
  363. // The following definitions are deprecated.
  364. //
  365. //*****************************************************************************
  366. #ifndef DEPRECATED
  367. //*****************************************************************************
  368. //
  369. // The following are deprecated defines for the UART register offsets.
  370. //
  371. //*****************************************************************************
  372. #define UART_O_LCR_H 0x0000002C // Line Control Register, HIGH byte
  373. #define UART_O_PeriphID4 0x00000FD0
  374. #define UART_O_PeriphID5 0x00000FD4
  375. #define UART_O_PeriphID6 0x00000FD8
  376. #define UART_O_PeriphID7 0x00000FDC
  377. #define UART_O_PeriphID0 0x00000FE0
  378. #define UART_O_PeriphID1 0x00000FE4
  379. #define UART_O_PeriphID2 0x00000FE8
  380. #define UART_O_PeriphID3 0x00000FEC
  381. #define UART_O_PCellID0 0x00000FF0
  382. #define UART_O_PCellID1 0x00000FF4
  383. #define UART_O_PCellID2 0x00000FF8
  384. #define UART_O_PCellID3 0x00000FFC
  385. //*****************************************************************************
  386. //
  387. // The following are deprecated defines for the bit fields in the UART_O_DR
  388. // register.
  389. //
  390. //*****************************************************************************
  391. #define UART_DR_DATA_MASK 0x000000FF // UART data
  392. //*****************************************************************************
  393. //
  394. // The following are deprecated defines for the bit fields in the UART_O_IBRD
  395. // register.
  396. //
  397. //*****************************************************************************
  398. #define UART_IBRD_DIVINT_MASK 0x0000FFFF // Integer baud-rate divisor
  399. //*****************************************************************************
  400. //
  401. // The following are deprecated defines for the bit fields in the UART_O_FBRD
  402. // register.
  403. //
  404. //*****************************************************************************
  405. #define UART_FBRD_DIVFRAC_MASK 0x0000003F // Fractional baud-rate divisor
  406. //*****************************************************************************
  407. //
  408. // The following are deprecated defines for the bit fields in the UART_O_LCR_H
  409. // register.
  410. //
  411. //*****************************************************************************
  412. #define UART_LCR_H_SPS 0x00000080 // Stick Parity Select
  413. #define UART_LCR_H_WLEN 0x00000060 // Word length
  414. #define UART_LCR_H_WLEN_5 0x00000000 // 5 bit data
  415. #define UART_LCR_H_WLEN_6 0x00000020 // 6 bit data
  416. #define UART_LCR_H_WLEN_7 0x00000040 // 7 bit data
  417. #define UART_LCR_H_WLEN_8 0x00000060 // 8 bit data
  418. #define UART_LCR_H_FEN 0x00000010 // Enable FIFO
  419. #define UART_LCR_H_STP2 0x00000008 // Two Stop Bits Select
  420. #define UART_LCR_H_EPS 0x00000004 // Even Parity Select
  421. #define UART_LCR_H_PEN 0x00000002 // Parity Enable
  422. #define UART_LCR_H_BRK 0x00000001 // Send Break
  423. //*****************************************************************************
  424. //
  425. // The following are deprecated defines for the bit fields in the UART_O_IFLS
  426. // register.
  427. //
  428. //*****************************************************************************
  429. #define UART_IFLS_RX_MASK 0x00000038 // RX FIFO level mask
  430. #define UART_IFLS_TX_MASK 0x00000007 // TX FIFO level mask
  431. //*****************************************************************************
  432. //
  433. // The following are deprecated defines for the bit fields in the UART_O_ICR
  434. // register.
  435. //
  436. //*****************************************************************************
  437. #define UART_ICR_LME5MIC 0x00008000 // LIN Mode Edge 5 Interrupt Clear
  438. #define UART_ICR_LME1MIC 0x00004000 // LIN Mode Edge 1 Interrupt Clear
  439. #define UART_ICR_LMSBMIC 0x00002000 // LIN Mode Sync Break Interrupt
  440. // Clear
  441. #define UART_RSR_ANY (UART_RSR_OE | UART_RSR_BE | UART_RSR_PE | \
  442. UART_RSR_FE)
  443. //*****************************************************************************
  444. //
  445. // The following are deprecated defines for the Reset Values for UART
  446. // Registers.
  447. //
  448. //*****************************************************************************
  449. #define UART_RV_CTL 0x00000300
  450. #define UART_RV_PCellID1 0x000000F0
  451. #define UART_RV_PCellID3 0x000000B1
  452. #define UART_RV_FR 0x00000090
  453. #define UART_RV_PeriphID2 0x00000018
  454. #define UART_RV_IFLS 0x00000012
  455. #define UART_RV_PeriphID0 0x00000011
  456. #define UART_RV_PCellID0 0x0000000D
  457. #define UART_RV_PCellID2 0x00000005
  458. #define UART_RV_PeriphID3 0x00000001
  459. #define UART_RV_PeriphID4 0x00000000
  460. #define UART_RV_LCR_H 0x00000000
  461. #define UART_RV_PeriphID6 0x00000000
  462. #define UART_RV_DR 0x00000000
  463. #define UART_RV_RSR 0x00000000
  464. #define UART_RV_ECR 0x00000000
  465. #define UART_RV_PeriphID5 0x00000000
  466. #define UART_RV_RIS 0x00000000
  467. #define UART_RV_FBRD 0x00000000
  468. #define UART_RV_IM 0x00000000
  469. #define UART_RV_MIS 0x00000000
  470. #define UART_RV_ICR 0x00000000
  471. #define UART_RV_PeriphID1 0x00000000
  472. #define UART_RV_PeriphID7 0x00000000
  473. #define UART_RV_IBRD 0x00000000
  474. #endif
  475. #endif // __HW_UART_H__