common/pic24_uart.c File Reference

#include "pic24_all.h"

Go to the source code of this file.

Functions

void checkRxErrorUART1 (void)
void outChar1 (uint8 u8_c)
uint8 isCharReady1 (void)
uint8 inChar1 (void)
void configUART1 (uint32 u32_baudRate)


Detailed Description

UART support functions.
Interrupt-driven TX/RX
By default, the UART functions use polling for both RX and TX. Define the macro UARTx_TX_INTERRUPT (i.e., UART1_TX_INTERRUPT) in your project file if you want interrupt-driven TX for the UARTx (i.e., UART1) module. For interrupt-driven TX, macro UARTx_TX_FIFO_SIZE sets the TX software FIFO size (default 32), and UARTx_TX_INTERRUPT_PRIORITY sets the priority (default 1).
Define the macro UARTx_RX_INTERRUPT (i.e., UART1_RX_INTERRUPT) in your project file if you want interrupt-driven RX for the UARTx (i.e., UART1) module. For interrupt-driven RX, macro UARTx_RX_FIFO_SIZE sets the RX software FIFO size (default 32), and UARTx_RX_INTERRUPT_PRIORITY sets the priority (default 1).

Definition in file pic24_uart.c.


Function Documentation

void checkRxErrorUART1 ( void   ) 

Check UART1 RX for error, call reportError() if error found.

Definition at line 71 of file pic24_uart.c.

void configUART1 ( uint32  u32_baudRate  ) 

Configure the UART. Settings chosen:

  • TX is on RP11
  • RX is on RP10
  • Format is 8 data bits, no parity, 1 stop bit
  • CTS, RTS, and BCLK not used

Parameters:
u32_baudRate The baud rate to use.

Definition at line 235 of file pic24_uart.c.

uint8 inChar1 ( void   ) 

Wait for a byte to be available from UART1 RX.

Returns:
Character read from UART1 RX.

Definition at line 215 of file pic24_uart.c.

uint8 isCharReady1 ( void   ) 

Return true if character is ready to be read

Definition at line 207 of file pic24_uart.c.

void outChar1 ( uint8  u8_c  ) 

Output u8_c to UART1 TX.

Parameters:
u8_c Character to write

Definition at line 146 of file pic24_uart.c.


Generated on Sun Mar 15 11:14:22 2009 for PIC24 Support Libraries by  doxygen 1.5.8