Wixel SDK
Macros | Functions | Variables
uart.c File Reference
#include <cc2511_map.h>
#include <cc2511_types.h>

Go to the source code of this file.

Macros

#define UART_TX_BUFFER_FREE_BYTES()   ((uartTxBufferInterruptIndex - uartTxBufferMainLoopIndex - 1) & (sizeof(uartTxBuffer) - 1))
 
#define UART_RX_BUFFER_FREE_BYTES()   ((uartRxBufferMainLoopIndex - uartRxBufferInterruptIndex - 1) & (sizeof(uartRxBuffer) - 1))
 
#define UART_RX_BUFFER_USED_BYTES()   ((uartRxBufferInterruptIndex - uartRxBufferMainLoopIndex) & (sizeof(uartRxBuffer) - 1))
 

Functions

void uartNInit (void)
 
void uartNSetBaudRate (uint32 baud)
 
void uartNSetParity (uint8 parity)
 
void uartNSetStopBits (uint8 stopBits)
 
uint8 uartNTxAvailable (void)
 
void uartNTxSend (const uint8 XDATA *buffer, uint8 size)
 
void uartNTxSendByte (uint8 byte)
 
uint8 uartNRxAvailable (void)
 
uint8 uartNRxReceiveByte (void)
 
 ISR_UTX ()
 
 ISR_URX ()
 

Variables

volatile BIT uartNRxParityErrorOccurred
 
volatile BIT uartNRxFramingErrorOccurred
 
volatile BIT uartNRxBufferFullOccurred
 

Detailed Description

This is the main source file for uart.lib. See uart.h for information on how to use this library.

Definition in file uart.c.