summaryrefslogtreecommitdiff
path: root/openpcd
diff options
context:
space:
mode:
author(no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-09-12 17:05:37 +0000
committer(no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-09-12 17:05:37 +0000
commit9c00f1d5e23f46f651c6e219afa53c676de8ded8 (patch)
tree13aab5a4538c346b7ab6360c494d0fa92cd1a28d /openpcd
parent42182e45b176d105ed2c87e026a0f78a348d509f (diff)
- add SSC READ and LOOP commands
git-svn-id: https://svn.openpcd.org:2342/trunk@189 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpcd')
-rw-r--r--openpcd/opcd_test/opcd_test.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/openpcd/opcd_test/opcd_test.c b/openpcd/opcd_test/opcd_test.c
index ef1dfb3..37f3094 100644
--- a/openpcd/opcd_test/opcd_test.c
+++ b/openpcd/opcd_test/opcd_test.c
@@ -77,6 +77,8 @@ static struct option opts[] = {
{ "usb-perf", 1, 0, 'u' },
{ "adc-read", 0, 0, 'a' },
{ "adc-loop", 0, 0, 'A' },
+ { "ssc-read", 0, 0, 'S' },
+ { "loop", 0, 0, 'L' },
{ "help", 0, 0, 'h'},
};
@@ -94,7 +96,7 @@ int main(int argc, char **argv)
while (1) {
int option_index = 0;
- c = getopt_long(argc, argv, "l:r:w:R:W:s:c:h?u:aA", opts,
+ c = getopt_long(argc, argv, "l:r:w:R:W:s:c:h?u:aASL", opts,
&option_index);
if (c == -1)
@@ -158,17 +160,26 @@ int main(int argc, char **argv)
opcd_usbperf(od, i);
break;
case 'a':
- opcd_send_command(od, OPNPC_CMD_ADC_READ, 0, 0, 0, NULL);
+ opcd_send_command(od, OPENPCD_CMD_ADC_READ, 0, 1, 0, NULL);
opcd_recv_reply(od, buf, buf_len);
/* FIXME: interpret and print ADC result */
break;
case 'A':
while (1) {
- opcd_send_command(od, OPNPC_CMD_ADC_READ, 0, 0, 0, NULL);
+ opcd_send_command(od, OPENPCD_CMD_ADC_READ, 0, 1, 0, NULL);
opcd_recv_reply(od, buf, buf_len);
/* FIXME: interpret and print ADC result */
}
break;
+ case 'S':
+ opcd_send_command(od, OPENPCD_CMD_SSC_READ, 0, 1, 0, NULL);
+ opcd_recv_reply(od, buf, buf_len);
+ /* FIXME: interpret and print ADC result */
+ break;
+ case 'L':
+ while (1)
+ opcd_recv_reply(od, buf, buf_len);
+ break;
case 'h':
case '?':
print_help();
personal git repositories of Harald Welte. Your mileage may vary