FreeCalypso > hg > freecalypso-hwlab
annotate lcdtest/commands.c @ 14:5a602e512b12
lcdtest: read ops split into command issuance and FTDI read
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 07 Apr 2018 01:19:14 +0000 |
parents | 238a77db4134 |
children | 1e94c7d4af03 |
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 |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 cmd_wi(argc, argv) |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 char **argv; |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 { |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 write_ir(strtoul(argv[1], 0, 16)); |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 return(0); |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 } |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 cmd_wd(argc, argv) |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 char **argv; |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 { |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 write_dr(strtoul(argv[1], 0, 16)); |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 return(0); |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 } |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 cmd_wr(argc, argv) |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 char **argv; |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 { |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 write_ir(strtoul(argv[1], 0, 16)); |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 write_dr(strtoul(argv[2], 0, 16)); |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 return(0); |
5eaf832d57d0
lcdtest program started, skeleton compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 } |