Anonymous
public text v1 · immutablevoid uart_putc(char c) {
if (UART_TX_OK && (tx_wr == tx_rd)) {
UDR = c;
} else {
while (TX_INCR(tx_wr, 1) == tx_rd) ;
tx_buf[tx_wr] = c;
tx_wr = TX_INCR(tx_wr, 1);
}
}void uart_putc(char c) {
if (UART_TX_OK && (tx_wr == tx_rd)) {
UDR = c;
} else {
while (TX_INCR(tx_wr, 1) == tx_rd) ;
tx_buf[tx_wr] = c;
tx_wr = TX_INCR(tx_wr, 1);
}
}