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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [sw/] [tests/] [uart/] [board/] [uart-echo.c] - Rev 707

Go to most recent revision | Compare with Previous | Blame | View Log

#include "cpu-utils.h"
#include "uart.h"
#include "printf.h"
 
// Echo some characters until we recieve a '!' charecter, after which
// we will exit simulation.
 
 
int
main()
{
 
  uart_init(DEFAULT_UART); // init the UART before we can printf
 
  char c;
  printf("Echo - type and see it echo back:\n");
  while (1)
    {
      c = uart_getc(DEFAULT_UART);  
      printf("%c",c);
    }
}
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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