Skip to content

Conversation

@laride
Copy link
Collaborator

@laride laride commented Dec 4, 2025

支持使用 USB 摄像头。

  • P4 可以使用市面上大部分 USB 摄像头。
  • S3 连接 USB 摄像头时,摄像头需要满足一些条件,典型条件比如:
    • 摄像头必须兼容 USB1.1 全速(Fullspeed)模式。
    • 摄像头必须能输出 JPEG (MJPEG) 格式。
    • 功能测试可以使用乐鑫 USB UVC 测试用摄像头

后续打算微调 Camera 部分,处理上次讨论的摄像头为可选件的初始化问题,单独写一个文档介绍接入摄像头的方式和要求。

.task_affinity = -1,
},
.usb = {
.init_usb_host_lib = true,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

考虑到未来支持其它 usb 设备,建议 usb_host 的初始化单独拎出去。


CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=4096

CONFIG_USB_HOST_CONTROL_TRANSFER_MAX_SIZE=1024
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

很多摄像头,config 描述符大小会大于 1024。建议更大一些,例如 1536

@laride laride marked this pull request as draft December 5, 2025 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants