You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, there were a few problems:
- USB manufacturer string was only configurable when an unknown VID was
used.
- USB product string would always include CDC/HID and HS/FS indication,
it was not possible to specify the full string.
- USB PID was always hardcoded, depending on the CDC/HID mode. These
hardcoded PIDs are really only valid within the ST PID, so it made
now sense that the vid *could* be specified.
This commit cleans this up:
- Boards must now either specify both the VID and PID, or neither.
- When boards specify no VID and PID, they use the ST VID with a pid
based on the CDC or HID mode like before.
- All boards used to specify the ST vid explicitly in boards.txt, now
they do not and rely on the default in the code.
- When no USB_MANUFACTURER_STRING is defined (can be in boards.txt or
variant.h now), a default is selected based on the VID, or "Unknown"
is used if the VID is unknown.
- When no USB_PRODUCT_STRING is defined (can be in boards.txt or
variant.h now), a default is based on the BOARD_NAME, CDC/HID and
FS/HS mode.
All included boards should work as before. Third-party board
definitions that use this core should be updated:
- If build.vid is 0x0483, it should be removed. Otherwise, both vid and
pid should be specified.
- If build.usb_manufacturer is specified, it should be replaced by
adding '-DUSB_MANUFACTURER_STRING="My Company"' to build.extra-flags.
0 commit comments