the return value is 0 on success
while(uart_send_nowait(num, c) == -1);
}
}
- return c;
+ return 0;
}
while(uart_send_9bits_nowait(num, c) == -1);
}
}
- return c;
+ return 0;
}
#include <uart_defs.h>
#include <uart_private.h>
-int uart_send_9bits_nowait(int c)
+int uart_send_9bits_nowait(uint8_t num, int c)
{
uint8_t flags;
IRQ_LOCK(flags);
if (*uart_regs[num].ucsra & (1<<UDRE)) {
uart_set_udr_9bits(c);
IRQ_UNLOCK(flags);
- return c;
+ return 0;
}
else {
IRQ_UNLOCK(flags);
}
IRQ_UNLOCK(flags);
- return (int)c;
+ return 0;
}
if (*uart_regs[num].ucsra & (1<<UDRE)) {
uart_set_udr(num, c);
IRQ_UNLOCK(flags);
- return (int)c;
+ return 0;
}
else {
IRQ_UNLOCK(flags);
}
IRQ_UNLOCK(flags);
- return (int)c;
+ return 0;
}