//******************************************************** // // file serial.c // // serial console functions by Teunis van Beelen // // teuniz@gmail.com // // for use with BoostC // // revised on 19-12-2005 // //******************************************************** #include "rs232.h" volatile unsigned char RecFifo[FIFO_SIZE_A], RecFifoCnt1=0, RecFifoCnt2=0, SndFifo[FIFO_SIZE_A], SndFifoCnt1=0, SndFifoCnt2=0; //***************** SERIAL IO *************************** void putch(unsigned char byte) // sends a byte to serial port { BEGIN_PUTCH: if(SndFifoCnt1>SndFifoCnt2) { if((SndFifoCnt1-SndFifoCnt2)>FIFO_SIZE_B) goto BEGIN_PUTCH; // buffer full } if(SndFifoCnt1