FreeCalypso > hg > freecalypso-hwlab
annotate lcdtest/commands.c @ 112:87d459d9797a
fc-simtool: pb-erase command implemented
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 26 Jan 2021 03:32:20 +0000 |
parents | 1e94c7d4af03 |
children |
rev | line source |
---|---|
12
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 #include <stdio.h> |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 #include <stdlib.h> |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 |
16
1e94c7d4af03
lcdtest: raw FTDI command fc added
Mychaela Falconia <falcon@freecalypso.org>
parents:
14
diff
changeset
|
4 cmd_fc(argc, argv) |
1e94c7d4af03
lcdtest: raw FTDI command fc added
Mychaela Falconia <falcon@freecalypso.org>
parents:
14
diff
changeset
|
5 char **argv; |
1e94c7d4af03
lcdtest: raw FTDI command fc added
Mychaela Falconia <falcon@freecalypso.org>
parents:
14
diff
changeset
|
6 { |
1e94c7d4af03
lcdtest: raw FTDI command fc added
Mychaela Falconia <falcon@freecalypso.org>
parents:
14
diff
changeset
|
7 u_char cmdbuf[16]; |
1e94c7d4af03
lcdtest: raw FTDI command fc added
Mychaela Falconia <falcon@freecalypso.org>
parents:
14
diff
changeset
|
8 unsigned di = 0; |
1e94c7d4af03
lcdtest: raw FTDI command fc added
Mychaela Falconia <falcon@freecalypso.org>
parents:
14
diff
changeset
|
9 char **ap; |
1e94c7d4af03
lcdtest: raw FTDI command fc added
Mychaela Falconia <falcon@freecalypso.org>
parents:
14
diff
changeset
|
10 |
1e94c7d4af03
lcdtest: raw FTDI command fc added
Mychaela Falconia <falcon@freecalypso.org>
parents:
14
diff
changeset
|
11 for (ap = argv + 1; *ap; ap++) |
1e94c7d4af03
lcdtest: raw FTDI command fc added
Mychaela Falconia <falcon@freecalypso.org>
parents:
14
diff
changeset
|
12 cmdbuf[di++] = strtoul(*ap, 0, 16); |
1e94c7d4af03
lcdtest: raw FTDI command fc added
Mychaela Falconia <falcon@freecalypso.org>
parents:
14
diff
changeset
|
13 do_ftdi_write(cmdbuf, di); |
1e94c7d4af03
lcdtest: raw FTDI command fc added
Mychaela Falconia <falcon@freecalypso.org>
parents:
14
diff
changeset
|
14 return(0); |
1e94c7d4af03
lcdtest: raw FTDI command fc added
Mychaela Falconia <falcon@freecalypso.org>
parents:
14
diff
changeset
|
15 } |
1e94c7d4af03
lcdtest: raw FTDI command fc added
Mychaela Falconia <falcon@freecalypso.org>
parents:
14
diff
changeset
|
16 |
12
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 cmd_wi(argc, argv) |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 char **argv; |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 { |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 write_ir(strtoul(argv[1], 0, 16)); |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 return(0); |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 } |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 cmd_wd(argc, argv) |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 char **argv; |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 { |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 write_dr(strtoul(argv[1], 0, 16)); |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 return(0); |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 } |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 cmd_wr(argc, argv) |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 char **argv; |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 { |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 write_ir(strtoul(argv[1], 0, 16)); |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 write_dr(strtoul(argv[2], 0, 16)); |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 return(0); |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 } |