view lcdtest/commands.c @ 156:6d9d0cfc9ed8

fc-simtool: grcard2-set-adm command implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 07 Feb 2021 02:40:28 +0000
parents 1e94c7d4af03
children
line wrap: on
line source

#include <stdio.h>
#include <stdlib.h>

cmd_fc(argc, argv)
	char **argv;
{
	u_char cmdbuf[16];
	unsigned di = 0;
	char **ap;

	for (ap = argv + 1; *ap; ap++)
		cmdbuf[di++] = strtoul(*ap, 0, 16);
	do_ftdi_write(cmdbuf, di);
	return(0);
}

cmd_wi(argc, argv)
	char **argv;
{
	write_ir(strtoul(argv[1], 0, 16));
	return(0);
}

cmd_wd(argc, argv)
	char **argv;
{
	write_dr(strtoul(argv[1], 0, 16));
	return(0);
}

cmd_wr(argc, argv)
	char **argv;
{
	write_ir(strtoul(argv[1], 0, 16));
	write_dr(strtoul(argv[2], 0, 16));
	return(0);
}