1#define USE_DVICHIP
2#ifdef USE_DVICHIP
3#include "ddk750_chip.h"
4#include "ddk750_reg.h"
5#include "ddk750_dvi.h"
6#include "ddk750_sii164.h"
7
8
9
10
11
12
13static dvi_ctrl_device_t g_dcftSupportedDviController[] = {
14#ifdef DVI_CTRL_SII164
15 {
16 .pfnInit = sii164InitChip,
17 .pfnGetVendorId = sii164GetVendorID,
18 .pfnGetDeviceId = sii164GetDeviceID,
19#ifdef SII164_FULL_FUNCTIONS
20 .pfnResetChip = sii164ResetChip,
21 .pfnGetChipString = sii164GetChipString,
22 .pfnSetPower = sii164SetPower,
23 .pfnEnableHotPlugDetection = sii164EnableHotPlugDetection,
24 .pfnIsConnected = sii164IsConnected,
25 .pfnCheckInterrupt = sii164CheckInterrupt,
26 .pfnClearInterrupt = sii164ClearInterrupt,
27#endif
28 },
29#endif
30};
31
32int dviInit(
33 unsigned char edgeSelect,
34 unsigned char busSelect,
35 unsigned char dualEdgeClkSelect,
36 unsigned char hsyncEnable,
37 unsigned char vsyncEnable,
38 unsigned char deskewEnable,
39 unsigned char deskewSetting,
40 unsigned char continuousSyncEnable,
41 unsigned char pllFilterEnable,
42 unsigned char pllFilterValue
43 )
44{
45 dvi_ctrl_device_t *pCurrentDviCtrl;
46
47 pCurrentDviCtrl = g_dcftSupportedDviController;
48 if (pCurrentDviCtrl->pfnInit) {
49 return pCurrentDviCtrl->pfnInit(edgeSelect, busSelect, dualEdgeClkSelect, hsyncEnable,
50 vsyncEnable, deskewEnable, deskewSetting, continuousSyncEnable,
51 pllFilterEnable, pllFilterValue);
52 }
53 return -1;
54}
55
56#endif
57