LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CHIP: LPC8xx UART ROM Driver

Detailed Description

Data Structures

struct  UART_CONFIG_T
 
struct  UART_PARAM_T
 
struct  UARTD_API_T
 

Macros

#define ERR_NO_ERROR   (0x00000000UL)
 
#define ERR_UART_RXD_BUSY   (0x00080001UL)
 
#define ERR_UART_TXD_BUSY   (0x00080002UL)
 
#define ERR_UART_OVERRUN_FRAME_PARITY_NOISE   (0x00080003UL)
 
#define ERR_UART_UNDERRUN   (0x00080004UL)
 
#define ERR_UART_PARAM   (0x00080005UL)
 
#define OVERRUN_ERR_EN   (1 << 0)
 
#define UNDERRUN_ERR_EN   (1 << 1)
 
#define FRAME_ERR_EN   (1 << 2)
 
#define PARITY_ERR_EN   (1 << 3)
 
#define RXNOISE_ERR_EN   (1 << 4)
 
#define ALL_ERR_EN
 
#define NO_ERR_EN   (0)
 
#define UART_ROM_MEM_SIZE   (0x20UL)
 
#define TX_MODE_BUF_EMPTY   (0x00)
 
#define RX_MODE_BUF_FULL   (0x00)
 
#define TX_MODE_SZERO_SEND_CRLF   (0x01)
 
#define RX_MODE_CRLF_RECVD   (0x01)
 
#define TX_MODE_SZERO_SEND_LF   (0x02)
 
#define RX_MODE_LF_RECVD   (0x02)
 
#define TX_MODE_SZERO   (0x03)
 
#define DRIVER_MODE_POLLING   (0x00)
 
#define DRIVER_MODE_INTERRUPT   (0x01)
 
#define DRIVER_MODE_DMA   (0x02)
 

Typedefs

typedef void UART_HANDLE_T
 
typedef void(* UART_CALLBK_T )(uint32_t err_code, uint32_t n)
 
typedef void(* UART_DMA_REQ_T )(uint32_t src_adr, uint32_t dst_adr, uint32_t size)
 

Macro Definition Documentation

#define ALL_ERR_EN
Value:

Macros for UART errors

< Enable all the UART errors Disable all the errors

Definition at line 68 of file uartd_8xx.h.

#define DRIVER_MODE_DMA   (0x02)

DMA mode

Definition at line 103 of file uartd_8xx.h.

#define DRIVER_MODE_INTERRUPT   (0x01)

Interrupt mode

Definition at line 102 of file uartd_8xx.h.

#define DRIVER_MODE_POLLING   (0x00)

UART ROM driver modesPolling mode

Definition at line 101 of file uartd_8xx.h.

#define ERR_NO_ERROR   (0x00000000UL)

UART ROM driver error codesSuccess

Definition at line 47 of file uartd_8xx.h.

#define ERR_UART_OVERRUN_FRAME_PARITY_NOISE   (0x00080003UL)

Overrun, Frame, Parity , Receive Noise error

Definition at line 50 of file uartd_8xx.h.

#define ERR_UART_PARAM   (0x00080005UL)

Parameter error

Definition at line 52 of file uartd_8xx.h.

#define ERR_UART_RXD_BUSY   (0x00080001UL)

Receive is busy

Definition at line 48 of file uartd_8xx.h.

#define ERR_UART_TXD_BUSY   (0x00080002UL)

Transmit is busy

Definition at line 49 of file uartd_8xx.h.

#define ERR_UART_UNDERRUN   (0x00080004UL)

Underrun

Definition at line 51 of file uartd_8xx.h.

#define FRAME_ERR_EN   (1 << 2)

Bit 2: enable frame error

Definition at line 60 of file uartd_8xx.h.

#define NO_ERR_EN   (0)

Definition at line 71 of file uartd_8xx.h.

#define OVERRUN_ERR_EN   (1 << 0)

Bit Numbers for UART errors in UART configuration. Used in uart_init functionBit 0: Enable overrun error

Definition at line 58 of file uartd_8xx.h.

#define PARITY_ERR_EN   (1 << 3)

Bit 3: enable parity error

Definition at line 61 of file uartd_8xx.h.

#define RX_MODE_BUF_FULL   (0x00)

0x01: uart_get_line: stop transfer when CRLF are received 0x01: uart_put_line: transfer stopped after reaching \0 and CRLF is sent out after that

Definition at line 85 of file uartd_8xx.h.

#define RX_MODE_CRLF_RECVD   (0x01)

0x02: uart_get_line: stop transfer when LF are received 0x02: uart_put_line: transfer stopped after reaching \0. And LF is sent out after that

Definition at line 89 of file uartd_8xx.h.

#define RX_MODE_LF_RECVD   (0x02)

0x03: uart_get_line: RESERVED 0x03: uart_put_line: transfer stopped after reaching \0

Definition at line 93 of file uartd_8xx.h.

#define RXNOISE_ERR_EN   (1 << 4)

Bit 4: enable receive noise error

Definition at line 62 of file uartd_8xx.h.

#define TX_MODE_BUF_EMPTY   (0x00)

Transfer mode values in UART parameter structure. Used in uart_get_line & uart_put_line function

< 0x00: uart_get_line: stop transfer when the buffer is full

< 0x00: uart_put_line: stop transfer when the buffer is empty

Definition at line 84 of file uartd_8xx.h.

#define TX_MODE_SZERO   (0x03)

Definition at line 96 of file uartd_8xx.h.

#define TX_MODE_SZERO_SEND_CRLF   (0x01)

Definition at line 88 of file uartd_8xx.h.

#define TX_MODE_SZERO_SEND_LF   (0x02)

Definition at line 92 of file uartd_8xx.h.

#define UART_ROM_MEM_SIZE   (0x20UL)

UART ROM memory size

Definition at line 76 of file uartd_8xx.h.

#define UNDERRUN_ERR_EN   (1 << 1)

Bit 1: Enable underrun error

Definition at line 59 of file uartd_8xx.h.

Typedef Documentation

typedef void(* UART_CALLBK_T)(uint32_t err_code, uint32_t n)

Definition at line 109 of file uartd_8xx.h.

typedef void(* UART_DMA_REQ_T)(uint32_t src_adr, uint32_t dst_adr, uint32_t size)

Definition at line 110 of file uartd_8xx.h.

typedef void UART_HANDLE_T

UART function definitions

Definition at line 108 of file uartd_8xx.h.