From: Sebastien Bourdeauducq Date: Tue, 7 Feb 2012 13:12:33 +0000 (+0100) Subject: software: UART RX demo X-Git-Tag: 24jan2021_ls180~3250 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ef0667d95962aaf8e9267e9a9712d0ead97994cd;p=litex.git software: UART RX demo --- diff --git a/software/bios/main.c b/software/bios/main.c index 36e21c62..d90867b4 100644 --- a/software/bios/main.c +++ b/software/bios/main.c @@ -4,11 +4,16 @@ int main(void) { + char c; + irq_setmask(0); irq_setie(1); uart_init(); printf("Hello World with IRQs\n"); - while(1); + while(1) { + c = uart_read(); + printf("You typed: %c\n", c); + } }