mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
software: UART RX demo
This commit is contained in:
parent
506ffab11a
commit
ef0667d959
1 changed files with 6 additions and 1 deletions
|
@ -4,11 +4,16 @@
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
|
char c;
|
||||||
|
|
||||||
irq_setmask(0);
|
irq_setmask(0);
|
||||||
irq_setie(1);
|
irq_setie(1);
|
||||||
uart_init();
|
uart_init();
|
||||||
|
|
||||||
printf("Hello World with IRQs\n");
|
printf("Hello World with IRQs\n");
|
||||||
|
|
||||||
while(1);
|
while(1) {
|
||||||
|
c = uart_read();
|
||||||
|
printf("You typed: %c\n", c);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue