/* * Copyright (c) 2021 HPMicro * * SPDX-License-Identifier: BSD-3-Clause * */ #ifndef HPM_CAMERA_H #define HPM_CAMERA_H #if defined(CONFIG_CAMERA_OV7725) && CONFIG_CAMERA_OV7725 #include "hpm_ov7725.h" #define CAMERA_MAX_IMAGE_OUTPUT_WIDTH OV7725_ACTIVE_IMAGE_WIDTH #define CAMERA_MAX_IMAGE_OUTPUT_HEIGHT OV7725_ACTIVE_IMAGE_HEIGHT #define CAMERA_DEVICE_ADDR OV7725_I2C_ADDR #elif defined(CONFIG_CAMERA_OV5640) && CONFIG_CAMERA_OV5640 #include "hpm_ov5640.h" #define CAMERA_MAX_IMAGE_OUTPUT_WIDTH OV5640_ACTIVE_IMAGE_WIDTH #define CAMERA_MAX_IMAGE_OUTPUT_HEIGHT OV5640_ACTIVE_IMAGE_HEIGHT #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 #else #error "unknown camera type, either have CONFIG_CAMERA_OV7725 or CONFIG_CAMERA_OV5640 defined" #endif #endif /* HPM_CAMERA_H */