ir_parser.c
来自「凌阳8202T的红外接收代码及LED屏的驱动代码」· C语言 代码 · 共 2,095 行 · 第 1/5 页
C
2,095 行
#ifdef DVD_AUDIO//2004-3-5 17:48
if(pDSV->hid_gp_chk_pwd==2)
{
regs0->iop_data[IR_PORT]|=IR_RDY;
//full_scrn=0; //t_disp=disp_mode;
osd_init();
return;
}
#endif//DVD_AUDIO
}
//Maoyong 2004.03.06 , Record disc check Level SYSTEM_SETUP_BROWSER,
//Avoid 2 times "ircmd_eject_toggle" and then can't do right TRAY OUT
#ifdef CHECK_RECORD_DISK_PARENT_LVL
if( !((system_state == SYSTEM_SETUP_BROWSER) && (rx== IRC_EJECT)) )
#endif
#ifdef SUPPORT_SPI_QSI
if( /*(rx == IRC_STOP) || */(rx == IRC_PLAY) /*|| (rx == IRC_PAUSE)*/ )
spi_cmd_func_table[uSpiRxData]();
else
#endif
irc_func_table[rx]();
if( (rx==IRC_SELECT)||(rx==IRC_PLAY_RESUME)||
(rx==IRC_PLAY_SELECT)||(rx==IRC_PAUSEPLAY))
user_input_pwd=0;
}
if((rx!=IRC_EJECT)&&(rx!=IRC_POWER))
return;
}
if( RejectBySWD( rx ) )
return;
#ifdef USE_IR_FILTER
if(g_pfnIRFilter == NULL)
{
g_pfnIRFilter = IRFilter_All_Pass;
}
switch(g_pfnIRFilter(rx))
{
case IR_FILTER_REJECT:
return;
break;
case IR_FILTER_NOP:
break;
case IR_FILTER_EXCEPTION:
break;
default:
break;
}
#ifdef SUPPORT_DIVX6
extern UINT32 is_divx6_file;
extern int divx6_AdjustState(BYTE rx);
if(is_divx6_file)
{
divx6_AdjustState(rx);
}
#endif //#ifdef SUPPORT_DIVX6
#endif//USE_IR_FILTER
extern UINT8 gIsMidiSelMenu __attribute__((unused)); //mimitsai add 2004-12-03 17:13
#ifdef SUPPORT_DIVX_HOME_THEATER
if( ( invalid & DRM_MENU ) && ( full_scrn & DIVX_DRM_MENU ) )
{
#ifdef IR_DBG
printf( "Disable key in DRM_MENU\n" );
#endif
#ifdef ALCO_DVD_UI
osd_init();
full_scrn=0;
#else
return;
#endif
}
else
#endif
#ifdef SUPPORT_MIDI //axel add for "FF"、“pause”etc.are invalid when press "PREVIEW"2004.09.21
if ((gIsMidiSelMenu)&&(rx==IRC_PREVIEW))
{
need_run_cmd=0;
#ifdef IR_DBG
printf("<ir_invalid 15>\n");
#endif
}
else
#endif
#if defined(SUPPORT_MIDI)&&defined(NEW_SEARCH_OSD) //axelchen add for "display"
extern UINT8 gIsMidiSelMenu;
if (gIsMidiSelMenu)
{
if((rx==IRC_GOTO)||(rx==IRC_DISPLAY))
need_run_cmd=0;
}
else
#endif// defined(SUPPORT_MIDI)&&defined(NEW_SEARCH_OSD)
if(rx==IRC_RANDOM)
{
#if !defined(PRESS_RANDOM_IF_INVID_DERECT_SHOW)//ZXB 2005-5-16 15:36
if(action_click)
#endif
{
if((invalid&(0x01<<play_state))
#ifdef WHEN_PROG_PLAYING_PUSH_RANDOM_SHOW_INVALID //ZXB 2005-5-16 15:36
||((invalid&PROG_PLAY)&&prog_cnt && (!setup_IsSettingPassword()))
#endif
)
{
#ifdef IR_DBG
printf("<ir_invalid 13>\n");
#endif
need_run_cmd=0;
}
}
}else if(invalid&(0x01<<play_state))
{
#ifdef WINGSUM_DVD
//suxin add 2005-10-19 for not display "INVIALID KEY" when IRC_NULL
//wingsum TVComBo, some IR button used by TV but can be detected by DVD.
// so we can receive IRC_NULL
return;
#endif
need_run_cmd=0;
#ifdef IR_DBG
printf("<ir_invalid 12>\n");
#endif
#ifdef PMP_UI /////////////////yangli
// if(pFsJpeg->gifsState == FS_STATE_INIT)
need_run_cmd=1;
#endif
#if 0//def SUPPORT_SMF // add ; hf.pang ; 2006-11-07 //leijy marked 2007-4-20 20:54
if(rx == IRC_RETURN)
need_run_cmd = 1;
#endif
#ifndef SUPPORT_8202_DVB //if don't add define,DVB will compile error!
if(rx == IRC_DEFAULT_SETUP) // jiangxl for default key 2006-7-21 01:13下午
{
need_run_cmd = 1;
}
#endif
#ifdef SUPPORT_DPF_UI
need_run_cmd =1;
#endif
#ifdef DIRECT_ACCESS_MEDIA//added by wangwei, 2006-4-12 17:56
if(rx == IRC_SW_MEDIA)
{
need_run_cmd = 1;
}
#endif//DIRECT_ACCESS_MEDIA
#if defined(ALCO_8200P_MULTIKEY)&& defined(NEED_DIFF_IR_PANEL_KEY)
if(((play_state==VCD_STATE_OPEN)||(play_state==VCD_STATE_IDLE)) && (rx==IRC_PAUSE))
{
if(panel_key_flag && (!(panel_key_flag&(0x01<<2))))
need_run_cmd = 1;
}
#endif
/* alan added 02-05-13 for FUSS : return to main setup menu when press IRC_RETURN */
//terry,0516,
//setup ->3d
#ifdef FUSS_DVD
if( (full_scrn&SETUP)&&(rx==IRC_RETURN) ) need_run_cmd=1;
#endif
#ifdef IR_SWITCH_DVD_USB_CARD_AVIN_DVB
if(rx == IRC_DVD_USB_CARD_AVIN_DVB)
{
need_run_cmd = 1;
}
#endif
#ifdef DVB_IR_3D_ON
if((full_scrn&SOUND) && (rx==IRC_3D))
need_run_cmd = 1;
#endif
#if defined(SUPPORT_RECEIVER)//chenzhao20060117
if(((current_rcvr_mode!=RECEIVER_MODE_DVD)&&(0
||(rx == IRC_VOLUME_DN)
||(rx == IRC_VOLUME_UP)
||(rx == IRC_MUTE)
#if defined(SUPPORT_PRO_LOGIC_IN_RECEIVRR_MODE)
||(rx == IRC_PROLOGIC)
#endif
#if defined(SUPPORT_RECEIVER_EQ)//chenzhao20060117
||(rx == IRC_EQ)
#endif
#ifdef SUPPORT_EX_BASS_FUNC//chenzhao20060117
||(rx == IRC_EX_BASS)
#endif
#ifdef IR_SLEEP//chenzhao20060208
||(rx == IRC_SLEEP)
#endif
))
#ifdef ADJUST_VOLUME_WHEN_NODISC//chenzhao20060208
||((system_state == SYSTEM_NODISC)&&((rx == IRC_VOLUME_DN)||(rx == IRC_VOLUME_UP)))
#endif
)
need_run_cmd = 1;
#endif
#ifdef TITLE_RETURN_CANCEL_SETUP
if((full_scrn&SETUP)&&((rx==IRC_RETURN)||(rx==IRC_TITLE_RETURN)))
need_run_cmd=1;
#endif
}
else if( (invalid&HL)&&HL_exist)
{
#ifdef IR_DBG
printf("<ir_invalid 11>\n");
#endif
need_run_cmd=0;
#ifdef IR_SWITCH_DVD_USB_CARD_AVIN_DVB
if(rx == IRC_DVD_USB_CARD_AVIN_DVB)
need_run_cmd = 1;
#endif
}else if((invalid&STILL)&&still_timer)
{
#ifdef IR_DBG
printf("<ir_invalid 10>\n");
#endif
#ifdef NEED_DIFF_IR_PANEL_KEY
if(!((rx==IRC_PAUSE) && (panel_key_flag&(0x01<<0))))
#endif
need_run_cmd=0;
#ifdef IR_SWITCH_DVD_USB_CARD_AVIN_DVB
if(rx == IRC_DVD_USB_CARD_AVIN_DVB)
need_run_cmd = 1;
#endif
#ifdef DIRECT_ACCESS_MEDIA//added by wangwei, 2006-4-12 17:56
if(rx == IRC_SW_MEDIA)
{
need_run_cmd = 1;
}
#endif//DIRECT_ACCESS_MEDIA
}
#if defined(NINTAUS_DVD)
else if( (invalid&MENU)&&(is_menu()))//( psd_state==(PSD_SEL_LIST|PSD_PLAY_SEG)) )
#else
else if( (invalid&MENU)&&( psd_state==(PSD_SEL_LIST|PSD_PLAY_SEG)) )
#endif
{//terry,2002/9/11 04:08PM
//I'm not sure whether has bug.But I'm sure DVD non-hl menu may be pause/ff/bw/...
#ifdef IR_DBG
printf("<ir_invalid 9>\n");
#endif
need_run_cmd=0;
}
#if defined(CD_RIPPING_NO_GUI)||defined(SUPPORT_VCD_MIC_ENCODER) //xieruirong
#if defined(CD_RIPPING_NO_GUI)&&(!defined(SUPPORT_VCD_MIC_ENCODER))
if (((rx == IRC_SUBP)) &&(cd_type == CDDA)&&(play_state == VCD_STATE_NORMAL)) //zhongshan added for stop state can not ripping 2007-5-10 17:46//xieruirong
#elif (!defined(CD_RIPPING_NO_GUI))&&(defined(SUPPORT_VCD_MIC_ENCODER))
if (((rx == IRC_SUBP)) &&((cd_type == CDVCD10)||(cd_type == CDVCD20)||(cd_type==CDSVCD))&&(play_state == VCD_STATE_NORMAL))
#else
if (((rx == IRC_SUBP)) &&((cd_type == CDDA)||(cd_type == CDVCD10)||(cd_type == CDVCD20)||(cd_type==CDSVCD))&&(play_state == VCD_STATE_NORMAL))
#endif
{
printf_w("\nready ripping\n");
//if (!fs_is_activated_rip())
#ifdef RIPPING_MODE_SELECT//qinhua add,2006-5-30 10:59下午
if(new_app_state!=NEW_APP_STATE_WRITE)
{
if (full_scrn!=RIP_GUI)
show_rip_gui();
else
rip_func_exit();
return;
}
#endif
{
if( is_usb_media_exists()) //xieruirong modifed on 2007-12-12
fs_activate_rip();
if (fs_is_activated_rip())
{
printf_w("usb is ready---\n");
if( media_type == MEDIA_NOTHING )
//zxb 2007-12-7 17:54 it strange that media_type will be set MEDIA_NOTHING
//when open(in ircmd.c).This will cause halt in fat_get_free_size_ByteUnit();
media_type = MEDIA_CD;
#ifdef SUPPORT_VCD_MIC_ENCODER//xieruirong
if((cd_type==CDVCD20 || cd_type==CDSVCD )&&IsPBCOn())
{
sys_cmd=CMD_SELECT | cd_trk_now;
psd_cmd_parser();
}
else if((cd_type == CDVCD10)||((cd_type==CDVCD20 || cd_type==CDSVCD )&&!IsPBCOn()))
{
ircmd_post_func(CMD_SELECT | (cd_trk_now-1));
}
else
#endif
ircmd_post_func(CMD_SELECT | v11_trk_now);
//make sure media status is reset in InitializeCDPlayback()
program_end = 1;
}
else
{
psprintf(RegionValStr[REGION2], "NO DEVICE");
PrintOsdMsg(STR_OS_SPACE, REGION2, 1, 1);
}
}
return;
}
else if(((rx==IRC_EJECT)||(rx==IRC_POWER))&&(new_app_state == NEW_APP_STATE_WRITE) )//qinhua add,maybe close file first,2006-5-27 01:51下午
{
fs_file_close(pWriteFileDst); //wangmin 20061108
fs_new_app_reset();//xieruirong for reset when identify vcd when close after open
}
else if ((rx == IRC_ANGLE) && fs_is_activated_rip())
{
printf("speed=%d\n", fs_get_rip_speed());
if (fs_get_rip_speed() == 1)
{
//single->double speed
fs_set_rip_speed(2);
//psprintf(RegionValStr[REGION1], "RECORDER 2X");
}
else
{
//double->single speed
fs_set_rip_speed(1);
//psprintf(RegionValStr[REGION1], "RECORDER NORMAL");
}
}
#ifdef DIRECT_ACCESS_MEDIA
else if ((new_app_state==NEW_APP_STATE_WRITE)&&((rx==IRC_AB)||(rx==IRC_FORWARD)||(rx==IRC_BACKWARD) ||(rx==IRC_SETUP)||(rx==IRC_SW_MEDIA)))
#else
else if ((new_app_state==NEW_APP_STATE_WRITE)&&((rx==IRC_AB)||(rx==IRC_FORWARD)||(rx==IRC_BACKWARD) ||(rx==IRC_SETUP)||(rx==IRC_SW_MEDIA)))
#endif
//xieruirong added 071217 for forbidding entering setup and media select when ripping
{
invalid_key();
//PrintOsdMsg(STR_OS_SPACE, REGION1, 1, 1);
return;
}
#endif //CD_RIPPING_NO_GUI
#ifdef SUPPORT_FILE_DELETING
#ifdef FILE_DELETING_USE_GUI
if( Is_FileDeleteGui() )
{
if(FileDelete_Gui_Irhander(rx))
{
return;
}
}
if((rx == IRC_ANGLE)&&(media_type == MEDIA_CARD))
{
if((pFsJpeg->ControlArea == CNT_AREA_DIR)||(pFsJpeg->ControlArea == CNT_AREA_FILE))//wangmin061221
{
if(!((((pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG)&&(pFsJpeg->g_nJpegMode == JPEG_FULL_SCREEN_MODE))||(pFsJpeg->gifsFuncBtn == FS_FUNC_OTHER))&&(play_state != VCD_STATE_MP3_FILELIST)))
{
FileDeleting_Gui_Entrance();
return;
}
}
}
#else
if((rx == IRC_ANGLE)&&(media_type == MEDIA_CARD))
{
if(pFsJpeg->gifsState != FS_STATE_INIT)//muwei add ,when in PreStop or Stop,(Break from the FS GUI State),Don't Delete
if((pFsJpeg->ControlArea == CNT_AREA_DIR)||(pFsJpeg->ControlArea == CNT_AREA_FILE))//wangmin061221
{
if(!((((pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG)&&(pFsJpeg->g_nJpegMode == JPEG_FULL_SCREEN_MODE))||(pFsJpeg->gifsFuncBtn == FS_FUNC_OTHER))&&(play_state != VCD_STATE_MP3_FILELIST)))
{
printf_w( "Dir-%d, file-%d:%s\n", pFsJpeg->fsnav_dir_now,pFsJpeg->fsnav_trk_now + pFsJpeg->first_mp3_entry, iso9660_file[ pFsJpeg->fsnav_trk_now + pFsJpeg->first_mp3_entry].name );
printf_w( "Dir-%d, folder:%s\n", pFsJpeg->fsnav_dir_now, iso9660_dir[ pFsJpeg->fsnav_dir_now].name );
funcBtn = pFsJpeg->gifsFuncBtn;
pFsJpeg->gifsFuncBtn = FS_FUNC_DELETE;
AVD_SetMediaInterrupt();
return;
}
}
}
#endif
#endif
else if(invalid&(0x01<<(VCD_STATE_MAX-1+cd_type_loaded)))
{
#ifdef IR_DBG
printf("<ir_invalid 8>\n");
#endif
need_run_cmd=0;
#ifdef DIRECT_ACCESS_MEDIA//added by xg.qi, 2007-5-25
if(rx == IRC_SW_MEDIA)
{
need_run_cmd = 1;
}
#endif//DIRECT_ACCESS_MEDIA
#ifdef SUPPORT_HDD_ACCESS
if(rx==IRC_SUBP || IRC_TITLEMENU) {
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?