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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [sw/] [tests/] [uart/] [sim/] [uart-simple.c] - Blame information for rev 733

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

Line No. Rev Author Line
1 349 julius
/*
2
 * UART hello world
3
 *
4
 * Tests UARTs by printing a hello world string.
5
 *
6
 * Julius Baxter, julius.baxter@orsoc.se
7
 *
8
*/
9
 
10 393 julius
#include "cpu-utils.h"
11 349 julius
#include "board.h"
12
#include "uart.h"
13
#include "printf.h"
14
 
15
void hello_from_uart(int uart_core)
16
{
17
  uart_init(uart_core);
18
  printf("\n\tHello world from UART%d \n\0", uart_core);
19
}
20
 
21
int main()
22
{
23
 
24
  hello_from_uart(0);
25 431 julius
 
26
  report(0x8000000d);
27 349 julius
 
28 431 julius
  exit(0);
29 349 julius
 
30
}

powered by: WebSVN 2.1.0

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