Access.i
上传用户:xmyjxjd
上传日期:2013-05-04
资源大小:1517k
文件大小:60k
- #line 1 "CodeAccess.c" /0
-
-
-
- #line 1 "C:KEILC51INCREG52.H" /0
-
-
-
-
-
-
- sfr P0 = 0x80;
- sfr P1 = 0x90;
- sfr P2 = 0xA0;
- sfr P3 = 0xB0;
- sfr PSW = 0xD0;
- sfr ACC = 0xE0;
- sfr B = 0xF0;
- sfr SP = 0x81;
- sfr DPL = 0x82;
- sfr DPH = 0x83;
- sfr PCON = 0x87;
- sfr TCON = 0x88;
- sfr TMOD = 0x89;
- sfr TL0 = 0x8A;
- sfr TL1 = 0x8B;
- sfr TH0 = 0x8C;
- sfr TH1 = 0x8D;
- sfr IE = 0xA8;
- sfr IP = 0xB8;
- sfr SCON = 0x98;
- sfr SBUF = 0x99;
-
-
- sfr T2CON = 0xC8;
- sfr RCAP2L = 0xCA;
- sfr RCAP2H = 0xCB;
- sfr TL2 = 0xCC;
- sfr TH2 = 0xCD;
-
-
-
-
- sbit CY = PSW^7;
- sbit AC = PSW^6;
- sbit F0 = PSW^5;
- sbit RS1 = PSW^4;
- sbit RS0 = PSW^3;
- sbit OV = PSW^2;
- sbit P = PSW^0;
-
-
- sbit TF1 = TCON^7;
- sbit TR1 = TCON^6;
- sbit TF0 = TCON^5;
- sbit TR0 = TCON^4;
- sbit IE1 = TCON^3;
- sbit IT1 = TCON^2;
- sbit IE0 = TCON^1;
- sbit IT0 = TCON^0;
-
-
- sbit EA = IE^7;
- sbit ET2 = IE^5;
- sbit ES = IE^4;
- sbit ET1 = IE^3;
- sbit EX1 = IE^2;
- sbit ET0 = IE^1;
- sbit EX0 = IE^0;
-
-
- sbit PT2 = IP^5;
- sbit PS = IP^4;
- sbit PT1 = IP^3;
- sbit PX1 = IP^2;
- sbit PT0 = IP^1;
- sbit PX0 = IP^0;
-
-
- sbit RD = P3^7;
- sbit WR = P3^6;
- sbit T1 = P3^5;
- sbit T0 = P3^4;
- sbit INT1 = P3^3;
- sbit INT0 = P3^2;
- sbit TXD = P3^1;
- sbit RXD = P3^0;
-
-
- sbit SM0 = SCON^7;
- sbit SM1 = SCON^6;
- sbit SM2 = SCON^5;
- sbit REN = SCON^4;
- sbit TB8 = SCON^3;
- sbit RB8 = SCON^2;
- sbit TI = SCON^1;
- sbit RI = SCON^0;
-
-
- sbit T2EX = P1^1;
- sbit T2 = P1^0;
-
-
- sbit TF2 = T2CON^7;
- sbit EXF2 = T2CON^6;
- sbit RCLK = T2CON^5;
- sbit TCLK = T2CON^4;
- sbit EXEN2 = T2CON^3;
- sbit TR2 = T2CON^2;
- sbit C_T2 = T2CON^1;
- sbit CP_RL2 = T2CON^0;
-
-
- #line 3 "CodeAccess.c" /0
-
-
- #line 1 "C:KEILC51INCINTRINS.H" /0
-
-
-
-
-
- extern void _nop_ (void);
- extern bit _testbit_ (bit);
- extern unsigned char _cror_ (unsigned char, unsigned char);
- extern unsigned int _iror_ (unsigned int, unsigned char);
- extern unsigned long _lror_ (unsigned long, unsigned char);
- extern unsigned char _crol_ (unsigned char, unsigned char);
- extern unsigned int _irol_ (unsigned int, unsigned char);
- extern unsigned long _lrol_ (unsigned long, unsigned char);
- extern unsigned char _chkfloat_(float);
-
-
-
- #line 4 "CodeAccess.c" /0
-
-
-
- #line 1 "HeaderMAIN_DEF.H" /0
-
- #line 1 "HEADERCHAR_DEF.H" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 1 "HeaderMAIN_DEF.H" /0
-
-
- #line 1 "HEADERMODE_DEF.H" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-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-
-
-
-
-
-
-
-
-
- #line 144 "HeaderMAIN_DEF.H" /1
-
-
-
-
-
-
-
-
-
-
-
- #line 155 "HeaderMAIN_DEF.H" /0
-
-
- #line 157 "HeaderMAIN_DEF.H" /1
-
-
- #line 159 "HeaderMAIN_DEF.H" /0
-
-
-
-
- #line 163 "HeaderMAIN_DEF.H" /1
-
-
- #line 165 "HeaderMAIN_DEF.H" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 270 "HeaderMAIN_DEF.H" /1
-
-
- #line 272 "HeaderMAIN_DEF.H" /0
-
- #line 273 "HeaderMAIN_DEF.H" /1
-
-
- #line 275 "HeaderMAIN_DEF.H" /0
-
- #line 276 "HeaderMAIN_DEF.H" /1
-
-
- #line 278 "HeaderMAIN_DEF.H" /0
-
- #line 279 "HeaderMAIN_DEF.H" /1
-
-
- #line 281 "HeaderMAIN_DEF.H" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 6 "CodeAccess.c" /0
-
-
- #line 1 "HeaderACCESS.h" /0
-
-
-
-
-
- unsigned char data Data[16];
-
- unsigned char data ucCnt;
- bit bBit;
- unsigned int data uiCount;
- unsigned char data ucByte_Temp;
-
- unsigned char bdata Reg;
-
- sbit r0 = Reg ^ 0;
- sbit r1 = Reg ^ 1;
- sbit r2 = Reg ^ 2;
- sbit r3 = Reg ^ 3;
- sbit r4 = Reg ^ 4;
- sbit r5 = Reg ^ 5;
- sbit r6 = Reg ^ 6;
- sbit r7 = Reg ^ 7;
-
-
-
-
- void BitDly(void);
- void SetPortBit(unsigned char port, unsigned char and, unsigned char or);
- void SetSFRPort(unsigned char port, unsigned char Data);
- unsigned char GetSFRPort(unsigned char port);
-
- unsigned char I2CGetByte(unsigned char ack);
- void I2CSendByte(unsigned char send);
- void I2CSendAddr(unsigned char addr, unsigned char index ,unsigned char rd);
- void I2CSendStop(void);
- void I2CRead(unsigned char addr, unsigned char index, unsigned char count);
- void I2CWrite(unsigned char *array);
-
- unsigned char RTDGetByte(void);
- void RTDSendByte(unsigned char send);
- void RTDSendAddr(unsigned char addr, unsigned char rd, unsigned char inc);
- void RTDRead(unsigned char index, unsigned char count, unsigned char inc);
- void RTDWrite(unsigned char data *array);
- void RTDCodeW(unsigned char code *array);
- void RTDOSDW(unsigned char code *array);
-
-
- void RTDSetBit(unsigned char addr,unsigned char and, unsigned char or);
- void RTDSetByte(unsigned char addr, unsigned char val);
-
-
- void Load_VLC_Font(unsigned char code *array, unsigned int start, unsigned int length);
- unsigned char Get_VLD(unsigned char code *array);
- void Getbit(unsigned char code *array);
-
- #line 56 "HeaderACCESS.h" /1
-
-
- #line 58 "HeaderACCESS.h" /0
-
-
- #line 60 "HeaderACCESS.h" /1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 84 "HeaderACCESS.h" /0
-
-
- #line 86 "HeaderACCESS.h" /1
-
-
- #line 88 "HeaderACCESS.h" /0
-
-
- #line 90 "HeaderACCESS.h" /1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 7 "CodeAccess.c" /0
- #line 7 "CodeAccess.c" /0
-
-
- #line 1 "HeaderCONFIG.H" /0
-
-
-
-
-
-
-
-
-
-
- #line 11 "HeaderCONFIG.H" /1
-
-
-
-
- #line 15 "HeaderCONFIG.H" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 30 "HeaderCONFIG.H" /1
-
-
- #line 32 "HeaderCONFIG.H" /0
-
-
- #line 34 "HeaderCONFIG.H" /1
-
-
-
-
-
-
-
-
-
-
- #line 44 "HeaderCONFIG.H" /0
-
-
-
-
- #line 48 "HeaderCONFIG.H" /1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 70 "HeaderCONFIG.H" /0
-
-
- #line 72 "HeaderCONFIG.H" /1
-
-
- #line 74 "HeaderCONFIG.H" /0
-
- #line 75 "HeaderCONFIG.H" /1
-
-
- #line 77 "HeaderCONFIG.H" /0
-
- #line 78 "HeaderCONFIG.H" /1
-
-
- #line 80 "HeaderCONFIG.H" /0
-
-
- #line 82 "HeaderCONFIG.H" /1
-
-
- #line 84 "HeaderCONFIG.H" /0
-
-
- #line 86 "HeaderCONFIG.H" /1
-
-
- #line 88 "HeaderCONFIG.H" /0
-
-
-
- #line 1 "DisplayDISP_B6.H" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 92 "DisplayDISP_B6.H" /1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 562 "DisplayDISP_B6.H" /0
-
- extern unsigned char code RTD_PWUP_INI[];
- extern unsigned char code RTD_DDC_TABLE[];
- extern unsigned char code RTD_IO_INI[];
-
- extern unsigned char code FreeV[];
- extern unsigned char code OSD_PWUP_INI[];
-
- extern unsigned int code VGA_Mode[][6];
- extern unsigned int code Mode_Preset[][5];
-
- extern unsigned char code RTD_VIDEO_60[];
- extern unsigned char code RTD_VIDEO_50[];
-
-
- #line 90 "HeaderCONFIG.H" /0
-
-
-
-
- #line 94 "HeaderCONFIG.H" /1
-
-
- #line 96 "HeaderCONFIG.H" /0
-
-
-
-
-
-
- #line 102 "HeaderCONFIG.H" /1
-
-
- #line 104 "HeaderCONFIG.H" /0
-
-
- #line 106 "HeaderCONFIG.H" /1
-
-
- #line 108 "HeaderCONFIG.H" /0
-
-
-
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ain_def.h" /0
-
-
- #line 1 "HEADERCODE_DEF.H" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 4 "Headermain_def.h" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 144 "Headermain_def.h" /1
-
-
-
-
-
-
-
-
-
-
-
- #line 155 "Headermain_def.h" /0
-
-
- #line 157 "Headermain_def.h" /1
-
-
- #line 159 "Headermain_def.h" /0
-
-
-
-
- #line 163 "Headermain_def.h" /1
-
-
- #line 165 "Headermain_def.h" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 270 "Headermain_def.h" /1
-
-
- #line 272 "Headermain_def.h" /0
-
- #line 273 "Headermain_def.h" /1
-
-
- #line 275 "Headermain_def.h" /0
-
- #line 276 "Headermain_def.h" /1
-
-
- #line 278 "Headermain_def.h" /0
-
- #line 279 "Headermain_def.h" /1
-
-
- #line 281 "Headermain_def.h" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 1 "PCB2523d1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
-
-
-
-
-
- #line 3 "HEADERMain_def.h" /0
-
-
- #line 1 "HEADERCODE_DEF.H" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 4 "HEADERMain_def.h" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 144 "HEADERMain_def.h" /1
-
-
-
-
-
-
-
-
-
-
-
- #line 155 "HEADERMain_def.h" /0
-
-
- #line 157 "HEADERMain_def.h" /1
-
-
- #line 159 "HEADERMain_def.h" /0
-
-
-
-
- #line 163 "HEADERMain_def.h" /1
-
-
- #line 165 "HEADERMain_def.h" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 270 "HEADERMain_def.h" /1
-
-
- #line 272 "HEADERMain_def.h" /0
-
- #line 273 "HEADERMain_def.h" /1
-
-
- #line 275 "HEADERMain_def.h" /0
-
- #line 276 "HEADERMain_def.h" /1
-
-
- #line 278 "HEADERMain_def.h" /0
-
- #line 279 "HEADERMain_def.h" /1
-
-
- #line 281 "HEADERMain_def.h" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 1 "HeaderMTV512.h" /0
-
-
-
-
-
-
-
-
-
- extern unsigned char xdata byMTV512_DDCRAMA[128];
- extern unsigned char xdata byMTV512_DDCRAMB[128];
-
-
-
-
-
- extern unsigned char xdata M512_PadMode0;
- extern unsigned char xdata M512_PadMode1;
- extern unsigned char xdata M512_PadMode2;
- extern unsigned char xdata M512_PadMode3;
- extern unsigned char xdata M512_PadMode4;
- extern unsigned char xdata M512_PadMode5;
- extern unsigned char xdata M512_Option1;
- extern unsigned char xdata M512_PadMode6;
- extern unsigned char xdata M512_PadMode7;
-
- extern unsigned char xdata M512_Port40;
- extern unsigned char xdata M512_Port41;
- extern unsigned char xdata M512_Port42;
-
-
-
-
-
-
-
- extern unsigned char xdata M512_Port50;
- extern unsigned char xdata M512_Port51;
- extern unsigned char xdata M512_Port52;
- extern unsigned char xdata M512_Port53;
- extern unsigned char xdata M512_Port54;
- extern unsigned char xdata M512_Port55;
- extern unsigned char xdata M512_Port56;
-
- extern unsigned char xdata M512_Port60;
- extern unsigned char xdata M512_Port61;
- extern unsigned char xdata M512_Port62;
- extern unsigned char xdata M512_Port63;
- extern unsigned char xdata M512_Port64;
- extern unsigned char xdata M512_Port65;
- extern unsigned char xdata M512_Port66;
- extern unsigned char xdata M512_Port67;
-
- extern unsigned char xdata M512_Port76;
- extern unsigned char xdata M512_Port77;
-
- extern unsigned char xdata M512_DA0;
- extern unsigned char xdata M512_DA1;
- extern unsigned char xdata M512_DA2;
- extern unsigned char xdata M512_DA3;
- extern unsigned char xdata M512_DA4;
- extern unsigned char xdata M512_DA5;
- extern unsigned char xdata M512_DA6;
- extern unsigned char xdata M512_DA7;
- extern unsigned char xdata M512_DA8;
- extern unsigned char xdata M512_DA9;
- extern unsigned char xdata M512_DA10;
- extern unsigned char xdata M512_DA11;
- extern unsigned char xdata M512_DA12;
- extern unsigned char xdata M512_DA13;
-
-
- extern unsigned char xdata M512_HVSTUS;
- extern unsigned char xdata M512_HCNTH;
- extern unsigned char xdata M512_HCNTL;
- extern unsigned char xdata M512_VCNTH;
- extern unsigned char xdata M512_VCNTL;
- extern unsigned char xdata M512_INTFLG;
- extern unsigned char xdata M512_INTEN;
-
-
-
- extern unsigned char xdata M512_IIC_CTR;
- extern unsigned char xdata M512_IIC_STUS1;
- extern unsigned char xdata M512_IIC_STUS2;
- extern unsigned char xdata M512_IIC_INTFLG;
- extern unsigned char xdata M512_IIC_INTEN;
- extern unsigned char xdata M512_IIC_MBUF;
- extern unsigned char xdata M512_IIC_TXRCABUF;
- extern unsigned char xdata M512_IIC_SLVAADR;
- extern unsigned char xdata M512_IIC_TXRCBBUF;
- extern unsigned char xdata M512_IIC_SLVBADR;
-
- extern unsigned char xdata M512_ISPSLV;
- extern unsigned char xdata M512_ISPEN;
-
-
-
-
- extern unsigned char xdata M512_ADC;
- extern unsigned char xdata M512_WDT;
- extern unsigned char xdata EINT1PEN ;
-
-
- #line 105 "HeaderMTV512.h" /1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 130 "HeaderMTV512.h" /0
-
-
-
-
-
-
-
-
- #line 4 "PCB2523d1_pcb.h" /0
-
-
-
-
-
-
-
-
-
-
-
-
- #line 16 "PCB2523d1_pcb.h" /1
-
-
-
- #line 19 "PCB2523d1_pcb.h" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 33 "PCB2523d1_pcb.h" /1
-
-
- #line 90 "PCB2523d1_pcb.h" /0
-
-
-
-
- sbit bRTD_SDIO_0 = 0x90;
-
-
- #line 158 "PCB2523d1_pcb.h" /1
-
-
-
-
- #line 162 "PCB2523d1_pcb.h" /0
-
- sbit bRTD_SCLK = 0x94;
- sbit bRTD_SCSB = 0x95;
- sbit bIIC_SCL = 0x96;
- sbit bIIC_SDA = 0x97;
-
- sbit bDDC_SCL = 0xb0;
- sbit bDDC_SDA = 0xb1;
-
- sbit bRTD_RST = 0xb2;
- sbit bRIGHT_KEY = 0xb4;
- sbit bLEFT_KEY = 0xb5;
-
-
-
-
-
-
-
-
- #line 182 "PCB2523d1_pcb.h" /1
-
-
-
- #line 185 "PCB2523d1_pcb.h" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 217 "PCB2523d1_pcb.h" /1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 282 "PCB2523d1_pcb.h" /0
-
-
- #line 110 "HeaderCONFIG.H" /0
-
-
-
-
- #line 114 "HeaderCONFIG.H" /1
-
-
- #line 116 "HeaderCONFIG.H" /0
-
-
- #line 118 "HeaderCONFIG.H" /1
-
-
- #line 120 "HeaderCONFIG.H" /0
-
- #line 1 "HEADERVDC_CFG.H" /0
-
- #line 2 "HEADERVDC_CFG.H" /1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
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ABLE[];
-
- extern unsigned char code AV_DETECT[];
- extern unsigned char code SV_DETECT[];
-
- extern unsigned char code YUV_DETECT[];
-
- extern unsigned char code AV_60_0[];
- extern unsigned char code AV_60_1[];
- extern unsigned char code AV_60_2[];
- extern unsigned char code AV_60_3[];
- extern unsigned char code AV_60_4[];
- extern unsigned char code AV_50_0[];
- extern unsigned char code AV_50_1[];
- extern unsigned char code AV_50_2[];
- extern unsigned char code AV_50_3[];
- extern unsigned char code AV_50_4[];
- extern unsigned char code AV_SECAM[];
-
- extern unsigned char code SV_60_0[];
- extern unsigned char code SV_60_1[];
- extern unsigned char code SV_60_2[];
- extern unsigned char code SV_60_3[];
- extern unsigned char code SV_60_4[];
- extern unsigned char code SV_50_0[];
- extern unsigned char code SV_50_1[];
- extern unsigned char code SV_50_2[];
- extern unsigned char code SV_50_3[];
- extern unsigned char code SV_50_4[];
- extern unsigned char code SV_SECAM[];
-
- extern unsigned char code VIDEO_ALL[];
- extern unsigned char code VIDEO_YUV[];
- extern unsigned char code VIDEO_60[];
- extern unsigned char code VIDEO_50[];
-
- extern unsigned char code TV_SOURCE_SEL[];
- extern unsigned char code TV_SCAN_GAIN[];
- extern unsigned char code TV_DISP_GAIN[];
-
-
- #line 120 "HeaderCONFIG.H" /0
-
-
-
-
- #line 124 "HeaderCONFIG.H" /1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 435 "HeaderCONFIG.H" /0
-
- extern unsigned int code CAP_WIN[][5];
- extern unsigned int code ADC_SD_SET[][3];
-
- extern unsigned char code VGA_INI_SS[];
- extern unsigned char code VGA_INI_CS[];
- extern unsigned char code VGA_INI_SOG[];
- extern unsigned char code VIDEO_INI[];
- extern unsigned char code DVI_INI[];
- extern unsigned char code VGA_SET_SS[];
- extern unsigned char code VGA_SET_CS[];
- extern unsigned char code VGA_SET_SOG[];
- extern unsigned char code LVDS_POWERUP[];
- extern unsigned char code LVDS_POWERDOWN[];
- extern unsigned char code Palette_Open[];
- extern unsigned char code Palette_Close[];
- extern unsigned char code Palette_1[];
- extern unsigned char code Palette_2[];
- extern unsigned char code Palette_3[];
- extern unsigned char code Palette_4[];
- extern unsigned char code Palette_5[];
- extern unsigned char code Palette_6[];
- extern unsigned char code Palette_7[];
- extern unsigned char code DCLK_OFFSET[16];
-
-
- #line 8 "CodeAccess.c" /0
-
-
- #line 1 "HeaderMTV512.H" /0
-
- #line 1 "HEADERMain_def.h" /0
-
- #line 1 "HEADERCHAR_DEF.H" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-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
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 144 "HEADERMain_def.h" /1
-
-
-
-
-
-
-
-
-
-
-
- #line 155 "HEADERMain_def.h" /0
-
-
- #line 157 "HEADERMain_def.h" /1
-
-
- #line 159 "HEADERMain_def.h" /0
-
-
-
-
- #line 163 "HEADERMain_def.h" /1
-
-
- #line 165 "HEADERMain_def.h" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 270 "HEADERMain_def.h" /1
-
-
- #line 272 "HEADERMain_def.h" /0
-
- #line 273 "HEADERMain_def.h" /1
-
-
- #line 275 "HEADERMain_def.h" /0
-
- #line 276 "HEADERMain_def.h" /1
-
-
- #line 278 "HEADERMain_def.h" /0
-
- #line 279 "HEADERMain_def.h" /1
-
-
- #line 281 "HEADERMain_def.h" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 1 "HeaderMTV512.H" /0
-
-
-
-
-
-
-
-
-
- extern unsigned char xdata byMTV512_DDCRAMA[128];
- extern unsigned char xdata byMTV512_DDCRAMB[128];
-
-
-
-
-
- extern unsigned char xdata M512_PadMode0;
- extern unsigned char xdata M512_PadMode1;
- extern unsigned char xdata M512_PadMode2;
- extern unsigned char xdata M512_PadMode3;
- extern unsigned char xdata M512_PadMode4;
- extern unsigned char xdata M512_PadMode5;
- extern unsigned char xdata M512_Option1;
- extern unsigned char xdata M512_PadMode6;
- extern unsigned char xdata M512_PadMode7;
-
- extern unsigned char xdata M512_Port40;
- extern unsigned char xdata M512_Port41;
- extern unsigned char xdata M512_Port42;
-
-
-
-
-
-
-
- extern unsigned char xdata M512_Port50;
- extern unsigned char xdata M512_Port51;
- extern unsigned char xdata M512_Port52;
- extern unsigned char xdata M512_Port53;
- extern unsigned char xdata M512_Port54;
- extern unsigned char xdata M512_Port55;
- extern unsigned char xdata M512_Port56;
-
- extern unsigned char xdata M512_Port60;
- extern unsigned char xdata M512_Port61;
- extern unsigned char xdata M512_Port62;
- extern unsigned char xdata M512_Port63;
- extern unsigned char xdata M512_Port64;
- extern unsigned char xdata M512_Port65;
- extern unsigned char xdata M512_Port66;
- extern unsigned char xdata M512_Port67;
-
- extern unsigned char xdata M512_Port76;
- extern unsigned char xdata M512_Port77;
-
- extern unsigned char xdata M512_DA0;
- extern unsigned char xdata M512_DA1;
- extern unsigned char xdata M512_DA2;
- extern unsigned char xdata M512_DA3;
- extern unsigned char xdata M512_DA4;
- extern unsigned char xdata M512_DA5;
- extern unsigned char xdata M512_DA6;
- extern unsigned char xdata M512_DA7;
- extern unsigned char xdata M512_DA8;
- extern unsigned char xdata M512_DA9;
- extern unsigned char xdata M512_DA10;
- extern unsigned char xdata M512_DA11;
- extern unsigned char xdata M512_DA12;
- extern unsigned char xdata M512_DA13;
-
-
- extern unsigned char xdata M512_HVSTUS;
- extern unsigned char xdata M512_HCNTH;
- extern unsigned char xdata M512_HCNTL;
- extern unsigned char xdata M512_VCNTH;
- extern unsigned char xdata M512_VCNTL;
- extern unsigned char xdata M512_INTFLG;
- extern unsigned char xdata M512_INTEN;
-
-
-
- extern unsigned char xdata M512_IIC_CTR;
- extern unsigned char xdata M512_IIC_STUS1;
- extern unsigned char xdata M512_IIC_STUS2;
- extern unsigned char xdata M512_IIC_INTFLG;
- extern unsigned char xdata M512_IIC_INTEN;
- extern unsigned char xdata M512_IIC_MBUF;
- extern unsigned char xdata M512_IIC_TXRCABUF;
- extern unsigned char xdata M512_IIC_SLVAADR;
- extern unsigned char xdata M512_IIC_TXRCBBUF;
- extern unsigned char xdata M512_IIC_SLVBADR;
-
- extern unsigned char xdata M512_ISPSLV;
- extern unsigned char xdata M512_ISPEN;
-
-
-
-
- extern unsigned char xdata M512_ADC;
- extern unsigned char xdata M512_WDT;
- extern unsigned char xdata EINT1PEN ;
-
-
- #line 105 "HeaderMTV512.H" /1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 130 "HeaderMTV512.H" /0
-
-
-
-
-
-
-
-
- #line 9 "CodeAccess.c" /0
-
-
- #line 1 "HeaderOSD.H" /0
-
- #line 1 ".HEADERMain_def.h" /0
-
- #line 1 "HEADERCHAR_DEF.H" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 1 ".HEADERMain_def.h" /0
-
-
- #line 1 "HEADERMODE_DEF.H" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 2 ".HEADERMain_def.h" /0
-
-
- #line 1 "HEADERRTD_DEF.H" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 3 ".HEADERMain_def.h" /0
-
-
- #line 1 "HEADERCODE_DEF.H" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 4 ".HEADERMain_def.h" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 144 ".HEADERMain_def.h" /1
-
-
-
-
-
-
-
-
-
-
-
- #line 155 ".HEADERMain_def.h" /0
-
-
- #line 157 ".HEADERMain_def.h" /1
-
-
- #line 159 ".HEADERMain_def.h" /0
-
-
-
-
- #line 163 ".HEADERMain_def.h" /1
-
-
- #line 165 ".HEADERMain_def.h" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 270 ".HEADERMain_def.h" /1
-
-
- #line 272 ".HEADERMain_def.h" /0
-
- #line 273 ".HEADERMain_def.h" /1
-
-
- #line 275 ".HEADERMain_def.h" /0
-
- #line 276 ".HEADERMain_def.h" /1
-
-
- #line 278 ".HEADERMain_def.h" /0
-
- #line 279 ".HEADERMain_def.h" /1
-
-
- #line 281 ".HEADERMain_def.h" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 1 "HeaderOSD.H" /0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 27 "HeaderOSD.H" /1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-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
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 5116 "HeaderOSD.H" /0
-
-
- extern unsigned char code Row_Info[][19];
- extern unsigned char code FactRow_Info[][20];
-
- extern unsigned char code OSD_Window_Setting[];
-
- extern unsigned char code Page_All_Atb[];
- extern unsigned char code Page_All_ENG[];
- extern unsigned char code Page_All_GER[];
- extern unsigned char code Page_All_FRE[];
- extern unsigned char code Page_All_ITA[];
- extern unsigned char code Page_All_SPA[];
- extern unsigned char code Page_All_CHI_T[];
- extern unsigned char code Page_All_CHI_S[];
- extern unsigned char code Page_All_JAP[];
-
- extern unsigned char code Page1_Atb[];
- extern unsigned char code Page1_ENG[];
- extern unsigned char code Page1_GER[];
- extern unsigned char code Page1_FRE[];
- extern unsigned char code Page1_ITA[];
- extern unsigned char code Page1_SPA[];
- extern unsigned char code Page1_CHI_T[];
- extern unsigned char code Page1_CHI_S[];
- extern unsigned char code Page1_JAP[];
-
- extern unsigned char code Page2_Atb[];
- extern unsigned char code Page2_ENG[];
- extern unsigned char code Page2_GER[];
- extern unsigned char code Page2_FRE[];
- extern unsigned char code Page2_ITA[];
- extern unsigned char code Page2_SPA[];
- extern unsigned char code Page2_CHI_T[];
- extern unsigned char code Page2_CHI_S[];
- extern unsigned char code Page2_JAP[];
-
- extern unsigned char code Page3_Atb[];
- extern unsigned char code Page3_ENG[];
- extern unsigned char code Page3_GER[];
- extern unsigned char code Page3_FRE[];
- extern unsigned char code Page3_ITA[];
- extern unsigned char code Page3_SPA[];
- extern unsigned char code Page3_CHI_T[];
- extern unsigned char code Page3_CHI_S[];
- extern unsigned char code Page3_JAP[];
-
- extern unsigned char code Page4_Atb[];
- extern unsigned char code Page4_ENG[];
- extern unsigned char code Page4_GER[];
- extern unsigned char code Page4_FRE[];
- extern unsigned char code Page4_ITA[];
- extern unsigned char code Page4_SPA[];
- extern unsigned char code Page4_CHI_T[];
- extern unsigned char code Page4_CHI_S[];
- extern unsigned char code Page4_JAP[];
-
- extern unsigned char code Page5_Atb[];
- extern unsigned char code Page5_ENG[];
- extern unsigned char code Page5_GER[];
- extern unsigned char code Page5_FRE[];
- extern unsigned char code Page5_ITA[];
- extern unsigned char code Page5_SPA[];
- extern unsigned char code Page5_CHI_T[];
- extern unsigned char code Page5_CHI_S[];
- extern unsigned char code Page5_JAP[];
-
- extern unsigned char code Page6_Atb[];
- extern unsigned char code Page6_ENG[];
- extern unsigned char code Page6_GER[];
- extern unsigned char code Page6_FRE[];
- extern unsigned char code Page6_ITA[];
- extern unsigned char code Page6_SPA[];
- extern unsigned char code Page6_CHI_T[];
- extern unsigned char code Page6_CHI_S[];
- extern unsigned char code Page6_JAP[];
-
- extern unsigned char code Page7_Atb[];
- extern unsigned char code Page7_ENG[];
- extern unsigned char code Page7_GER[];
- extern unsigned char code Page7_FRE[];
- extern unsigned char code Page7_ITA[];
- extern unsigned char code Page7_SPA[];
- extern unsigned char code Page7_CHI_T[];
- extern unsigned char code Page7_CHI_S[];
- extern unsigned char code Page7_JAP[];
-
- extern unsigned char code OSD_Version[];
-
- extern unsigned char code NoCable_ENG[];
- extern unsigned char code NoCable_GER[];
- extern unsigned char code NoCable_FRE[];
- extern unsigned char code NoCable_ITA[];
- extern unsigned char code NoCable_SPA[];
- extern unsigned char code NoCable_CHI_T[];
- extern unsigned char code NoCable_CHI_S[];
- extern unsigned char code NoCable_JAP[];
-
- extern unsigned char code NoSignal_ENG[];
- extern unsigned char code NoSignal_FRA[];
- extern unsigned char code NoSignal_DEU[];
- extern unsigned char code NoSignal_ESP[];
- extern unsigned char code NoSignal_ITA[];
- extern unsigned char code NoSignal_CHI_T[];
- extern unsigned char code NoSignal_CHI_S[];
- extern unsigned char code NoSignal_JAP[];
-
- extern unsigned char code NoSupport_ENG[];
- extern unsigned char code NoSupport_GER[];
- extern unsigned char code NoSupport_FRE[];
- extern unsigned char code NoSupport_ITA[];
- extern unsigned char code NoSupport_SPA[];
- extern unsigned char code NoSupport_CHI_T[];
- extern unsigned char code NoSupport_CHI_S[];
- extern unsigned char code NoSupport_JAP[];
-
- extern unsigned char code rgb_OSD_VOLUME[];
- extern unsigned char code OSD_VOLUME_ENG[];
- extern unsigned char code OSD_VOLUME_ESP[];
- extern unsigned char code OSD_VOLUME_JAP[];
- extern unsigned int code strTabVOLUME_Atb[];
-
- extern unsigned char code OSD_AUTO[];
- extern unsigned char code OSD_Auto_ENG[];
- extern unsigned char code OSD_Auto_DEU[];
- extern unsigned char code OSD_Auto_FRA[];
- extern unsigned char code OSD_Auto_ESP[];
- extern unsigned char code OSD_Auto_ITA[];
- extern unsigned char code OSD_Auto_CHI_T[];
- extern unsigned char code OSD_Auto_JAP[];
- extern unsigned int code strTabAuto_Atb[];
-
- extern unsigned char code OSD_RGB[];
- extern unsigned char code OSD_DVI[];
- extern unsigned char code OSD_AV[];
- extern unsigned char code OSD_SV[];
- extern unsigned char code OSD_YUV[];
- extern unsigned char code OSD_TV[];
-
- extern unsigned char code FactoryPageAtbFont[];
- extern unsigned char code OSD_Clean_All[];
- extern unsigned char code Version_Panel[];
- extern unsigned char code RecallOK[];
- extern unsigned char code AutoOK[];
-
- extern unsigned char code OSD_Reset[];
- extern unsigned char code OSD_Enable[];
-
-
- extern unsigned char code Page8_Atb[];
- extern unsigned char code Page8_Title_ENG[];
- extern unsigned char code Page8_Title_GER[];
- extern unsigned char code Page8_Title_FRE[];
- extern unsigned char code Page8_Title_ITA[];
- extern unsigned char code Page8_Title_SPA[];
- extern unsigned char code Page8_Title_CHI_T[];
- extern unsigned char code Page8_Title_CHI_S[];
- extern unsigned char code Page8_Title_JAP[];
- extern unsigned char code Page8_Content[];
-
- extern unsigned char code Page9_Atb[];
- extern unsigned char code Page9_Title_ENG[];
- extern unsigned char code Page9_Title_GER[];
- extern unsigned char code Page9_Title_FRE[];
- extern unsigned char code Page9_Title_ITA[];
- extern unsigned char code Page9_Title_SPA[];
- extern unsigned char code Page9_Title_CHI_T[];
- extern unsigned char code Page9_Title_CHI_S[];
- extern unsigned char code Page9_Title_JAP[];
- extern unsigned char code Page9_Content[];
-
- extern unsigned char code PageADC_Atb[];
- extern unsigned char code PageADC_ENG[];
- extern unsigned char code PageVDC_Atb[];
- extern unsigned char code PageVDC_ENG[];
-
-
-
-
- #line 5305 "HeaderOSD.H" /1
-
-
-
-
-
-
-
- #line 5312 "HeaderOSD.H" /0
-
-
- extern unsigned int code OSD_HINT_TABLE[][8];
- extern unsigned int code OSD_REMK_TABLE[][8];
- extern unsigned int code OSD_PAGE_TABLE[][8];
- extern unsigned int code OSD_PAGE_All_TABLE[][8];
-
-
-
- #line 10 "CodeAccess.c" /0
-
-
- #line 1 "HeaderPower_Ctrl.h" /0
-
-
-
-
-
-
-
-
-
-
-
- #line 12 "HeaderPower_Ctrl.h" /1
-
-
-
-
-
-
-
-
- #line 20 "HeaderPower_Ctrl.h" /0
-
- extern bit bPower_Status;
- extern bit bPanel_Status;
-
- extern void PowerDown_ADC(void);
- extern void PowerUp_ADC(void);
- extern void PowerDown_VDC(void);
- extern void PowerUp_VDC(void);
- extern void PowerDown_LVDS(void);
- extern void PowerUp_LVDS(void);
- extern void PowerDown_TMDS(void);
- extern void PowerUp_TMDS(void);
-
- extern void Set_Panel(unsigned char status);
- extern bit Power_Control(unsigned char Notify);
-
-
-
-
- #line 11 "CodeAccess.c" /0
-
-
-
- #line 14 "CodeAccess.c" /1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 119 "CodeAccess.c" /0
-
- void BitDly(void)
- {
- _nop_(); _nop_(); _nop_(); _nop_(); _nop_(); _nop_(); _nop_(); _nop_();
- _nop_(); _nop_(); _nop_(); _nop_(); _nop_(); _nop_(); _nop_(); _nop_();
- _nop_(); _nop_(); _nop_(); _nop_(); _nop_(); _nop_(); _nop_(); _nop_();
- _nop_(); _nop_(); _nop_(); _nop_(); _nop_(); _nop_(); _nop_(); _nop_();
- }
-
- void I2CRead(unsigned char addr, unsigned char index, unsigned char count)
- {
- unsigned char n;
-
- if (count)
- {
- I2CSendAddr(addr, index, 0);
-
- I2CSendAddr(addr, 0, 1);
-
- count = count - 1;
-
- for (n = 0; n < count; n++) Data[n] = I2CGetByte(0);
-
- Data[count] = I2CGetByte(1);
-
- I2CSendStop();
- }
- }
-
- void I2CWrite(unsigned char *array)
- {
- unsigned char n, len;
-
- if (3 <= array[0])
- {
- len = array[0];
- I2CSendAddr(array[1], array[2], 0);
-
- for (n = 3; n < len; n++) I2CSendByte(array[n]);
-
- I2CSendStop();
- }
- }
-
-
- unsigned char I2CGetByte(unsigned char ack)
- {
- unsigned char r, m;
-
- r = 0;
-
- for (m = 0; m < 8; m++)
- {
- bIIC_SCL = 1;
- BitDly();
-
- r = (r << 1) | bIIC_SDA;
-
- bIIC_SCL = 0;
- BitDly();
- }
-
-
- bIIC_SDA = (bit)(ack & 0x01);
- BitDly();
-
- bIIC_SCL = 1;
- BitDly();
-
- bIIC_SCL = 0;
- BitDly();
-
- bIIC_SDA = 1;
-
- #line 193 "CodeAccess.c" /1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 212 "CodeAccess.c" /0
-
- return (r);
- }
-
- void I2CSendByte(unsigned char send)
- {
- unsigned char m;
-
- for (m = 0; m < 8; m++)
- {
- bIIC_SDA = (bit)(send & 0x80);
- BitDly();
-
- bIIC_SCL = 1;
- BitDly();
-
- bIIC_SCL = 0;
-
- send = send << 1;
- }
-
- bIIC_SDA = 1;
- bIIC_SCL = 1;
- BitDly();
-
- bIIC_SCL = 0;
- BitDly();
-
- #line 240 "CodeAccess.c" /1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 256 "CodeAccess.c" /0
- }
-
- void I2CSendAddr(unsigned char addr, unsigned char index, unsigned char rd)
- {
-
- bIIC_SCL = 1;
- bIIC_SDA = 0;
- BitDly();
-
- bIIC_SCL = 0;
- I2CSendByte(addr + rd);
-
- if (0 == rd) I2CSendByte(index);
-
- #line 270 "CodeAccess.c" /1
-
-
-
-
-
-
-
- #line 277 "CodeAccess.c" /0
- }
-
- void I2CSendStop(void)
- {
-
- bIIC_SDA = 0;
- BitDly();
-
- bIIC_SCL = 1;
- BitDly();
-
- bIIC_SDA = 1;
- BitDly();
-
- #line 291 "CodeAccess.c" /1
-
-
-
-
-
-
-
- #line 298 "CodeAccess.c" /0
- }
-
- unsigned char RTDGetByte(void)
- {
-
-
- #line 304 "CodeAccess.c" /1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 338 "CodeAccess.c" /0
- bRTD_SCLK = 1;
- bRTD_SCLK = 0;
- r0 = bRTD_SDIO_0;
-
- bRTD_SCLK = 1;
- bRTD_SCLK = 0;
- r1 = bRTD_SDIO_0;
-
- bRTD_SCLK = 1;
- bRTD_SCLK = 0;
- r2 = bRTD_SDIO_0;
-
- bRTD_SCLK = 1;
- bRTD_SCLK = 0;
- r3 = bRTD_SDIO_0;
-
- bRTD_SCLK = 1;
- bRTD_SCLK = 0;
- r4 = bRTD_SDIO_0;
-
- bRTD_SCLK = 1;
- bRTD_SCLK = 0;
- r5 = bRTD_SDIO_0;
-
- bRTD_SCLK = 1;
- bRTD_SCLK = 0;
- r6 = bRTD_SDIO_0;
-
- bRTD_SCLK = 1;
- bRTD_SCLK = 0;
- r7 = bRTD_SDIO_0;
-
- bRTD_SCLK = 1;
-
-
-
-
- return Reg;
- }
-
- void RTDSendByte(unsigned char send)
- {
-
-
-
- #line 383 "CodeAccess.c" /1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 424 "CodeAccess.c" /0
- bRTD_SDIO_0 = (bit)(send & 0x01);
- bRTD_SCLK = 1;
- bRTD_SCLK = 0;
-
- bRTD_SDIO_0 = (bit)(send & 0x02);
- bRTD_SCLK = 1;
- bRTD_SCLK = 0;
-
- bRTD_SDIO_0 = (bit)(send & 0x04);
- bRTD_SCLK = 1;
- bRTD_SCLK = 0;
-
- bRTD_SDIO_0 = (bit)(send & 0x08);
- bRTD_SCLK = 1;
- bRTD_SCLK = 0;
-
- bRTD_SDIO_0 = (bit)(send & 0x10);
- bRTD_SCLK = 1;
- bRTD_SCLK = 0;
-
- bRTD_SDIO_0 = (bit)(send & 0x20);
- bRTD_SCLK = 1;
- bRTD_SCLK = 0;
-
- bRTD_SDIO_0 = (bit)(send & 0x40);
- bRTD_SCLK = 1;
- bRTD_SCLK = 0;
-
- bRTD_SDIO_0 = (bit)(send & 0x80);
- bRTD_SCLK = 1;
- bRTD_SCLK = 0;
-
- bRTD_SDIO_0 = 1;
- bRTD_SCLK = 1;
-
-
-
-
- }
-
- void RTDSendAddr(unsigned char addr, unsigned char rd, unsigned char inc)
- {
-
-
- #line 468 "CodeAccess.c" /1
-
-
-
-
-
-
-
-
-
-
-
-
- #line 480 "CodeAccess.c" /0
- RTDSendByte(addr);
-
- bRTD_SDIO_0 = 1;
- bRTD_SCLK = 1;
- bRTD_SDIO_0 = (bit)(rd & 0x01);
- bRTD_SCLK = 1;
- bRTD_SCLK = 0;
- bRTD_SDIO_0 = (bit)(inc & 0x01);
- bRTD_SCLK = 1;
- bRTD_SCLK = 0;
- bRTD_SDIO_0 = 1;
-
-
-
- }
-
- void RTDSendStop(void)
- {
-
- bRTD_SCLK = 0;
- bRTD_SCLK = 1;
- bRTD_SCSB = 1;
-
- }
-
- void RTDRead(unsigned char index, unsigned char count, unsigned char inc)
- {
- if (count)
- {
- bRTD_SCSB = 0;
-
- RTDSendAddr(index, 1, inc);
-
- index = 0;
- do
- {
- Data[index++] = RTDGetByte();
- }
- while (--count);
-
- RTDSendStop();
-
- }
- }
-
- void RTDWrite(unsigned char data *array)
- {
-
- unsigned char len, m;
-
- do
- {
- if (0 == (array[0] & 0xfc)) return;
-
- len = array[0] - 3;
- array = array + 1;
- bRTD_SCSB = 0;
-
-
- if (2 == array[0])
- {
- RTDSendAddr(array[1], 0, 1);
-
- array = array + 2;
- m = array[0];
-
- do
- {
- RTDSendByte(m);
- }
- while (--len);
-
- array = array + 1;
- }
- else
- {
- RTDSendAddr(array[1], 0, array[0]);
-
- array = array + 2;
- do
- {
- RTDSendByte(*array++);
- }
- while (--len);
- }
- RTDSendStop();
- }
- while (1);
- }
-
- void RTDCodeW(unsigned char code *array)
- {
- unsigned char len, m;
-
- do
- {
- if (0 == (array[0] & 0xfc)) return;
-
- len = array[0] - 3;
- array = array + 1;
- bRTD_SCSB = 0;
-
- if (2 == array[0])
- {
- RTDSendAddr(array[1], 0, 1);
-
- array = array + 2;
- m = array[0];
-
- do
- {
- RTDSendByte(m);
- }
- while (--len);
-
- array = array + 1;
- }
- else
- {
- RTDSendAddr(array[1], 0, array[0]);
-
- array = array + 2;
- do
- {
- RTDSendByte(*array++);
- }
- while (--len);
- }
- RTDSendStop();
-
- }
- while (1);
- }
-
- void RTDOSDW(unsigned char code *array)
- {
- unsigned char len;
- do
- {
- if (array[0] == 0xfd) return;
-
- bRTD_SCSB = 0;
- RTDSendAddr(0x90,0,0);
- RTDSendByte(*array++);
- RTDSendByte(*array++);
-
- RTDSendStop();
-
- bRTD_SCSB = 0;
- RTDSendAddr(0x92,0,1);
- do
- {
- if(array[0] == 0xfc)
- {
- if(array[2] == 0xfe)
- {
- do
- {
- len = array[3] - 1;
- RTDSendByte(0xfc + array[1]);
- }while(len--);
-
- array += 4;
- }
- else
- {
- RTDSendByte(0xfc + array[1]);
- array += 2;
- }
- }
- else if(array[1] == 0xfe)
- {
- len = array[2] - 1;
- do
- {
- RTDSendByte(*array);
- }while(len--);
-
- array += 3;
- }
- else
- RTDSendByte(*array++);
-
-
- }while(array[0] != 0xff);
- array +=1 ;
- RTDSendStop();
-
- }
- while (1);
-
- }
-
-
- void RTDSetByte(unsigned char addr, unsigned char val)
- {
-
- bRTD_SCSB = 0;
-
- RTDSendAddr(addr, 0, 1);
-
-
- RTDSendByte(val);
-
- RTDSendStop();
-
- }
-
- void RTDSetBit(unsigned char addr, unsigned char and, unsigned char or)
- {
-
- bRTD_SCSB = 0;
- RTDSendAddr(addr, 1, 1);
-
-
- or = (RTDGetByte() & and) | or;
-
- RTDSendStop();
-
-
- bRTD_SCSB = 0;
- RTDSendAddr(addr, 0, 1);
-
-
- RTDSendByte(or);
-
- RTDSendStop();
-
-
- }
-
-
- void Load_VLC_Font(unsigned char code *array, unsigned int start, unsigned int length)
- {
- unsigned char n,m;
- unsigned char ucTemp[3];
- unsigned char idata ucTemp_VLD[3];
-
-
- #line 719 "CodeAccess.c" /1
-
-
- #line 721 "CodeAccess.c" /0
-
- start += 640;
-
- bRTD_SCSB = 0;
- RTDSendAddr(0x90, 0, 0);
- ucTemp[0] = (unsigned char)((start >> 8) & 0x000f) | 0xd0;
- RTDSendByte(ucTemp[0]);
- ucTemp[0] = (unsigned char)(start & 0x00ff);
- RTDSendByte(ucTemp[0]);
-
- RTDSendStop();
-
- bRTD_SCSB = 0;
- RTDSendAddr(0x92, 0, 1);
-
- ucCnt = 0;
- uiCount = 0;
- bBit = 0;
- ucByte_Temp = 0;
-
- do
- {
- for(m=0; m<9; m++)
- {
-
- ucTemp_VLD[0] = Get_VLD(array) << 4;
- ucTemp_VLD[0] |= Get_VLD(array);
- ucTemp_VLD[1] = Get_VLD(array) << 4;
- ucTemp_VLD[1] |= Get_VLD(array);
- ucTemp_VLD[2] = Get_VLD(array) << 4;
- ucTemp_VLD[2] |= Get_VLD(array);
-
-
- ucTemp[0] = (ucTemp_VLD[1] << 4) | (ucTemp_VLD[2] & 0x0f);
- ucTemp[1] = (ucTemp_VLD[2] & 0xf0) | (ucTemp_VLD[0] & 0x0f);
- ucTemp[2] = (ucTemp_VLD[0] & 0xf0) | (ucTemp_VLD[1] >> 4);
-
- for(n=0;n<3;n++)
- {
-
- #line 761 "CodeAccess.c" /1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 794 "CodeAccess.c" /0
- bRTD_SDIO_0 = (bit)(ucTemp[n] & 0x01);
- bRTD_SCLK = 1;
- bRTD_SCLK = 0;
- bRTD_SDIO_0 = (bit)(ucTemp[n] & 0x02);
- bRTD_SCLK = 1;
- bRTD_SCLK = 0;
- bRTD_SDIO_0 = (bit)(ucTemp[n] & 0x04);
- bRTD_SCLK = 1;
- bRTD_SCLK = 0;
- bRTD_SDIO_0 = (bit)(ucTemp[n] & 0x08);
- bRTD_SCLK = 1;
- bRTD_SCLK = 0;
- bRTD_SDIO_0 = (bit)(ucTemp[n] & 0x10);
- bRTD_SCLK = 1;
- bRTD_SCLK = 0;
- bRTD_SDIO_0 = (bit)(ucTemp[n] & 0x20);
- bRTD_SCLK = 1;
- bRTD_SCLK = 0;
- bRTD_SDIO_0 = (bit)(ucTemp[n] & 0x40);
- bRTD_SCLK = 1;
- bRTD_SCLK = 0;
- bRTD_SDIO_0 = (bit)(ucTemp[n] & 0x80);
- bRTD_SCLK = 1;
- bRTD_SCLK = 0;
- bRTD_SDIO_0 = 1;
- bRTD_SCLK = 1;
-
- }
- }
- }
- while (--length);
-
- RTDSendStop();
-
- }
-
- unsigned char Get_VLD(unsigned char code *array)
- {
- unsigned char data ucZero_Cnt = 0;
- bit bSec_Part = 0;
-
- while(1)
- {
- if( ucCnt == 0 )
- {
- ucByte_Temp = *(array + uiCount);
- ucCnt = 0x80;
- uiCount++;
- }
-
- while( ucCnt > 0 )
- {
- bBit = (bit)(ucByte_Temp & ucCnt);
- ucCnt >>= 1;
-
- if( (bBit) && (bSec_Part == 0) )
- {
- bSec_Part = 1;
- }
- else
- {
- ucZero_Cnt++;
- }
-
- if( bSec_Part == 1 )
- {
- switch(ucZero_Cnt)
- {
- case 0:
- bSec_Part = 0;
- ucZero_Cnt = 0;
- return 0;
-
- case 1:
- Getbit(array);
- bSec_Part = 0;
- ucZero_Cnt = 0;
-
- if(!bBit)
- {
- return 1;
- }
- else
- {
- return 15;
- }
-
- case 2:
- Getbit(array);
- bSec_Part = 0;
- ucZero_Cnt = 0;
-
- if(!bBit)
- {
- return 2;
- }
- else
- {
- return 8;
- }
-
- case 3:
- Getbit(array);
- bSec_Part = 0;
- ucZero_Cnt = 0;
-
- if(!bBit)
- {
- return 12;
- }
- else
- {
- return 7;
- }
-
- case 4:
- Getbit(array);
- bSec_Part = 0;
- ucZero_Cnt = 0;
-
- if(bBit)
- {
- Getbit(array);
-
- if(!bBit)
- {
- return 4;
- }
- else
- {
- return 9;
- }
- }
- else
- {
- Getbit(array);
-
- if(!bBit)
- {
- Getbit(array);
-
- if(!bBit)
- {
- return 3;
- }
- else
- {
- return 11;
- }
-
- }
- else
- {
- Getbit(array);
-
- if(!bBit)
- {
- return 10;
- }
- else
- {
- return 5;
- }
-
- }
- }
-
- case 5:
- Getbit(array);
- bSec_Part = 0;
- ucZero_Cnt = 0;
-
- if(bBit)
- {
- Getbit(array);
-
- if(!bBit)
- {
- return 14;
- }
- else
- {
- return 13;
- }
- }
- else
- {
- Getbit(array);
- if(bBit)
- {
- return 6;
- }
- }
- }
- }
- }
- }
- }
-
- void Getbit(unsigned char code *array)
- {
- if( ucCnt == 0 )
- {
- ucByte_Temp = *(array + uiCount);
- ucCnt = 0x80;
- uiCount++;
- }
-
- bBit = (bit)(ucByte_Temp & ucCnt);
- ucCnt >>= 1;
-
- }
-
- #line 1007 "CodeAccess.c" /1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 1117 "CodeAccess.c" /0
-
-
-
- #line 1120 "CodeAccess.c" /1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #line 1135 "CodeAccess.c" /0