OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [sw/] [tests/] [uart/] [board/] [uart-echo.c] - Blame information for rev 408

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 408 julius
#include "cpu-utils.h"
2
#include "uart.h"
3
#include "printf.h"
4
 
5
// Echo some characters until we recieve a '!' charecter, after which
6
// we will exit simulation.
7
 
8
 
9
int
10
main()
11
{
12
 
13
  uart_init(DEFAULT_UART); // init the UART before we can printf
14
 
15
  char c;
16
  printf("Echo - type and see it echo back:\n");
17
  while (1)
18
    {
19
      c = uart_getc(DEFAULT_UART);
20
      printf("%c",c);
21
    }
22
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.