view target-utils/c139explore/main.c @ 971:53114af707f2

rvinterf: both README files are now outdated, moved into doc as README.old and README.older
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Sat, 07 Nov 2015 06:59:51 +0000
parents eb27543ce18e
children d92e4aadeeb3
line wrap: on
line source

#include "types.h"
#include "ns16550.h"

struct ns16550_regs *uart_base;

main()
{
	/* delay kludge workaround for defect in fc-compalram */
	osmo_delay_ms(30);
	uart_base = (struct ns16550_regs *) 0xFFFF5800;
	printf("C139 hardware exploration utility running\n");
	/* GPIO init */
	*(volatile u16 *)0xfffe4802 = 0x0002;
	*(volatile u16 *)0xfffe4804 = 0xFFF5;
	/* take peripherals out of reset */
	*(volatile u16 *)0xfffffd04 = 0xFFF3;
	abb_init();
	uwire_init();
	for (;;) {
		putchar('=');
		if (command_entry())
			command_dispatch();
	}
}