add video_entity_info struct
This commit is contained in:
@@ -23,6 +23,12 @@
|
|||||||
#include "usbd_core.h"
|
#include "usbd_core.h"
|
||||||
#include "usbd_video.h"
|
#include "usbd_video.h"
|
||||||
|
|
||||||
|
struct video_entity_info {
|
||||||
|
uint8_t bDescriptorSubtype;
|
||||||
|
uint8_t bEntityId;
|
||||||
|
uint16_t wTerminalType;
|
||||||
|
};
|
||||||
|
|
||||||
struct usbd_video_cfg_priv {
|
struct usbd_video_cfg_priv {
|
||||||
struct video_probe_and_commit_controls probe;
|
struct video_probe_and_commit_controls probe;
|
||||||
struct video_probe_and_commit_controls commit;
|
struct video_probe_and_commit_controls commit;
|
||||||
@@ -722,20 +728,20 @@ static void video_notify_handler(uint8_t event, void *arg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void usbd_video_add_interface(usbd_class_t *class, usbd_interface_t *intf)
|
void usbd_video_add_interface(usbd_class_t *devclass, usbd_interface_t *intf)
|
||||||
{
|
{
|
||||||
static usbd_class_t *last_class = NULL;
|
static usbd_class_t *last_class = NULL;
|
||||||
|
|
||||||
if (last_class != class) {
|
if (last_class != devclass) {
|
||||||
last_class = class;
|
last_class = devclass;
|
||||||
usbd_class_register(class);
|
usbd_class_register(devclass);
|
||||||
}
|
}
|
||||||
|
|
||||||
intf->class_handler = video_class_request_handler;
|
intf->class_handler = video_class_request_handler;
|
||||||
intf->custom_handler = NULL;
|
intf->custom_handler = NULL;
|
||||||
intf->vendor_handler = NULL;
|
intf->vendor_handler = NULL;
|
||||||
intf->notify_handler = video_notify_handler;
|
intf->notify_handler = video_notify_handler;
|
||||||
usbd_class_add_interface(class, intf);
|
usbd_class_add_interface(devclass, intf);
|
||||||
|
|
||||||
if (usbd_video_cfg.vcintf == 0xff) {
|
if (usbd_video_cfg.vcintf == 0xff) {
|
||||||
usbd_video_cfg.vcintf = intf->intf_num;
|
usbd_video_cfg.vcintf = intf->intf_num;
|
||||||
|
|||||||
@@ -29,14 +29,14 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void usbd_video_add_interface(usbd_class_t *class, usbd_interface_t *intf);
|
void usbd_video_add_interface(usbd_class_t *devclass, usbd_interface_t *intf);
|
||||||
|
|
||||||
void usbd_video_open(uint8_t intf);
|
void usbd_video_open(uint8_t intf);
|
||||||
void usbd_video_close(uint8_t intf);
|
void usbd_video_close(uint8_t intf);
|
||||||
void usbd_video_probe_and_commit_controls_init(uint32_t dwFrameInterval, uint32_t dwMaxVideoFrameSize, uint32_t dwMaxPayloadTransferSize);
|
void usbd_video_probe_and_commit_controls_init(uint32_t dwFrameInterval, uint32_t dwMaxVideoFrameSize, uint32_t dwMaxPayloadTransferSize);
|
||||||
uint32_t usbd_video_mjpeg_payload_fill(uint8_t *input, uint32_t input_len, uint8_t *output, uint32_t *out_len);
|
uint32_t usbd_video_mjpeg_payload_fill(uint8_t *input, uint32_t input_len, uint8_t *output, uint32_t *out_len);
|
||||||
void usbd_video_mjpeg_payload_header_toggle(uint8_t *output, uint32_t packets);
|
void usbd_video_mjpeg_payload_header_toggle(uint8_t *output, uint32_t packets);
|
||||||
|
void usbd_video_sof_callback(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user