⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vx1828_au.c

📁 Vx1828点3.5"TFT屏的的源程序
💻 C
📖 第 1 页 / 共 3 页
字号:
					temp_data[0] = 0x4B;                       		shi_sub_write(VX1828,0xD8,0x00,&temp_data[0]);// set TC19 |V_DROP_L3  |V_DROP_L4  |                    		temp_data[0] = 0x5D;                       		shi_sub_write(VX1828,0xD7,0x00,&temp_data[0]);// set TC18 |V_DROP_L1  |V_DROP_L2  |                    		temp_data[0] = 0x05;                       		shi_sub_write(VX1828,0xD6,0x00,&temp_data[0]);// set TC17 |----|DROP_PER_N|					#endif					     	          			video_format = 0x00;		// setting present Video format .?     	     osd_show(0x0A,0x04,&PALN);					//pal_parameter();					break;               		case 1:	// PAL B               			#if _debug               			printf("the video is PAL-B \n");					#endif     	          			//temp_data[0] = hposP_sel;	// Address 0x3c     	          			//temp_data[1] = vposP_sel;	// Address 0x3d     	          			//temp_data[2] = 0x30;		// Address 0x3e     	          			//temp_data[3] = 0x1A;		// Address 0x3f     	          			//temp_data[4] = 0x33;		// Address 0x40     	          			//temp_data[5] = 0x80;		// Address 0x41     	          			//shi_sub_write(VX1828,0x3c,0x05,&temp_data[0]);	     	          			//delay for a while so that to decease no-sync after auto change patten .     	          			//like as PAL-N TO NTSC .  					DelayXms(0x80);					#if LG     	          			temp_data[0] = 0x16;                       		shi_sub_write(VX1828,0xC2,0x00,&temp_data[0]);// set TC6 |-|         STV_ON       |     	          			temp_data[0] = 0x79;                       		shi_sub_write(VX1828,0xa6,0x00,&temp_data[0]);     	          			temp_data[0] = 0x00;                       		shi_sub_write(VX1828,0xa5,0x00,&temp_data[0]);					temp_data[0] = 0x02;                       		shi_sub_write(VX1828,0xC7,0x00,&temp_data[0]);// set TC5 | OEV_MODE[3:0]|-|-|ZOOM_MODE[1:0]|     	          			temp_data[0] =0xCD;     	          		shi_sub_write(VX1828,0x3c,0x00,&temp_data[0]);// set  OS9   | HSHIFT  |     	          			temp_data[0] =0x03;     	          		shi_sub_write(VX1828,0x3d,0x00,&temp_data[0]);// set  OS9   | HSHIFT  |				     	          			//temp_data[0] =0x0c;     	          			//shi_sub_write(VX1828,0xc0,0x00,&temp_data[0]);// set  OS9   | HSHIFT  |					#endif					#if AU					temp_data[0] = 0x02;                       		shi_sub_write(VX1828,0xC7,0x00,&temp_data[0]);					#endif					#if 0                    		temp_data[0] = 0x4B;                       		shi_sub_write(VX1828,0xD8,0x00,&temp_data[0]);                    		temp_data[0] = 0x5D;                       		shi_sub_write(VX1828,0xD7,0x00,&temp_data[0]);                    		temp_data[0] = 0x05;                       		shi_sub_write(VX1828,0xD6,0x00,&temp_data[0]);					#endif					//pal_parameter();				                    		//	temp_data[0] =0x80;                    		//	shi_sub_write(VX1828,0x1E,0x00,&temp_data[0]);                    		//	temp_data[0] =0x5A;                    		//	shi_sub_write(VX1828,0x1F,0x00,&temp_data[0]);                    		// 	temp_data[0] =0x87;                    		// 	shi_sub_write(VX1828,0x20,0x00,&temp_data[0]);     	          			video_format = 0x01;		// set the format of the present video .? 			     	          			break;               		case 2:	// PAL M               			#if _debug               			printf("the video is PAL-M \n");										#endif     	          			//temp_data[0] = hposPM_sel;	// Address 0x3c     	          			//temp_data[1] = vposPM_sel;	// Address 0x3d     	          			//temp_data[2] = 0x0C;		// Address 0x3e     	          			//temp_data[3] = 0x24;		// Address 0x3f     	          			//temp_data[4] = 0x28;		// Address 0x40     	          			//temp_data[5] = 0x66;		// Address 0x41     	          			//shi_sub_write(VX1828,0x3c,0x05,&temp_data[0]);     	          			#if 0		          		     	          			temp_data[0] = 0x78;                       		shi_sub_write(VX1828,0x1c,0x00,&temp_data[0]);					#endif					DelayXms(0x80);					#if LG     	          			temp_data[0] = 0x16;                       		shi_sub_write(VX1828,0xC2,0x00,&temp_data[0]);// set TC6 |-|         STV_ON       |     	          			temp_data[0] = 0x79;                       		shi_sub_write(VX1828,0xa6,0x00,&temp_data[0]);     	          			temp_data[0] = 0x00;                       		shi_sub_write(VX1828,0xa5,0x00,&temp_data[0]);					temp_data[0] = 0x02;                       		shi_sub_write(VX1828,0xC7,0x00,&temp_data[0]);// set TC5 | OEV_MODE[3:0]|-|-|ZOOM_MODE[1:0]|     	          			temp_data[0] =0xCD;     	          		shi_sub_write(VX1828,0x3c,0x00,&temp_data[0]);// set  OS9   | HSHIFT  |     	          			temp_data[0] =0x03;     	          		shi_sub_write(VX1828,0x3d,0x00,&temp_data[0]);     	          			temp_data[0] =0x0c;     	          		shi_sub_write(VX1828,0xc0,0x00,&temp_data[0]);// set  OS9   | HSHIFT  |					#endif					#if AU					temp_data[0] = 0x02;                       		shi_sub_write(VX1828,0xC7,0x00,&temp_data[0]);					#endif					#if 0					DelayXms(0xff);DelayXms(0xff);DelayXms(0xff);					temp_data[0] = 0x38;                       		shi_sub_write(VX1828,0x1c,0x00,&temp_data[0]);					#endif					#if 0                    		temp_data[0] = 0x4B;                       		shi_sub_write(VX1828,0xD8,0x00,&temp_data[0]);                    		temp_data[0] = 0x5D;                       		shi_sub_write(VX1828,0xD7,0x00,&temp_data[0]);                    		temp_data[0] = 0x05;                       		shi_sub_write(VX1828,0xD6,0x00,&temp_data[0]);					#endif					//pal_parameter();				     	          			video_format = 0x02;		// set the patten of the present Video .?       	          			//	osd_show(0x0A,0x04,&PALM);    	               		break;               		case 3:	// NTSC               			#if _debug               			printf("the video is NTSC \n");										#endif     	          			//temp_data[0] = hposNS_sel;	// Address 0x3c     	          			//temp_data[1] = vposNS_sel;	// Address 0x3d     	          			//temp_data[2] = 0x10;		// Address 0x3e     	          			//temp_data[3] = 0x2A;		// Address 0x3f     	          			//temp_data[4] = 0x2A;		// Address 0x40     	          			//temp_data[5] = 0x60;		// Address 0x41     	          			//shi_sub_write(VX1828,0x3c,0x05,&temp_data[0]);     	          			#if 0     	          			     	          			temp_data[0] = 0x78;                       		shi_sub_write(VX1828,0x1c,0x00,&temp_data[0]);					#endif					DelayXms(0x80);					#if LG     	          			temp_data[0] = 0x12;                       		shi_sub_write(VX1828,0xC2,0x00,&temp_data[0]);										temp_data[0] = 0x7b;  					                    		shi_sub_write(VX1828,0xa6,0x00,&temp_data[0]);     	          			temp_data[0] = 0x00; 					                    		shi_sub_write(VX1828,0xa5,0x00,&temp_data[0]);										temp_data[0] = 0x00;                       		shi_sub_write(VX1828,0xC7,0x00,&temp_data[0]);     	          			temp_data[0] =0xCd;     	          		shi_sub_write(VX1828,0x3c,0x00,&temp_data[0]);									temp_data[0] =0x00;     	          		shi_sub_write(VX1828,0x3d,0x00,&temp_data[0]);// set  OS9   | HSHIFT  |					#endif					#if AU					temp_data[0] = 0x00;                       		shi_sub_write(VX1828,0xC7,0x00,&temp_data[0]);					#endif					//temp_data[0] =0xC6;     	          			//shi_sub_write(VX1828,0xc0,0x00,&temp_data[0]);// set  OS9   | HSHIFT  |					//ntsc_parameter();					#if 0 					DelayXms(0xff);DelayXms(0xff);DelayXms(0xff);     	          			temp_data[0] = 0x38;                       		shi_sub_write(VX1828,0x1c,0x00,&temp_data[0]);					#endif     	          			video_format = 0x03;		// set the patten of the present Video .?     					     	           			break;               		default:     	          			break;               		}				               		modestatus=tempmode;               	}     	     		//BSTctrl = 0;   DelayXms(0x10);               	//INVctrl = 0;               	}   		#endif   //=============================================================//===================== menu Button =============================//=============================================================          	if (power_flag)		{				time_setup_process();					//======when topmenu hasn't appear , press right or left .==============               	if (!topmenu_flag&&irvoladd_flag)               	{               		               		irvoladd_flag=0;osd_timer=0;TR0=0;					#if _debug               		printf("!topmenu_flag&&irvoladd_flag\n");					#endif				top_sel=1;				time_sel=1;	                   	britmenu_flag  = 0;	                  	 timemenu_flag=0;					               	if (volshow_flag == 0){						initvol_menu();						#if _debug							printf("initvolmenu() \n");							#endif											volshow_flag = 1; 				}				if(volume_sel>=0x0f)	{volume_sel=0x0e;}				                    	if (volume_sel <0x0f)                    	{                    			                         		volume_sel++;					Vol_menu(volume_sel);                         		//shi_sub_write(PT2313L,volume_sel,0x00,&volume_sel);                         	set_audio_volume(volume_sel);                         		DelayXms(0x80);		// avoid error repress 	                    		                    	shi_sub_write(EEPROM,0xF6,0x00,&volume_sel);					DelayXms(0x80);				shi_sub_read(EEPROM,0xF6,0,&tmp);					#if _debug										if(tmp==volume_sel){						printf("save volume_sel to 0x06 ok ");						}					else{						printf("save volume_sel to 0x06 bad");						}					#endif                    	}				osd_timer=0;TR0=1;               	}							//-------------------------------------------				if (!topmenu_flag && irvolsub_flag)          		{          			          			irvolsub_flag=0;osd_timer=0;TR0=0;				#if _debug          			printf("!topmenu_flag && (irvolsub_flag)\n");				#endif				top_sel=1;				time_sel=1;								topmenu_flag=0;	                   	britmenu_flag  = 0;	                  	 timemenu_flag=0;	                   //volshow_flag = 0;										               	if (volshow_flag == 0){						initvol_menu();							#if _debug						printf("initvolmenu() \n");						#endif						volshow_flag = 1; 				}				               		if (volume_sel>0)               		{                    			volume_sel--;					Vol_menu(volume_sel);                    			//shi_sub_write(PT2313L,volume_sel,0x00,&volume_sel);                    			set_audio_volume(volume_sel);                    			DelayXms(0x30);		// avoid error repress                    			// Save tuner's vaiable to EEPROM                    			//	W_en = 0;	DelayXms(0x80);		// avoid error repress                    											shi_sub_write(EEPROM,0xF6,0x00,&volume_sel);					DelayXms(0x80);					shi_sub_read(EEPROM,0xF6,0x00,&tmp);					#if _debug					if(tmp==volume_sel){						printf("save volume_sel to 0x06=%bx ok ",tmp);						}					else{						printf("save volume_sel to 0x06=%bc bad",tmp);						} 					#endif               		}  				osd_timer=0;TR0=1;          		}			//================  for BRIGHTNRSS =============================               	if (!topmenu_flag&& irbriadd_flag)               	{	               		               		irbriadd_flag=0;osd_timer=0;TR0=0;				#if _debug               		printf("!topmenu_flag&& irbiradd_flag \n");				#endif		               	if (britmenu_flag== 0){						initbrit_menu();						#if _debug							printf("initbrit_menu() \n");						#endif												britmenu_flag= 1; 				}								if(britc_sel>64){britc_sel=32;};                          if (britc_sel <64)	                    {		                         britc_sel++;	                    	//DelayXms(0x20);										               			brit_menu(britc_sel);	                         	adj_britclr(britc,britc_sel*4-1);	// setting w1120A regestor ?	                         Submenu1(britc_sel);	                         	//Save britc_sel to EEPROM	                         	shi_sub_write(EEPROM,0x01,0x00,&britc_sel);					DelayXms(0x80);					shi_sub_read(EEPROM,0x01,0,&tmp);					#if _debug					if(tmp==britc_sel){						printf("save britc_sel=%bx ok ",tmp);						}					else{						printf("save britc_sel=%bx bad",tmp);						}					#endif	                    } 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -