|
|
@@ -4,8 +4,7 @@ |
|
|
|
#include "config.h" |
|
|
|
|
|
|
|
/* Init */ |
|
|
|
void uart_init(int uart); |
|
|
|
void uart_set_rate(int uart, int32_t rate); |
|
|
|
void uart_init(int uart, int32_t rate); |
|
|
|
|
|
|
|
/* Blocking sends */ |
|
|
|
void uart_put(int uart, uint8_t x); |
|
|
@@ -25,8 +24,7 @@ int uart_can_get(int uart); |
|
|
|
int uart_can_put(int uart); |
|
|
|
|
|
|
|
/* Helpers to work with a specific uart */ |
|
|
|
#define uart1_init() uart_init(1) |
|
|
|
#define uart1_set_rate(x) uart_set_rate(1,x) |
|
|
|
#define uart1_init(x) uart_init(1, x) |
|
|
|
#define uart1_put(x) uart_put(1,x) |
|
|
|
#define uart1_put_string(x) uart_put_string(1,x) |
|
|
|
#define uart1_crlf() uart_crlf(1) |
|
|
@@ -36,8 +34,7 @@ int uart_can_put(int uart); |
|
|
|
#define uart1_put_bin(x) uart_put_bin(1,x) |
|
|
|
#define uart1_put_dec(x) uart_put_dec(1,x) |
|
|
|
|
|
|
|
#define uart2_init() uart_init(2) |
|
|
|
#define uart2_set_rate(x) uart_set_rate(2,x) |
|
|
|
#define uart2_init(x) uart_init(2, x) |
|
|
|
#define uart2_put(x) uart_put(2,x) |
|
|
|
#define uart2_put_string(x) uart_put_string(2,x) |
|
|
|
#define uart2_crlf() uart_crlf(2) |
|
|
|