mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Update sensors drivers headers.
* Fix possible build issues if a driver is disabled. * Make sure no extra files are included if a driver is disabled.
This commit is contained in:
parent
dff8879008
commit
04fae4f28b
@ -67,6 +67,8 @@
|
||||
/******************************************************************************/
|
||||
/** INCLUDE FILES **/
|
||||
/******************************************************************************/
|
||||
#include "omv_boardconfig.h"
|
||||
#if (OMV_ENABLE_LEPTON == 1)
|
||||
|
||||
#include "LEPTON_Types.h"
|
||||
#include "LEPTON_ErrorCodes.h"
|
||||
@ -236,4 +238,4 @@ LEP_RESULT LEP_I2C_MasterStatus(LEP_UINT16 portID,
|
||||
return(result);
|
||||
}
|
||||
|
||||
|
||||
#endif // (OMV_ENABLE_LEPTON == 1)
|
||||
|
||||
@ -16,13 +16,10 @@
|
||||
*/
|
||||
#ifndef _MLX90640_I2C_Driver_H_
|
||||
#define _MLX90640_I2C_Driver_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include STM32_HAL_H
|
||||
|
||||
void MLX90640_I2CInit(I2C_HandleTypeDef *i2c);
|
||||
int MLX90640_I2CGeneralReset(void);
|
||||
int MLX90640_I2CRead(uint8_t slaveAddr,uint16_t startAddress, uint16_t nMemAddressRead, uint16_t *data);
|
||||
int MLX90640_I2CWrite(uint8_t slaveAddr,uint16_t writeAddress, uint16_t data);
|
||||
void MLX90640_I2CFreqSet(int freq);
|
||||
#endif
|
||||
void MLX90640_I2CInit(I2C_HandleTypeDef *i2c);
|
||||
int MLX90640_I2CGeneralReset(void);
|
||||
int MLX90640_I2CRead(uint8_t slaveAddr,uint16_t startAddress, uint16_t nMemAddressRead, uint16_t *data);
|
||||
int MLX90640_I2CWrite(uint8_t slaveAddr,uint16_t writeAddress, uint16_t data);
|
||||
void MLX90640_I2CFreqSet(int freq);
|
||||
#endif //_MLX90640_I2C_Driver_H_
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
#include STM32_HAL_H
|
||||
#include <MLX90640_I2C_Driver.h>
|
||||
#include <MLX90640_API.h>
|
||||
#include <math.h>
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
#include "py/mphal.h"
|
||||
#include "irq.h"
|
||||
#include "cambus.h"
|
||||
#include "sensor.h"
|
||||
#include "ov2640.h"
|
||||
#include "ov5640.h"
|
||||
#include "ov7725.h"
|
||||
@ -22,7 +23,6 @@
|
||||
#include "mt9v034.h"
|
||||
#include "lepton.h"
|
||||
#include "hm01b0.h"
|
||||
#include "sensor.h"
|
||||
#include "systick.h"
|
||||
#include "framebuffer.h"
|
||||
#include "omv_boardconfig.h"
|
||||
|
||||
@ -8,19 +8,22 @@
|
||||
*
|
||||
* HM01B0 driver.
|
||||
*/
|
||||
#include "omv_boardconfig.h"
|
||||
#if (OMV_ENABLE_HM01B0 == 1)
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "cambus.h"
|
||||
#include "sensor.h"
|
||||
#include "hm01b0.h"
|
||||
#include "hm01b0_regs.h"
|
||||
#include "systick.h"
|
||||
#include "omv_boardconfig.h"
|
||||
#define HIMAX_BOOT_RETRY (10)
|
||||
|
||||
#define HIMAX_LINE_LEN_PCK 0x172
|
||||
#define HIMAX_FRAME_LENGTH 0x232
|
||||
#if (OMV_ENABLE_HM01B0 == 1)
|
||||
#define HIMAX_BOOT_RETRY (10)
|
||||
#define HIMAX_LINE_LEN_PCK 0x172
|
||||
#define HIMAX_FRAME_LENGTH 0x232
|
||||
|
||||
static const uint16_t default_regs[][2] = {
|
||||
{BLC_TGT, 0x08}, // BLC target :8 at 8 bit mode
|
||||
{BLC2_TGT, 0x08}, // BLI target :8 at 8 bit mode
|
||||
|
||||
@ -10,6 +10,5 @@
|
||||
*/
|
||||
#ifndef __HM01B0_H__
|
||||
#define __HM01B0_H__
|
||||
#include "sensor.h"
|
||||
int hm01b0_init(sensor_t *sensor);
|
||||
#endif // __HM01B0_H__
|
||||
|
||||
@ -8,17 +8,17 @@
|
||||
*
|
||||
* Lepton driver.
|
||||
*/
|
||||
#include "omv_boardconfig.h"
|
||||
#if (OMV_ENABLE_LEPTON == 1)
|
||||
|
||||
#include STM32_HAL_H
|
||||
#include "irq.h"
|
||||
#include "cambus.h"
|
||||
#include "sensor.h"
|
||||
#include "systick.h"
|
||||
#include "framebuffer.h"
|
||||
#include "omv_boardconfig.h"
|
||||
#include "common.h"
|
||||
|
||||
#if (OMV_ENABLE_LEPTON == 1)
|
||||
|
||||
#include "crc16.h"
|
||||
#include "LEPTON_SDK.h"
|
||||
#include "LEPTON_AGC.h"
|
||||
|
||||
@ -10,7 +10,6 @@
|
||||
*/
|
||||
#ifndef __LEPTON_H__
|
||||
#define __LEPTON_H__
|
||||
#include "sensor.h"
|
||||
#define LEPTON_XCLK_FREQ 24000000
|
||||
int lepton_init(sensor_t *sensor);
|
||||
#endif // __LEPTON_H__
|
||||
|
||||
@ -8,14 +8,15 @@
|
||||
*
|
||||
* MT9V034 driver.
|
||||
*/
|
||||
#include "omv_boardconfig.h"
|
||||
#if (OMV_ENABLE_MT9V034 == 1)
|
||||
|
||||
#include "cambus.h"
|
||||
#include "sensor.h"
|
||||
#include "mt9v034.h"
|
||||
#include "systick.h"
|
||||
#include "framebuffer.h"
|
||||
#include "sensor.h"
|
||||
#include "omv_boardconfig.h"
|
||||
|
||||
#if (OMV_ENABLE_MT9V034 == 1)
|
||||
#define MT9V034_MAX_HEIGHT (480)
|
||||
#define MT9V034_MAX_WIDTH (752)
|
||||
#define MT9V034_CHIP_VERSION (0x00)
|
||||
|
||||
@ -10,7 +10,6 @@
|
||||
*/
|
||||
#ifndef __MT9V034_H__
|
||||
#define __MT9V034_H__
|
||||
#include "sensor.h"
|
||||
#define MT9V034_XCLK_FREQ 27000000
|
||||
int mt9v034_init(sensor_t *sensor);
|
||||
#endif // __MT9V034_H__
|
||||
|
||||
@ -8,16 +8,18 @@
|
||||
*
|
||||
* OV2640 driver.
|
||||
*/
|
||||
#include "omv_boardconfig.h"
|
||||
#if (OMV_ENABLE_OV2640 == 1)
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "cambus.h"
|
||||
#include "sensor.h"
|
||||
#include "ov2640.h"
|
||||
#include "ov2640_regs.h"
|
||||
#include "systick.h"
|
||||
#include "omv_boardconfig.h"
|
||||
|
||||
#if (OMV_ENABLE_OV2640 == 1)
|
||||
|
||||
#define CIF_WIDTH (400)
|
||||
#define CIF_HEIGHT (296)
|
||||
|
||||
@ -10,7 +10,6 @@
|
||||
*/
|
||||
#ifndef __OV2640_H__
|
||||
#define __OV2640_H__
|
||||
#include "sensor.h"
|
||||
#define OV2640_XCLK_FREQ 24000000
|
||||
int ov2640_init(sensor_t *sensor);
|
||||
#endif // __OV2640_H__
|
||||
|
||||
@ -8,16 +8,18 @@
|
||||
*
|
||||
* OV5640 driver.
|
||||
*/
|
||||
#include "omv_boardconfig.h"
|
||||
#if (OMV_ENABLE_OV5640 == 1)
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "cambus.h"
|
||||
#include "sensor.h"
|
||||
#include "ov5640.h"
|
||||
#include "ov5640_regs.h"
|
||||
#include "systick.h"
|
||||
#include "omv_boardconfig.h"
|
||||
|
||||
#if (OMV_ENABLE_OV5640 == 1)
|
||||
|
||||
#define BLANK_LINES 8
|
||||
#define DUMMY_LINES 6
|
||||
|
||||
@ -10,7 +10,6 @@
|
||||
*/
|
||||
#ifndef __OV5640_H__
|
||||
#define __OV5640_H__
|
||||
#include "sensor.h"
|
||||
#define OV5640_XCLK_FREQ 24000000
|
||||
int ov5640_init(sensor_t *sensor);
|
||||
#endif // __OV5640_H__
|
||||
|
||||
@ -8,16 +8,19 @@
|
||||
*
|
||||
* OV7690 driver.
|
||||
*/
|
||||
#include "omv_boardconfig.h"
|
||||
#if (OMV_ENABLE_OV7690 == 1)
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "cambus.h"
|
||||
#include "sensor.h"
|
||||
#include "ov7690.h"
|
||||
#include "ov7690_regs.h"
|
||||
#include "systick.h"
|
||||
#include "omv_boardconfig.h"
|
||||
|
||||
#if (OMV_ENABLE_OV7690 == 1)
|
||||
static const uint8_t default_regs[][2] = {
|
||||
|
||||
// From App Note.
|
||||
|
||||
@ -10,7 +10,6 @@
|
||||
*/
|
||||
#ifndef __OV7690_H__
|
||||
#define __OV7690_H__
|
||||
#include "sensor.h"
|
||||
#define OV7690_XCLK_FREQ 24000000
|
||||
int ov7690_init(sensor_t *sensor);
|
||||
#endif // __OV7690_H__
|
||||
|
||||
@ -8,16 +8,18 @@
|
||||
*
|
||||
* OV7725 driver.
|
||||
*/
|
||||
#include "omv_boardconfig.h"
|
||||
#if (OMV_ENABLE_OV7725 == 1)
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "cambus.h"
|
||||
#include "sensor.h"
|
||||
#include "ov7725.h"
|
||||
#include "ov7725_regs.h"
|
||||
#include "systick.h"
|
||||
#include "omv_boardconfig.h"
|
||||
|
||||
#if (OMV_ENABLE_OV7725 == 1)
|
||||
|
||||
static const uint8_t default_regs[][2] = {
|
||||
|
||||
|
||||
@ -10,6 +10,5 @@
|
||||
*/
|
||||
#ifndef __OV7725_H__
|
||||
#define __OV7725_H__
|
||||
#include "sensor.h"
|
||||
int ov7725_init(sensor_t *sensor);
|
||||
#endif // __OV7725_H__
|
||||
|
||||
@ -8,16 +8,18 @@
|
||||
*
|
||||
* OV9650 driver.
|
||||
*/
|
||||
#include "omv_boardconfig.h"
|
||||
#if (OMV_ENABLE_OV9650 == 1)
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "cambus.h"
|
||||
#include "sensor.h"
|
||||
#include "ov9650.h"
|
||||
#include "systick.h"
|
||||
#include "ov9650_regs.h"
|
||||
#include "omv_boardconfig.h"
|
||||
|
||||
#if (OMV_ENABLE_OV9650 == 1)
|
||||
|
||||
#define NUM_BR_LEVELS 7
|
||||
|
||||
|
||||
@ -10,6 +10,5 @@
|
||||
*/
|
||||
#ifndef __OV9650_H__
|
||||
#define __OV9650_H__
|
||||
#include "sensor.h"
|
||||
int ov9650_init(sensor_t *sensor);
|
||||
#endif // __OV9650_H__
|
||||
|
||||
Loading…
Reference in New Issue
Block a user