uart.h

This 3 Wire example application demonstrates the use of a DS1302 Real Time Clock (by Don Cramer).




#ifndef _uart.h

#define _uart.h



#include <system.h>



char hexBuffer[16];//used by hexDump



void setupUart(char rateScaler);//initialize uart



void sendChar(char value);//send a byte

char receiveChar();//get a byte

void sendString( const char* text ); //send a string

void sendHex(char value);//send hex value of byte



short txBufferIsReady();//OK to send byte

short rxBufferIsReady();//byte waiting in rx buffer



void setTxInterrupt(char enable);//enable/disable tx interrupt

void setRxInterrupt(char enable);//enable/disable rx interrupt



void hexDump();//dump hexBuffer as hex and ascii



void sendDecNumber(unsigned int n);//send number





#endif






http://www.sourceboost.com/home.html

Copyright © 2002-2006 SourceBoost Technologies