uart.c
char
uart_poll(uint8_t bauds) {
  // TMR0 -= UART_BRG;            // load corrected baud value
  TMR0 = (256 - UART_BRG_FN(bauds));
  while(TMR0 & (1 << 7)) {
    if((PIR1 & 0b00100000))
      return 1;
  }
  return 0;
}
// returns 1 when start bit received or 0 when timeout
//---------------------------------------------------------
returns 1 when start bit received or 0 when timeout
returns 1 when start bit received or 0 when timeout
char
uart_poll(uint8_t bauds) {
  TMR0 = (256 - UART_BRG_FN(bauds));
  while(TMR0 & (1 << 7)) {
    if((PIR1 & 0b00100000))
      return 1;
  }
  return 0;
}
char uart_poll ( uint8_t bauds ) { TMR0 = ( 256 - UART_BRG_FN ( bauds ) ) ; while ( TMR0 & ( 1 << 7 ) ) { if ( ( PIR1 & 0b00100000 ) ) return 1 ; } return 0 ; }
returns 1 when start bit received or 0 when timeout
returns 1 when start bit received or 0 when timeout
// TMR0 -= UART_BRG;            // load corrected baud value