mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-10 12:44:55 +00:00
fixed device/video_capture/src/images.h,main.c CFG_EXAMPLE_VIDEO_DISABLE_MJPG to CFG_EXAMPLE_VIDEO_DISABLE_MJPEG
This commit is contained in:
parent
9474db8b0f
commit
3f4e77738b
@ -1,4 +1,4 @@
|
|||||||
#if defined(CFG_EXAMPLE_VIDEO_DISABLE_MJPG)
|
#if defined(CFG_EXAMPLE_VIDEO_DISABLE_MJPEG)
|
||||||
static const unsigned char frame_buffer[128 * (96 + 1) * 2] = {
|
static const unsigned char frame_buffer[128 * (96 + 1) * 2] = {
|
||||||
/* 0 */
|
/* 0 */
|
||||||
0xeb, 0x80, 0xeb, 0x80, 0xeb, 0x80, 0xeb, 0x80, 0xeb, 0x80, 0xeb, 0x80, 0xeb, 0x80, 0xeb, 0x80,
|
0xeb, 0x80, 0xeb, 0x80, 0xeb, 0x80, 0xeb, 0x80, 0xeb, 0x80, 0xeb, 0x80, 0xeb, 0x80, 0xeb, 0x80,
|
||||||
|
@ -115,7 +115,7 @@ static unsigned interval_ms = 1000 / FRAME_RATE;
|
|||||||
#ifdef CFG_EXAMPLE_VIDEO_READONLY
|
#ifdef CFG_EXAMPLE_VIDEO_READONLY
|
||||||
#include "images.h"
|
#include "images.h"
|
||||||
|
|
||||||
# if !defined(CFG_EXAMPLE_VIDEO_DISABLE_MJPG)
|
# if !defined(CFG_EXAMPLE_VIDEO_DISABLE_MJPEG)
|
||||||
static struct {
|
static struct {
|
||||||
uint32_t size;
|
uint32_t size;
|
||||||
uint8_t const *buffer;
|
uint8_t const *buffer;
|
||||||
@ -187,7 +187,7 @@ void video_task(void)
|
|||||||
already_sent = 1;
|
already_sent = 1;
|
||||||
start_ms = board_millis();
|
start_ms = board_millis();
|
||||||
#ifdef CFG_EXAMPLE_VIDEO_READONLY
|
#ifdef CFG_EXAMPLE_VIDEO_READONLY
|
||||||
# if defined(CFG_EXAMPLE_VIDEO_DISABLE_MJPG)
|
# if defined(CFG_EXAMPLE_VIDEO_DISABLE_MJPEG)
|
||||||
tud_video_n_frame_xfer(0, 0, (void*)(uintptr_t)&frame_buffer[(frame_num % (FRAME_WIDTH / 2)) * 4],
|
tud_video_n_frame_xfer(0, 0, (void*)(uintptr_t)&frame_buffer[(frame_num % (FRAME_WIDTH / 2)) * 4],
|
||||||
FRAME_WIDTH * FRAME_HEIGHT * 16/8);
|
FRAME_WIDTH * FRAME_HEIGHT * 16/8);
|
||||||
# else
|
# else
|
||||||
@ -205,7 +205,7 @@ void video_task(void)
|
|||||||
start_ms += interval_ms;
|
start_ms += interval_ms;
|
||||||
|
|
||||||
#ifdef CFG_EXAMPLE_VIDEO_READONLY
|
#ifdef CFG_EXAMPLE_VIDEO_READONLY
|
||||||
# if defined(CFG_EXAMPLE_VIDEO_DISABLE_MJPG)
|
# if defined(CFG_EXAMPLE_VIDEO_DISABLE_MJPEG)
|
||||||
tud_video_n_frame_xfer(0, 0, (void*)(uintptr_t)&frame_buffer[(frame_num % (FRAME_WIDTH / 2)) * 4],
|
tud_video_n_frame_xfer(0, 0, (void*)(uintptr_t)&frame_buffer[(frame_num % (FRAME_WIDTH / 2)) * 4],
|
||||||
FRAME_WIDTH * FRAME_HEIGHT * 16/8);
|
FRAME_WIDTH * FRAME_HEIGHT * 16/8);
|
||||||
# else
|
# else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user