/* structs */
struct global_uart_t {
fifo_t rx;
+#if UART_TX_ENABLED
fifo_t tx;
+#endif
};
/* global variables */
void uart_init(void);
void uart_putc(uint8_t data);
+#if UART_TX_ENABLED
static inline bool uart_send_complete(void)
{
return _BV(_UDRE_UART0) & _UCSRA_UART0;
}
+#else
+/* we're never incomplete, never. */
+#define uart_send_complete() 1
+#endif
#endif