Commit b60609ad authored by Josuah Demangeon's avatar Josuah Demangeon Committed by Benjamin Cabé
Browse files

samples: usb: add new UVC sample



Following the addition of USB Video Class, this adds a sample that makes
use of the zephyr,camera chosen node of any board to stream the video
source to the host. A snippet video-sw-generator can be used to test
and debug devices without a zephyr,camera chosen node.

Signed-off-by: default avatarJosuah Demangeon <me@josuah.net>
parent 7538b7bd
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -551,6 +551,8 @@ The following Product IDs are currently used:
+----------------------------------------------------+--------+
| :zephyr:code-sample:`uac2-implicit-feedback`       | 0x000F |
+----------------------------------------------------+--------+
| :zephyr:code-sample:`uvc`                          | 0x0011 |
+----------------------------------------------------+--------+
| :zephyr:code-sample:`usb-dfu` (DFU Mode)           | 0xFFFF |
+----------------------------------------------------+--------+

+4 −0
Original line number Diff line number Diff line
@@ -32,6 +32,8 @@ Samples

* :zephyr:code-sample:`uac2-implicit-feedback`

* :zephyr:code-sample:`uvc`

Samples ported to new USB device support
----------------------------------------

@@ -223,6 +225,8 @@ instance (``n``) and is used as an argument to the :c:func:`usbd_register_class`
+-----------------------------------+-------------------------+-------------------------+
| Bluetooth HCI USB transport layer | :ref:`bt_hci_raw`       | :samp:`bt_hci_{n}`      |
+-----------------------------------+-------------------------+-------------------------+
| USB Video Class (UVC)             | Video device            | :samp:`uvc_{n}`         |
+-----------------------------------+-------------------------+-------------------------+

CDC ACM UART
============
+2 −1
Original line number Diff line number Diff line
@@ -83,7 +83,8 @@ static void sample_fix_code_triple(struct usbd_context *uds_ctx,
	    IS_ENABLED(CONFIG_USBD_CDC_ECM_CLASS) ||
	    IS_ENABLED(CONFIG_USBD_CDC_NCM_CLASS) ||
	    IS_ENABLED(CONFIG_USBD_MIDI2_CLASS) ||
	    IS_ENABLED(CONFIG_USBD_AUDIO2_CLASS)) {
	    IS_ENABLED(CONFIG_USBD_AUDIO2_CLASS) ||
	    IS_ENABLED(CONFIG_USBD_VIDEO_CLASS)) {
		/*
		 * Class with multiple interfaces have an Interface
		 * Association Descriptor available, use an appropriate triple
+8 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: Apache-2.0

cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(usb_video)

include(${ZEPHYR_BASE}/samples/subsys/usb/common/common.cmake)
target_sources(app PRIVATE src/main.c)
+9 −0
Original line number Diff line number Diff line
# Copyright The Zephyr Project Contributors
# SPDX-License-Identifier: Apache-2.0

# Source common USB sample options used to initialize new experimental USB
# device stack. The scope of these options is limited to USB samples in project
# tree, you cannot use them in your own application.
source "samples/subsys/usb/common/Kconfig.sample_usbd"

source "Kconfig.zephyr"
Loading