comparison target-utils/simtest/volt.c @ 456:3884d823b36e

simtest: volt command implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 09 Feb 2019 08:09:32 +0000
parents
children
comparison
equal deleted inserted replaced
455:bd465e30fc05 456:3884d823b36e
1 #include <sys/types.h>
2 #include <strings.h>
3 #include "types.h"
4 #include "abbdefs.h"
5
6 void
7 cmd_volt(argbulk)
8 char *argbulk;
9 {
10 char *argv[2];
11
12 if (parse_args(argbulk, 1, 1, argv, 0) < 0)
13 return;
14 if (!strcmp(argv[0], "1.8"))
15 abb_reg_write(VRPCSIM, 2);
16 else if (!strcmp(argv[0], "3"))
17 abb_reg_write(VRPCSIM, 3);
18 else
19 printf("ERROR: \"1.8\" or \"3\" argument expected\n");
20 }