software: UART RX demo
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Tue, 7 Feb 2012 13:12:33 +0000 (14:12 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Tue, 7 Feb 2012 13:12:33 +0000 (14:12 +0100)
software/bios/main.c

index 36e21c628b38fdb1aa7d5ccc0ecfd6ce5431ba16..d90867b4261e87f30d502b0ca86a6b95fc463cff 100644 (file)
@@ -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);
+       }
 }