mirror of
https://github.com/thead-yocto-mirror/csi_hal
synced 2026-07-07 08:34:58 +02:00
102 lines
4.1 KiB
C
102 lines
4.1 KiB
C
/*
|
|
* Copyright (C) 2021 Alibaba Group Holding Limited
|
|
* Author: LuChongzhi <chongzhi.lcz@alibaba-inc.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
|
|
#ifndef __CSI_CAMERA_PROPERTY_H__
|
|
#define __CSI_CAMERA_PROPERTY_H__
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
/* Camera Property ID */
|
|
#define CSI_CAMERA_PID_BASE (0x009a0000 | 0x900)
|
|
|
|
#define CSI_CAMERA_FLAG_NEXT_CTRL 0x80000000
|
|
|
|
/* image processing releated */
|
|
#define CSI_CAMERA_PID_HFLIP (CSI_CAMERA_PID_BASE + 0x1)
|
|
#define CSI_CAMERA_PID_VFLIP (CSI_CAMERA_PID_BASE + 0x2)
|
|
#define CSI_CAMERA_PID_ROTATE (CSI_CAMERA_PID_BASE + 0x3)
|
|
|
|
/* exposure related */
|
|
#define CSI_CAMERA_PID_EXPOSURE_MODE (CSI_CAMERA_PID_BASE + 0x11)
|
|
enum CSI_CAMERA_EXPOSURE_MODE {
|
|
CSI_CAMERA_EXPOSURE_MODE_AUTO = 0,
|
|
CSI_CAMERA_EXPOSURE_MANUAL = 1,
|
|
CSI_CAMERA_EXPOSURE_SHUTTER_PRIORITY = 2,
|
|
CSI_CAMERA_EXPOSURE_APERTURE_PRIORITY = 3,
|
|
};
|
|
#define CSI_CAMERA_PID_EXPOSURE_ABSOLUTE (CSI_CAMERA_PID_BASE + 0x12)
|
|
#define CSI_CAMERA_PID_EXPOSURE_AUTO_PRIORITY (CSI_CAMERA_PID_BASE + 0x13)
|
|
#define CSI_CAMERA_PID_EXPOSURE_BIAS (CSI_CAMERA_PID_BASE + 0x14)
|
|
#define CSI_CAMERA_PID_EXPOSURE_METERING (CSI_CAMERA_PID_BASE + 0x15)
|
|
enum CSI_CAMERA_PID_EXPOSURE_METERING_MODE {
|
|
CSI_CAMERA_EXPOSURE_METERING_AVERAGE = 0,
|
|
CSI_CAMERA_EXPOSURE_METERING_CENTER_WEIGHTED = 1,
|
|
CSI_CAMERA_EXPOSURE_METERING_SPOT = 2,
|
|
CSI_CAMERA_EXPOSURE_METERING_MATRIX = 3,
|
|
};
|
|
|
|
/* Focus related */
|
|
#define CSI_CAMERA_PID_FOCUS_ABSOLUTE (CSI_CAMERA_PID_BASE + 0x21)
|
|
#define CSI_CAMERA_PID_FOCUS_RELATIVE (CSI_CAMERA_PID_BASE + 0x22)
|
|
#define CSI_CAMERA_PID_FOCUS_AUTO (CSI_CAMERA_PID_BASE + 0x23)
|
|
|
|
#define CSI_CAMERA_PID_AUTO_FOCUS_START (CSI_CAMERA_PID_BASE + 0x24)
|
|
#define CSI_CAMERA_PID_AUTO_FOCUS_STOP (CSI_CAMERA_PID_BASE + 0x25)
|
|
|
|
#define CSI_CAMERA_PID_AUTO_FOCUS_STATUS (CSI_CAMERA_PID_BASE + 0x26)
|
|
#define CSI_CAMERA_AUTO_FOCUS_STATUS_IDLE (1<<0)
|
|
#define CSI_CAMERA_AUTO_FOCUS_STATUS_BUSY (1<<1)
|
|
#define CSI_CAMERA_AUTO_FOCUS_STATUS_REACHED (1<<2)
|
|
#define CSI_CAMERA_AUTO_FOCUS_STATUS_FAILED (1<<3)
|
|
|
|
/* 3A misc */
|
|
#define CSI_CAMERA_PID_AUTO_PRESET_WHITE_BALANCE (CSI_CAMERA_PID_BASE + 0x31)
|
|
enum CSI_CAMERA_AUTO_PRESET_WHITE_BALANCE_MODE {
|
|
CSI_CAMERA_WHITE_BALANCE_MANUAL = 0,
|
|
CSI_CAMERA_WHITE_BALANCE_AUTO = 1,
|
|
CSI_CAMERA_WHITE_BALANCE_CUSTOM1 = 2,
|
|
CSI_CAMERA_WHITE_BALANCE_CUSTOM2 = 3,
|
|
};
|
|
|
|
#define CSI_CAMERA_PID_3A_LOCK (CSI_CAMERA_PID_BASE + 0x32)
|
|
#define CSI_CAMERA_LOCK_EXPOSURE (1 << 0)
|
|
#define CSI_CAMERA_LOCK_WHITE_BALANCE (1 << 1)
|
|
#define CSI_CAMERA_LOCK_FOCUS (1 << 2)
|
|
|
|
/* Gain */
|
|
#define CSI_CAMERA_PID_RED_GAIN (CSI_CAMERA_PID_BASE + 0x41)
|
|
#define CSI_CAMERA_PID_GREEN_GAIN (CSI_CAMERA_PID_BASE + 0x42)
|
|
#define CSI_CAMERA_PID_BLUE_GAIN (CSI_CAMERA_PID_BASE + 0x43)
|
|
#define CSI_CAMERA_PID_WIDE_DYNAMIC_RANGE (CSI_CAMERA_PID_BASE + 0x44)
|
|
#define CSI_CAMERA_PID_ZOOM_ABSOLUTE (CSI_CAMERA_PID_BASE + 0x45)
|
|
#define CSI_CAMERA_PID_ZOOM_RELATIVE (CSI_CAMERA_PID_BASE + 0x46)
|
|
#define CSI_CAMERA_PID_ZOOM_CONTINOUS (CSI_CAMERA_PID_BASE + 0x47)
|
|
|
|
/* PAN & TILT */
|
|
#define CSI_CAMERA_PID_PAN_RELATIVE (CSI_CAMERA_PID_BASE + 0x51)
|
|
#define CSI_CAMERA_PID_TILT_RELATIVE (CSI_CAMERA_PID_BASE + 0x52)
|
|
#define CSI_CAMERA_PID_PAN_ABSOLUTE (CSI_CAMERA_PID_BASE + 0x53)
|
|
#define CSI_CAMERA_PID_TILT_ABSOLUTE (CSI_CAMERA_PID_BASE + 0x54)
|
|
#define CSI_CAMERA_PID_PAN_RESET (CSI_CAMERA_PID_BASE + 0x55)
|
|
#define CSI_CAMERA_PID_TILT_RESET (CSI_CAMERA_PID_BASE + 0x56)
|
|
|
|
/* misc enhance */
|
|
#define CSI_CAMERA_PID_HDR_MODE (CSI_CAMERA_PID_BASE + 0x61)
|
|
#define CSI_CAMERA_PID_BAND_STOP_FILTER (CSI_CAMERA_PID_BASE + 0x62)
|
|
#define CSI_CAMERA_PID_IMAGE_STABILIZATION (CSI_CAMERA_PID_BASE + 0x63)
|
|
|
|
#define CSI_CAMERA_PID_GAIN (CSI_CAMERA_PID_BASE + 0x64)
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif /* __CSI_CAMERA_PROPERTY_H__ */
|
|
|