hi_sns_ctrl.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /******************************************************************************
  2. Copyright (C), 2016, Hisilicon Tech. Co., Ltd.
  3. ******************************************************************************
  4. File Name : hi_sns_ctrl.h
  5. Version : Initial Draft
  6. Author : Hisilicon multimedia software group
  7. Created : 2011/01/10
  8. Description :
  9. History :
  10. 1.Date : 2011/01/10
  11. Author :
  12. Modification: Created file
  13. ******************************************************************************/
  14. #ifndef __HI_SNS_CTRL_H__
  15. #define __HI_SNS_CTRL_H__
  16. #include "hi_type.h"
  17. #include "hi_comm_3a.h"
  18. #ifdef __cplusplus
  19. #if __cplusplus
  20. extern "C" {
  21. #endif
  22. #endif /* End of #ifdef __cplusplus */
  23. typedef struct hiISP_SNS_STATE_S
  24. {
  25. HI_BOOL bInit; /* HI_TRUE: Sensor init */
  26. HI_BOOL bSyncInit; /* HI_TRUE: Sync Reg init */
  27. HI_U8 u8ImgMode;
  28. HI_U8 u8Hdr; /* HI_TRUE: HDR enbale */
  29. WDR_MODE_E enWDRMode;
  30. ISP_SNS_REGS_INFO_S astRegsInfo[2]; /* [0]: Sensor reg info of cur-frame; [1]: Sensor reg info of pre-frame ; */
  31. HI_U32 au32FL[2]; /* [0]: FullLines of cur-frame; [1]: Pre FullLines of pre-frame */
  32. HI_U32 u32FLStd; /* FullLines std */
  33. HI_U32 au32WDRIntTime[4];
  34. } ISP_SNS_STATE_S;
  35. typedef struct hiISP_SNS_OBJ_S
  36. {
  37. HI_S32 (*pfnRegisterCallback)(VI_PIPE ViPipe, ALG_LIB_S *pstAeLib, ALG_LIB_S *pstAwbLib);
  38. HI_S32 (*pfnUnRegisterCallback)(VI_PIPE ViPipe, ALG_LIB_S *pstAeLib, ALG_LIB_S *pstAwbLib);
  39. HI_S32 (*pfnSetBusInfo)(VI_PIPE ViPipe, ISP_SNS_COMMBUS_U unSNSBusInfo);
  40. HI_VOID (*pfnStandby)(VI_PIPE ViPipe);
  41. HI_VOID (*pfnRestart)(VI_PIPE ViPipe);
  42. HI_S32 (*pfnWriteReg)(VI_PIPE ViPipe, HI_S32 s32Addr, HI_S32 s32Data);
  43. HI_S32 (*pfnReadReg)(VI_PIPE ViPipe, HI_S32 s32Addr);
  44. HI_S32 (*pfnSetInit)(VI_PIPE ViPipe, ISP_INIT_ATTR_S *pstInitAttr);
  45. } ISP_SNS_OBJ_S;
  46. extern ISP_SNS_OBJ_S stSnsMn34220Obj;
  47. extern ISP_SNS_OBJ_S stSnsImx377Obj;
  48. extern ISP_SNS_OBJ_S stSnsImx299Obj;
  49. extern ISP_SNS_OBJ_S stSnsImx477Obj;
  50. extern ISP_SNS_OBJ_S stSnsImx299SlvsObj;
  51. extern ISP_SNS_OBJ_S stSnsImx290Obj;
  52. extern ISP_SNS_OBJ_S stSnsImx334Obj;
  53. extern ISP_SNS_OBJ_S stSnsOV2718Obj;
  54. extern ISP_SNS_OBJ_S stSnsCmv50000Obj;
  55. extern ISP_SNS_OBJ_S stSnsImx277SlvsObj;
  56. extern ISP_SNS_OBJ_S stSnsImx117Obj;
  57. extern ISP_SNS_OBJ_S stSnsImx290SlaveObj;
  58. extern ISP_SNS_OBJ_S stSnsImx334SlaveObj;
  59. #define CMOS_CHECK_POINTER(ptr)\
  60. do {\
  61. if (HI_NULL == ptr)\
  62. {\
  63. ISP_TRACE(HI_DBG_ERR, "Null Pointer!\n");\
  64. return HI_ERR_ISP_NULL_PTR;\
  65. }\
  66. }while(0)
  67. #define CMOS_CHECK_POINTER_VOID(ptr)\
  68. do {\
  69. if (HI_NULL == ptr)\
  70. {\
  71. ISP_TRACE(HI_DBG_ERR, "Null Pointer!\n");\
  72. return;\
  73. }\
  74. }while(0)
  75. #define SENSOR_FREE(ptr)\
  76. do{\
  77. if (HI_NULL != ptr)\
  78. {\
  79. free(ptr);\
  80. ptr = HI_NULL;\
  81. }\
  82. } while (0)
  83. #ifdef __cplusplus
  84. #if __cplusplus
  85. }
  86. #endif
  87. #endif /* End of #ifdef __cplusplus */
  88. #endif /* __HI_SNS_CTRL_H__ */