uart_8xx.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491
  1. /*
  2. * @brief LPC8xx UART driver
  3. *
  4. * @note
  5. * Copyright(C) NXP Semiconductors, 2012
  6. * All rights reserved.
  7. *
  8. * @par
  9. * Software that is described herein is for illustrative purposes only
  10. * which provides customers with programming information regarding the
  11. * LPC products. This software is supplied "AS IS" without any warranties of
  12. * any kind, and NXP Semiconductors and its licensor disclaim any and
  13. * all warranties, express or implied, including all implied warranties of
  14. * merchantability, fitness for a particular purpose and non-infringement of
  15. * intellectual property rights. NXP Semiconductors assumes no responsibility
  16. * or liability for the use of the software, conveys no license or rights under any
  17. * patent, copyright, mask work right, or any other intellectual property rights in
  18. * or to any products. NXP Semiconductors reserves the right to make changes
  19. * in the software without notification. NXP Semiconductors also makes no
  20. * representation or warranty that such application will be suitable for the
  21. * specified use without further testing or modification.
  22. *
  23. * @par
  24. * Permission to use, copy, modify, and distribute this software and its
  25. * documentation is hereby granted, under NXP Semiconductors' and its
  26. * licensor's relevant copyrights in the software, without fee, provided that it
  27. * is used in conjunction with NXP Semiconductors microcontrollers. This
  28. * copyright, permission, and disclaimer notice must appear in all copies of
  29. * this code.
  30. */
  31. #ifndef __UART_8XX_H_
  32. #define __UART_8XX_H_
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36. #include "ring_buffer.h"
  37. /** @defgroup UART_8XX CHIP: LPC8xx UART Driver
  38. * @ingroup CHIP_8XX_Drivers
  39. * @{
  40. */
  41. /**
  42. * @brief UART register block structure
  43. */
  44. typedef struct {
  45. __IO uint32_t CFG; /*!< Configuration register */
  46. __IO uint32_t CTRL; /*!< Control register */
  47. __IO uint32_t STAT; /*!< Status register */
  48. __IO uint32_t INTENSET; /*!< Interrupt Enable read and set register */
  49. __O uint32_t INTENCLR; /*!< Interrupt Enable clear register */
  50. __I uint32_t RXDATA; /*!< Receive Data register */
  51. __I uint32_t RXDATA_STAT; /*!< Receive Data with status register */
  52. __IO uint32_t TXDATA; /*!< Transmit data register */
  53. __IO uint32_t BRG; /*!< Baud Rate Generator register */
  54. __IO uint32_t INTSTAT; /*!< Interrupt status register */
  55. __IO uint32_t OSR; /*!< Oversampling Selection regiser */
  56. __IO uint32_t ADDR; /*!< Address register for automatic address matching */
  57. } LPC_USART_T;
  58. /**
  59. * @brief UART CFG register definitions
  60. */
  61. #define UART_CFG_ENABLE (0x01 << 0)
  62. #define UART_CFG_DATALEN_7 (0x00 << 2) /*!< UART 7 bit length mode */
  63. #define UART_CFG_DATALEN_8 (0x01 << 2) /*!< UART 8 bit length mode */
  64. #define UART_CFG_DATALEN_9 (0x02 << 2) /*!< UART 9 bit length mode */
  65. #define UART_CFG_PARITY_NONE (0x00 << 4) /*!< No parity */
  66. #define UART_CFG_PARITY_EVEN (0x02 << 4) /*!< Even parity */
  67. #define UART_CFG_PARITY_ODD (0x03 << 4) /*!< Odd parity */
  68. #define UART_CFG_STOPLEN_1 (0x00 << 6) /*!< UART One Stop Bit Select */
  69. #define UART_CFG_STOPLEN_2 (0x01 << 6) /*!< UART Two Stop Bits Select */
  70. #define UART_CFG_CTSEN (0x01 << 9) /*!< CTS enable bit */
  71. #define UART_CFG_SYNCEN (0x01 << 11) /*!< Synchronous mode enable bit */
  72. #define UART_CFG_CLKPOL (0x01 << 12) /*!< Un_RXD rising edge sample enable bit */
  73. #define UART_CFG_SYNCMST (0x01 << 14) /*!< Select master mode (synchronous mode) enable bit */
  74. #define UART_CFG_LOOP (0x01 << 15) /*!< Loopback mode enable bit */
  75. #ifdef CHIP_LPC82X /* LPC82X specific bits */
  76. #define UART_CFG_OETA (0x01 << 18) /*!< Output Enable Turnaround time for RS485 */
  77. #define UART_CFG_AUTOADDR (0x01 << 19) /*!< Automatic address matching enable */
  78. #define UART_CFG_OESEL (0x01 << 20) /*!< Output enable select */
  79. #define UART_CFG_OEPOL (0x01 << 21) /*!< Output enable polarity */
  80. #define UART_CFG_RXPOL (0x01 << 22) /*!< Receive data polarity */
  81. #define UART_CFG_TXPOL (0x01 << 22) /*!< Transmit data polarity */
  82. #define UART_CFG_RESERVED ((1<<1)|(1<<7)|(1<<8)|(1<<10)|(1<<13)|(3 << 16)|(0xffu<<24))
  83. #else
  84. #define UART_CFG_RESERVED ((1<<1)|(1<<7)|(1<<8)|(1<<10)|(1<<13)|(0xffffu<<16))
  85. #endif
  86. /**
  87. * @brief UART CTRL register definitions
  88. */
  89. #define UART_CTRL_TXBRKEN (0x01 << 1) /*!< Continuous break enable bit */
  90. #define UART_CTRL_ADDRDET (0x01 << 2) /*!< Address detect mode enable bit */
  91. #define UART_CTRL_TXDIS (0x01 << 6) /*!< Transmit disable bit */
  92. #define UART_CTRL_CC (0x01 << 8) /*!< Continuous Clock mode enable bit */
  93. #define UART_CTRL_CLRCC (0x01 << 9) /*!< Clear Continuous Clock bit */
  94. #ifdef CHIP_LPC82X
  95. #define UART_CTRL_AUTOBAUD (1 << 16) /*!< Enable UART Autobaud */
  96. #define UART_CTRL_RESERVED (0xFFFEFCB9U)
  97. #else
  98. #define UART_CTRL_RESERVED (1|(7<<3)|(1<<7)|0xfffffc00u)
  99. #endif
  100. /**
  101. * @brief UART STAT register definitions
  102. */
  103. #define UART_STAT_RXRDY (0x01 << 0) /*!< Receiver ready */
  104. #define UART_STAT_RXIDLE (0x01 << 1) /*!< Receiver idle */
  105. #define UART_STAT_TXRDY (0x01 << 2) /*!< Transmitter ready for data */
  106. #define UART_STAT_TXIDLE (0x01 << 3) /*!< Transmitter idle */
  107. #define UART_STAT_CTS (0x01 << 4) /*!< Status of CTS signal */
  108. #define UART_STAT_DELTACTS (0x01 << 5) /*!< Change in CTS state */
  109. #define UART_STAT_TXDISINT (0x01 << 6) /*!< Transmitter disabled */
  110. #define UART_STAT_OVERRUNINT (0x01 << 8) /*!< Overrun Error interrupt flag. */
  111. #define UART_STAT_RXBRK (0x01 << 10) /*!< Received break */
  112. #define UART_STAT_DELTARXBRK (0x01 << 11) /*!< Change in receive break detection */
  113. #define UART_STAT_START (0x01 << 12) /*!< Start detected */
  114. #define UART_STAT_FRM_ERRINT (0x01 << 13) /*!< Framing Error interrupt flag */
  115. #define UART_STAT_PAR_ERRINT (0x01 << 14) /*!< Parity Error interrupt flag */
  116. #define UART_STAT_RXNOISEINT (0x01 << 15) /*!< Received Noise interrupt flag */
  117. #ifdef CHIP_LPC82X
  118. #define UART_STAT_ABERR (0x01 << 16) /*!< Auto baud error */
  119. #define UART_STAT_RESERVED ((1<<7)|(1<<9)|(0xFFFEU<<16))
  120. #else
  121. #define UART_STAT_RESERVED ((1<<7)|(1<<9)|(0xffffu<<16))
  122. #endif
  123. /**
  124. * @brief UART INTENSET/INTENCLR register definitions
  125. */
  126. #define UART_INTEN_RXRDY (0x01 << 0) /*!< Receive Ready interrupt */
  127. #define UART_INTEN_TXRDY (0x01 << 2) /*!< Transmit Ready interrupt */
  128. #define UART_INTEN_DELTACTS (0x01 << 5) /*!< Change in CTS state interrupt */
  129. #define UART_INTEN_TXDIS (0x01 << 6) /*!< Transmitter disable interrupt */
  130. #define UART_INTEN_OVERRUN (0x01 << 8) /*!< Overrun error interrupt */
  131. #define UART_INTEN_DELTARXBRK (0x01 << 11) /*!< Change in receiver break detection interrupt */
  132. #define UART_INTEN_START (0x01 << 12) /*!< Start detect interrupt */
  133. #define UART_INTEN_FRAMERR (0x01 << 13) /*!< Frame error interrupt */
  134. #define UART_INTEN_PARITYERR (0x01 << 14) /*!< Parity error interrupt */
  135. #define UART_INTEN_RXNOISE (0x01 << 15) /*!< Received noise interrupt */
  136. #ifdef CHIP_LPC82X
  137. #define UART_INTEN_TXIDLE (0x01 << 3) /*!< TX Idle enable/clear */
  138. #define UART_INTEN_ABERR (0x01 << 16) /*!< Auto baud error */
  139. #define UART_INTEN_RESERVED ((1<<1)|(1<<4)|(1<<7)|(3<<9)|(0xfffeu<<16))
  140. #define UART_INTSTAT_RESERVED ((1<<1)|(1<<4)|(1<<7)|(3<<9)|(0xfffeu<<16))
  141. #else
  142. #define UART_INTEN_RESERVED ((1<<1)|(3<<3)|(1<<7)|(3<<9)|(0xffffu<<16))
  143. #define UART_INTSTAT_RESERVED ((1<<1)|(3<<3)|(1<<7)|(3<<9)|(0xffffu<<16))
  144. #endif
  145. /**
  146. * @brief Enable the UART
  147. * @param pUART : Pointer to selected UARTx peripheral
  148. * @return Nothing
  149. */
  150. STATIC INLINE void Chip_UART_Enable(LPC_USART_T *pUART)
  151. {
  152. pUART->CFG = UART_CFG_ENABLE | (pUART->CFG & ~UART_CFG_RESERVED);
  153. }
  154. /**
  155. * @brief Disable the UART
  156. * @param pUART : Pointer to selected UARTx peripheral
  157. * @return Nothing
  158. */
  159. STATIC INLINE void Chip_UART_Disable(LPC_USART_T *pUART)
  160. {
  161. pUART->CFG &= ~(UART_CFG_RESERVED | UART_CFG_ENABLE);
  162. }
  163. STATIC INLINE void Chip_UART_LoopbackConfig(LPC_USART_T *pUART, uint32_t isEn)
  164. {
  165. if (isEn)
  166. pUART->CFG |= UART_CFG_LOOP;
  167. else
  168. pUART->CFG &= ~UART_CFG_LOOP;
  169. }
  170. /**
  171. * @brief Enable transmission on UART TxD pin
  172. * @param pUART : Pointer to selected pUART peripheral
  173. * @return Nothing
  174. */
  175. STATIC INLINE void Chip_UART_TXEnable(LPC_USART_T *pUART)
  176. {
  177. pUART->CTRL &= ~(UART_CTRL_RESERVED | UART_CTRL_TXDIS);
  178. }
  179. /**
  180. * @brief Disable transmission on UART TxD pin
  181. * @param pUART : Pointer to selected pUART peripheral
  182. * @return Nothing
  183. */
  184. STATIC INLINE void Chip_UART_TXDisable(LPC_USART_T *pUART)
  185. {
  186. pUART->CTRL = UART_CTRL_TXDIS | (pUART->CTRL & ~UART_CTRL_RESERVED);
  187. }
  188. /**
  189. * @brief Transmit a single data byte through the UART peripheral
  190. * @param pUART : Pointer to selected UART peripheral
  191. * @param data : Byte to transmit
  192. * @return Nothing
  193. * @note This function attempts to place a byte into the UART transmit
  194. * holding register regard regardless of UART state.
  195. */
  196. STATIC INLINE void Chip_UART_SendByte(LPC_USART_T *pUART, uint8_t data)
  197. {
  198. pUART->TXDATA = (uint32_t) data;
  199. }
  200. /**
  201. * @brief Read a single byte data from the UART peripheral
  202. * @param pUART : Pointer to selected UART peripheral
  203. * @return A single byte of data read
  204. * @note This function reads a byte from the UART receive FIFO or
  205. * receive hold register regard regardless of UART state. The
  206. * FIFO status should be read first prior to using this function
  207. */
  208. STATIC INLINE uint32_t Chip_UART_ReadByte(LPC_USART_T *pUART)
  209. {
  210. /* Strip off undefined reserved bits, keep 9 lower bits */
  211. return (uint32_t) (pUART->RXDATA & 0x000001FF);
  212. }
  213. /**
  214. * @brief Enable UART interrupts
  215. * @param pUART : Pointer to selected UART peripheral
  216. * @param intMask : OR'ed Interrupts to enable
  217. * @return Nothing
  218. * @note Use an OR'ed value of UART_INTEN_* definitions with this function
  219. * to enable specific UART interrupts.
  220. */
  221. STATIC INLINE void Chip_UART_IntEnable(LPC_USART_T *pUART, uint32_t intMask)
  222. {
  223. pUART->INTENSET = intMask;
  224. }
  225. /**
  226. * @brief Disable UART interrupts
  227. * @param pUART : Pointer to selected UART peripheral
  228. * @param intMask : OR'ed Interrupts to disable
  229. * @return Nothing
  230. * @note Use an OR'ed value of UART_INTEN_* definitions with this function
  231. * to disable specific UART interrupts.
  232. */
  233. STATIC INLINE void Chip_UART_IntDisable(LPC_USART_T *pUART, uint32_t intMask)
  234. {
  235. pUART->INTENCLR = intMask;
  236. }
  237. /**
  238. * @brief Returns UART interrupts that are enabled
  239. * @param pUART : Pointer to selected UART peripheral
  240. * @return Returns the enabled UART interrupts
  241. * @note Use an OR'ed value of UART_INTEN_* definitions with this function
  242. * to determine which interrupts are enabled. You can check
  243. * for multiple enabled bits if needed.
  244. */
  245. STATIC INLINE uint32_t Chip_UART_GetIntsEnabled(LPC_USART_T *pUART)
  246. {
  247. return (pUART->INTENSET & ~UART_INTEN_RESERVED);
  248. }
  249. /**
  250. * @brief Get UART interrupt status
  251. * @param pUART : The base of UART peripheral on the chip
  252. * @return The Interrupt status register of UART
  253. * @note Multiple interrupts may be pending. Mask the return value
  254. * with one or more UART_INTEN_* definitions to determine
  255. * pending interrupts.
  256. */
  257. STATIC INLINE uint32_t Chip_UART_GetIntStatus(LPC_USART_T *pUART)
  258. {
  259. return (pUART->INTSTAT & ~UART_INTSTAT_RESERVED);
  260. }
  261. /**
  262. * @brief Configure data width, parity and stop bits
  263. * @param pUART : Pointer to selected pUART peripheral
  264. * @param config : UART configuration, OR'ed values of select UART_CFG_* defines
  265. * @return Nothing
  266. * @note Select OR'ed config options for the UART from the UART_CFG_PARITY_*,
  267. * UART_CFG_STOPLEN_*, and UART_CFG_DATALEN_* definitions. For example,
  268. * a configuration of 8 data bits, 1 stop bit, and even (enabled) parity would be
  269. * (UART_CFG_DATALEN_8 | UART_CFG_STOPLEN_1 | UART_CFG_PARITY_EVEN). Will not
  270. * alter other bits in the CFG register.
  271. */
  272. STATIC INLINE void Chip_UART_ConfigData(LPC_USART_T *pUART, uint32_t config)
  273. {
  274. uint32_t reg;
  275. reg = pUART->CFG & ~((0x3 << 2) | (0x3 << 4) | (0x1 << 6) | UART_CFG_RESERVED);
  276. pUART->CFG = reg | config;
  277. }
  278. /**
  279. * @brief Get the UART status register
  280. * @param pUART : Pointer to selected UARTx peripheral
  281. * @return UART status register
  282. * @note Multiple statuses may be pending. Mask the return value
  283. * with one or more UART_STAT_* definitions to determine
  284. * statuses.
  285. */
  286. STATIC INLINE uint32_t Chip_UART_GetStatus(LPC_USART_T *pUART)
  287. {
  288. return (pUART->STAT & ~UART_STAT_RESERVED);
  289. }
  290. /**
  291. * @brief Clear the UART status register
  292. * @param pUART : Pointer to selected UARTx peripheral
  293. * @param stsMask : OR'ed statuses to disable
  294. * @return Nothing
  295. * @note Multiple interrupts may be pending. Mask the return value
  296. * with one or more UART_INTEN_* definitions to determine
  297. * pending interrupts.
  298. */
  299. STATIC INLINE void Chip_UART_ClearStatus(LPC_USART_T *pUART, uint32_t stsMask)
  300. {
  301. pUART->STAT = stsMask;
  302. }
  303. /**
  304. * @brief Set oversample value
  305. * @param pUART : Pointer to selected UARTx peripheral
  306. * @param ovrVal : Oversample value (can be from 5 to 16)
  307. * @return Nothing
  308. * @note The valid values for ovrVal is 5 to 16 (samples per bit)
  309. */
  310. STATIC INLINE void Chip_UART_SetOSR(LPC_USART_T *pUART, uint32_t ovrVal)
  311. {
  312. pUART->OSR = ovrVal - 1;
  313. }
  314. /**
  315. * @brief Set address for hardware address matching
  316. * @param pUART : Pointer to selected UARTx peripheral
  317. * @param addr : Address to compare (0x00 to 0xFF)
  318. * @return Nothing
  319. * @note The valid values for addr is 0x00 to 0xFF
  320. */
  321. STATIC INLINE void Chip_UART_SetAddr(LPC_USART_T *pUART, uint32_t addr)
  322. {
  323. pUART->ADDR = addr;
  324. }
  325. /**
  326. * @brief Initialize the UART peripheral
  327. * @param pUART : The base of UART peripheral on the chip
  328. * @return Nothing
  329. */
  330. void Chip_UART_Init(LPC_USART_T *pUART);
  331. /**
  332. * @brief Deinitialize the UART peripheral
  333. * @param pUART : The base of UART peripheral on the chip
  334. * @return Nothing
  335. */
  336. void Chip_UART_DeInit(LPC_USART_T *pUART);
  337. /**
  338. * @brief Transmit a byte array through the UART peripheral (non-blocking)
  339. * @param pUART : Pointer to selected UART peripheral
  340. * @param data : Pointer to bytes to transmit
  341. * @param numBytes : Number of bytes to transmit
  342. * @return The actual number of bytes placed into the FIFO
  343. * @note This function places data into the transmit FIFO until either
  344. * all the data is in the FIFO or the FIFO is full. This function
  345. * will not block in the FIFO is full. The actual number of bytes
  346. * placed into the FIFO is returned. This function ignores errors.
  347. */
  348. int Chip_UART_Send(LPC_USART_T *pUART, const void *data, int numBytes);
  349. /**
  350. * @brief Read data through the UART peripheral (non-blocking)
  351. * @param pUART : Pointer to selected UART peripheral
  352. * @param data : Pointer to bytes array to fill
  353. * @param numBytes : Size of the passed data array
  354. * @return The actual number of bytes read
  355. * @note This function reads data from the receive FIFO until either
  356. * all the data has been read or the passed buffer is completely full.
  357. * This function will not block. This function ignores errors.
  358. */
  359. int Chip_UART_Read(LPC_USART_T *pUART, void *data, int numBytes);
  360. /**
  361. * @brief Set baud rate for UART
  362. * @param pUART : The base of UART peripheral on the chip
  363. * @param baudrate: Baud rate to be set
  364. * @return Nothing
  365. */
  366. void Chip_UART_SetBaud(LPC_USART_T *pUART, uint32_t baudrate);
  367. /**
  368. * @brief Transmit a byte array through the UART peripheral (blocking)
  369. * @param pUART : Pointer to selected UART peripheral
  370. * @param data : Pointer to data to transmit
  371. * @param numBytes : Number of bytes to transmit
  372. * @return The number of bytes transmitted
  373. * @note This function will send or place all bytes into the transmit
  374. * FIFO. This function will block until the last bytes are in the FIFO.
  375. */
  376. int Chip_UART_SendBlocking(LPC_USART_T *pUART, const void *data, int numBytes);
  377. /**
  378. * @brief Read data through the UART peripheral (blocking)
  379. * @param pUART : Pointer to selected UART peripheral
  380. * @param data : Pointer to data array to fill
  381. * @param numBytes : Size of the passed data array
  382. * @return The size of the dat array
  383. * @note This function reads data from the receive FIFO until the passed
  384. * buffer is completely full. The function will block until full.
  385. * This function ignores errors.
  386. */
  387. int Chip_UART_ReadBlocking(LPC_USART_T *pUART, void *data, int numBytes);
  388. /**
  389. * @brief UART receive-only interrupt handler for ring buffers
  390. * @param pUART : Pointer to selected UART peripheral
  391. * @param pRB : Pointer to ring buffer structure to use
  392. * @return Nothing
  393. * @note If ring buffer support is desired for the receive side
  394. * of data transfer, the UART interrupt should call this
  395. * function for a receive based interrupt status.
  396. */
  397. void Chip_UART_RXIntHandlerRB(LPC_USART_T *pUART, RINGBUFF_T *pRB);
  398. /**
  399. * @brief UART transmit-only interrupt handler for ring buffers
  400. * @param pUART : Pointer to selected UART peripheral
  401. * @param pRB : Pointer to ring buffer structure to use
  402. * @return Nothing
  403. * @note If ring buffer support is desired for the transmit side
  404. * of data transfer, the UART interrupt should call this
  405. * function for a transmit based interrupt status.
  406. */
  407. void Chip_UART_TXIntHandlerRB(LPC_USART_T *pUART, RINGBUFF_T *pRB);
  408. /**
  409. * @brief Populate a transmit ring buffer and start UART transmit
  410. * @param pUART : Pointer to selected UART peripheral
  411. * @param pRB : Pointer to ring buffer structure to use
  412. * @param data : Pointer to buffer to move to ring buffer
  413. * @param count : Number of bytes to move
  414. * @return The number of bytes placed into the ring buffer
  415. * @note Will move the data into the TX ring buffer and start the
  416. * transfer. If the number of bytes returned is less than the
  417. * number of bytes to send, the ring buffer is considered full.
  418. */
  419. uint32_t Chip_UART_SendRB(LPC_USART_T *pUART, RINGBUFF_T *pRB, const void *data, int count);
  420. /**
  421. * @brief Copy data from a receive ring buffer
  422. * @param pUART : Pointer to selected UART peripheral
  423. * @param pRB : Pointer to ring buffer structure to use
  424. * @param data : Pointer to buffer to fill from ring buffer
  425. * @param bytes : Size of the passed buffer in bytes
  426. * @return The number of bytes placed into the ring buffer
  427. * @note Will move the data from the RX ring buffer up to the
  428. * the maximum passed buffer size. Returns 0 if there is
  429. * no data in the ring buffer.
  430. */
  431. int Chip_UART_ReadRB(LPC_USART_T *pUART, RINGBUFF_T *pRB, void *data, int bytes);
  432. /**
  433. * @brief UART receive/transmit interrupt handler for ring buffers
  434. * @param pUART : Pointer to selected UART peripheral
  435. * @param pRXRB : Pointer to transmit ring buffer
  436. * @param pTXRB : Pointer to receive ring buffer
  437. * @return Nothing
  438. * @note This provides a basic implementation of the UART IRQ
  439. * handler for support of a ring buffer implementation for
  440. * transmit and receive.
  441. */
  442. void Chip_UART_IRQRBHandler(LPC_USART_T *pUART, RINGBUFF_T *pRXRB, RINGBUFF_T *pTXRB);
  443. /**
  444. * @}
  445. */
  446. #ifdef __cplusplus
  447. }
  448. #endif
  449. #endif /* __UART_8XX_H_ */