RTD_def.h
上传用户:xmyjxjd
上传日期:2013-05-04
资源大小:1517k
文件大小:11k
开发平台:

C/C++

  1. #define CAPTURE_HDELAY      3//5
  2. #define MEASURE_HDEALY      10//12
  3. #define MEAS_H_STA_OFFSET   (MEASURE_HDEALY - CAPTURE_HDELAY)
  4. #define MEAS_H_END_OFFSET   (MEASURE_HDEALY - CAPTURE_HDELAY + 1)
  5. #define MINIMUM_HDELAY      6//24    
  6. #define PROGRAM_HDELAY      6//24
  7. #define MINIMUM_VDELAY      1
  8. #define PROGRAM_VDELAY      3   // Must be smaller than 8
  9. ///////////////////////////////////////////////////////////////////
  10. // Definitions for OSD user font table
  11. #define SWAP_FONT_RAM       0
  12. ///////////////////////////////////////////////////////////////////
  13. //Definitions for APLL P_Code
  14. #define P_Code              21//22
  15. #define I_Correction        4//24   //If set to 0, I_Correction will be the (P_Correction / 4 + 10)
  16. #define Correct_Amount      185  //When Phase Error exceed the threshold "16",the correction amount
  17.                                  //will update to this value
  18. ///////////////////////////////////////////////////////////////////
  19. // Definitions for RTD control register address
  20. #define ID_REG_00           0x00
  21. #define STATUS0_01          0x01
  22. #define HOSTCTRL_02         0x02
  23. #define IRQCTRL0_03         0x03
  24. #define VGIP_CTRL_04        0x04
  25. #define VGIP_SIGINV_05      0x05
  26. #define IPH_ACT_STA_06      0x06
  27. #define IPH_ACT_WID_08      0x08
  28. #define IPV_ACT_STA_0A      0x0A
  29. #define IPV_ACT_LEN_0C      0x0C
  30. #define IRQ_CTRL1_0E        0x0E
  31. #define PTNPOS_LO_0F        0x0F
  32. #define ADC_TEST_10         0x10
  33. #define PTNRD_11            0x11
  34. #define PTNGD_12            0x12
  35. #define PTNBD_13            0x13
  36. #define INT_FLD_DETECT_14   0x14    //INTERNAL_FIELD_DETECTION
  37. #define SCALE_CTRL_15       0x15
  38. #define HOR_SCA_16          0x16
  39. #define VER_SCA_18          0x18
  40. #define HV_SCA_L_1A         0x1A
  41. #define FILTER_CTRL0_1B     0x1B
  42. #define FILTER_CTRL1_1C     0x1C
  43. #define FILTER_PORT_1D      0x1D
  44. #define FS_FT_DELAY_1E      0x1E    //FRAME SYNC FINETUNE DELAY
  45. #define STATUS1_1F          0x1F
  46. #define VDIS_CTRL_20        0x20
  47. #define VDIS_SIGINV_21      0x21
  48. #define DH_TOTAL_22         0x22
  49. #define DH_HS_END_24        0x24
  50. #define DH_BKGD_STA_25      0x25
  51. #define LAST_LINE_L_26      0x26
  52. #define DH_ACT_STA_27       0x27
  53. #define DH_ACT_END_29       0x29
  54. #define DH_BKGD_END_2B      0x2B
  55. #define LAST_LINE_H_2C      0x2C
  56. #define DV_TOTAL_2D         0x2D
  57. #define DV_TOTAL_H_2E       0x2E
  58. #define DV_VS_END_2F        0x2F
  59. #define DV_BKGD_STA_30      0x30
  60. #define DV_BKGD_STA_31      0x31
  61. #define DV_ACT_STA_32       0x32
  62. #define DV_ACT_END_34       0x34
  63. #define DV_BKGD_END_36      0x36
  64. #define IV_DV_LINES_38      0x38
  65. #define YUV2RGB_39          0x39
  66. #define DIS_TIMING0_3A      0X3A
  67. #define DIS_TIMING1_3B      0x3B
  68. #define PE_CONTROL_3C       0x3C    // From RTD2020 rev.C
  69. #define DV_TOTAL_STATUS_3D  0x3D
  70. #define DUTY_FINE_TUNE_3E   0x3E
  71. #define DUTY_FINE_TUNE_3F   0x3F
  72. #define DRW_BSU_40          0x40
  73. #define DRL_BSU_42          0x42
  74. #define SYNC_CTRL_4A        0x4A
  75. #define SYNC_CTRL_4B        0x4B
  76. #define SYNC_POR_4C         0x4C
  77. #define MEAS_HS_PER_4D      0x4D
  78. #define MEAS_HS_LATCH_4E    0x4E
  79. #define MEAS_VS_PER_4F      0x4F
  80. #define MEAS_HI_51          0x51
  81. #define MEAS_HI_52          0x52
  82. #define MEAS_VS_53          0x53
  83. #define MEAS_VS_HI_54       0x54
  84. #define CLAMP_55            0x55
  85. #define FX_LST_LEN_L_59     0x59
  86. #define FX_LST_LEN_H_5A     0x5A
  87. #define ANTI_FLICKER_TH1_5B 0x5B
  88. #define COLOR_CTRL_5D       0x5D
  89. #define BRIGHT_R_5E         0x5E
  90. #define BRIGHT_G_5F         0x5F
  91. #define BRIGHT_B_60         0x60
  92. #define CONTRAST_R_61       0x61
  93. #define CONTRAST_G_62       0x62
  94. #define CONTRAST_B_63       0x63
  95. #define RED_GAMMA_64        0x64
  96. #define GRN_GAMMA_65        0x65
  97. #define BLU_GAMMA_66        0x66
  98. #define DITHER_PORT_67      0x67
  99. #define OP_CRC_CTRL_68      0x68
  100. #define OP_CRC_BYTE_69      0x69
  101. #define PATTERN_GEN_6C      0x6C
  102. #define BGCOLOR_CONTROL_6C  0x6C
  103. #define OVL_CTRL_6D         0x6D
  104. #define OVL_LUT_ADDR_6E     0x6E
  105. #define OVL_PORT_6F         0x6F
  106. #define SD_CTRL_70          0x70
  107. #define H_SCALE_DL_71       0x71
  108. #define V_SCALE_DL_73       0x73
  109. #define H_BND_STA_L_75      0x75    //H_BOUNDARY_STA_L
  110. #define H_BND_END_L_76      0x76
  111. #define H_BND_HIGH_77       0x77
  112. #define V_BND_STA_L_78      0x78    //V_BOUNDARY_STA_L
  113. #define V_BND_END_L_79      0x79
  114. #define V_BND_HIGH_7A       0x7A
  115. #define MARGIN_R_7B         0x7B
  116. #define MARGIN_G_7C         0x7C
  117. #define MARGIN_B_7D         0x7D
  118. #define DIFF_THRED_7E       0x7E    //DIFF_THRESHOLD
  119. #define AUTO_ADJ_CTRL_7F    0x7F
  120. #define VER_START_80        0x80
  121. #define HOR_START_84        0x84
  122. #define AUTO_PHASE0_88      0x88
  123. #define AUTO_BAL_RESULT_88  0x88
  124. #define IVS_DELAY_8C        0x8C
  125. #define IHS_DELAY_8D        0x8D
  126. #define ODD_CTRL_8E         0x8E
  127. #define OSD_ADDR_MSB_90     0x90
  128. #define OSD_ADDR_LSB_91     0x91
  129. #define OSD_ROW_90          0x90
  130. #define OSD_COL_91          0x91
  131. #define OSD_DATA_92         0x92
  132. #define OSD_TEST_93         0x93
  133. #define OSD_SCRAMBLE_94     0x94
  134. #define TC_ADDR_PORT_95     0x95    //TCON_ADDRESS_PORT
  135. #define TC_DATA_PORT_96     0x96    //TCON_DATA_PORT
  136. #define FIX_DVTOTAL_LSB_97  0x97
  137. #define FIX_DVTOTAL_MSB_98  0x98
  138. #define SPREAD_SPECTRUM_99  0x99
  139. #define PLL_PHASE_9F        0x9f
  140. #define DCLK_OFFSET_LSB_9A  0x9a
  141. #define DCLK_OFFSET_MSB_9B  0x9b
  142. #define HW_AUTO_PHASE_9E    0x9e
  143. #define TMDS_OUTPUT_ENA_A0  0xa0
  144. #define TMDS_INPUT_ENA_A1   0xa1
  145. #define ANG_PERFORMANCE1_A2 0xa2
  146. #define ANG_PERFORMANCE2_A3 0xa3
  147. #define ANG_PERFORMANCE3_A4 0xa4
  148. #define ANG_TEST_SEL_A5     0xa5
  149. #define HDCP_CONTROL_REG_A6 0xa6
  150. #define CRC_OUTPUT_BYTE_A7  0xa7
  151. #define DB_TEST_MODE_AA     0xaa
  152. #define DVI_REG_TEST_AB     0xab
  153. #define PATTERN_COM_AC      0xac
  154. #define PIXEL_ERROR_RATE_AD 0xad
  155. #define DVI_CTRL1_AF        0xaf
  156. #define TMDS_CTL_STATUS_B0  0xb0
  157. #define DEVICE_KEY_ACCESS_B1 0xb1
  158. #define TMDS_TEST_MODE1_B3  0xb3
  159. #define HDCP_ADDR_PORT_B6   0xb6
  160. #define HDCP_DATA_PORT_B7   0xb7
  161. #define DDC_ENABLE_BC       0xbc
  162. #define DDC_INDEX_BD        0xbd
  163. #define DDC_ACCESS_PORT_BE  0xbe
  164. #define LVDS_CTRL0_C0       0xc0
  165. #define LVDS_CTRL_C1        0xc1
  166. #define LVDS_CTRL_C2        0xc2
  167. #define LVDS_CTRL_C3        0xc3
  168. #define LVDS_CTRL_C4        0xc4
  169. #define PLL_DIV_CTRL0_C8    0xC8
  170. #define I_CODE_LB_C9        0xC9
  171. #define I_CODE_MB_CA        0xCA
  172. #define P_CODE_CB           0xCB
  173. #define PLLDIV_CC           0xCC
  174. #define PLL_CALIBRATION_CE  0xCE
  175. #define DPLL_CTRL_D0        0xD0
  176. #define DPLL_M_D1           0xD1
  177. #define DPLL_N_D2           0xD2
  178. #define DPLL_FILTER_D3      0xD3
  179. #define DPLL_SSP_D4         0xD4    //Spread Spectrum
  180. #define PLL1_CTRL_D6        0xD6
  181. #define PLL1_M_D7           0xD7
  182. #define PLL1_FILTER_D9      0xD9
  183. #define PLL2_CTRL_DA        0xDA
  184. #define PLL2_M_DB           0xDB
  185. #define PLL2_FILTER_DD      0xDD
  186. #define PLL_PHASE_DF        0xDF
  187. #define REDGAIN_E0          0xE0
  188. #define GRNGAIN_E1          0xE1
  189. #define BLUGAIN_E2          0xE2
  190. #define REDOFST_E3          0xE3
  191. #define GRNOFST_E4          0xE4
  192. #define BLUOFST_E5          0xE5
  193. #define ADC_CTRL_E6         0xE6
  194. #define ADC_REG_CUR_L_E7    0xE7
  195. #define ADC_REG_CUR_H_E8    0xE8
  196. #define ADC_REG_TEST_E9     0xE9
  197. #define ADC_REG_CLK_EA      0xEA
  198. #define ADC_FRAME_MODULE_EB 0xEB
  199. #define ADC_DIFF_MODE_EC    0xEC
  200. #define HS_SCHMITT_TRIG_ED  0xED
  201. #define DDC_SET_SLAVE_F0    0xF0
  202. #define DDC_SUB_IN_F1       0xF1
  203. #define DDC_DATA_IN_F2      0xF2
  204. #define DDC_DATA_OUT_F3     0xF3
  205. #define DDC_STATUS_F4       0xF4
  206. #define DDC_IRQ_CTRL_F5     0xF5
  207. #define GP1_ODOCTRL_F6      0xF6    //GPIO_P1 OPEN_DRAIN OUTPUT CONTROL
  208. #define GP1_IO_CTRL_F7      0xF7
  209. #define GP1_FUNC_SEL_F8     0xF8
  210. #define GP2_ODOCTRL_F9      0xF9
  211. #define GP2_IO_CTRL_FA      0xFA
  212. #define GP2_FUNC_SEL_FB     0xFB
  213. #define DDC_ENABLE_FC       0xFC
  214. #define DDC_INDEX_FD        0xFD
  215. #define DDC_ACCESS_P_FE     0xFE    //DDC_ACCESS_PORT
  216. #define TMDS_CORRECTION_FF  0xFF
  217. /* Old definition for RTD3001
  218. #define STATUS0_01          0x01
  219. #define HOSTCTRL_02         0x02
  220. #define IRQCTRL_03          0x03
  221. #define VGIP_CTRL_04        0x04
  222. #define VGIP_SIGINV_05      0x05
  223. #define IPH_ACT_STA_06      0x06
  224. #define IPH_ACT_WID_08      0x08
  225. #define IPV_ACT_STA_0A      0x0A
  226. #define IPV_ACT_LEN_0C      0x0C
  227. #define SCALE_CTRL_15       0x15
  228. #define HSCALE_FACTOR_16    0x16
  229. #define VSCALE_FACTOR_18    0x18
  230. #define FILTER_CTRL_1A      0x1A
  231. #define HFILTER_PORT_1B     0x1B
  232. #define VFILTER_PORT_1C     0x1C
  233. #define FS_FT_DELAY_1E      0x1E
  234. #define STATUS1_1F          0x1F
  235. #define VDIS_CTRL_20        0x20
  236. #define VDIS_SIGINV_21      0x21
  237. #define DH_TOTAL_22         0x22
  238. #define DH_BKGD_STA_25      0x25
  239. #define LAST_LINE_L_26      0x26
  240. #define DH_ACT_STA_27       0x27
  241. #define DH_ACT_END_29       0x29
  242. #define DH_BKGD_END_2B      0x2B
  243. #define LAST_LINE_H_2C      0x2C
  244. #define DV_TOTAL_2D         0x2D
  245. #define DV_TOTAL_H_2E       0x2E
  246. #define DV_BKGD_STA_30      0x30
  247. #define DV_ACT_STA_32       0x32
  248. #define DV_ACT_END_34       0x34
  249. #define DV_BKGD_END_36      0x36
  250. #define MEMCTRL_38          0x38
  251. #define MEM_TIMING_3A       0X3A
  252. #define DIS_TIMING_3B       0x3B
  253. #define PLLCTRL_3C          0x3C
  254. #define DCLK_3D             0x3D
  255. #define MCLK_3F             0x3F
  256. #define COMP_WID_43         0x43
  257. #define DWPIX_BSU_45        0x45
  258. #define DRPIX_BSU_47        0x47
  259. #define DRLEN_BSU_49        0x49
  260. #define SYNC_CTRL_4B        0x4B
  261. #define SYNC_POR_4C         0x4C
  262. #define HSYNC_HI_51         0x51
  263. #define CLAMP_55            0x55
  264. #define MEM_TEST_5B         0x5B
  265. #define COLOR_CTRL_5D       0x5D
  266. #define BRIGHT_R_5E         0x5E
  267. #define BRIGHT_G_5F         0x5F
  268. #define BRIGHT_B_60         0x60
  269. #define CONTRAST_R_61       0x61
  270. #define CONTRAST_G_62       0x62
  271. #define CONTRAST_B_63       0x63
  272. #define RED_GAMMA_64        0x64
  273. #define GRN_GAMMA_65        0x65
  274. #define BLU_GAMMA_66        0x66
  275. #define DITHER_PORT_67      0x67
  276. #define FULL_LINE_68        0x68
  277. #define OVL_CTRL_6D         0x6D
  278. #define OVL_LUT_ADDR_6E     0x6E
  279. #define OVL_PORT_6F         0x6F
  280. #define SD_CTRL_70          0x70
  281. #define WRT_MEM_PIX_71      0x71
  282. #define H_SCALE_DL_75       0x75
  283. #define V_SCALE_DL_77       0x77
  284. #define AUTO_BAL_CTRL_79    0x79
  285. #define AUTO_PHA_CTRL_7A    0x7A
  286. #define MARGIN_R_7B         0x7B
  287. #define MARGIN_G_7C         0x7C
  288. #define MARGIN_B_7D         0x7D
  289. #define LINE_SEL_7E         0x7E
  290. #define AUTO_POS_CTRL_7F    0x7F
  291. #define VER_START_80        0x80
  292. #define HOR_START_84        0x84
  293. #define AUTO_PHASE0_88      0x88
  294. #define AUTO_BAL_RESULT_88  0x88
  295. #define IVS_DELAY_8C        0x8C
  296. #define IHS_DELAY_8D        0x8D
  297. #define ODD_CTRL_8E         0x8E
  298. #define OSD_ROW_90          0x90
  299. #define OSD_COL_91          0x91
  300. #define OSD_DATA_92         0x92
  301. #define TC_CTRL1_B0         0xB0
  302. #define TC_CTRL2_B1         0xB1
  303. #define TC_CTRL3_B3         0xB2
  304. #define TC_GPO7_B3          0xB3
  305. #define TC_GPO6_BC          0xBC
  306. #define TC_GPO5_C5          0xC5
  307. #define TC_GPO4_CE          0xCE
  308. #define TC_GPO3_D7          0xD7
  309. #define TC_GPO2_E0          0xE0
  310. #define TC_GPO1_E9          0xE9
  311. #define TC_GPO0_F2          0xF2
  312. */