diff options
author | (no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2006-08-25 12:32:11 +0000 |
---|---|---|
committer | (no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2006-08-25 12:32:11 +0000 |
commit | 9865031f9f7ab887b31b260b6060e1fde2b7a670 (patch) | |
tree | 1b56d558550769d617910f69c3745e72e99e8ad4 /openpcd/opcd_test/opcd_test.c | |
parent | 767a06ec648b9242cba5bb1dddfef08137d7b7dc (diff) |
add usb benchmarking mode
git-svn-id: https://svn.openpcd.org:2342/trunk@132 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpcd/opcd_test/opcd_test.c')
-rw-r--r-- | openpcd/opcd_test/opcd_test.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/openpcd/opcd_test/opcd_test.c b/openpcd/opcd_test/opcd_test.c index 7b58aca..2aa1753 100644 --- a/openpcd/opcd_test/opcd_test.c +++ b/openpcd/opcd_test/opcd_test.c @@ -74,6 +74,7 @@ static struct option opts[] = { { "fifo-read", 1, 0, 'R' }, { "set-bits", 1, 0, 's' }, { "clear-bits", 1, 0, 'c' }, + { "usb-perf", 1, 0, 'u' }, { "help", 0, 0, 'h'}, }; @@ -91,7 +92,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?", opts, + c = getopt_long(argc, argv, "l:r:w:R:W:s:c:h?u:", opts, &option_index); if (c == -1) @@ -149,6 +150,11 @@ int main(int argc, char **argv) exit(2); opcd_send_command(od, OPENPCD_CMD_REG_BITS_CLEAR, i, j, 0, NULL); break; + case 'u': + if (get_number(optarg, 1, 255, &i) < 0) + exit(2); + opcd_usbperf(od, i); + break; case 'h': case '?': print_help(); |