2022-09-06 12:48:16 +08:00
|
|
|
/*
|
2023-08-15 18:41:20 +08:00
|
|
|
* Copyright (c) 2021 HPMicro
|
2022-09-06 12:48:16 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef HPM_CAMERA_H
|
|
|
|
#define HPM_CAMERA_H
|
|
|
|
|
2023-08-15 18:41:20 +08:00
|
|
|
#if defined(CONFIG_CAMERA_OV7725) && CONFIG_CAMERA_OV7725
|
2022-09-06 12:48:16 +08:00
|
|
|
#include "hpm_ov7725.h"
|
|
|
|
#define CAMERA_MAX_IMAGE_OUTPUT_WIDTH OV7725_ACTIVE_IMAGE_WIDTH
|
|
|
|
#define CAMERA_MAX_IMAGE_OUTPUT_HEIGHT OV7725_ACTIVE_IMAGE_HEIGHT
|
2023-08-15 18:41:20 +08:00
|
|
|
#define CAMERA_DEVICE_ADDR OV7725_I2C_ADDR
|
|
|
|
#elif defined(CONFIG_CAMERA_OV5640) && CONFIG_CAMERA_OV5640
|
2022-09-06 12:48:16 +08:00
|
|
|
#include "hpm_ov5640.h"
|
|
|
|
#define CAMERA_MAX_IMAGE_OUTPUT_WIDTH OV5640_ACTIVE_IMAGE_WIDTH
|
|
|
|
#define CAMERA_MAX_IMAGE_OUTPUT_HEIGHT OV5640_ACTIVE_IMAGE_HEIGHT
|
2023-08-15 18:41:20 +08:00
|
|
|
#define CAMERA_DEVICE_ADDR OV5640_I2C_ADDR
|
|
|
|
#elif defined(CONFIG_CAMERA_MT9M114) && CONFIG_CAMERA_MT9M114
|
|
|
|
#include "hpm_mt9m114.h"
|
|
|
|
#define CAMERA_MAX_IMAGE_OUTPUT_WIDTH MT9M114_ACTIVE_IMAGE_WIDTH
|
|
|
|
#define CAMERA_MAX_IMAGE_OUTPUT_HEIGHT MT9M114_ACTIVE_IMAGE_HEIGHT
|
|
|
|
#define CAMERA_DEVICE_ADDR MT9M114_I2C_ADDR
|
2022-09-06 12:48:16 +08:00
|
|
|
#else
|
|
|
|
#error "unknown camera type, either have CONFIG_CAMERA_OV7725 or CONFIG_CAMERA_OV5640 defined"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* HPM_CAMERA_H */
|