UART.c File Reference

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.

Detailed Description

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.

Generated on Tue Jun 29 16:36:15 2010 by  doxygen 1.6.3