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:
parent
02226d0352
commit
1c4011ff6e
29 changed files with 42 additions and 156 deletions
|
@ -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
|
Steering Committee, may allocate other USB Product IDs based on well-motivated
|
||||||
and documented requests.
|
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:
|
The following Product IDs are currently used:
|
||||||
|
|
||||||
* :kconfig:option:`CONFIG_USB_PID_CDC_ACM_SAMPLE`
|
+-------------------------------------+--------+
|
||||||
* :kconfig:option:`CONFIG_USB_PID_CDC_ACM_COMPOSITE_SAMPLE`
|
| Sample | PID |
|
||||||
* :kconfig:option:`CONFIG_USB_PID_HID_CDC_SAMPLE`
|
+=====================================+========+
|
||||||
* :kconfig:option:`CONFIG_USB_PID_CONSOLE_SAMPLE`
|
| :ref:`usb_cdc-acm` | 0x0001 |
|
||||||
* :kconfig:option:`CONFIG_USB_PID_DFU_SAMPLE`
|
+-------------------------------------+--------+
|
||||||
* :kconfig:option:`CONFIG_USB_PID_HID_SAMPLE`
|
| :ref:`usb_cdc-acm_composite` | 0x0002 |
|
||||||
* :kconfig:option:`CONFIG_USB_PID_HID_MOUSE_SAMPLE`
|
+-------------------------------------+--------+
|
||||||
* :kconfig:option:`CONFIG_USB_PID_MASS_SAMPLE`
|
| :ref:`usb_hid-cdc` | 0x0003 |
|
||||||
* :kconfig:option:`CONFIG_USB_PID_TESTUSB_SAMPLE`
|
+-------------------------------------+--------+
|
||||||
* :kconfig:option:`CONFIG_USB_PID_WEBUSB_SAMPLE`
|
| :ref:`cdc-acm-console` | 0x0004 |
|
||||||
* :kconfig:option:`CONFIG_USB_PID_BLE_HCI_H4_SAMPLE`
|
+-------------------------------------+--------+
|
||||||
|
| :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 USB device descriptor field ``bcdDevice`` (Device Release Number) represents
|
||||||
the Zephyr kernel major and minor versions as a binary coded decimal value.
|
the Zephyr kernel major and minor versions as a binary coded decimal value.
|
||||||
|
|
|
@ -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"
|
|
|
@ -7,6 +7,7 @@ CONFIG_BT=y
|
||||||
CONFIG_BT_HCI_RAW=y
|
CONFIG_BT_HCI_RAW=y
|
||||||
|
|
||||||
CONFIG_USB_DEVICE_STACK=y
|
CONFIG_USB_DEVICE_STACK=y
|
||||||
|
CONFIG_USB_DEVICE_PID=0x000B
|
||||||
CONFIG_USB_DEVICE_BLUETOOTH=y
|
CONFIG_USB_DEVICE_BLUETOOTH=y
|
||||||
CONFIG_USB_DEVICE_BLUETOOTH_VS_H4=n
|
CONFIG_USB_DEVICE_BLUETOOTH_VS_H4=n
|
||||||
|
|
||||||
|
|
|
@ -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"
|
|
|
@ -4,6 +4,7 @@ CONFIG_SERIAL=y
|
||||||
CONFIG_UART_INTERRUPT_DRIVEN=y
|
CONFIG_UART_INTERRUPT_DRIVEN=y
|
||||||
|
|
||||||
CONFIG_USB_DEVICE_STACK=y
|
CONFIG_USB_DEVICE_STACK=y
|
||||||
|
CONFIG_USB_DEVICE_PID=0x000C
|
||||||
CONFIG_USB_DEVICE_BT_H4=y
|
CONFIG_USB_DEVICE_BT_H4=y
|
||||||
|
|
||||||
# Workaround: Unable to allocate command buffer when using K_NO_WAIT since
|
# Workaround: Unable to allocate command buffer when using K_NO_WAIT since
|
||||||
|
|
|
@ -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"
|
|
|
@ -1,5 +1,6 @@
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
CONFIG_USB_DEVICE_STACK=y
|
CONFIG_USB_DEVICE_STACK=y
|
||||||
|
CONFIG_USB_DEVICE_PID=0x000D
|
||||||
CONFIG_USB_REQUEST_BUFFER_SIZE=300
|
CONFIG_USB_REQUEST_BUFFER_SIZE=300
|
||||||
CONFIG_UART_INTERRUPT_DRIVEN=y
|
CONFIG_UART_INTERRUPT_DRIVEN=y
|
||||||
|
|
||||||
|
|
|
@ -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"
|
|
|
@ -1,6 +1,7 @@
|
||||||
CONFIG_STDOUT_CONSOLE=y
|
CONFIG_STDOUT_CONSOLE=y
|
||||||
CONFIG_USB_DEVICE_STACK=y
|
CONFIG_USB_DEVICE_STACK=y
|
||||||
CONFIG_USB_DEVICE_PRODUCT="Zephyr CDC ACM sample"
|
CONFIG_USB_DEVICE_PRODUCT="Zephyr CDC ACM sample"
|
||||||
|
CONFIG_USB_DEVICE_PID=0x0001
|
||||||
CONFIG_LOG=y
|
CONFIG_LOG=y
|
||||||
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
|
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
|
||||||
CONFIG_USB_DEVICE_LOG_LEVEL_ERR=y
|
CONFIG_USB_DEVICE_LOG_LEVEL_ERR=y
|
||||||
|
|
|
@ -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"
|
|
|
@ -6,6 +6,7 @@ CONFIG_UART_LINE_CTRL=y
|
||||||
|
|
||||||
CONFIG_USB_DEVICE_STACK=y
|
CONFIG_USB_DEVICE_STACK=y
|
||||||
CONFIG_USB_DEVICE_PRODUCT="Zephyr CDC ACM Composite sample"
|
CONFIG_USB_DEVICE_PRODUCT="Zephyr CDC ACM Composite sample"
|
||||||
|
CONFIG_USB_DEVICE_PID=0x0002
|
||||||
CONFIG_USB_COMPOSITE_DEVICE=y
|
CONFIG_USB_COMPOSITE_DEVICE=y
|
||||||
CONFIG_USB_CDC_ACM_RINGBUF_SIZE=512
|
CONFIG_USB_CDC_ACM_RINGBUF_SIZE=512
|
||||||
|
|
||||||
|
|
|
@ -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"
|
|
|
@ -1,5 +1,6 @@
|
||||||
CONFIG_USB_DEVICE_STACK=y
|
CONFIG_USB_DEVICE_STACK=y
|
||||||
CONFIG_USB_DEVICE_PRODUCT="Zephyr USB console sample"
|
CONFIG_USB_DEVICE_PRODUCT="Zephyr USB console sample"
|
||||||
|
CONFIG_USB_DEVICE_PID=0x0004
|
||||||
|
|
||||||
CONFIG_SERIAL=y
|
CONFIG_SERIAL=y
|
||||||
CONFIG_CONSOLE=y
|
CONFIG_CONSOLE=y
|
||||||
|
|
|
@ -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"
|
|
|
@ -2,6 +2,7 @@ CONFIG_STDOUT_CONSOLE=y
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
CONFIG_USB_DEVICE_STACK=y
|
CONFIG_USB_DEVICE_STACK=y
|
||||||
CONFIG_USB_DEVICE_PRODUCT="Zephyr DFU sample"
|
CONFIG_USB_DEVICE_PRODUCT="Zephyr DFU sample"
|
||||||
|
CONFIG_USB_DEVICE_PID=0x0005
|
||||||
CONFIG_USB_DFU_CLASS=y
|
CONFIG_USB_DFU_CLASS=y
|
||||||
CONFIG_USB_DFU_ENABLE_UPLOAD=y
|
CONFIG_USB_DFU_ENABLE_UPLOAD=y
|
||||||
CONFIG_FLASH=y
|
CONFIG_FLASH=y
|
||||||
|
|
|
@ -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"
|
|
|
@ -1,6 +1,7 @@
|
||||||
CONFIG_USB_COMPOSITE_DEVICE=y
|
CONFIG_USB_COMPOSITE_DEVICE=y
|
||||||
CONFIG_USB_DEVICE_STACK=y
|
CONFIG_USB_DEVICE_STACK=y
|
||||||
CONFIG_USB_DEVICE_PRODUCT="Zephyr HID and CDC ACM sample"
|
CONFIG_USB_DEVICE_PRODUCT="Zephyr HID and CDC ACM sample"
|
||||||
|
CONFIG_USB_DEVICE_PID=0x0003
|
||||||
CONFIG_ENTROPY_GENERATOR=y
|
CONFIG_ENTROPY_GENERATOR=y
|
||||||
CONFIG_ENTROPY_DEVICE_RANDOM_GENERATOR=y
|
CONFIG_ENTROPY_DEVICE_RANDOM_GENERATOR=y
|
||||||
|
|
||||||
|
|
|
@ -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"
|
|
|
@ -1,6 +1,7 @@
|
||||||
CONFIG_USB_DEVICE_STACK=y
|
CONFIG_USB_DEVICE_STACK=y
|
||||||
CONFIG_USB_DEVICE_HID=y
|
CONFIG_USB_DEVICE_HID=y
|
||||||
CONFIG_USB_DEVICE_PRODUCT="Zephyr HID mouse sample"
|
CONFIG_USB_DEVICE_PRODUCT="Zephyr HID mouse sample"
|
||||||
|
CONFIG_USB_DEVICE_PID=0x0007
|
||||||
|
|
||||||
CONFIG_LOG=y
|
CONFIG_LOG=y
|
||||||
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
|
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
|
||||||
|
|
|
@ -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"
|
|
|
@ -1,6 +1,7 @@
|
||||||
CONFIG_USB_DEVICE_STACK=y
|
CONFIG_USB_DEVICE_STACK=y
|
||||||
CONFIG_USB_DEVICE_HID=y
|
CONFIG_USB_DEVICE_HID=y
|
||||||
CONFIG_USB_DEVICE_PRODUCT="Zephyr HID sample"
|
CONFIG_USB_DEVICE_PRODUCT="Zephyr HID sample"
|
||||||
|
CONFIG_USB_DEVICE_PID=0x0006
|
||||||
CONFIG_USB_HID_BOOT_PROTOCOL=y
|
CONFIG_USB_HID_BOOT_PROTOCOL=y
|
||||||
|
|
||||||
CONFIG_LOG=y
|
CONFIG_LOG=y
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
# Copyright (c) 2019-2020 Nordic Semiconductor ASA
|
# Copyright (c) 2019-2020 Nordic Semiconductor ASA
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
config USB_DEVICE_PID
|
|
||||||
default USB_PID_MASS_SAMPLE
|
|
||||||
|
|
||||||
config APP_WIPE_STORAGE
|
config APP_WIPE_STORAGE
|
||||||
bool "Option to clear the flash area before mounting"
|
bool "Option to clear the flash area before mounting"
|
||||||
help
|
help
|
||||||
|
|
|
@ -3,6 +3,7 @@ CONFIG_STDOUT_CONSOLE=y
|
||||||
#USB related configs
|
#USB related configs
|
||||||
CONFIG_USB_DEVICE_STACK=y
|
CONFIG_USB_DEVICE_STACK=y
|
||||||
CONFIG_USB_DEVICE_PRODUCT="Zephyr MSC sample"
|
CONFIG_USB_DEVICE_PRODUCT="Zephyr MSC sample"
|
||||||
|
CONFIG_USB_DEVICE_PID=0x0008
|
||||||
CONFIG_LOG=y
|
CONFIG_LOG=y
|
||||||
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
|
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
|
||||||
CONFIG_USB_MASS_STORAGE=y
|
CONFIG_USB_MASS_STORAGE=y
|
||||||
|
|
|
@ -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"
|
|
|
@ -3,6 +3,7 @@ CONFIG_STDOUT_CONSOLE=y
|
||||||
#USB related configs
|
#USB related configs
|
||||||
CONFIG_USB_DEVICE_STACK=y
|
CONFIG_USB_DEVICE_STACK=y
|
||||||
CONFIG_USB_DEVICE_PRODUCT="Zephyr testusb sample"
|
CONFIG_USB_DEVICE_PRODUCT="Zephyr testusb sample"
|
||||||
|
CONFIG_USB_DEVICE_PID=0x0009
|
||||||
CONFIG_LOG=y
|
CONFIG_LOG=y
|
||||||
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
|
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
|
||||||
CONFIG_USB_DEVICE_LOOPBACK=y
|
CONFIG_USB_DEVICE_LOOPBACK=y
|
||||||
|
|
|
@ -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
|
|
|
@ -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"
|
|
|
@ -3,6 +3,7 @@ CONFIG_USB_DEVICE_STACK=y
|
||||||
CONFIG_USB_DEVICE_BOS=y
|
CONFIG_USB_DEVICE_BOS=y
|
||||||
CONFIG_SERIAL=y
|
CONFIG_SERIAL=y
|
||||||
CONFIG_USB_DEVICE_PRODUCT="Zephyr WebUSB sample"
|
CONFIG_USB_DEVICE_PRODUCT="Zephyr WebUSB sample"
|
||||||
|
CONFIG_USB_DEVICE_PID=0x000A
|
||||||
CONFIG_UART_INTERRUPT_DRIVEN=y
|
CONFIG_UART_INTERRUPT_DRIVEN=y
|
||||||
CONFIG_UART_LINE_CTRL=y
|
CONFIG_UART_LINE_CTRL=y
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,6 @@ module = USB_DEVICE
|
||||||
module-str = usb device
|
module-str = usb device
|
||||||
source "subsys/logging/Kconfig.template.log_config"
|
source "subsys/logging/Kconfig.template.log_config"
|
||||||
|
|
||||||
source "samples/subsys/usb/usb_pid.Kconfig"
|
|
||||||
|
|
||||||
config USB_DEVICE_VID
|
config USB_DEVICE_VID
|
||||||
hex "USB Vendor ID"
|
hex "USB Vendor ID"
|
||||||
default 0x2FE3
|
default 0x2FE3
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue