📄 joetoevb.c
字号:
#endif
//=============================================================================
//UI_TVOutDetect
//=============================================================================
void UI_TVOutDetect(void) USING_0
{
UCHAR tmp;
#if(TURNKEY_OPTION == 1)
if (VIDEO_DET == 1)//wendy@2004/8/30 //Davis@2004/9/2 VIDEO_DET == 1
#else
if ((XBYTE[0x2040] & 0x01) == 0)
#endif
{
if ((G_DisplayType != K_DISPLAY_CompTvNtsc) && (G_DisplayType != K_DISPLAY_CompTvPal))
{
if((G_UIStatusH&0xff00)==K_UISTATUS_DSC_AUDIO)
{
if (G_SensorPowerOnOff == 0)
{
UI_SensorPowerOnOff(1);
XBYTE[0x2080] = 0x01; //power on TGPLL
L2_InitFront(0);
L2_InitAEAW(0);
}
}
if (G_CameraOptions.TVDispType == K_UIOPTION_TVTYPE_NTSC)
{
ChangeDispDevice(K_DISPLAY_CompTvNtsc);
if((G_UIStatusH&0xff00)==K_UISTATUS_DSC_PLAY)
{
UI_DestroyMenu(); //wendy@2004/8/15
Playback_Initial();
}
else
UI_DestroyMenu(); //wendy@2004/8/15
}
else if (G_CameraOptions.TVDispType == K_UIOPTION_TVTYPE_PAL)
{
// if((G_UIStatusH&0x00ff)!=0)
ChangeDispDevice(K_DISPLAY_CompTvPal);
if((G_UIStatusH&0xff00)==K_UISTATUS_DSC_PLAY)
{
UI_DestroyMenu(); //wendy@2004/8/15
Playback_Initial();
}
else
UI_DestroyMenu(); //wendy@2004/8/15
}
if((G_UIStatusH&0xff00)==K_UISTATUS_DSC_AUDIO)
{
UI_SensorPowerOnOff(1);
XBYTE[0x2080] = 0x01; //power on TGPLL
L2_InitFront(0);
L2_InitAEAW(0);
L1_InitPreview(1); //cytsai@0102
UI_PrintPic();
}
G_AutoPowerOffCount = 0;
}
}
else
{
if ((G_DisplayType == K_DISPLAY_CompTvNtsc) || (G_DisplayType == K_DISPLAY_CompTvPal))
{
//patch4.3@yichang@0611 for version B/C chip co-exist
tmp = MemStretch;
MemStretch = 0x01;
//patch4.1@yichang@0517 for TV out -> LCD
XBYTE[0x2D32] = 0x20; // osdvzfac
MemStretch = tmp;
#ifdef STNLCD
ChangeDispDevice(K_DISPLAY_StnLcd);
#endif
#ifdef UPS051
ChangeDispDevice(K_DISPLAY_Ups051);
#endif
#ifdef AU015AN02
ChangeDispDevice(K_DISPLAY_Au015An02);
if((G_UIStatusH&0xff00)==K_UISTATUS_DSC_AUDIO)
{
UI_PrintPic();
}
#endif
#ifdef EPSON
ChangeDispDevice(K_DISPLAY_Epson);
#endif
#ifdef CASIO
ChangeDispDevice(K_DISPLAY_Casio);
#endif
#ifdef STNLCD160
ChangeDispDevice(K_DISPLAY_StnLcd160);
#endif
#ifdef VGATFT
ChangeDispDevice(K_DISPLAY_VgaTftLcd);
#endif
#ifdef SVGAOUT
ChangeDispDevice(K_DISPLAY_Svga);
#endif
#ifdef AU015BL01 //patch5.2.1@cwh@AU015BL01;2003/08/08
ChangeDispDevice(K_DISPLAY_Au015Bl01);
#endif
#ifdef TOPPOLY //patch5.2.1@cwh@Toppoly TC015TREB1;2003/08/27
ChangeDispDevice(K_DISPLAY_Tc015Treb1);
#endif
// patch 5.2.1_28@mattwang@rename CASIO2G to CASIO2G1181 beg
#ifdef CASIO2G1181 //patch5.2.1@cwh@CASIO2G ;2003/09/24
ChangeDispDevice(K_DISPLAY_Casio2G1181);
#endif
// patch 5.2.1_28@mattwang@rename CASIO2G to CASIO2G1181 end
// patch 5.2.1_28@mattwang@add CASIO2G1163 LCD pannel beg
#ifdef CASIO2G1163
ChangeDispDevice(K_DISPLAY_Casio2G1163);
#endif
// patch 5.2.1_28@mattwang@add CASIO2G1163 LCD pannel end
// patch 5.2.1_30@mattwang@add STNLCD128 LCD pannel beg
#ifdef STNLCD128
ChangeDispDevice(K_DISPLAY_StnLcd128);
#endif
// patch 5.2.1_30@mattwang@add STNLCD128 LCD pannel end
// patch 5.2.1_33@mattwang@add AU015AN04 LCD pannel beg
#ifdef AU015AN04
ChangeDispDevice(K_DISPLAY_Au015An04);
if((G_UIStatusH&0xff00)==K_UISTATUS_DSC_AUDIO)
{
UI_PrintPic();
// Playback_Initial();
}
#endif
// patch 5.2.1_33@mattwang@add AU015AN04 LCD pannel end
/*
if((G_UIStatusH&0xff00)==K_UISTATUS_DSC_PLAY)
{
UI_DestroyMenu(); //wendy@2004/8/15
// Playback_Initial();
}
else
UI_DestroyMenu(); //wendy@2004/8/15
*/
}
}
}
//=============================================================================
//UI_CardHotInsertionDetect
//=============================================================================
void UI_CardHotInsertionDetect(void) USING_0
{
USHORT status;
UCHAR sts;
L2_CardDetect(&sts);
if ( ((sts == FALSE) && (G_ExtCardStatus == 1)) \
|| ((sts == TRUE) && (G_ExtCardStatus == 0)) )
{
G_AutoPowerOffCount = 0;
//turnkey_patch2.2@ada@Cancel the menu while switching storage begin
if (G_CameraOptions.DPOF == K_UIOPTION_DPOF_ON)
{
G_CameraOptions.DPOF = K_UIOPTION_DPOF_OFF;
}
if (G_StayInMenu)
{
//turnkey_patch2.2@ada@Fix the bug which can not jump out of the charging loop while power low begin
G_FlashChargingCount = 0;
//turnkey_patch2.2@ada@Fix the bug which can not jump out of the charging loop while power low end
//turnkey_patch2.2@ada@Cancel the menu if non key is pressed after time out begin
G_StayInMenuCount = 0;
//turnkey_patch2.2@ada@Cancel the menu if non key is pressed after time out end
//turnkey_patch2.2@ada@Cancel the DPOF function if USB is plugged in begin
if (G_CameraOptions.DPOF == K_UIOPTION_DPOF_ON)
{
G_CameraOptions.DPOF = K_UIOPTION_DPOF_OFF;
}
//turnkey_patch2.2@ada@Cancel the DPOF function if USB is plugged in end
UI_DestroyMenu();
}
//turnkey_patch2.2@ada@Cancel the menu while switching storage end
UI_BusyLed(1);
UI_Buzzer();
INITIO_StorageInitialize();
status = G_UIStatus & 0xff00;
if (status == K_UISTATUS_DSC_PREVIEW)
{
UI_PreviewStatusOSD();
}
else
{
if (status == K_UISTATUS_DSC_PLAY)
{
if (G_UI_USBConnect == K_UI_USB_DISCONNECT)
{
// DELAY_1s();//bug//wendy@2004/4/20
//DELAY_1s();//bug//wendy@2004/4/20
Playback_Initial(); //Note:This function maybe change G_ExtCardStatus
}
else
{
Playback_Initial(); //Note:This function maybe change G_ExtCardStatus//wendy@2004/4/20
//UI_PlaybackStatusOSD();
}
}
if(status == K_UISTATUS_USBMODE_MASS)
UI_PrintOSDString(" MSDC ", 6, 3, UI_MENU_BG_COLOR_ON | UI_MENU_TITLE_TEXT_COLOR); ////printf("MSDC\n");
}
UI_BusyLed(0);
G_AutoPowerOffCount = 0;
#if (MLUN_OPTION)
if((G_UIStatus & 0xff00) ==K_UISTATUS_USBMODE_MASS)
MLUN_Initialize();
#endif
}
}
//=============================================================================
//UI_Buzzer
//=============================================================================
void UI_Buzzer(void) USING_0
{
/*data USHORT i;
data USHORT j;
data UCHAR k = 2;
EA = 0;
L2_ConfigGPIOBit(17,1); //Buzzer(high active)
for (i = 0; i < 1000; i++)
{
L2_SetGPIOBit(17,1);
for (j = 0; j < 18; j++)
{
k++;
k--;
}
L2_SetGPIOBit(17,0);
for (j = 0; j < 18; j++)
{
k++;
k--;
}
}
EA = 1;*/
if(G_CameraOptions.Buzzer)//Davis@2004/9/6
{
XBYTE[0x2090] = 0x69; // bit-timer = 1/4k
XBYTE[0x2091] = 0x18;
XBYTE[0x2094] = 0x40;
XBYTE[0x2095] = 0x00;
XBYTE[0x2096] = 0x00;
XBYTE[0x2097] = 0x00;
XBYTE[0x2093] = 0x01;
XBYTE[0x2098] = 0x55;//wendy@2004/8/31
XBYTE[0x209d] = 0x01;
XBYTE[0x209c] = 0x01;
XBYTE[0x209e] = 0x03;
}
}
//=============================================================================
//UI_Buzzer1//wendy@2004/9/7
//=============================================================================
void UI_Buzzer1(void) USING_0
{
/*data USHORT i;
data USHORT j;
data UCHAR k = 2;
EA = 0;
L2_ConfigGPIOBit(17,1); //Buzzer(high active)
for (i = 0; i < 1000; i++)
{
L2_SetGPIOBit(17,1);
for (j = 0; j < 18; j++)
{
k++;
k--;
}
L2_SetGPIOBit(17,0);
for (j = 0; j < 18; j++)
{
k++;
k--;
}
}
EA = 1;*/
XBYTE[0x2090] = 0x69; // bit-timer = 1/4k
XBYTE[0x2091] = 0x18;
XBYTE[0x2094] = 0x40;
XBYTE[0x2095] = 0x00;
XBYTE[0x2096] = 0x00;
XBYTE[0x2097] = 0x00;
XBYTE[0x2093] = 0x08;
XBYTE[0x2098] = 0xe0;//0x55;//wendy@2004/8/31
XBYTE[0x209d] = 0x01;
XBYTE[0x209c] = 0x01;
XBYTE[0x209e] = 0x03;
}
//=============================================================================
//UI_BusyLed
//=============================================================================
void UI_BusyLed(UCHAR OnOff) USING_0
{
#if (TURNKEY_OPTION == 1)
L2_ConfigGPIOBit(30,1);
if (OnOff > 0)
{
L2_SetGPIOBit(30,1);//wendy
}
else
{
L2_SetGPIOBit(30,0);
}
#else
XBYTE[0x203a] |= 0x04; //gpio 18
if (OnOff > 0)
{
XBYTE[0x2032] |= 0x04;
}
else
{
XBYTE[0x2032] &= 0xfb;
}
#endif
}
//=============================================================================
//UI_SelfTimerLed
//=============================================================================
void UI_SelfTimerLed(UCHAR OnOff) USING_0
{
#if (TURNKEY_OPTION == 1)
L2_ConfigGPIOBit(29,1);
XBYTE[0x2008] |= 0x10; //Mshutter output enable
if (OnOff)
{
XBYTE[0x2b07] = 0x11; //Mshutter is Self Timer LED(high active)
L2_SetGPIOBit(29,1);//wendy
}
else
{
XBYTE[0x2b07] = 0x10;
L2_SetGPIOBit(29,0);//wendy
}
#else
XBYTE[0x203a] |= 0x08; //gpio19
// XBYTE[0x203a] |= 0x02; //gpio17
if (OnOff > 0)
{
XBYTE[0x2032] |= 0x08;
// XBYTE[0x2032] |= 0x02;//gpio17
}
else
{
XBYTE[0x2032] &= 0xf7;
}
#endif
/* if (OnOff)
{
XBYTE[0x2090] = 0x00; // f = 1s
XBYTE[0x2091] = 0x00;
XBYTE[0x2092] = 0x60;
XBYTE[0x2094] = 0x02;
XBYTE[0x2095] = 0x00;
XBYTE[0x2096] = 0x00;
XBYTE[0x2097] = 0x00;
XBYTE[0x2093] = 0x01;
XBYTE[0x2099] = 0xf0;
XBYTE[0x209d] = 0x01;
XBYTE[0x209c] = 0x04;
XBYTE[0x209e] = 0x03;
}
else
{
XBYTE[0x209c] = 0x00;
}
*/
}
//=============================================================================
//UI_FlashLight_Charge
//=============================================================================
void UI_FlashLight_Charge(void) USING_0
{
USHORT status;
UCHAR FOSD_H_num, FOSD_V_num;
UI_GetFOSDSize(&FOSD_H_num, &FOSD_V_num);
status = G_UIStatusH& 0xff00;
//wendy@2004/9/8
if(G_FlashChargeFlag==2)
{
if(G_FlashChargeCount<70/*60*/)
{
return;
}
else
{
G_FlashChargeCount=0;
G_FlashChargeFlag=0;
}
}
//wendy@2004/9/8
if((G_UI_USBConnect == K_UI_USB_DISCONNECT) && (G_UIStatusH == K_UISTATUS_DSC_PREVIEW))//wendy@2004/9/8
{
if (G_Refresh_Status_OSD == 1)
{
if (G_StayInMenu)
{
UI_DestroyMenu();
}
G_Refresh_Status_OSD = 0;
L2_SetFOSDIndex(0,FOSD_H_num-9,G_FlashStatus*2 + 0x12);
L2_SetFOSDAttr(0,FOSD_H_num-9, UI_MENU_DEHIGHLIGHT_COLOR);
L2_SetFOSDIndex(0,FOSD_H_num-8,G_FlashStatus*2 + 0x13);
L2_SetFOSDAttr(0,FOSD_H_num-8, UI_MENU_DEHIGHLIGHT_COLOR);
if (G_FlashStatus == K_FlashLightOff)
{
UI_FlashLight_Power(0);
G_FlashCharging = 0;
G_FlashChargingCount = 0;
UI_BusyLed(0);
G_FlashChargeFlag=0;//wendy@2004/9/8
G_FlashChargeCount=0;//wendy@2004/9/8
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -