✨ Adds support for esp32 P4
This commit is contained in:
@@ -1,15 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include <template/state_result.h>
|
||||
#include <sdkconfig.h>
|
||||
#include <platform_shared/api.pb.h>
|
||||
|
||||
#if !CONFIG_IDF_TARGET_ESP32P4
|
||||
#include <esp_camera.h>
|
||||
#else
|
||||
#define PIXFORMAT_JPEG 0
|
||||
#define FRAMESIZE_VGA 0
|
||||
#define GAINCEILING_2X 0
|
||||
#endif
|
||||
|
||||
namespace Camera {
|
||||
|
||||
// Use proto type directly as settings type
|
||||
using CameraSettings = api_CameraSettings;
|
||||
|
||||
// Default factory settings
|
||||
inline CameraSettings CameraSettings_defaults() {
|
||||
CameraSettings settings = api_CameraSettings_init_zero;
|
||||
settings.pixformat = PIXFORMAT_JPEG;
|
||||
|
||||
@@ -1,17 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include <template/state_result.h>
|
||||
#include <sdkconfig.h>
|
||||
#include <platform_shared/api.pb.h>
|
||||
|
||||
/*
|
||||
* I2C software connection
|
||||
*/
|
||||
#if CONFIG_IDF_TARGET_ESP32P4
|
||||
#ifndef SDA_PIN
|
||||
#define SDA_PIN 7
|
||||
#endif
|
||||
#ifndef SCL_PIN
|
||||
#define SCL_PIN 8
|
||||
#endif
|
||||
#else
|
||||
#ifndef SDA_PIN
|
||||
#define SDA_PIN 21
|
||||
#endif
|
||||
#ifndef SCL_PIN
|
||||
#define SCL_PIN 22
|
||||
#endif
|
||||
#endif
|
||||
#ifndef I2C_FREQUENCY
|
||||
#define I2C_FREQUENCY 1000000UL
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user