From 831443a2dce346cafab47a0a7f593e72fa33bfa4 Mon Sep 17 00:00:00 2001 From: kkitayam <45088311+kkitayam@users.noreply.github.com> Date: Thu, 30 Sep 2021 01:13:19 +0900 Subject: [PATCH] Move frame settings to usb_descriptors.h --- examples/device/video_capture/src/main.c | 1 + examples/device/video_capture/src/tusb_config.h | 8 -------- examples/device/video_capture/src/usb_descriptors.h | 4 ++++ 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/examples/device/video_capture/src/main.c b/examples/device/video_capture/src/main.c index a38791365..b24f01555 100644 --- a/examples/device/video_capture/src/main.c +++ b/examples/device/video_capture/src/main.c @@ -29,6 +29,7 @@ #include "bsp/board.h" #include "tusb.h" +#include "usb_descriptors.h" #include "images.h" //--------------------------------------------------------------------+ diff --git a/examples/device/video_capture/src/tusb_config.h b/examples/device/video_capture/src/tusb_config.h index 06a949b1c..5d2d5470c 100644 --- a/examples/device/video_capture/src/tusb_config.h +++ b/examples/device/video_capture/src/tusb_config.h @@ -105,14 +105,6 @@ // video streaming endpoint size #define CFG_TUD_VIDEO_STREAMING_EP_BUFSIZE 256 -//-------------------------------------------------------------------- -// APPLICATION CONFIGURATION -//-------------------------------------------------------------------- -#define FRAME_WIDTH 128 -#define FRAME_HEIGHT 96 -#define FRAME_RATE 10 - - #ifdef __cplusplus } #endif diff --git a/examples/device/video_capture/src/usb_descriptors.h b/examples/device/video_capture/src/usb_descriptors.h index eff57f1fa..e52703b29 100644 --- a/examples/device/video_capture/src/usb_descriptors.h +++ b/examples/device/video_capture/src/usb_descriptors.h @@ -33,6 +33,10 @@ #define UVC_ENTITY_CAP_INPUT_TERMINAL 0x01 #define UVC_ENTITY_CAP_OUTPUT_TERMINAL 0x02 +#define FRAME_WIDTH 128 +#define FRAME_HEIGHT 96 +#define FRAME_RATE 10 + enum { ITF_NUM_VIDEO_CONTROL = 0, ITF_NUM_VIDEO_STREAMING,