view target-utils/pirexplore/lcd.c @ 75:c9768f5fb329

target-utils: pirexplore added to top level Makefile
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 28 Jul 2013 01:30:22 +0000
parents 8138a6380ae3
children 07b686248ab7
line wrap: on
line source

#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;
}