init
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
// 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);
|
||||
|
||||
void cam_give_all(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* This file is part of the OpenMV project.
|
||||
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
|
||||
* This work is licensed under the MIT license, see the file LICENSE for details.
|
||||
*
|
||||
* SCCB (I2C like) driver.
|
||||
*
|
||||
*/
|
||||
#ifndef __SCCB_H__
|
||||
#define __SCCB_H__
|
||||
#include <stdint.h>
|
||||
int SCCB_Init(int pin_sda, int pin_scl);
|
||||
int SCCB_Use_Port(int sccb_i2c_port);
|
||||
int SCCB_Deinit(void);
|
||||
uint8_t SCCB_Probe(void);
|
||||
uint8_t SCCB_Read(uint8_t slv_addr, uint8_t reg);
|
||||
int SCCB_Write(uint8_t slv_addr, uint8_t reg, uint8_t data);
|
||||
uint8_t SCCB_Read16(uint8_t slv_addr, uint16_t reg);
|
||||
int SCCB_Write16(uint8_t slv_addr, uint16_t reg, uint8_t data);
|
||||
uint16_t SCCB_Read_Addr16_Val16(uint8_t slv_addr, uint16_t reg);
|
||||
int SCCB_Write_Addr16_Val16(uint8_t slv_addr, uint16_t reg, uint16_t data);
|
||||
#endif // __SCCB_H__
|
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "esp_system.h"
|
||||
#include "esp_camera.h"
|
||||
|
||||
esp_err_t xclk_timer_conf(int ledc_timer, int xclk_freq_hz);
|
||||
|
||||
esp_err_t camera_enable_out_clock(const camera_config_t *config);
|
||||
|
||||
void camera_disable_out_clock(void);
|
Reference in New Issue
Block a user