tvafe_general.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #ifndef _TVAFE_GENERAL_H
  2. #define _TVAFE_GENERAL_H
  3. // ***************************************************************************
  4. // *** enum definitions *********************************************
  5. // ***************************************************************************
  6. typedef enum tvafe_adc_ch_e {
  7. TVAFE_ADC_CH_NULL = 0,
  8. TVAFE_ADC_CH_PGA,
  9. TVAFE_ADC_CH_A,
  10. TVAFE_ADC_CH_B,
  11. TVAFE_ADC_CH_C,
  12. } tvafe_adc_ch_t;
  13. typedef enum tvafe_state_e {
  14. TVAFE_STATE_NOSIG = 0,
  15. TVAFE_STATE_UNSTABLE,
  16. TVAFE_STATE_STABLE,
  17. } tvafe_state_t;
  18. // ***************************************************************************
  19. // *** macro definitions *********************************************
  20. // ***************************************************************************
  21. #define TVAFE_SURE_NOSIG 8 // Stay in TVAFE_STATE_NOSIG for some cycles (10mS per each) => be sure TVIN_SIG_STATUS_NOSIG
  22. #define TVAFE_SURE_UNSTABLE 8 // Stay in TVAFE_STATE_UNSTABLE for some cycles (10mS per each) => be sure TVIN_SIG_STATUS_UNSTABLE
  23. #define TVAFE_EXIT_NOSIG 1 // Have signal for some cycles (10mS per each) => exit TVAFE_STATE_NOSIG
  24. #define TVAFE_BACK_NOSIG 8 // No signal for some cycles (10mS per each) => back to TVAFE_STATE_NOSIG
  25. #define TVAFE_EXIT_STABLE 1 // Signal unstable for some cycles (10mS per each) => exit TVAFE_STATE_STABLE
  26. #define TVAFE_BACK_STABLE 8 // Signal stable for some cycles (10mS per each) => back to TVAFE_STATE_STABLE
  27. // ***************************************************************************
  28. // *** global parameters **********
  29. // ***************************************************************************
  30. extern enum tvafe_adc_pin_e tvafe_default_cvbs_out;
  31. // *****************************************************************************
  32. // ******** function claims ********
  33. // *****************************************************************************
  34. enum tvafe_adc_pin_e tvafe_get_free_pga_pin(struct tvafe_pin_mux_s *pinmux);
  35. int tvafe_source_muxing(struct tvafe_info_s *info);
  36. void tvafe_vga_set_edid(struct tvafe_vga_edid_s *edid);
  37. void tvafe_vga_get_edid(struct tvafe_vga_edid_s *edid);
  38. void tvafe_set_fmt(struct tvafe_info_s *info);
  39. void tvafe_set_cal_value(struct tvafe_adc_cal_s *para);
  40. void tvafe_get_cal_value(struct tvafe_adc_cal_s *para);
  41. void tvafe_get_wss_data(struct tvafe_comp_wss_s *para);
  42. enum tvin_scan_mode_e tvafe_top_get_scan_mode(void);
  43. void tvafe_check_cvbs_3d_comb(void);
  44. void tvafe_init_state_handler(void);
  45. void tvafe_run_state_handler(struct tvafe_info_s *info);
  46. void tvafe_stop_module(struct tvafe_info_s *info);
  47. void tvafe_reset_module(enum tvin_port_e port);
  48. #endif // _TVAFE_GENERAL_H