1
0
mirror of https://github.com/antonblanchard/chiselwatt.git synced 2026-03-06 03:20:07 +00:00

Fix some compiler warnings in uart.c

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
This commit is contained in:
Anton Blanchard
2020-01-31 05:14:44 +11:00
committed by Anton Blanchard
parent 63ed617cb6
commit 593c183c8c

6
uart.c
View File

@@ -62,7 +62,7 @@ void uart_tx(unsigned char tx)
tx_countbits--;
if (tx == 1) {
if (is_error(tx_countbits)) {
printf("START_BIT error %d %d\n", BITWIDTH, tx_countbits);
printf("START_BIT error %ld %ld\n", BITWIDTH, tx_countbits);
tx_countbits = BITWIDTH*2;
tx_state = ERROR;
break;
@@ -84,7 +84,7 @@ void uart_tx(unsigned char tx)
if (tx != tx_prev) {
if (is_error(tx_countbits)) {
printf("BITS error %d %d\n", BITWIDTH, tx_countbits);
printf("BITS error %ld %ld\n", BITWIDTH, tx_countbits);
tx_countbits = BITWIDTH*2;
tx_state = ERROR;
break;
@@ -104,7 +104,7 @@ void uart_tx(unsigned char tx)
if (tx == 0) {
if (is_error(tx_countbits)) {
printf("STOP_BIT error %d %d\n", BITWIDTH, tx_countbits);
printf("STOP_BIT error %ld %ld\n", BITWIDTH, tx_countbits);
tx_countbits = BITWIDTH*2;
tx_state = ERROR;
break;