Commit ddec2e35 authored by root's avatar root Committed by Alessandro Rubini

spec-vuart: wait until TX is ready before transmitting a byte

parent ab412e32
......@@ -26,6 +26,7 @@ int vc_rx(void *ptr)
void vc_tx(void *ptr, int c)
{
while( *(int *)(ptr + UART_REG_SR) & UART_SR_RX_RDY);
*(int *)(ptr + UART_REG_HOST_TDR) = UART_HOST_TDR_DATA_W(c);
}
......
......@@ -85,6 +85,7 @@
#define UART_HOST_RDR_COUNT_W(value) WBGEN2_GEN_WRITE(value, 9, 16)
#define UART_HOST_RDR_COUNT_R(reg) WBGEN2_GEN_READ(reg, 9, 16)
#define UART_REG_SR 0x0
#define UART_REG_HOST_TDR 0x10
#define UART_REG_HOST_RDR 0x14
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment