csi_camera_platform_spec.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * Copyright (C) 2021 Alibaba Group Holding Limited
  3. * Author: LuChongzhi <chongzhi.lcz@alibaba-inc.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. */
  9. #ifndef __CSI_CAMERA_PLATFORM_SPEC_H__
  10. #define __CSI_CAMERA_PLATFORM_SPEC_H__
  11. #include <stdio.h>
  12. #include <csi_camera.h>
  13. /******************************************************************************/
  14. /*********** Platform Spec in Enum ********************************************/
  15. /******************************************************************************/
  16. #define CAMERA_PROPERTY_MAX_ENUM_COUNT 16
  17. typedef struct camera_support_enums {
  18. int count;
  19. int enums[CAMERA_PROPERTY_MAX_ENUM_COUNT];
  20. } camera_spec_enums_s;
  21. typedef enum camera_sepc_enums {
  22. CAMERA_SPEC_ENUM_CHANNEL_PIX_FMT,
  23. CAMERA_SPEC_ENUM_CHANNEL_IMG_TYPE,
  24. CAMERA_SPEC_ENUM_CAMERA_EVENT_TYPES,
  25. CAMERA_SPEC_ENUM_CHANNEL_EVENT_TYPES,
  26. /* Camera Properties below */
  27. CAMERA_SPEC_ENUM_CAMERA_EXPOSURE_MODES = CSI_CAMERA_PID_EXPOSURE_MODE,
  28. } camera_sepc_enums_e;
  29. const camera_spec_enums_s *camera_spec_get_enum_array(int property_id);
  30. /******************************************************************************/
  31. /*********** Platform Spec in Bitmask *****************************************/
  32. /******************************************************************************/
  33. #define CAMERA_PROPERTY_MAX_BITMASK_COUNT 32
  34. typedef struct camera_support_bitmasks {
  35. int count;
  36. int bitmask[CAMERA_PROPERTY_MAX_BITMASK_COUNT];
  37. } camera_spec_bitmasks_t;
  38. typedef enum camera_sepc_bitmasks {
  39. CAMERA_SPEC_BITMAKS_CHANNEL_CAPTURE_TYPE,
  40. CAMERA_SPEC_BITMAKS_CHANNEL_META_TYPE,
  41. /* Camera Properties below */
  42. CAMERA_SPEC_BITMAKS_CAMERA_3A_LOCK = CSI_CAMERA_PID_3A_LOCK,
  43. } camera_sepc_bitmasks_e;
  44. const camera_spec_bitmasks_t *camera_spec_get_bitmask_array(int property_id);
  45. #endif /* __CSI_CAMERA_PLATFORM_SPEC_H__ */