mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-08 20:46:52 +03:00
v10.2.0
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
// Copyright 2010-2020 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "esp_camera.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Uninitialize the lcd_cam module
|
||||
*
|
||||
* @param handle Provide handle pointer to release resources
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK Success
|
||||
* - ESP_FAIL Uninitialize fail
|
||||
*/
|
||||
esp_err_t cam_deinit(void);
|
||||
|
||||
/**
|
||||
* @brief Initialize the lcd_cam module
|
||||
*
|
||||
* @param config Configurations - see lcd_cam_config_t struct
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK Success
|
||||
* - ESP_ERR_INVALID_ARG Parameter error
|
||||
* - ESP_ERR_NO_MEM No memory to initialize lcd_cam
|
||||
* - ESP_FAIL Initialize fail
|
||||
*/
|
||||
esp_err_t cam_init(const camera_config_t *config);
|
||||
|
||||
esp_err_t cam_config(const camera_config_t *config, framesize_t frame_size, uint16_t sensor_pid);
|
||||
|
||||
void cam_stop(void);
|
||||
|
||||
void cam_start(void);
|
||||
|
||||
camera_fb_t *cam_take(TickType_t timeout);
|
||||
|
||||
void cam_give(camera_fb_t *dma_buffer);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,49 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include "esp_err.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/semphr.h"
|
||||
#include "freertos/task.h"
|
||||
#include "esp_camera.h"
|
||||
#include "sensor.h"
|
||||
|
||||
#include "esp_system.h"
|
||||
#if ESP_IDF_VERSION_MAJOR >= 4 // IDF 4+
|
||||
#if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4
|
||||
#include "esp32/rom/lldesc.h"
|
||||
#else
|
||||
#error Target CONFIG_IDF_TARGET is not supported
|
||||
#endif
|
||||
#else // ESP32 Before IDF 4.0
|
||||
#include "rom/lldesc.h"
|
||||
#endif
|
||||
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t sample2;
|
||||
uint8_t unused2;
|
||||
uint8_t sample1;
|
||||
uint8_t unused1;
|
||||
};
|
||||
uint32_t val;
|
||||
} dma_elem_t;
|
||||
|
||||
typedef enum {
|
||||
/* camera sends byte sequence: s1, s2, s3, s4, ...
|
||||
* fifo receives: 00 s1 00 s2, 00 s2 00 s3, 00 s3 00 s4, ...
|
||||
*/
|
||||
SM_0A0B_0B0C = 0,
|
||||
/* camera sends byte sequence: s1, s2, s3, s4, ...
|
||||
* fifo receives: 00 s1 00 s2, 00 s3 00 s4, ...
|
||||
*/
|
||||
SM_0A0B_0C0D = 1,
|
||||
/* camera sends byte sequence: s1, s2, s3, s4, ...
|
||||
* fifo receives: 00 s1 00 00, 00 s2 00 00, 00 s3 00 00, ...
|
||||
*/
|
||||
SM_0A00_0B00 = 3,
|
||||
} i2s_sampling_mode_t;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#define __SCCB_H__
|
||||
#include <stdint.h>
|
||||
int SCCB_Init(int pin_sda, int pin_scl);
|
||||
int SCCB_Deinit(void);
|
||||
uint8_t SCCB_Probe();
|
||||
uint8_t SCCB_Read(uint8_t slv_addr, uint8_t reg);
|
||||
uint8_t SCCB_Write(uint8_t slv_addr, uint8_t reg, uint8_t data);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "camera_common.h"
|
||||
#include "esp_system.h"
|
||||
|
||||
esp_err_t xclk_timer_conf(int ledc_timer, int xclk_freq_hz);
|
||||
|
||||
esp_err_t camera_enable_out_clock();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user