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

Detailed Description

These functions provide data transmit and receive via the UART and will block until the all the data has been sent or a specified amount of data has been received.

Functions

int Chip_UART_SendBlocking (LPC_USART_T *pUART, const void *data, int numBytes)
 Transmit a byte array through the UART peripheral (blocking)
 
int Chip_UART_ReadBlocking (LPC_USART_T *pUART, void *data, int numBytes)
 Read data through the UART peripheral (blocking)
 

Function Documentation

int Chip_UART_ReadBlocking ( LPC_USART_T pUART,
void *  data,
int  numBytes 
)

Read data through the UART peripheral (blocking)

Parameters
pUART: Pointer to selected UART peripheral
data: Pointer to data array to fill
numBytes: Size of the passed data array
Returns
The size of the dat array
Note
This function reads data from the receive FIFO until the passed buffer is completely full. The function will block until full. This function ignores errors.

Definition at line 123 of file uart_11xx.c.

int Chip_UART_SendBlocking ( LPC_USART_T pUART,
const void *  data,
int  numBytes 
)

Transmit a byte array through the UART peripheral (blocking)

Parameters
pUART: Pointer to selected UART peripheral
data: Pointer to data to transmit
numBytes: Number of bytes to transmit
Returns
The number of bytes transmitted
Note
This function will send or place all bytes into the transmit FIFO. This function will block until the last bytes are in the FIFO.

Definition at line 90 of file uart_11xx.c.