diff target-utils/c139explore/main.c @ 0:e7502631a0f9

initial import from freecalypso-sw rev 1033:5ab737ac3ad7
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 11 Jun 2016 00:13:35 +0000
parents
children f24b31082605
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/target-utils/c139explore/main.c	Sat Jun 11 00:13:35 2016 +0000
@@ -0,0 +1,20 @@
+#include "types.h"
+
+main()
+{
+	/* delay kludge workaround for defect in fc-compalram */
+	osmo_delay_ms(30);
+	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();
+	}
+}