TI J721E Imaging User Guide
iss_sensors.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2020 Texas Instruments Incorporated
4  *
5  * All rights reserved not granted herein.
6  *
7  * Limited License.
8  *
9  * Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive
10  * license under copyrights and patents it now or hereafter owns or controls to make,
11  * have made, use, import, offer to sell and sell ("Utilize") this software subject to the
12  * terms herein. With respect to the foregoing patent license, such license is granted
13  * solely to the extent that any such patent is necessary to Utilize the software alone.
14  * The patent license shall not apply to any combinations which include this software,
15  * other than combinations with devices manufactured by or for TI ("TI Devices").
16  * No hardware patent is licensed hereunder.
17  *
18  * Redistributions must preserve existing copyright notices and reproduce this license
19  * (including the above copyright notice and the disclaimer and (if applicable) source
20  * code license limitations below) in the documentation and/or other materials provided
21  * with the distribution
22  *
23  * Redistribution and use in binary form, without modification, are permitted provided
24  * that the following conditions are met:
25  *
26  * * No reverse engineering, decompilation, or disassembly of this software is
27  * permitted with respect to any software provided in binary form.
28  *
29  * * any redistribution and use are licensed by TI for use only with TI Devices.
30  *
31  * * Nothing shall obligate TI to provide you with source code for the software
32  * licensed and provided to you in object code.
33  *
34  * If software source code is provided to you, modification and redistribution of the
35  * source code are permitted provided that the following conditions are met:
36  *
37  * * any redistribution and use of the source code, including any resulting derivative
38  * works, are licensed by TI for use only with TI Devices.
39  *
40  * * any redistribution and use of any object code compiled from the source code
41  * and any resulting derivative works, are licensed by TI for use only with TI Devices.
42  *
43  * Neither the name of Texas Instruments Incorporated nor the names of its suppliers
44  *
45  * may be used to endorse or promote products derived from this software without
46  * specific prior written permission.
47  *
48  * DISCLAIMER.
49  *
50  * THIS SOFTWARE IS PROVIDED BY TI AND TI'S LICENSORS "AS IS" AND ANY EXPRESS
51  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
52  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
53  * IN NO EVENT SHALL TI AND TI'S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT,
54  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
55  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
56  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
57  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
58  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
59  * OF THE POSSIBILITY OF SUCH DAMAGE.
60  *
61  */
62 #ifndef ISS_SENSORS_H_
63 #define ISS_SENSORS_H_
64 
65 #include "TI/tivx_ext_raw_image.h"
66 
67 #include <stdio.h>
68 #include <stdint.h>
69 #include <stdlib.h>
70 #include <assert.h>
71 
72 /*******************************************************************************
73  * Include files
74  *******************************************************************************
75  */
76 
77 /*******************************************************************************
78  * Defines
79  *******************************************************************************
80  */
81 
82 /* FPD-Link initialization using B7 implementation */
83 // #define B7_IMPLEMENTATION
84 
89 #define SENSOR_I2C_TIMEOUT (5000U)
90 
91 typedef enum
92 {
108 
114 typedef enum
115 {
121 
122 
128 typedef enum
129 {
145 
146 
147 #define IMAGE_SENSOR_REMOTE_SERVICE_NAME "com.ti.image_sensor"
148 #define CMD_PARAM_SIZE 384
149 
150 /* Maximum number of channels supported */
151 #if defined(SOC_J784S4) || defined(SOC_J742S2)
152 #define ISS_SENSORS_MAX_CHANNEL (12U)
153 #else
154 #define ISS_SENSORS_MAX_CHANNEL (8U)
155 #endif
156 
157 /* Max characters in the sensor name */
158 #define ISS_SENSORS_MAX_NAME (32U)
159 
160 /* Supports Sensor's name */
161 #define SENSOR_SONY_IMX390_UB953_D3 "IMX390-UB953_D3"
162 #define SENSOR_SONY_IMX728_UB971_SONY "IMX728-UB971_SONY"
163 #define SENSOR_ONSEMI_AR0233_UB953_MARS "AR0233-UB953_MARS"
164 #define SENSOR_ONSEMI_AR0820_UB953_LI "AR0820-UB953_LI"
165 #define UB9XX_RAW_TESTPAT "UB9xxx_RAW12_TESTPATTERN"
166 #define UB96X_TESTPATTERN_UYVY "UB96x_UYVY_TESTPATTERN"
167 #define GW_AR0233_UYVY "GW_AR0233_UYVY"
168 #define SENSOR_OV2312_UB953_LI "OV2312-UB953_LI"
169 #define SENSOR_SONY_IMX390_UB953_DISCOVERY_NARROW "IMX390-UB953-DISCOVERY-NARROW"
170 #define SENSOR_SONY_IMX390_UB953_DISCOVERY_MID "IMX390-UB953-DISCOVERY-MID"
171 #define SENSOR_SONY_IMX390_UB953_DISCOVERY_WIDE "IMX390-UB953-DISCOVERY-WIDE"
172 
173 /* Defines ported from PDK for devices on MCU_PLUS_SDK */
174 #if defined (MCU_PLUS_SDK)
175 
177 #define BOARD_I2C_REG_ADDR_MSB_FIRST (0x0U)
178 
179 #define I2C_400kHz I2C_400KHZ
180 
189 #define BOARD_CSI_INST_0 ((uint32_t) 0x0U)
190 
191 #define BOARD_CSI_INST_1 ((uint32_t) 0x1U)
192 
193 #define BOARD_CSI_INST_2 ((uint32_t) 0x2U)
194 /* @} */
195 
196 #define BOARD_FPD_9702_CSI2_DES_HUB1 (0U)
197 #define BOARD_FPD_9702_CSI2_DES_HUB2 (1U)
198 #define BOARD_FPD_9702_CSI2_DES_HUB3 (2U)
199 
200 /* Board detect ID for Fusion2 */
201 #define BOARD_ID_FUSION2 (0x2U)
202 
203 int32_t Board_i2c16BitRegRd(void *handle,
204  uint32_t slaveAddr,
205  uint16_t regAddr,
206  uint8_t *regData,
207  uint8_t numOfBytes,
208  uint8_t byteOrdSel,
209  uint32_t i2cTimeout);
210 
211 void Board_fpdUb9702GetI2CAddr(uint8_t *i2cAddr,
212  uint32_t hubInstance);
213 #endif /* MCU_PLUS_SDK */
214 
215 /*******************************************************************************
216  * Data structure's
217  *******************************************************************************
218  */
219 
224 typedef enum
225 {
253 
254 
259 typedef enum
260 {
270 
275 typedef enum {
294 
299 typedef enum {
307 
312 typedef enum {
320 
321 
327 typedef struct
328 {
329  uint32_t totalWidth, totalHeight;
331  struct {
332  uint32_t startx, starty;
334  uint32_t width, height;
336  } info[ISS_SENSOR_MAX_EXPOSURE];
338 
343 typedef struct
344 {
345  uint16_t nRegAddr;
347  uint16_t nRegValue;
349  uint32_t nDelay;
351 } I2cParams;
352 
353 
359 typedef struct
360 {
361  uint32_t chId;
363  uint32_t expRatio;
365  uint32_t exposureTime[ISS_SENSOR_MAX_EXPOSURE];
368  uint32_t analogGain[ISS_SENSOR_MAX_EXPOSURE];
372 
373 
379 typedef struct
380 {
381  uint32_t chId;
383  uint32_t rGain[ISS_SENSOR_MAX_EXPOSURE];
386  uint32_t gGain[ISS_SENSOR_MAX_EXPOSURE];
389  uint32_t bGain[ISS_SENSOR_MAX_EXPOSURE];
392  uint32_t colorTemp[ISS_SENSOR_MAX_EXPOSURE];
396 
397 
402 typedef struct
403 {
404  uint32_t chId;
406  uint8_t *pDccCfg;
408  uint32_t dccCfgSize;
411 
416 typedef struct
417 {
420 
422  uint8_t senI2cAddr;
423 
425  uint8_t serI2cAddr;
427 
428 
433 typedef struct
434 {
435  tivx_raw_image_create_params_t raw_params;
437  uint32_t features;
439  uint32_t aewbMode;
441  uint32_t fps;
443  uint32_t numDataLanes;
445  uint32_t dataLanesMap[4];
447  uint32_t dataLanesPolarity[4];
449  uint32_t csi_laneBandSpeed;
452 
453 
459 typedef struct
460 {
463  uint16_t i2cInstId;
465  uint8_t i2cAddrSensor[ISS_SENSORS_MAX_CHANNEL];
467  uint8_t i2cAddrSer[ISS_SENSORS_MAX_CHANNEL];
469  // uint8_t i2cAddrMisc[ISS_SENSORS_MAX_CHANNEL];
473 #if defined(B7_IMPLEMENTATION)
474  IssSensor_ModuleParams moduleInfo;
476 #endif
477  uint32_t num_channels;
479  uint32_t dccId;
482 
483 /*******************************************************************************
484  * Defines
485  *******************************************************************************
486  */
487 
488 /* Maximum amount of sensors allowed to be connected via Fusion board
489 (8 on Fusion1, 12 on Fusion2) */
490 #define ISS_SENSORS_MAX_SENSOR_INSTANCES (12U)
491 #define ISS_SENSORS_MAX_SUPPORTED_SENSOR ISS_SENSORS_MAX_SENSOR_INSTANCES
492 
493 /* Maximum amount of sensor handles allowed to be registered to the framework
494  Memory can handle up to 15 handles */
495 #define ISS_SENSORS_MAX_SENSOR_HANDLES (12U)
496 
497 
498 #define DEFAULT_TARGET_BRIGHTNESS_MIN 40
499 #define DEFAULT_TARGET_BRIGHTNESS_MAX 50
500 #define DEFAULT_TARGET_BRIGHTNESS 45
501 #define DEFAULT_TARGET_THRESHOLD 5
502 #define DEFAULT_EXPOSURE_TIME 1
503 #define DEFAULT_ENABLE_BLC 0
504 
505 
506 /* 8-bit GPIO Expander 5 */
507 #define TCA6408_I2C_ADDR_1 0x20
508 #define TCA6408_I2C_ADDR_2 0x21
509 #define TCA6408_CONFIG_REG 0x03
510 
511 /* Register values for port select register (0x4C) to read and write from
512  specified port:
513 FPD3 RX Port 0 | FPD3 RX Port 1 | FPD3 RX Port 2 | FPD3 RX Port 3
514 R: 0x4C[5:4]=00 | R: 0x4C[5:4]=01 | R: 0x4C[5:4]=10 | R: 0x4C[5:4]=11
515 W: 0x4C[0]=1 | W: 0x4C[1]=1 | W: 0x4C[2]=1 | W: 0x4C[3]=1 */
516 #define DES_PORT_SEL_0 0x01
517 #define DES_PORT_SEL_1 0x12
518 #define DES_PORT_SEL_2 0x24
519 #define DES_PORT_SEL_3 0x38
520 
521 
522 /*******************************************************************************
523  * Data Structures
524  *******************************************************************************
525  */
526 
531 typedef struct
532 {
533  uint8_t pol;
536  uint8_t position;
545 
546 
551 typedef struct
552 {
555  uint8_t enableFsin;
560 
561 
580 typedef struct
581 {
589 
594 typedef struct {
595  uint32_t min;
597  uint32_t max;
599 } IssAeRange;
600 
601 
608 #define MAX_AE_DYN_PARAMS (10U)
609 
614 typedef struct {
615  IssAeRange exposureTimeRange[MAX_AE_DYN_PARAMS];
617  IssAeRange analogGainRange[MAX_AE_DYN_PARAMS];
619  IssAeRange digitalGainRange[MAX_AE_DYN_PARAMS];
621  uint32_t numAeDynParams;
627  uint32_t threshold;
631  uint32_t enableBlc;
634 
635 
641 typedef struct {
645  uint32_t sensor_pre_gain;
648 
653 typedef int32_t (*IssSensor_ProbeFxn) (uint32_t chId, void *pSensorHdl);
654 
659 typedef int32_t (*IssSensor_ConfigFxn) (uint32_t chId, void *pSensorHdl, uint32_t sensor_features_requested);
660 
665 typedef int32_t (*IssSensor_StreamOnFxn) (uint32_t chId, void *pSensorHdl);
666 
671 typedef int32_t (*IssSensor_StreamOffFxn) (uint32_t chId, void *pSensorHdl);
672 
678 typedef int32_t (*IssSensor_PowerOnFxn) (uint32_t chId, void *pSensorHdl);
679 
684 typedef int32_t (*IssSensor_PowerOffFxn) (uint32_t chId, void *pSensorHdl);
685 
690 typedef int32_t (*IssSensor_SetAeParamsFxn) (void *pSensorHdl, uint32_t chId, IssSensor_ExposureParams *pExpPrms);
691 
696 typedef int32_t (*IssSensor_GetDccParamsFxn) (uint32_t chId, void *pSensorHdl, IssSensor_DccParams *pDccPrms);
697 
702 typedef int32_t (*IssSensor_GetExpParamsFxn) (uint32_t chId, void *pSensorHdl, IssSensor_ExposureParams *pExpPrms);
703 
708 typedef void (*IssSensor_InitAewbConfigFxn) (uint32_t chId, void *pSensorHdl);
709 
714 typedef void (*IssSensor_GetIspConfigFxn) (uint32_t chId, void *pSensorHdl);
715 
720 typedef void (*IssSensor_DeinitFxn) (uint32_t chId, void *pSensorHdl);
721 
726 typedef int32_t (*I2cRegReadWriteFxn) (uint32_t chId, void *pSensorHdl, uint32_t readWriteFlag, I2cParams *pReg);
727 
732 typedef int32_t (*IssSensor_GetExpPrgFxn) (uint32_t chId, void *pSensorHdl, IssAeDynamicParams *p_ae_dynPrms);
733 
738 typedef int32_t (*IssSensor_GetWbConfigFxn) (uint32_t chId, void *pSensorHdl, IssAwbDynamicParams *p_awb_dynPrms);
739 
740 
745 typedef int32_t (*IssSensor_SetAwbParamsFxn) (void *pSensorHdl, uint32_t chId, IssSensor_WhiteBalanceParams *pWbPrms);
746 
751 typedef int32_t (*IssSensor_GetAwbParamsFxn) (uint32_t chId, void *pSensorHdl, IssSensor_WhiteBalanceParams *pWbPrms);
752 
776 };
777 /* Forward Declaration of Sensor Params */
778 typedef struct IssSensorFxns_t IssSensorFxns;
779 
780 
781 // typedef int32_t (*IssSerDes_ProbeFxn)(uint32_t chId, void *pSensorHdl);
782 
783 // typedef int32_t (*IssSerDes_ConfigFxn)(uint32_t chId, void *pSensorHdl);
784 
785 // typedef int32_t (*IssSerDes_EnableCSIFxn)(uint32_t chId, void *pSensorHdl);
786 
787 // typedef int32_t (*IssSerDes_DisableCSIFxn)(uint32_t chId, void *pSensorHdl);
788 
789 // typedef int32_t (*IssSerDes_SelectTypeFxn)(uint32_t chId, void *pSensorHdl, uint32_t type);
790 
791 // struct IssSerDesFxns_t {
792 // IssSerDes_ProbeFxn probe;
793 // IssSerDes_ConfigFxn config;
794 // IssSerDes_EnableCSIFxn enableCSI;
795 // IssSerDes_DisableCSIFxn disableCSI;
796 // IssSerDes_SelectTypeFxn selectType;
797 // };
798 // typedef struct IssSerDesFxns_t IssSerDesFxns;
799 
804 typedef struct
805 {
806  uint32_t isUsed;
810  IssSensorFxns * sensorFxns;
814  // IssSerDesFxns * desFxns;
815  // IssSerDesFxns * serFxns;
817 
818 
819 /*******************************************************************************
820  * Functions Declarations
821  *******************************************************************************
822  * \ingroup group_vision_function_imaging_sensordrv
823  */
824 
825 
840 int32_t IssSensor_Init();
841 
854 int32_t IssSensor_DeInit();
855 
870 int32_t IssSensor_Register(IssSensors_Handle *pSensorPrms);
871 
872 
890 int32_t IssSensor_GetSensorInfo(char * name, IssSensor_CreateParams *pCreatePrms);
891 
906 
907 #ifndef DEPRECATED
908 #define IssSensor_GetSensorHandle IssSensor_getSensorHandleFromName
909 #endif /* DEPRECATED */
910 
930 
949 void* IssSensor_Create(char * name);
950 
972 int32_t IssSensor_Control(void* handle, uint32_t cmd, void* cmdArgs,
973  void* cmdRetArgs);
974 
991 int32_t IssSensor_Start(void* handle, uint32_t chId);
992 
1009 int32_t IssSensor_Stop(void* handle, uint32_t chId);
1010 
1026 int32_t IssSensor_Delete(void* handle);
1027 
1041 int32_t IssSensor_cfgDesScript(I2cParams *script, int8_t ub960InstanceId);
1042 
1057 int32_t ub953_cfgScript(uint8_t i2cInstId, uint8_t i2cAddr, I2cParams *script);
1058 
1071 // IssSensors_Handle * getSensorHandleFromName(char *name);
1072 
1090 int32_t IssSensor_PowerOn(void* handle, uint32_t chMask);
1091 
1092 
1106 int32_t IssSensor_PowerOff(void* handle, uint32_t chId);
1107 
1124 int32_t IssSensor_Config(void* handle, uint32_t chId, uint32_t feat);
1125 
1140 int32_t IssSensor_SetAeParams(void *handle, uint32_t chId, IssSensor_ExposureParams *pExpPrms);
1141 
1156 int32_t IssSensor_SetAwbParams(void *handle, uint32_t chId, IssSensor_WhiteBalanceParams *pWbPrms);
1157 
1158 int32_t enableUB960Broadcast(int8_t ub960InstanceId);
1159 int32_t disableUB960Broadcast(int8_t ub960InstanceId);
1160 int32_t UB960_SelectPort(uint32_t chId);
1161 int32_t UB960_SetAlias(uint32_t chId, uint8_t slot, uint8_t phy_i2c_addr_7bit, uint8_t alias_i2c_addr_7bit);
1162 int32_t UB960_SetSerAlias(uint32_t chId, uint8_t alias_i2c_addr_7bit);
1163 int32_t UB960_SetSensorAlias(uint32_t chId, uint8_t sensor_phy_i2c_addr_7bit, uint8_t ser_alias_i2c_addr_7bit);
1164 
1165 
1179 int32_t enableUB960Streaming(uint32_t chId);
1180 
1194 int32_t disableUB960Streaming(uint32_t chId);
1195 
1196 
1221 int8_t getDeserializerInstIdFromChId(uint32_t chId);
1222 
1223 int32_t powerOffDeserializers(void);
1224 
1225 
1226 #ifndef DEPRECATED
1227 
1245 int32_t IssSensor_GetSensorInfoFromDccId(uint32_t dccId, IssSensor_Info *pInfo);
1246 
1247 #endif /* DEPRECATED */
1248 
1249 #endif /* End of ISS_SENSORS_H_*/
1250 
int32_t IssSensor_PowerOn(void *handle, uint32_t chMask)
Function to get sensor handle from name.
IMAGE_SERDES_FPD_LINK
Enumeration for FPD-Link type.
Definition: iss_sensors.h:114
Definition: iss_sensors.h:268
Definition: iss_sensors.h:131
AutoExposure results data structure.
Definition: iss_sensors.h:359
Definition: iss_sensors.h:250
Definition: iss_sensors.h:248
Definition: iss_sensors.h:278
int32_t(* IssSensor_ConfigFxn)(uint32_t chId, void *pSensorHdl, uint32_t sensor_features_requested)
Callback for sensor & SerDes configuration.
Definition: iss_sensors.h:659
IssAeRange blueGainRange
Definition: iss_sensors.h:643
uint32_t isUsed
Definition: iss_sensors.h:806
uint32_t exposureTimeStepSize
Definition: iss_sensors.h:629
IssSensor_Exposures
Enum for different sensor exposures in WDR sensor.
Definition: iss_sensors.h:259
int32_t IssSensor_GetSensorInfoFromDccId(uint32_t dccId, IssSensor_Info *pInfo)
Function to get Sensor information for sensor whose DCC ID is passed. It searches in the table of reg...
int32_t IssSensor_Register(IssSensors_Handle *pSensorPrms)
Function to register a sensor driver with the driver framework.
IssSensor_Info sensorInfo
Definition: iss_sensors.h:471
uint32_t dccId
Definition: iss_sensors.h:479
IssSensor_StreamOnFxn streamOn
Definition: iss_sensors.h:761
I2cParams * desCfgPreScript
Definition: iss_sensors.h:582
int32_t UB960_SelectPort(uint32_t chId)
Definition: iss_sensors.h:301
#define MAX_AE_DYN_PARAMS
Maximum number of dynamic parameter configuration supported for Auto Exposure Algorithm tuning...
Definition: iss_sensors.h:608
int32_t(* IssSensor_GetAwbParamsFxn)(uint32_t chId, void *pSensorHdl, IssSensor_WhiteBalanceParams *pWbPrms)
Callback for getting WB gains in the sensor.
Definition: iss_sensors.h:751
Definition: iss_sensors.h:261
Definition: iss_sensors.h:314
int32_t enableUB960Broadcast(int8_t ub960InstanceId)
Definition: iss_sensors.h:276
Definition: iss_sensors.h:105
IssSensor_StreamOffFxn streamOff
Definition: iss_sensors.h:762
IssSensor_ProbeFxn probe
Definition: iss_sensors.h:759
Sensor Specific Auto Exposure Dynamic Parameters.
Definition: iss_sensors.h:614
Structure used for specifying register configurations of sensor, serializer and deserializer.
Definition: iss_sensors.h:580
Definition: iss_sensors.h:238
Definition: iss_sensors.h:135
Structure for setting camera moduel information.
Definition: iss_sensors.h:416
Definition: iss_sensors.h:265
Definition: iss_sensors.h:280
Definition: iss_sensors.h:99
uint32_t chId
Definition: iss_sensors.h:404
uint32_t chId
Definition: iss_sensors.h:361
Definition: iss_sensors.h:134
uint32_t nDelay
Definition: iss_sensors.h:349
Sensor Information structure.
Definition: iss_sensors.h:433
uint32_t num_channels
Definition: iss_sensors.h:477
Definition: iss_sensors.h:232
Create Time parameters, ISS sensor layer uses these parameters and configures board module and sensor...
Definition: iss_sensors.h:459
int32_t IssSensor_Config(void *handle, uint32_t chId, uint32_t feat)
Function to configure the sensor.
Definition: iss_sensors.h:316
Definition: iss_sensors.h:101
Definition: iss_sensors.h:230
Definition: iss_sensors.h:95
Definition: iss_sensors.h:267
#define IssSensor_GetSensorHandle
Definition: iss_sensors.h:908
int32_t powerOffDeserializers(void)
uint32_t sensor_pre_gain
Definition: iss_sensors.h:645
uint16_t nRegValue
Definition: iss_sensors.h:347
uint32_t chId
Definition: iss_sensors.h:381
uint16_t nRegAddr
Definition: iss_sensors.h:345
uint32_t totalWidth
Definition: iss_sensors.h:329
IssSensor_Features
Enum for Sensor Features.
Definition: iss_sensors.h:224
Definition: iss_sensors.h:236
int32_t(* IssSensor_SetAwbParamsFxn)(void *pSensorHdl, uint32_t chId, IssSensor_WhiteBalanceParams *pWbPrms)
Callback for setting WB gains in the sensor.
Definition: iss_sensors.h:745
int32_t IssSensor_DeInit()
Function to de-initialize sensor driver framework. Unregisters remote service.
Definition: iss_sensors.h:142
int32_t(* I2cRegReadWriteFxn)(uint32_t chId, void *pSensorHdl, uint32_t readWriteFlag, I2cParams *pReg)
Callback for reading/writing sensor registers from the application. Reserved for future use...
Definition: iss_sensors.h:726
Definition: iss_sensors.h:132
uint32_t threshold
Definition: iss_sensors.h:627
int32_t(* IssSensor_PowerOffFxn)(uint32_t chId, void *pSensorHdl)
Callback for powering OFF the sensor, if applicable.
Definition: iss_sensors.h:684
int32_t UB960_SetAlias(uint32_t chId, uint8_t slot, uint8_t phy_i2c_addr_7bit, uint8_t alias_i2c_addr_7bit)
int32_t(* IssSensor_ProbeFxn)(uint32_t chId, void *pSensorHdl)
Callback for sensor probe. Detection of sensor HW using chip ID register.
Definition: iss_sensors.h:653
int32_t(* IssSensor_StreamOffFxn)(uint32_t chId, void *pSensorHdl)
Callback for stopping streaming.
Definition: iss_sensors.h:671
IssSensor_CreateParams * createPrms
Definition: iss_sensors.h:808
IssSensor_GetAwbParamsFxn getAwbParams
Definition: iss_sensors.h:775
IssAeRange targetBrightnessRange
Definition: iss_sensors.h:623
Definition: iss_sensors.h:226
#define ISS_SENSORS_MAX_CHANNEL
Definition: iss_sensors.h:154
Min/Max Range, used in AWB calibration data.
Definition: iss_sensors.h:594
AutoWhiteBalance results data structure.
Definition: iss_sensors.h:379
Definition: iss_sensors.h:136
int32_t(* IssSensor_GetWbConfigFxn)(uint32_t chId, void *pSensorHdl, IssAwbDynamicParams *p_awb_dynPrms)
Callback for getting sensor&#39;s WB constraints. Needed for AutoWhiteBalance tuning. ...
Definition: iss_sensors.h:738
uint8_t pol
Definition: iss_sensors.h:533
uint32_t features
Definition: iss_sensors.h:437
Definition: iss_sensors.h:246
uint8_t sensorBroadcast
Definition: iss_sensors.h:553
IssSensor_GetDccParamsFxn getDccParams
Definition: iss_sensors.h:767
int32_t IssSensor_Stop(void *handle, uint32_t chId)
Used stopping the sensor, which is alraedy opened using Create function. Must be called after Create ...
Definition: iss_sensors.h:288
uint32_t fps
Definition: iss_sensors.h:441
For Line Interleaved WDR mode, this structure is used for specifying position of each exposure frame...
Definition: iss_sensors.h:327
#define ISS_SENSORS_MAX_NAME
Definition: iss_sensors.h:158
Definition: iss_sensors.h:282
tivx_raw_image_create_params_t raw_params
Definition: iss_sensors.h:435
Definition: iss_sensors.h:143
Structure for setting DCC params.
Definition: iss_sensors.h:402
IssSensor_DeinitFxn deinit
Definition: iss_sensors.h:772
Definition: iss_sensors.h:318
int32_t(* IssSensor_SetAeParamsFxn)(void *pSensorHdl, uint32_t chId, IssSensor_ExposureParams *pExpPrms)
Callback for setting sensor exposure and gain.
Definition: iss_sensors.h:690
int32_t IssSensor_cfgDesScript(I2cParams *script, int8_t ub960InstanceId)
Function to configure UB960 deserializer.
uint16_t i2cInstId
Definition: iss_sensors.h:463
Definition: iss_sensors.h:98
uint8_t serI2cAddr
Definition: iss_sensors.h:425
IssSensor_GetIspConfigFxn getIspConfig
Definition: iss_sensors.h:769
Definition: iss_sensors.h:303
void(* IssSensor_DeinitFxn)(uint32_t chId, void *pSensorHdl)
Callback for de-initializing the sensor, if applicable. Reserved for future use.
Definition: iss_sensors.h:720
uint32_t expRatio
Definition: iss_sensors.h:363
uint8_t enableFsin
Definition: iss_sensors.h:555
IssSensor_PowerOnFxn powerOn
Definition: iss_sensors.h:763
Definition: iss_sensors.h:244
I2cParams * sensorCfgPreScript
Definition: iss_sensors.h:584
I2cParams * sensorCfgPostScript
Definition: iss_sensors.h:587
uint32_t numDataLanes
Definition: iss_sensors.h:443
Handle to the sensor driver. Includes all the information about the sensor.
Definition: iss_sensors.h:804
IMAGE_SENSOR_CTRLCMD
IOCTLS supported as part of IM_SENSOR_CMD_CTL command.
Definition: iss_sensors.h:128
int32_t disableUB960Broadcast(int8_t ub960InstanceId)
Definition: iss_sensors.h:100
int32_t IssSensor_Start(void *handle, uint32_t chId)
Used Starting the sensor, which is already opened using Create function. Must be called after Create ...
uint32_t starty
Definition: iss_sensors.h:332
Definition: iss_sensors.h:263
int32_t disableUB960Streaming(uint32_t chId)
Function to enable streaming from UB960 by setting register 0x33 to 0x2 for the given camera channel...
IssSensor_GetExpPrgFxn getExpPrg
Definition: iss_sensors.h:771
uint32_t csi_laneBandSpeed
Definition: iss_sensors.h:449
uint32_t max
Definition: iss_sensors.h:597
int32_t IssSensor_Control(void *handle, uint32_t cmd, void *cmdArgs, void *cmdRetArgs)
Used for sending control commands, this layer supports all configuration using control commants...
Definition: iss_sensors.h:116
uint32_t dccCfgSize
Definition: iss_sensors.h:408
Structure containins sensor information, used for registering it to the sensor framework.
Definition: iss_sensors.h:758
int8_t getDeserializerInstIdFromChId(uint32_t chId)
Function to map UB960 Instance to channel number On Fusion board the mapping is as follows Camera Cha...
void(* IssSensor_GetIspConfigFxn)(uint32_t chId, void *pSensorHdl)
Callback for getting ISP settings specific to the sensor, if applicable. Reserved for future use...
Definition: iss_sensors.h:714
int32_t IssSensor_GetSensorInfo(char *name, IssSensor_CreateParams *pCreatePrms)
Function to get Sensor information for given sensor It searches in the table of registered sensors...
uint8_t * pDccCfg
Definition: iss_sensors.h:406
Definition: iss_sensors.h:118
int32_t IssSensor_PowerOff(void *handle, uint32_t chId)
Function to power OFF the sensor.
Definition: iss_sensors.h:104
int32_t IssSensor_Init()
Function to initialize sensor driver framework. Registers with remote service. Includes init function...
int32_t UB960_SetSensorAlias(uint32_t chId, uint8_t sensor_phy_i2c_addr_7bit, uint8_t ser_alias_i2c_addr_7bit)
Definition: iss_sensors.h:286
Definition: iss_sensors.h:139
Definition: iss_sensors.h:133
Definition: iss_sensors.h:138
IssSensor_InitAewbConfigFxn initAewbConfig
Definition: iss_sensors.h:768
AlgItt_IssAewbMode
AEWB Algorithm Mode.
Definition: iss_sensors.h:275
AlgItt_IssAeMode
AE Algorithm SubModes.
Definition: iss_sensors.h:299
Definition: iss_sensors.h:130
uint32_t width
Definition: iss_sensors.h:334
Definition: iss_sensors.h:94
IssSensors_Handle * IssSensor_getSensorHandleFromName(char *name)
Function to get sensor handle from name.
int32_t IssSensor_SetAwbParams(void *handle, uint32_t chId, IssSensor_WhiteBalanceParams *pWbPrms)
Function to send WhiteBalance gains to the sensor.
IMAGE_SERDES_FPD_LINK fpdLink
Definition: iss_sensors.h:419
uint8_t position
Definition: iss_sensors.h:536
IssSensor_PowerOffFxn powerOff
Definition: iss_sensors.h:764
Register address and value pair, with delay.
Definition: iss_sensors.h:343
uint32_t targetBrightness
Definition: iss_sensors.h:625
Definition: iss_sensors.h:234
Definition: iss_sensors.h:93
int32_t(* IssSensor_GetDccParamsFxn)(uint32_t chId, void *pSensorHdl, IssSensor_DccParams *pDccPrms)
Callback for getting DCC parameters. Reserved for future use.
Definition: iss_sensors.h:696
Definition: iss_sensors.h:102
IssSensor_GetWbConfigFxn getWbCfg
Definition: iss_sensors.h:773
int32_t(* IssSensor_GetExpPrgFxn)(uint32_t chId, void *pSensorHdl, IssAeDynamicParams *p_ae_dynPrms)
Callback for getting sensor&#39;s exposure constraints. Needed for AutoExposure tuning.
Definition: iss_sensors.h:732
Sensor Specific Auto WhiteBalance Dynamic Parameters.
Definition: iss_sensors.h:641
Definition: iss_sensors.h:137
int32_t UB960_SetSerAlias(uint32_t chId, uint8_t alias_i2c_addr_7bit)
Definition: iss_sensors.h:242
Definition: iss_sensors.h:117
I2cParams * serCfgPreScript
Definition: iss_sensors.h:583
void(* IssSensor_InitAewbConfigFxn)(uint32_t chId, void *pSensorHdl)
Callback for setting AEWB specific sensor settings, if applicable. Reserved for future use...
Definition: iss_sensors.h:708
Definition: iss_sensors.h:119
CSI-2 COmplex I/O Lane Configuration.
Definition: iss_sensors.h:531
I2cRegReadWriteFxn readWriteReg
Definition: iss_sensors.h:770
AlgItt_IssAwbMode
AWB Algorithm SubModes.
Definition: iss_sensors.h:312
IMAGE_SENSOR_COMMAND
Definition: iss_sensors.h:91
Structure used for describing sensor interfacing.
Definition: iss_sensors.h:551
Definition: iss_sensors.h:106
int32_t enableUB960Streaming(uint32_t chId)
Function to enable streaming from UB960 by setting register 0x33 to 0x3 for the given camera channel...
uint32_t enableBlc
Definition: iss_sensors.h:631
IssAeRange greenGainRange
Definition: iss_sensors.h:644
Definition: iss_sensors.h:305
void * IssSensor_Create(char *name)
Creates the sensor, based on the create params, it searches for the given sensor in the registered se...
IssSensor_ConfigFxn config
Definition: iss_sensors.h:760
I2cParams * desCfgPostScript
Definition: iss_sensors.h:585
int32_t(* IssSensor_GetExpParamsFxn)(uint32_t chId, void *pSensorHdl, IssSensor_ExposureParams *pExpPrms)
Callback for getting current exposure settings. Reserved for future use.
Definition: iss_sensors.h:702
IssSensor_SetAeParamsFxn setAeParams
Definition: iss_sensors.h:766
uint32_t numAeDynParams
Definition: iss_sensors.h:621
int32_t IssSensor_SetAeParams(void *handle, uint32_t chId, IssSensor_ExposureParams *pExpPrms)
Function to send Exposure parameters to the sensor.
IssSensorFxns * sensorFxns
Definition: iss_sensors.h:810
I2cParams * serCfgPostScript
Definition: iss_sensors.h:586
IssSensorIntfParams * sensorIntfPrms
Definition: iss_sensors.h:812
int32_t(* IssSensor_StreamOnFxn)(uint32_t chId, void *pSensorHdl)
Callback for starting streaming.
Definition: iss_sensors.h:665
IssSensor_GetExpParamsFxn getAeParams
Definition: iss_sensors.h:765
int32_t IssSensor_Delete(void *handle)
Used for deleting the sensor, which is already opened using Create function. Internally it deletes se...
Definition: iss_sensors.h:97
uint32_t aewbMode
Definition: iss_sensors.h:439
int32_t(* IssSensor_PowerOnFxn)(uint32_t chId, void *pSensorHdl)
Callback for powering ON the sensor and/or configuring the deserialser so that the sensor is visible ...
Definition: iss_sensors.h:678
IssAeRange redGainRange
Definition: iss_sensors.h:642
uint32_t min
Definition: iss_sensors.h:595
Definition: iss_sensors.h:96
Definition: iss_sensors.h:103
uint8_t numCamerasStreaming
Definition: iss_sensors.h:557
IssSensor_SetAwbParamsFxn setAwbParams
Definition: iss_sensors.h:774
Definition: iss_sensors.h:228
uint8_t senI2cAddr
Definition: iss_sensors.h:422
int32_t ub953_cfgScript(uint8_t i2cInstId, uint8_t i2cAddr, I2cParams *script)
Function to configure UB953 serializer.
Definition: iss_sensors.h:240