1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

16 Commits

Author SHA1 Message Date
MrKevinWeiss
7f134c6c74
sys/usb: Add PID/VID check in macro 2023-05-31 12:55:53 +02:00
8b41443913
usbus: Add functions to query max packet sizes 2023-03-31 16:43:44 +02:00
Marian Buschsieweke
eaace28804
sys/usb: Set USB model to $(BOARD) by default 2022-08-29 16:39:05 +02:00
zvecr
bf241a117c usbus: Bind extra USB config 2021-12-10 23:34:59 +00:00
185bf28c21
usb: Add configuration options for USB peripheral serial
This adds compile-time options to configure the serial of an USB
peripheral. The serial be autogenerated with a configured number of
bytes. It is also possible to configure a fixed serial string for a
device and disable the autogeneration of the serial.
2020-12-17 11:37:04 +01:00
chrysn
c0cc03a09a usb: Adapt error message to newly present build variables 2020-06-30 10:51:39 +02:00
Benjamin Valentin
bc12d2e3b9 USB VID/PID: allow for boards to define default custom VID/PID
For boards that have terminals in their shipped configurations it makes sense
to reuse those VID/PIDs when providing a terminal in RIOT as well.

That affects the builtin-peripherals IDs and not the custom specified ones.

Co-authored-by: chrysn <chrysn@fsfe.org>
2020-06-02 14:17:55 +02:00
chrysn
cca756da27 USB VID/PID: Add text to outline what may use the 7D00 PID 2020-01-30 15:04:26 +01:00
chrysn
763ce7a9bf USB VID/PID: Move check inside usb.h include guards
As the whitelist define can be set per compilation unit in all
legitimate cases, the checks do not need to be run on every single usb.h
inclusion. This is done for two reaons:

* It is sufficient -- if any user C file includes usb.h, there's already
  a good chance that the user is doing something USB related manualy.
  (And conversely, the existing examples with boards that happen to pull
  in CDC-ACM or CDC-ECM do not include usb.h from an example C file).

* Defining the USB_H_USER_IS_RIOT around legitimate uses of the header
  by other headers would allow accidental sidestepping: If a user
  includes a legitimate usb.h using header (say, board.h) and just
  forgets to include usb.h on their own, their application that'd mess
  with USB would still work as usb.h is transitively included, and the
  check for custom includes does not trigger.
2020-01-30 15:04:26 +01:00
chrysn
f35ce9cd8e USB VID/PID: Allow default VID/PID from inside RIOT code
A new define, USB_H_USER_IS_RIOT_INTERNAL, is defined that may only be
set from within RIOT's own compilation units that deem themselves
standard RIOT peripherals. If all usb.h users in a program match that
requirement, a default VID/PID pair is set.

Due to the new composite check, the individual checks for VID/PID being
set become moot and are removed.
2020-01-30 15:01:41 +01:00
Leandro Lanzieri
a1836d36a4 Kconfig: Expose USB peripheral configurations 2020-01-14 10:34:53 +01:00
Leandro Lanzieri
15bd4897c1 usb: Move configuration macros to 'CONFIG_' namespace
Macros that changed:
USB_CONFIG_VID -> CONFIG_USB_VID
USB_CONFIG_PID -> CONFIG_USB_PID
USB_CONFIG_MANUF_STR -> CONFIG_USB_MANUF_STR
USB_CONFIG_PRODUCT_STR -> CONFIG_USB_PRODUCT_STR
USB_CONFIG_CONFIGURATION_STR -> CONFIG_USB_CONFIGURATION_STR
USB_CONFIG_PRODUCT_BCDVERSION -> CONFIG_USB_PRODUCT_BCDVERSION
USB_CONFIG_SPEC_BCDVERSION -> CONFIG_USB_SPEC_BCDVERSION
USB_CONFIG_SELF_POWERED -> CONFIG_USB_SELF_POWERED
USB_CONFIG_MAX_POWER -> CONFIG_USB_MAX_POWER
USB_CONFIG_DEFAULT_LANGID -> CONFIG_USB_DEFAULT_LANGID
2020-01-14 10:34:53 +01:00
Leandro Lanzieri
731f27378b usb: Add configs to compile time configuration Doxygen group 2019-12-04 20:08:02 +01:00
Leandro Lanzieri
d835c52a4b usb: Fix VID/PID macros documentation 2019-12-04 20:08:02 +01:00
35af9b9fb7
usb: Add generic USB structs and functions 2019-06-05 14:22:12 +02:00
f52d0c7c53
usb: Add defines for USB peripheral devices 2019-03-14 21:39:57 +01:00