Merge pull request #16182 from Jason2866/webcam

Update Webcam lib `*.h` files
This commit is contained in:
Theo Arends 2022-08-09 10:05:04 +02:00 committed by GitHub
commit e79cd1b342
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 0 deletions

View File

@ -70,6 +70,7 @@
#include "driver/ledc.h" #include "driver/ledc.h"
#include "sensor.h" #include "sensor.h"
#include "sys/time.h" #include "sys/time.h"
#include "sdkconfig.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -91,6 +92,19 @@ typedef enum {
CAMERA_FB_IN_DRAM /*!< Frame buffer is placed in internal DRAM */ CAMERA_FB_IN_DRAM /*!< Frame buffer is placed in internal DRAM */
} camera_fb_location_t; } camera_fb_location_t;
#if CONFIG_CAMERA_CONVERTER_ENABLED
/**
* @brief Camera RGB\YUV conversion mode
*/
typedef enum {
CONV_DISABLE,
RGB565_TO_YUV422,
YUV422_TO_RGB565,
YUV422_TO_YUV420
} camera_conv_mode_t;
#endif
/** /**
* @brief Configuration structure for camera initialization * @brief Configuration structure for camera initialization
*/ */
@ -124,6 +138,9 @@ typedef struct {
size_t fb_count; /*!< Number of frame buffers to be allocated. If more than one, then each frame will be acquired (double speed) */ size_t fb_count; /*!< Number of frame buffers to be allocated. If more than one, then each frame will be acquired (double speed) */
camera_fb_location_t fb_location; /*!< The location where the frame buffer will be allocated */ camera_fb_location_t fb_location; /*!< The location where the frame buffer will be allocated */
camera_grab_mode_t grab_mode; /*!< When buffers should be filled */ camera_grab_mode_t grab_mode; /*!< When buffers should be filled */
#if CONFIG_CAMERA_CONVERTER_ENABLED
camera_conv_mode_t conv_mode; /*!< RGB<->YUV Conversion mode */
#endif
} camera_config_t; } camera_config_t;
/** /**

View File

@ -26,6 +26,10 @@ typedef enum {
GC2145_PID = 0x2145, GC2145_PID = 0x2145,
GC032A_PID = 0x232a, GC032A_PID = 0x232a,
GC0308_PID = 0x9b, GC0308_PID = 0x9b,
BF3005_PID = 0x30,
BF20A6_PID = 0x20a6,
SC101IOT_PID = 0xda4a,
SC030IOT_PID = 0x9a46,
} camera_pid_t; } camera_pid_t;
typedef enum { typedef enum {
@ -38,6 +42,10 @@ typedef enum {
CAMERA_GC2145, CAMERA_GC2145,
CAMERA_GC032A, CAMERA_GC032A,
CAMERA_GC0308, CAMERA_GC0308,
CAMERA_BF3005,
CAMERA_BF20A6,
CAMERA_SC101IOT,
CAMERA_SC030IOT,
CAMERA_MODEL_MAX, CAMERA_MODEL_MAX,
CAMERA_NONE, CAMERA_NONE,
} camera_model_t; } camera_model_t;
@ -52,11 +60,16 @@ typedef enum {
GC2145_SCCB_ADDR = 0x3C,// 0x78 >> 1 GC2145_SCCB_ADDR = 0x3C,// 0x78 >> 1
GC032A_SCCB_ADDR = 0x21,// 0x42 >> 1 GC032A_SCCB_ADDR = 0x21,// 0x42 >> 1
GC0308_SCCB_ADDR = 0x21,// 0x42 >> 1 GC0308_SCCB_ADDR = 0x21,// 0x42 >> 1
BF3005_SCCB_ADDR = 0x6E,
BF20A6_SCCB_ADDR = 0x6E,
SC101IOT_SCCB_ADDR = 0x68,// 0xd0 >> 1
SC030IOT_SCCB_ADDR = 0x68,// 0xd0 >> 1
} camera_sccb_addr_t; } camera_sccb_addr_t;
typedef enum { typedef enum {
PIXFORMAT_RGB565, // 2BPP/RGB565 PIXFORMAT_RGB565, // 2BPP/RGB565
PIXFORMAT_YUV422, // 2BPP/YUV422 PIXFORMAT_YUV422, // 2BPP/YUV422
PIXFORMAT_YUV420, // 1.5BPP/YUV420
PIXFORMAT_GRAYSCALE, // 1BPP/GRAYSCALE PIXFORMAT_GRAYSCALE, // 1BPP/GRAYSCALE
PIXFORMAT_JPEG, // JPEG/COMPRESSED PIXFORMAT_JPEG, // JPEG/COMPRESSED
PIXFORMAT_RGB888, // 3BPP/RGB888 PIXFORMAT_RGB888, // 3BPP/RGB888