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

cargo-hf2 parses --vid and --pid without bias towards hex #15

Open
gkelly opened this issue Apr 13, 2020 · 2 comments
Open

cargo-hf2 parses --vid and --pid without bias towards hex #15

gkelly opened this issue Apr 13, 2020 · 2 comments

Comments

@gkelly
Copy link
Contributor

gkelly commented Apr 13, 2020

Most (all?) times that USB VID/PID values are written they are written as hexadecimal without the 0x prefix. This is confusing when using cargo hf2 because you end up with errors like:

$ cargo hf2 --vid 2886 --pid 002f --example blink
error: Invalid value for '--pid <pid>': invalid digit found in string

udev rules and lsusb both print these values without the 0x prefix, so it feels unergonomic to reject those same values here.

@jacobrosenthal
Copy link
Owner

jacobrosenthal commented Apr 13, 2020 via email

@gkelly
Copy link
Contributor Author

gkelly commented Apr 13, 2020

I think it does parse hex but must need the 0x

Sorry, I didn't mention that but yes it definitely does do the right thing if you put the base prefix on the arguments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants