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

Add VID and PID device target filters #85

Conversation

tomas-pecserke
Copy link

This PR improves usability of #83 and depends on #84.

It adds --vid <vid> and --pid <pid> device target filter options to device selection accepting hex id representation.
The Vendor ID and Product ID is then compared with identifiers specified by idVendor and idProduct of device configuration option respectively.

This solution does NOT break backward compatibility - functionality and outputs do not change if the flag is not specified.

Usage:

# TinyUSB examples use Cafe:0200
picotool info --pid cafe --vid 0200

❗Attention: Help needed with clipp options for these filters.
Currently I have all the options as optional and despite that i get this error when used without any options:

$ picotool info

ERROR: missing required argument

SYNOPSIS:
    picotool info [-b] [-p] [-d] [-l] [-a] [--bus <bus>] [--address <addr>] [--vid <vid>] [--pid <pid>] [--serial <serial>] [-f] [-F]
    picotool info [-b] [-p] [-d] [-l] [-a] <filename> [-t <type>]

Use "picotool help info" for more info

If you have any idea why, please let me know.

@lurch
Copy link
Contributor

lurch commented Jun 3, 2023

This should probably be targeting the develop branch?

@tomas-pecserke tomas-pecserke force-pushed the feature/vid-pid-device-target-filters branch from 4313928 to 96bdf4c Compare June 3, 2023 18:22
@tomas-pecserke tomas-pecserke changed the base branch from master to develop June 3, 2023 18:22
@tomas-pecserke tomas-pecserke force-pushed the feature/vid-pid-device-target-filters branch from 96bdf4c to 0cd1357 Compare June 3, 2023 23:52
@will-v-pi will-v-pi added this to the 1.6.2 milestone Jul 27, 2024
@will-v-pi
Copy link
Contributor

These have been added for picotool 2.0.0

@will-v-pi will-v-pi closed this Aug 9, 2024
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

Successfully merging this pull request may close these issues.

3 participants