Universal Asynchronous Receive Transmit controls for use with printf and other stdio functions. More...
Go to the source code of this file.
Defines | |
#define | CR 0x0D |
Functions | |
int | getkey (void) |
Read character from Serial Port. | |
int | sendchar (int ch) |
Send characters via Serial Port. |
Universal Asynchronous Receive Transmit controls for use with printf and other stdio functions.
Example Hardware and Register setup:
// ******************************************************************************* // Initialize UART0 for printf function // ******************************************************************************* U0LCR=0x83; // DLAB=1 U0DLL=32; U0DLM=0; U0FCR|=1; // FIFO U0LCR=0x3; // DLAB=0 PINSEL0_bit.P0_0 = 1; // UART0 TXD PINSEL0_bit.P0_1 = 1; // UART0 RXD
Definition in file UART.c.