Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device number fixes #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ Consider yourself forewarned, and forearmed.
$ ./cp210x-cfg -h
Syntax:
cp210x-cfg [-h ] |
[-m vid:pid] [-d bus:dev]
[-m vid:pid] [-d bus.dev]
[ -l | [-V vid] [-P pid] [-F flush] [-M mode] [-N name] [-S serial]]

-h This help
-m vid:pid Find and use first device with vid:pid
-d bus:dev Find and use device at bus:dev
-d bus.dev Find and use device at bus.dev
-l List all CP210x devices connected
-V vid Program the given Vendor ID
-P pid Program the given Product ID
Expand Down
6 changes: 3 additions & 3 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,12 +283,12 @@ void syntax (void)
fprintf (stderr,
"Syntax:\n"
"cp210x-cfg [-h ] |\n"
" [-m vid:pid] [-d bus:dev]\n"
" [-m vid:pid] [-d bus.dev]\n"
" [ -l | [-V vid] [-P pid] [-F flush] [-M mode] [-N name] [-S serial]]\n"
"\n"
" -h This help\n"
" -m vid:pid Find and use first device with vid:pid\n"
" -d bus:dev Find and use device at bus:dev\n"
" -d bus.dev Find and use device at bus.dev\n"
" -l List all CP210x devices connected\n"
" -V vid Program the given Vendor ID\n"
" -P pid Program the given Product ID\n"
Expand Down Expand Up @@ -351,7 +351,7 @@ int main (int argc, char *argv[])
fprintf (stderr, "error: bad format to -d option, expected n.n\n");
return 10;
}
want_dev = strtol (++p, NULL, 0);
want_dev = strtol (++p, NULL, 10);
break;
}
case 'm':
Expand Down