diff target-utils/pirexplore/lcd.c @ 74:8138a6380ae3

pirexplore: attempt to play with SPCA552E
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sat, 27 Jul 2013 07:30:08 +0000
parents
children 07b686248ab7
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/target-utils/pirexplore/lcd.c	Sat Jul 27 07:30:08 2013 +0000
@@ -0,0 +1,23 @@
+#include <sys/types.h>
+#include "types.h"
+
+void
+cmd_spca(argbulk)
+	char *argbulk;
+{
+	char *argv[3];
+	u_long addr, data;
+
+	if (parse_args(argbulk, 2, 2, argv, 0) < 0)
+		return;
+	if (parse_hexarg(argv[0], 4, &addr) < 0) {
+		printf("ERROR: arg1 must be a valid 16-bit hex value\n");
+		return;
+	}
+	if (parse_hexarg(argv[1], 4, &data) < 0) {
+		printf("ERROR: arg2 must be a valid 16-bit hex value\n");
+		return;
+	}
+	*(volatile u16 *)0x02800000 = addr;
+	*(volatile u16 *)0x02800002 = data;
+}