PIC24 Support Libraries
|
Go to the source code of this file.
Macros | |
#define | IS_CHAR_READY_UART1() U1STAbits.URXDA |
#define | IS_TRANSMIT_BUFFER_FULL_UART1() U1STAbits.UTXBF |
#define | IS_TRANSMIT_COMPLETE_UART1() U1STAbits.TRMT |
Functions | |
static void | WAIT_UNTIL_TRANSMIT_COMPLETE_UART1 () |
void | outChar1 (uint8_t u8_c) |
uint8_t | inChar1 (void) |
void | configUART1 (uint32_t u32_baudRate) |
uint8_t | isCharReady1 (void) |
void | checkRxErrorUART1 (void) |
This file contains routines which configure and use the UARTs on the PIC. See pic24_serial.h for higher-level routines, which should typically be called by the user rather than these routines.
Definition in file pic24_uart.h.
#define IS_CHAR_READY_UART1 | ( | ) | U1STAbits.URXDA |
Determine if a character is available in the UART's receive buffer.
Definition at line 57 of file pic24_uart.h.
Referenced by inChar1(), and isCharReady1().
#define IS_TRANSMIT_BUFFER_FULL_UART1 | ( | ) | U1STAbits.UTXBF |
Determine if a the transmit buffer is full.
Definition at line 63 of file pic24_uart.h.
Referenced by outChar1().
#define IS_TRANSMIT_COMPLETE_UART1 | ( | ) | U1STAbits.TRMT |
Determines if all characters placed in the UART have been sent. Returns 1 if the last transmission has completed, or 0 if a transmission is in progress or queued in the transmit buffer.
Definition at line 70 of file pic24_uart.h.
Referenced by WAIT_UNTIL_TRANSMIT_COMPLETE_UART1().
void checkRxErrorUART1 | ( | void | ) |
Check UART1 RX for error, call reportError() if error found.
Definition at line 70 of file pic24_uart.c.
Referenced by inChar1(), and WAIT_UNTIL_TRANSMIT_COMPLETE_UART1().
void configUART1 | ( | uint32_t | u32_baudRate | ) |
Configure the UART. Settings chosen:
u32_baudRate | The baud rate to use. |
Definition at line 250 of file pic24_uart.c.
Referenced by configDefaultUART(), and WAIT_UNTIL_TRANSMIT_COMPLETE_UART1().
uint8_t inChar1 | ( | void | ) |
Wait for a byte to be available from UART1 RX.
Definition at line 214 of file pic24_uart.c.
Referenced by inChar(), outChar1(), and WAIT_UNTIL_TRANSMIT_COMPLETE_UART1().
uint8_t isCharReady1 | ( | void | ) |
Return true if character is ready to be read
Definition at line 206 of file pic24_uart.c.
Referenced by isCharReady(), outChar1(), and WAIT_UNTIL_TRANSMIT_COMPLETE_UART1().
void outChar1 | ( | uint8_t | u8_c | ) |
Output u8_c to UART1 TX.
u8_c | Character to write |
Definition at line 145 of file pic24_uart.c.
Referenced by checkRxErrorUART1(), outChar(), and WAIT_UNTIL_TRANSMIT_COMPLETE_UART1().
|
inlinestatic |
Waits until all characters placed in the UART have been sent.
Definition at line 73 of file pic24_uart.h.