vi_hw_api.h 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /*
  2. * Copyright (c) 2021 Alibaba Group. All rights reserved.
  3. * License-Identifier: Apache-2.0
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License"); you may
  6. * not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  13. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. *
  17. */
  18. #ifndef VI_HW_API_H
  19. #define VI_HW_API_H
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. #include "../common/isp_common.h"
  24. #include "../driver/vipre/vipre_handler.h"
  25. int32_t isp_initialize(uint16_t id);
  26. int32_t isp_handler_config(uint16_t hor_res, uint16_t ver_res,
  27. EIsp_raw_fomrat raw_type, uint16_t line_value,
  28. uint64_t buffer_addr, uint32_t buffer_size,uint16_t line_size);
  29. int isp_get_status(int id);
  30. Eisp_bool isp_get_next_entry(Sisp_buffer buffer_list[MAX_BUFFER_BLOCK]);
  31. int16_t isp_get_pushed_line_num();
  32. int16_t isp_get_poped_line_num();
  33. Eisp_bool isp_is_last_entry_pop_in_frame();
  34. Eisp_bool isp_is_all_entry_done();
  35. Eisp_bool isp_is_last_entry_push_in_frame();
  36. uint32_t isp_pop_n_line(uint16_t line_num);
  37. int32_t isp_get_line_size();
  38. uint32_t isp_get_frame_size();
  39. uint32_t isp_get_frame_height();
  40. int32_t isp_enable_inerrupt(uint16_t id);
  41. int32_t isp_disable_inerrupt(uint16_t id);
  42. int isp_get_irq_num(uint16_t id);
  43. void isp_recovery_state_update(uint16_t id );
  44. int32_t post_isp_initialize(uint16_t id);
  45. int32_t post_isp_handler_config(uint16_t hor_res, uint16_t ver_res,
  46. uint16_t size_per_px, uint16_t line_value,
  47. uint64_t buffer_addr, uint32_t buffer_size,uint16_t line_size);
  48. int32_t post_isp_get_next_entry(Sisp_buffer *entry_info);
  49. int32_t post_isp_push_entry(uint16_t line_num);
  50. Eisp_bool post_isp_is_last_block_in_frame();
  51. Eisp_bool post_isp_is_last_block_pop_in_frame();
  52. int32_t post_isp_get_line_size();
  53. uint32_t post_isp_get_frame_size( );
  54. Eisp_bool post_isp_is_full();
  55. Eisp_bool post_isp_is_empty();
  56. int16_t post_isp_get_pushed_line_num();
  57. int16_t post_isp_get_poped_line_num();
  58. void post_isp_soft_reset(uint16_t id);
  59. int32_t post_isp_enable_inerrupt(uint16_t id);
  60. int32_t post_isp_disable_inerrupt(uint16_t id);
  61. int post_isp_get_status(int id);
  62. void post_isp_recovery_state_update(uint16_t id );
  63. int32_t vipre_initialize();
  64. int32_t vipre_handler_nline_config(uint32_t chan_num,uint16_t hor_res, uint16_t ver_res,
  65. uint16_t line_size, csi_dsp_img_fmt_e raw_type, uint16_t line_value,
  66. uint64_t *buffer_addr_list, uint32_t buffer_size);
  67. int32_t vipre_frame_mode_handler_config(uint32_t act_channel,uint16_t hor_res, uint16_t ver_res,uint16_t stride,
  68. csi_dsp_img_fmt_e raw_type,uint32_t buffer_num,uint64_t *buffer_addr_list);
  69. int32_t vipre_check_exeptional(int id);
  70. Eisp_bool vipre_pop_new_entry(int16_t line_num);
  71. int vipre_get_irq_num();
  72. uint32_t vipre_get_frame_height();
  73. int32_t vipre_check_exeptional(int id);
  74. void vipre_recovery_state_update(uint16_t id );
  75. Eisp_bool vipre_get_next_entry(uint16_t id,Svipre_buffer *buffer);
  76. frame_meta_t * vipre_get_frame_meta();
  77. Eisp_bool vipre_is_empty();
  78. #ifdef __cplusplus
  79. }
  80. #endif
  81. #endif