mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-31 05:52:55 +08:00
Change input terminal type to camera
This commit is contained in:
parent
4d0cf6135a
commit
7325dd6335
@ -48,7 +48,7 @@ enum {
|
||||
/* control */\
|
||||
+ TUD_VIDEO_DESC_STD_VC_LEN\
|
||||
+ (TUD_VIDEO_DESC_CS_VC_LEN + 1/*bInCollection*/)\
|
||||
+ TUD_VIDEO_DESC_INPUT_TERM_LEN\
|
||||
+ TUD_VIDEO_DESC_CAMERA_TERM_LEN\
|
||||
+ TUD_VIDEO_DESC_OUTPUT_TERM_LEN\
|
||||
/* Interface 1, Alternate 0 */\
|
||||
+ TUD_VIDEO_DESC_STD_VS_LEN\
|
||||
@ -79,9 +79,11 @@ enum {
|
||||
TUD_VIDEO_DESC_STD_VC(ITF_NUM_VIDEO_CONTROL, 0, _stridx), \
|
||||
TUD_VIDEO_DESC_CS_VC( /* UVC 1.5*/ 0x0150, \
|
||||
/* wTotalLength - bLength */ \
|
||||
TUD_VIDEO_DESC_INPUT_TERM_LEN + TUD_VIDEO_DESC_OUTPUT_TERM_LEN, \
|
||||
TUD_VIDEO_DESC_CAMERA_TERM_LEN + TUD_VIDEO_DESC_OUTPUT_TERM_LEN, \
|
||||
UVC_CLOCK_FREQUENCY, 1), \
|
||||
TUD_VIDEO_DESC_INPUT_TERM(UVC_ENTITY_CAP_INPUT_TERMINAL, VIDEO_ETT_COMPOSITE_CONNECTOR, 0, 0), \
|
||||
TUD_VIDEO_DESC_CAMERA_TERM(UVC_ENTITY_CAP_INPUT_TERMINAL, 0, 0,\
|
||||
/*wObjectiveFocalLengthMin*/0, /*wObjectiveFocalLengthMax*/0,\
|
||||
/*wObjectiveFocalLength*/0, /*bmControls*/0), \
|
||||
TUD_VIDEO_DESC_OUTPUT_TERM(UVC_ENTITY_CAP_OUTPUT_TERMINAL, VIDEO_TT_STREAMING, 0, 1, 0), \
|
||||
/* Video stream alt. 0 */ \
|
||||
TUD_VIDEO_DESC_STD_VS( 1, 0, 0, 0), \
|
||||
@ -108,5 +110,4 @@ enum {
|
||||
/* EP */ \
|
||||
TUD_VIDEO_DESC_EP_ISO(_epin, _epsize, 1)
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -373,6 +373,7 @@ TU_VERIFY_STATIC( sizeof(video_probe_and_commit_control_t) == 48, "size is not c
|
||||
#define TUD_VIDEO_DESC_CS_VC_LEN 12
|
||||
#define TUD_VIDEO_DESC_INPUT_TERM_LEN 8
|
||||
#define TUD_VIDEO_DESC_OUTPUT_TERM_LEN 9
|
||||
#define TUD_VIDEO_DESC_CAMERA_TERM_LEN 18
|
||||
#define TUD_VIDEO_DESC_STD_VS_LEN 9
|
||||
#define TUD_VIDEO_DESC_CS_VS_IN_LEN 13
|
||||
#define TUD_VIDEO_DESC_CS_VS_OUT_LEN 9
|
||||
@ -412,6 +413,13 @@ TU_VERIFY_STATIC( sizeof(video_probe_and_commit_control_t) == 48, "size is not c
|
||||
TUD_VIDEO_DESC_OUTPUT_TERM_LEN, TUSB_DESC_CS_INTERFACE, VIDEO_CS_ITF_VC_OUTPUT_TERMINAL, \
|
||||
_tid, U16_TO_U8S_LE(_tt), _at, _srcid, _stridx
|
||||
|
||||
/* 3.7.2.3 */
|
||||
#define TUD_VIDEO_DESC_CAMERA_TERM(_tid, _at, _stridx, _focal_min, _focal_max, _focal, _ctls) \
|
||||
TUD_VIDEO_DESC_CAMERA_TERM_LEN, TUSB_DESC_CS_INTERFACE, VIDEO_CS_ITF_VC_INPUT_TERMINAL, \
|
||||
_tid, U16_TO_U8S_LE(VIDEO_ITT_CAMERA), _at, _stridx, \
|
||||
U16_TO_U8S_LE(_focal_min), U16_TO_U8S_LE(_focal_max), U16_TO_U8S_LE(_focal), 3, \
|
||||
TU_U32_BYTE0(_ctls), TU_U32_BYTE1(_ctls), TU_U32_BYTE2(_ctls)
|
||||
|
||||
/* 3.9.1 */
|
||||
#define TUD_VIDEO_DESC_STD_VS(_itfnum, _alt, _epn, _stridx) \
|
||||
TUD_VIDEO_DESC_STD_VS_LEN, TUSB_DESC_INTERFACE, _itfnum, _alt, \
|
||||
|
Loading…
x
Reference in New Issue
Block a user