usb: remove usb_pid.Kconfig file

Remove Kconfig file samples/subsys/usb/usb_pid.Kconfig added in
the commit e5cbe6a9e7 ("usb: cdc: Add unique PIDs for each sample")
with the motivation to have a separate ID for each sample supposedly
to be recognizable by the host.

The new USB support does not use the options, VID/PID is set
directly in the application. As a note, it is not necessary to have
unique PID for each sample, especially for the well known USB classes.

Replace the individual Kconfig options in the documentation
by a table with the references to the samples and PIDs.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit is contained in:
Johann Fischer 2022-11-10 00:51:20 +01:00 committed by Carles Cufí
commit 1c4011ff6e
29 changed files with 42 additions and 156 deletions

View file

@ -104,21 +104,37 @@ The USB maintainer, if one is assigned, or otherwise the Zephyr Technical
Steering Committee, may allocate other USB Product IDs based on well-motivated
and documented requests.
When adding a new sample, add a new entry in :file:`samples/subsys/usb/usb_pid.Kconfig`
and a Kconfig file inside your sample subdirectory.
The following Product IDs are currently used:
* :kconfig:option:`CONFIG_USB_PID_CDC_ACM_SAMPLE`
* :kconfig:option:`CONFIG_USB_PID_CDC_ACM_COMPOSITE_SAMPLE`
* :kconfig:option:`CONFIG_USB_PID_HID_CDC_SAMPLE`
* :kconfig:option:`CONFIG_USB_PID_CONSOLE_SAMPLE`
* :kconfig:option:`CONFIG_USB_PID_DFU_SAMPLE`
* :kconfig:option:`CONFIG_USB_PID_HID_SAMPLE`
* :kconfig:option:`CONFIG_USB_PID_HID_MOUSE_SAMPLE`
* :kconfig:option:`CONFIG_USB_PID_MASS_SAMPLE`
* :kconfig:option:`CONFIG_USB_PID_TESTUSB_SAMPLE`
* :kconfig:option:`CONFIG_USB_PID_WEBUSB_SAMPLE`
* :kconfig:option:`CONFIG_USB_PID_BLE_HCI_H4_SAMPLE`
+-------------------------------------+--------+
| Sample | PID |
+=====================================+========+
| :ref:`usb_cdc-acm` | 0x0001 |
+-------------------------------------+--------+
| :ref:`usb_cdc-acm_composite` | 0x0002 |
+-------------------------------------+--------+
| :ref:`usb_hid-cdc` | 0x0003 |
+-------------------------------------+--------+
| :ref:`cdc-acm-console` | 0x0004 |
+-------------------------------------+--------+
| :ref:`usb_dfu` | 0x0005 |
+-------------------------------------+--------+
| :ref:`usb_hid` | 0x0006 |
+-------------------------------------+--------+
| :ref:`usb_hid-mouse` | 0x0007 |
+-------------------------------------+--------+
| :ref:`usb_mass` | 0x0008 |
+-------------------------------------+--------+
| :ref:`testusb-app` | 0x0009 |
+-------------------------------------+--------+
| :ref:`webusb-sample` | 0x000A |
+-------------------------------------+--------+
| :ref:`bluetooth-hci-usb-sample` | 0x000B |
+-------------------------------------+--------+
| :ref:`bluetooth-hci-usb-h4-sample` | 0x000C |
+-------------------------------------+--------+
| :ref:`wpanusb-sample` | 0x000D |
+-------------------------------------+--------+
The USB device descriptor field ``bcdDevice`` (Device Release Number) represents
the Zephyr kernel major and minor versions as a binary coded decimal value.

View file

@ -1,7 +0,0 @@
# Copyright (c) 2019 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config USB_DEVICE_PID
default USB_PID_BLE_HCI_SAMPLE
source "Kconfig.zephyr"

View file

@ -7,6 +7,7 @@ CONFIG_BT=y
CONFIG_BT_HCI_RAW=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PID=0x000B
CONFIG_USB_DEVICE_BLUETOOTH=y
CONFIG_USB_DEVICE_BLUETOOTH_VS_H4=n

View file

@ -1,7 +0,0 @@
# Copyright (c) 2019 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config USB_DEVICE_PID
default USB_PID_BLE_HCI_H4_SAMPLE
source "Kconfig.zephyr"

View file

@ -4,6 +4,7 @@ CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PID=0x000C
CONFIG_USB_DEVICE_BT_H4=y
# Workaround: Unable to allocate command buffer when using K_NO_WAIT since

View file

@ -1,7 +0,0 @@
# Copyright (c) 2020 PHYTEC Messtechnik GmbH
# SPDX-License-Identifier: Apache-2.0
config USB_DEVICE_PID
default USB_PID_WPANUSB_SAMPLE
source "Kconfig.zephyr"

View file

@ -1,5 +1,6 @@
CONFIG_GPIO=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PID=0x000D
CONFIG_USB_REQUEST_BUFFER_SIZE=300
CONFIG_UART_INTERRUPT_DRIVEN=y

View file

@ -1,7 +0,0 @@
# Copyright (c) 2019 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config USB_DEVICE_PID
default USB_PID_CDC_ACM_SAMPLE
source "Kconfig.zephyr"

View file

@ -1,6 +1,7 @@
CONFIG_STDOUT_CONSOLE=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PRODUCT="Zephyr CDC ACM sample"
CONFIG_USB_DEVICE_PID=0x0001
CONFIG_LOG=y
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
CONFIG_USB_DEVICE_LOG_LEVEL_ERR=y

View file

@ -1,7 +0,0 @@
# Copyright (c) 2019 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config USB_DEVICE_PID
default USB_PID_CDC_ACM_COMPOSITE_SAMPLE
source "Kconfig.zephyr"

View file

@ -6,6 +6,7 @@ CONFIG_UART_LINE_CTRL=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PRODUCT="Zephyr CDC ACM Composite sample"
CONFIG_USB_DEVICE_PID=0x0002
CONFIG_USB_COMPOSITE_DEVICE=y
CONFIG_USB_CDC_ACM_RINGBUF_SIZE=512

View file

@ -1,7 +0,0 @@
# Copyright (c) 2019 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config USB_DEVICE_PID
default USB_PID_CONSOLE_SAMPLE
source "Kconfig.zephyr"

View file

@ -1,5 +1,6 @@
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PRODUCT="Zephyr USB console sample"
CONFIG_USB_DEVICE_PID=0x0004
CONFIG_SERIAL=y
CONFIG_CONSOLE=y

View file

@ -1,7 +0,0 @@
# Copyright (c) 2019 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config USB_DEVICE_PID
default USB_PID_DFU_SAMPLE
source "Kconfig.zephyr"

View file

@ -2,6 +2,7 @@ CONFIG_STDOUT_CONSOLE=y
CONFIG_GPIO=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PRODUCT="Zephyr DFU sample"
CONFIG_USB_DEVICE_PID=0x0005
CONFIG_USB_DFU_CLASS=y
CONFIG_USB_DFU_ENABLE_UPLOAD=y
CONFIG_FLASH=y

View file

@ -1,7 +0,0 @@
# Copyright (c) 2019 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config USB_DEVICE_PID
default USB_PID_HID_CDC_SAMPLE
source "Kconfig.zephyr"

View file

@ -1,6 +1,7 @@
CONFIG_USB_COMPOSITE_DEVICE=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PRODUCT="Zephyr HID and CDC ACM sample"
CONFIG_USB_DEVICE_PID=0x0003
CONFIG_ENTROPY_GENERATOR=y
CONFIG_ENTROPY_DEVICE_RANDOM_GENERATOR=y

View file

@ -1,7 +0,0 @@
# Copyright (c) 2019 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config USB_DEVICE_PID
default USB_PID_HID_MOUSE_SAMPLE
source "Kconfig.zephyr"

View file

@ -1,6 +1,7 @@
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_HID=y
CONFIG_USB_DEVICE_PRODUCT="Zephyr HID mouse sample"
CONFIG_USB_DEVICE_PID=0x0007
CONFIG_LOG=y
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y

View file

@ -1,7 +0,0 @@
# Copyright (c) 2019 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config USB_DEVICE_PID
default USB_PID_HID_SAMPLE
source "Kconfig.zephyr"

View file

@ -1,6 +1,7 @@
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_HID=y
CONFIG_USB_DEVICE_PRODUCT="Zephyr HID sample"
CONFIG_USB_DEVICE_PID=0x0006
CONFIG_USB_HID_BOOT_PROTOCOL=y
CONFIG_LOG=y

View file

@ -1,9 +1,6 @@
# Copyright (c) 2019-2020 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config USB_DEVICE_PID
default USB_PID_MASS_SAMPLE
config APP_WIPE_STORAGE
bool "Option to clear the flash area before mounting"
help

View file

@ -3,6 +3,7 @@ CONFIG_STDOUT_CONSOLE=y
#USB related configs
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PRODUCT="Zephyr MSC sample"
CONFIG_USB_DEVICE_PID=0x0008
CONFIG_LOG=y
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
CONFIG_USB_MASS_STORAGE=y

View file

@ -1,7 +0,0 @@
# Copyright (c) 2019 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config USB_DEVICE_PID
default USB_PID_TESTUSB_SAMPLE
source "Kconfig.zephyr"

View file

@ -3,6 +3,7 @@ CONFIG_STDOUT_CONSOLE=y
#USB related configs
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PRODUCT="Zephyr testusb sample"
CONFIG_USB_DEVICE_PID=0x0009
CONFIG_LOG=y
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
CONFIG_USB_DEVICE_LOOPBACK=y

View file

@ -1,54 +0,0 @@
# Copyright (c) 2019 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config USB_PID_CDC_ACM_SAMPLE
hex
default 0x0001
config USB_PID_CDC_ACM_COMPOSITE_SAMPLE
hex
default 0x0002
config USB_PID_HID_CDC_SAMPLE
hex
default 0x0003
config USB_PID_CONSOLE_SAMPLE
hex
default 0x0004
config USB_PID_DFU_SAMPLE
hex
default 0x0005
config USB_PID_HID_SAMPLE
hex
default 0x0006
config USB_PID_HID_MOUSE_SAMPLE
hex
default 0x0007
config USB_PID_MASS_SAMPLE
hex
default 0x0008
config USB_PID_TESTUSB_SAMPLE
hex
default 0x0009
config USB_PID_WEBUSB_SAMPLE
hex
default 0x000A
config USB_PID_BLE_HCI_SAMPLE
hex
default 0x000B
config USB_PID_BLE_HCI_H4_SAMPLE
hex
default 0x000C
config USB_PID_WPANUSB_SAMPLE
hex
default 0x000D

View file

@ -1,7 +0,0 @@
# Copyright (c) 2019 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config USB_DEVICE_PID
default USB_PID_WEBUSB_SAMPLE
source "Kconfig.zephyr"

View file

@ -3,6 +3,7 @@ CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_BOS=y
CONFIG_SERIAL=y
CONFIG_USB_DEVICE_PRODUCT="Zephyr WebUSB sample"
CONFIG_USB_DEVICE_PID=0x000A
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_LINE_CTRL=y

View file

@ -16,8 +16,6 @@ module = USB_DEVICE
module-str = usb device
source "subsys/logging/Kconfig.template.log_config"
source "samples/subsys/usb/usb_pid.Kconfig"
config USB_DEVICE_VID
hex "USB Vendor ID"
default 0x2FE3