isp_vsm.c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. #include <stdio.h>
  10. #include <stdlib.h>
  11. #include <stdint.h>
  12. #include <unistd.h>
  13. #include <string.h>
  14. #include "ra_common.h"
  15. #define REG_BASE 0x00002f00
  16. static const reg_field_s reg_desc[] = {
  17. /* structure field order
  18. reg_name, offset,reset_value,msb,lsb, field_name, field_desc */
  19. {"ISP_VSM_MODE", "Video Stable Measure Mode",
  20. 0x00002f00, 0x00000000, 1, 1, "vsm_meas_irq_enable", "1: Enable VS measurement done IRQ"},
  21. {NULL, NULL, 0x00002f00, 0x00000000, 0, 0, "vsm_meas_en", "1: Enable measurement"},
  22. };
  23. int light_isp_vsm_reg_dump(reg_analyzer_info_s *ra_info)
  24. {
  25. uint32_t count = sizeof(reg_desc) / sizeof(reg_desc[0]);
  26. return ra_dump_reg_fields(ra_info, reg_desc, count);
  27. }
  28. int light_isp_vsm_reg_define(reg_analyzer_info_s *ra_info)
  29. {
  30. uint32_t count = sizeof(reg_desc) / sizeof(reg_desc[0]);
  31. return ra_dump_reg_define(ra_info, reg_desc, count);
  32. }
  33. int light_isp_vsm_reg_find(reg_analyzer_info_s *ra_info)
  34. {
  35. uint32_t count = sizeof(reg_desc) / sizeof(reg_desc[0]);
  36. return ra_dump_reg_find(ra_info, reg_desc, count);
  37. }