mirror of
https://github.com/Fishwaldo/bl_mcu_sdk.git
synced 2025-07-20 03:38:59 +00:00
[refactor][cam] refactor camera driver,add standard interfaces for camera
This commit is contained in:
parent
9792e36ab4
commit
e27aedace2
20 changed files with 404 additions and 259 deletions
|
@ -353,16 +353,18 @@ uint32_t jpeg_count = 0;
|
|||
|
||||
void usbd_video_set_interface_callback(uint8_t value)
|
||||
{
|
||||
struct device* cam0 = device_find("camera0");
|
||||
|
||||
if (value) {
|
||||
play_status = 1;
|
||||
MSG("OPEN\r\n");
|
||||
mjpeg_start();
|
||||
cam_start();
|
||||
device_control(cam0, DEVICE_CTRL_RESUME, NULL);
|
||||
|
||||
} else {
|
||||
play_status = 0;
|
||||
MSG("CLOSE\r\n");
|
||||
cam_stop();
|
||||
device_control(cam0, DEVICE_CTRL_SUSPEND, NULL);
|
||||
mjpeg_stop();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue