WHere can I find a portable 16550 library for use with C51?
Hi Erwin! I have lost your e-mail address, but I want to notify you about a problem in the code that I have sent you.
uchar uart_getc( void ) { uchar return_byte; if (rxcount) { // if bytes in rx buffer EA = 0; // disable all interrupt return_byte = rxbuf[rxo++]; // get byte from buffer and advance output pointer --rxcount; // decrement number of bytes in buffer if (rxcount < TRLOW) { // if number of bytes in rx buffer lower than threshold uart_mcr = 0x03; // set RTS bit of UART rts = 1; // and flag too. } EA = 1; // enable interrupt return return_byte; } else { return 0; // nothing to receive } }