ark7116.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. #ifndef _ARK7116_DRV_H_
  2. #define _ARK7116_DRV_H_
  3. #if __cplusplus
  4. extern "C"
  5. {
  6. #endif
  7. typedef enum _ConfigDisplayMode
  8. {
  9. DISP_16_9= 0 ,
  10. DISP_4_3,
  11. }ConfigDisplayMode;
  12. typedef enum _ColorSysType
  13. {
  14. PAL = 0,
  15. PAL_N,
  16. PAL_M,
  17. NTSC,
  18. SECAM,
  19. PAL60,
  20. AUTO,
  21. NULL_SYS = -1,
  22. }ColorSysType;
  23. //MCU CFG Addr
  24. #define MCU_CFG_ADDR 0xC6
  25. /************************Global ***********************/
  26. #define RSTN 0XFD00
  27. #define ENH_PLL 0XFD0E
  28. /***********************Decoder ************************/
  29. #define DECODER_RST 0XFEA0
  30. //BUS Addr
  31. #define BUS_STATUS_ADDR 0xAF
  32. typedef struct _PanlstaticPara
  33. {
  34. unsigned int addr;
  35. unsigned char dat;
  36. }PanlstaticPara;
  37. typedef enum _VdeOutputType
  38. {
  39. VDE_CLOSE = 0,
  40. VDE_RED,
  41. VDE_GREEN,
  42. VDE_BLUE ,
  43. VDE_GRAY,
  44. VDE_WHITE,
  45. VDE_BLACK,
  46. MAX_VDECOLOR = VDE_BLACK,
  47. } VdeOutputTyp;
  48. /*************************************VP CONTROL REG*********************************/
  49. #define BRIGHT_REG 0XFFD4
  50. #define CONTRAST_REG 0XFFD3
  51. #define SATURATION_REG 0XFFD6
  52. #define TINT_REG 0XFFD5
  53. #define VDE_REG 0XFFD2
  54. /*==============start===============*/
  55. /*AV1
  56. [VideoChannel]
  57. AV1
  58. [VideoType]
  59. CVBS
  60. [VideoPI]
  61. VIDEO_P
  62. [VideoPicSys]
  63. PAL
  64. [VideoData]
  65. 13500000
  66. 690
  67. 280
  68. 864
  69. 312
  70. Update date:Monday, November 24, 2014
  71. Update time:11:05:45
  72. */
  73. /*屏参参数相关的结构体*/
  74. typedef struct _PannelPara
  75. {
  76. PanlstaticPara *pVideoStaicPara;
  77. }PannelPara;
  78. typedef struct _VideoChannel
  79. {
  80. unsigned char INPUT_ID;
  81. PannelPara VideoPara;
  82. }VideoChannel;
  83. #define STATIC_NUM 280
  84. #define POS_DYN_NUM 0
  85. #define SYS_DYN_NUM 0
  86. #define PAD_MUX_NUM 36
  87. #define VCOM_AC_Def 0X00
  88. #define VCOM_DC_Def 0X00
  89. #define PWMA_VAL 0X0000
  90. #define PWMB_VAL 0X0000
  91. #define PAL_PLL_CLK 0X0048
  92. #define NTSC_PLL_CLK 0X0048
  93. #define PWM0_CYCLE_VAL 0X00FF
  94. #define PWM1_CYCLE_VAL 0X00FF
  95. #define PWM2_CYCLE_VAL 0X00FF
  96. #define PWM3_CYCLE_VAL 0X00FF
  97. #define PWM0_DUTY_VAL 0X0080
  98. #define PWM1_DUTY_VAL 0X0080
  99. #define PWM2_DUTY_VAL 0X0080
  100. #define PWM3_DUTY_VAL 0X0080
  101. #define I2C_ACCESS_LOOP_TIME 20
  102. typedef struct
  103. {
  104. unsigned char regAddr;
  105. unsigned char regValue;
  106. }ARK7116REG;
  107. typedef struct
  108. {
  109. unsigned char regAddr;
  110. unsigned char regPalValue;
  111. unsigned char regNtscValue;
  112. }ARK7116DYREG;
  113. #if __cplusplus
  114. }
  115. #endif
  116. #endif