📄 gen.c
字号:
#include "gen.h"
#include "MTV212MN32.h"
#include "comm.h"
#include "intpro.h"
#include "Ic_ctrl.h"
#include "osd.h"
#include "I2C.h"
void Mute_ON(void);
void Mute_Off(void);
void Disable_Deguass(void);
void Enable_Deguass(void);
void Delay(int n);
void Select_Vync_Source(void);
void System_State_Reset(void);
void Set_CS_switch(unsigned char hfre);
void Set_Vsize(void);
void Set_pLED_Normal(void);
void Set_pLED_Suspend(void);
void Set_Power_Suspend(void);
void Set_Power_Normal(void);
void Set_Power_Off(void);
void Mute_ON(void)
{
PIN_MUTE=1;
Video_CutOff();
CloseOsd();
}
void Mute_Off(void)
{
PIN_MUTE=0;
}
void Disable_Degauss(void)
{
PIN_DEGAUSS=0;
}
void Enable_Degauss(void)
{
PIN_DEGAUSS=1;
sEvent_DisableDegauss(0x08);
}
//做了相应的修改
void Delay( int n)
{
int i;
int j;
for(i=0;i<5;i++) //25ms*10 delay time
{
for(j=0;j<n;j++); //25ms delay time
}
return;
}
/*********************************************************************
* 函 数 名: Select_Vync_Source
* 功能描述: 监测当前同步信号的类型,是分离式同步信号还是复合式同步信号
* 并进行相应设置
* 输 入: 无
* 返 回: 无
***********************************************************************/
void Select_Vync_Source(void)
{
if (XFR_HVSTUS&0x80) {
if (!Flg_SyncType) { // 设置为复合同步信号输入
XFR_HVCTR0=0xc0;
Flg_SyncType=1;
}
}
else {
if (Flg_SyncType) { // 设置为分离式同步信号输入
XFR_HVCTR0=0x80;
Flg_SyncType=0;
}
}
}
void System_State_Reset(void)
{
sEvent_SysReset(0x00);
CloseOsd();
Flg_BriCon_Shortcut=0;
Flg_Par_Adjustment=0;
}
void Set_CS_switch(unsigned char hfre)
{
if (hfre>=30&&hfre<=40) { PIN_CS1=0;PIN_CS2=0;PIN_CS3=0;}
else if(hfre>40&&hfre<=50){PIN_CS1=0;PIN_CS2=0;PIN_CS3=1;}
else if(hfre>50&&hfre<=59){PIN_CS1=0;PIN_CS2=1;PIN_CS3=1;}
else if(hfre>59){PIN_CS1=1;PIN_CS2=1;PIN_CS3=1;}
}
void Set_Vsize(void)
{
}
// 设置使电源指示灯指示正常工作状态:绿色(绿亮,黄灭)
void Set_pLED_Normal(void)
{
PIN_LED_OFF=1;
}
// 设置使电源指示灯指示suspend/standby状态:橙色(绿亮,黄亮)
void Set_pLED_Suspend(void)
{
PIN_LED_OFF=0;
}
// 控制电源使其处于正常工作的状态
void Set_Power_Normal(void)
{ miscDelay(10);
PIN_STANDBY=0; //打开6.3V的电源
if (Flg_SoftStart) PHD_Protection();
}
// 控制电源使其处于suspend/standby状态
void Set_Power_Suspend(void)
{
Video_CutOff();
miscDelay(20);
PIN_STANDBY=1; //关闭12V的电源
Flg_SoftStart=1;
}
// 控制电源使其处于Off状态
/*void Set_Power_Off(void)
{
Video_CutOff(); //通过LM1246关闭视频输出
delay(20);
Flg_1246_PS=1; //使LM1246处于省电的状态
Write_LM1246_Reg(0x39,_cror_(Reg_1246_FrmCtrl,5)&0x03);
delay(20);
PIN_SUSPEND=1; //关闭12V的电源
delay(10);
PIN_OFF=1; //关闭6.3V的电源
Flg_SoftStart=1;
}*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -