From 285a175d79067bc8ac09583169f8d6befd69fe14 Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Tue, 6 Aug 2013 21:57:03 +0200 Subject: [PATCH] uart: fix return value of send functions the return value is 0 on success --- modules/comm/uart/uart_send.c | 2 +- modules/comm/uart/uart_send9.c | 2 +- modules/comm/uart/uart_send9_nowait.c | 6 +++--- modules/comm/uart/uart_send_nowait.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/comm/uart/uart_send.c b/modules/comm/uart/uart_send.c index 26bb2a3..e2faed1 100644 --- a/modules/comm/uart/uart_send.c +++ b/modules/comm/uart/uart_send.c @@ -44,5 +44,5 @@ int uart_send(uint8_t num, char c) while(uart_send_nowait(num, c) == -1); } } - return c; + return 0; } diff --git a/modules/comm/uart/uart_send9.c b/modules/comm/uart/uart_send9.c index ba5b898..7967b12 100644 --- a/modules/comm/uart/uart_send9.c +++ b/modules/comm/uart/uart_send9.c @@ -44,5 +44,5 @@ int uart_send_9bits(uint8_t num, int c) while(uart_send_9bits_nowait(num, c) == -1); } } - return c; + return 0; } diff --git a/modules/comm/uart/uart_send9_nowait.c b/modules/comm/uart/uart_send9_nowait.c index d22ef7b..86bed9c 100644 --- a/modules/comm/uart/uart_send9_nowait.c +++ b/modules/comm/uart/uart_send9_nowait.c @@ -25,7 +25,7 @@ #include #include -int uart_send_9bits_nowait(int c) +int uart_send_9bits_nowait(uint8_t num, int c) { uint8_t flags; IRQ_LOCK(flags); @@ -36,7 +36,7 @@ int uart_send_9bits_nowait(int c) if (*uart_regs[num].ucsra & (1<