📄 key_handler_idle.c
字号:
{ SysDeleteTask( &gTask_nav, NULL); SysDeleteTask(&gTask_appl, 0); }#if _APP_CAP_OSD_NOT_DSP_LOGO_AFTER_POWEROFF S5H_SetTvOnOff( FALSE ); SH_MixSetVideoEn( FALSE);#endif#if _APP_CAP_FUNC_FE_POWER_DOWN /*To contrl the front end state directly here, will make it confused so send command to front end directly Liu 0728*/ SH_FE_Power(); gTray_open = FALSE; SH_returnEepromHandle(); /* prevent infinite waiting of semaphore...(yanglu, 051228) */ SH_writeEepromByte(EEPROM_ADDRESS_OPEN_CMD, 0x5A); SH_writeEepromFromBuffer(); /*0729 Liu wait spindle stop*/ { SH_FEState_et state; UINT tray_timeout = 0; state = SH_FE_GetState(); while( state != SH_FE_STATE_STOP ) { if( tray_timeout == 3000 ) { SysPrintf("\n TIMEOUT &&&&"); break; } tray_timeout++; SysSleep(800,0); state = SH_FE_GetState(); } }#else/*_APP_CAP_FUNC_FE_POWER_DOWN*/ /* If tray is opened, close it. */ {#if (_USE_5008 || _USE_5010) // || _USE_5005)#ifdef _BOARD_EVA Tray_CLOSE();#else /* <<< @: 5008CHN-76.cklee 050506 : tray is not closed when tray open status power off */ SysSuspendTask(&gAVL_Task, NULL); Initial_Tray_CLOSE(); SysResumeTask(&gAVL_Task, NULL); /* >>> @: 5008CHN-76.cklee 050506 */#endif#elif (_USE_5005 || _USE_5009 || _USE_5015) /* <<< @: 5008CHN-76.cklee 050506 : tray is not closed when tray open status power off */ SysSuspendTask(&gAVL_Task, NULL); Initial_Tray_CLOSE(); SysResumeTask(&gAVL_Task, NULL); /* >>> @: 5008CHN-76.cklee 050506 */#else Tray_CLOSE();#endif gTray_open = FALSE; SH_writeEepromByte(EEPROM_ADDRESS_OPEN_CMD, 0x5A); } /* Stop spindle */ { SH_FEState_et state; UINT tray_timeout = 0; /* WangLin 20060302, for Power on/off problem temporaly solve the F/E problem, F/E engineer will continue to debug */ SH_FE_Stop(); state = SH_FE_GetState(); while( state != SH_FE_STATE_STOP ) { if( tray_timeout == 30000 ) { SysPrintf("\n TIMEOUT &&&&"); break; } tray_timeout++; SysSleep(800,0); /* <<< @: 5008CHN-128.cklee 050506 : spindle reverse turning when power off key received. */ /* >>> @: 5008CHN-128.cklee 050506 */ state = SH_FE_GetState(); } }#endif /*_APP_CAP_FUNC_FE_POWER_DOWN*/ /* Set VFD OFF */ SetVfdPowerOff(); gPower_state = TOGGLE_OFF; gPower_off_start = FALSE;}#if _APP_CAP_KEY_SUPPORT_EXT_AV/****************************************************************************** * Function name : GuiExternAV * Arguments : * IN VOID * * OUT * I/O * Return : VOID * * By : Taejin Kwon * Description : * Revision : ****************************************************************************** */VOID GuiExternAV( UCHAR param ){}#endifextern UINT gDisc_detect_retry; /****************************************************************************** * Function name : GuiOpenClose * Arguments : * IN UCHAR param * * OUT * I/O * Return : VOID * * By : Taejin Kwon * Description : * Revision : ****************************************************************************** */VOID GuiOpenClose( UCHAR param ){ gRedraw_flag = FALSE; /* Don't redraw CDDA info osd, in this case(yanglu, 060302) */#if _APP_CAP_FUNC_SCORING //SysControlTimer( &gTimer_score_osd,TIMER_DISABLE, 0 ); OsdScoringTimerSet(0, TIMER_DISABLE );#endif /* Clear the previous graphic plane */ SysPrintf("\nOpen/Close key.");#if _APP_CAP_FUNC_COLDSTART if(gOSD_state.etCur_dsp == DISPLAY_COLDSTART) { gCold_start_mode = FALSE;#if _COP_5009_SIMPLE_SOL SH_GfxShowCanvas(SH_CANV1,FALSE);#endif OSD_LogoOn(LOGO_IDLE, TRUE); }#endif#if 0 // SSCR:yyd for 654:MMN open(mute), there is still a short voice#if _APP_CAP_FUNC_MASTER_MUTE if (gMuteOn == 1) SH_AUD_SetMasterMute(!SH_AUD_GetMasterMute()); #endif#endif #if 1 // cydrain 20060524#if _APP_CAP_OSD_SUBTITLE_CONCURRENT_DISPLAY if(S5H_GetAppType() == APP_MMN) //limeng 060712 { if(GetMmpFileType() == MMP_VIDEO_FILE) MmpClearDivxSubtitle(); }#endif#else if(SH_PAR_GetExSubtitleMode()) //(weilf)20060410 SH_GfxShowCanvas(SH_CANV3, FALSE);#endif#if _APP_CAP_NAV_USB_DISC if((GetMainMode() == MODE_NORMAL_USB) || (GetMainMode() == MODE_NORMAL_MCARD1) || (GetMainMode() == MODE_NORMAL_MCARD2)) SetMainMode(MODE_NORMAL_DISC);#endif #if _COP_UI_FUNC_OPENCLOSE_RESUME if( gResumeSet ) ApplSaveResumeInfo(TRUE);#endif /* Moved to RunNavTask() (20051222, TJ Kwon) */// SH_writeEepromFromBuffer(); /* * This function call line is moved from here to RunNavTask() function. * To create logo after application handling data cleared. * During JPG decoding and displaying, logo is overlaped with jpg data. * * 2005.09.09 * TJ *//* Liu 0808 during playback the disc type maybe changed(VCD --> UNKNOWN) so the open close key can not processed..*/ switch (S5H_GetAppType()) { case APP_DVD: case APP_VCD: case APP_MMN: SetNavTaskEnd(END_NAV_TRAY_OPEN); break; default: { /* * To support disc decide time task terminate against OPEN * command. * * 2005.08.30 * TJ */ DiscType_t disc = GetDiscState(); if( disc == DUMMY_DISC || disc == UNKNOWN_DISC || disc == NO_DISC#if _APP_CAP_FUNC_COLDSTART || disc == COLD_START #endif#if (_APP_CAP_NAV_USB_DISC || _APP_CAP_NAV_FX_DATA) || disc == USB_DATA || disc == FX_DATA || disc == NO_USB || disc == NO_FX#endif || disc == MIXED_CD ){// SSCR:yyd for 654:MMN open(mute), there is still a short voice#if _APP_CAP_FUNC_MASTER_MUTE if (gMuteOn == 1) SH_AUD_SetMasterMute(!SH_AUD_GetMasterMute()); #endif UiCmdGeneral(UOP_OPENCLOSE);} else SetNavTaskEnd(END_NAV_TRAY_OPEN); } break; } SetupInfoSaveResumeFlag( FALSE ); gDisc_detect_retry = 0; SetLrstereoState(LRSTEREO_STEREO);//By QQ 050913 clear lrstero status when in open tray to avoid audio part error#if _APP_CAP_AUD_KARAOKE /* reset the spdif mode(pcm spdif mode) for karaoke ouput. wjin 051126*/ //SH_AUD_reset_SPDIF_mode();// /* SSCR jiangmq (060731) move to RunNavTask() and _ad_engine_updateplaymode() after fadeout done.#endif}#if _APP_CAP_KEY_USE_NTPAL_CHANGE /****************************************************************************** * Function name : GuiTvChange * Arguments : * IN UCHAR param * * OUT * I/O * Return : VOID * * By : Taejin Kwon * Description : * Revision : ****************************************************************************** */VOID GuiTvChange( UCHAR param ){ S5H_App_t app_type; SetupDisplay_t display; S5H_OutputTvMode_t pre_mode, next_mode = OUTPUT_525_60; OSD_State_st *osd_state; osd_state = OSD_GetState(); app_type = S5H_GetAppType(); pre_mode = S5H_GetOutputTvMode();#if 0 /*digest mode NTSC / PAL key can work.. Jiang shanbin*/_APP_CAP_FUNC_VCD_DIGEST_PREVIEW /*BY QQ 060403 in digest menu ,TV system should not work*/ if( IsVcdDigestMode() == TRUE ) { OsdNotAvailOn(); return; }#endif/*_SUPPORT_VCD_DIGEST_PREVIEW*/#if _APP_CAP_OSD_ENSURE_MESSAGE if( osd_state->etCur_dsp == DISPLAY_PROGRAM || osd_state->etCur_dsp == DISPLAY_SETUP ) { OSD_SetIconDisplay(ICON_WARNING, NULL, SYS_NO_WAIT); return; } if( osd_state->etCur_icon == ICON_LOADING)//clina 061013 fix bug697 { return; } if( osd_state->etCur_icon != ICON_NP_ENSURE ) { OSD_SetIconDisplay(ICON_NP_ENSURE, NULL, SYS_NO_WAIT); return; }#endif /*_APP_CAP_OSD_ENSURE_MESSAGE */ SetupInfoGetMenuDisplay( &display ); //SSCR changlina 060531 if(display.tv_system==SET_COLOR_END-1) display.tv_system=SET_COLOR_AUTO; else display.tv_system++; switch (display.tv_system) { case SET_COLOR_AUTO: S5H_SetDiscTvOutput(TV_AUTO); break; case SET_COLOR_NTSC: S5H_SetDiscTvOutput(TV_NTSC); break; case SET_COLOR_PAL: S5H_SetDiscTvOutput(TV_PAL); break;#if _COP_TV_PAL60 case SET_COLOR_PAL60: S5H_SetDiscTvOutput(TV_PAL60); break;#endif#if _COP_TV_PALM case SET_COLOR_PALM: S5H_SetDiscTvOutput(TV_PALM); break;#endif #if _COP_TV_PALN case SET_COLOR_PALN: S5H_SetDiscTvOutput(TV_PALN); break;#endif } /* >>> @: 5008CHN-89.Liu renliang 050510 */ S5H_ApplyDiscTvOutput(); next_mode = S5H_GetOutputTvMode(); SetupInfoSetMenuDisplay( &display ); switch ( app_type ) { case APP_DVD: UiCmdGeneral(UOP_NTSC_PAL); /*Jiang Shanbin , temply for digest send TV change*/ break; /* <<< @: 5008CHN-6134.ishan 050624 : send TV change msg to navigator for CDG, MMN */ case APP_VCD: UiCmdGeneral(UOP_NTSC_PAL); break; /* >>> @: 5008CHN-6134.ishan 050624 */#if _APP_CAP_NAV_MMP case APP_MMN: /* <<< @: 5008CHN-470.Gaoping 050718AM :Combination playing Audio and JPEG, change the Video mode continously and quickly happen audio noise,servo CLV error and color shift in PAL 60 mode.*/ //if( pre_mode != next_mode ) { /* <<< @: 5008CHN-XXX.Gaoping 050818PM, MMN:press ntsc/pal key the small size jpg will show*/ if(GetMmpFileType() == MMP_IMAGE_FILE) //pro. when change ntsc/pal in avi resume stop mode, the video is off azureming@060426 { //SH_GfxShowCanvas(SH_CANV1, FALSE ); //ntsc/pal change, osd flicker azureming@060814 if (GetDisplayMainState()==DISPLAY_IMAGE_ALBUM)//gaoping 20060905 { BYTE2 album_select = GetMmpAlbumSelect(); MmpShowAlbum(album_select, MMP_ALBUM_FIRST_DRAW); } SH_MixSetVideoEn(TOGGLE_OFF); } /* <<< @: 5008CHN-XXX.Gaoping 050818PM, MMN:press ntsc/pal key the small size jpg will show*/ UiCmdGeneral(UOP_NTSC_PAL); } /* >>> @: 5008CHN-470.Gaoping 050718AM : */ break;#endif } /* press video scan change key when dvd playback, then go to undefined instruction exception. 2006.02.01 by CKLee. */ if((app_type == APP_MMN) && (osd_state->etCur_dsp == DISPLAY_EXPLORER)) //(weilf)20060413:display notice MmpShowNoticeString(MMP_NOTICE_NP, NULL); else if( gLoading_on != TRUE )// Qian liping 060425: in loading, not show the NTSC/PAL osd. OSD_SetIconDisplay(ICON_NP, NULL, SYS_NO_WAIT); /* <<< @: 5008CHN-XXX.Qian liping 050811:When in setup, if current state is MAIN_DISP_NTSCPAL, change dom3 item at the same time.*/ SpecialKeyUpdateInSetup( RC_KEY_NTSC_PAL ); /* >>> @: 5008CHN-XXX.Qian liping 050811.*/}#endif/****************************************************************************** * Function name : GuiPlayPause * Arguments : * IN UCHAR param * * OUT * I/O * Return : VOID * * By : Taejin Kwon * Description : * Revision : ****************************************************************************** */VOID GuiPlayPause( UCHAR param ){ DiscType_t disc; disc = GetDiscState(); switch( disc ) { #if _APP_CAP_NAV_MMP case CD_DATA: case DVD_DATA: #if _APP_CAP_NAV_USB_DISC case USB_DATA:#endif#if _APP_CAP_NAV_FX_DATA case FX_DATA:#endif break; #endif default:#if _APP_CAP_KEY_SEPERATE_PLAY UiCmdGeneral( UOP_PLAY);#else UiCmdGeneral( UOP_PLAYPAUSE );#endif break; }}/****************************************************************************** * Function name : GuiStop * Arguments : * IN UCHAR param * * OUT * I/O * Return : VOID * * By : Taejin Kwon * Description : * Revision : ****************************************************************************** */VOID GuiStop( UCHAR param ){ SetMainState_t main; DiscType_t disc; SysPrintf("\nStop key."); InitTempValueState(); disc = GetDiscState(); switch( disc ) { #if _APP_CAP_NAV_MMP case CD_DATA: case DVD_DATA: #if _APP_CAP_NAV_USB_DISC case USB_DATA:#endif#if _APP_CAP_NAV_FX_DATA case FX_DATA:#endif //gaoping 20060120 myKeyMsgSender(RC_KEY_STOP,RC_KEY_MODE_NORMAL); break; #endif default: main = GetMainState(); if( main != MAIN_OPEN ) UiCmdGeneral( UOP_STOP ); break; }}#if _APP_CAP_AUD_REVERBERATION /****************************************************************************** * Function name : GuiReverbration * Arguments : * IN UCHAR param * * OUT * I/O * Return : VOID * * By : * Description : * Revision : ****************************************************************************** */ VOID GuiReverbration( UCHAR param ){ DiscType_t disc; OSD_State_st *osd_state;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -