ir_parser.c
来自「OSD显示,单片机实现,ICCAVR! 代码风格严谨,为高人所写.我仅为了上传换」· C语言 代码 · 共 1,847 行 · 第 1/4 页
C
1,847 行
#endif//NEW_PARENTAL_GUI
#ifdef SETUP_SOME_KEY_NO_RESPONSE//eastech2030
//printf("pre test6\n");
if(rx==IRC_SETUP||rx==IRC_POWER||rx==IRC_EJECT) //add by TOM
ExitSetupPage(1);
else
{
if(rx!=IRC_STOP)
{
rx=IRC_NULL;
return;
}
else
{
if(full_scrn & CUSTM)
ExitSetupPage(1);
if(full_scrn & SETUP)
{
rx=IRC_NULL;
return;
}
}
}
#else
ExitSetupPage(1);
#endif//SETUP_SOME_KEY_NO_RESPONSE
#if defined(SDRAM_16Mb_Mode) && !defined(STOP_SHOW_SETUP)//libing modify it 2005-6-17 13:17
//avoid the bug when otherIR key (except SETUP),
//"DISPLAY" cause error.
//zhaoyanhua add 2003-11-13 11:36
/*
if (0)//old_t_disp)
{
t_disp=old_t_disp;
DispPolling(3);
}
*/
resumeMSF=0;//nono 4-1-16 15:28
#endif
//#endif
}
#ifdef SUPPORT_FUNCTION_MENU
else if(full_scrn & SETUP_PLUS)
{
ExitSetupPage(0);
}
#endif
else if(full_scrn & GOTO)
#ifdef DIV_GOTO_DISPLAY//zhaoyanhua add 03-11-5 22:39
ExitGOTOPage();
#else
ircmd_goto();
#endif
#ifdef SUPPORT_REP_READ
else if(full_scrn & READ)
{
CancelRead();
}
#endif
else if(full_scrn & MARK) //Jeff 20020416
{
// alan 0429 solve goto fade out and fade in again when full_scrn in mark mode
if (rx != IRC_GOTO)
ircmd_book();
}
#if (defined VIRTUAL_KEYBOARD) && (defined DIV_GOTO_DISPLAY) //zhaoyanhua add 2004-2-16 16:58
else if (full_scrn & KEYBOARD)
{
ircmd_virtual_keyboard();
}
#endif
#ifdef SWITCH_CD_CARD_USB//liweihua 2004-6-13 14:51
else if(full_scrn & SWITCH_GUI)
{
ircmd_switch_cd_card_usb();
}
#endif
else
ClearOsdMsg(1);
#ifdef RETAIN_3D_IN_PREV_NEXT
if((full_scrn&SOUND) && !((rx==IRC_PREV || rx==IRC_NEXT)) //wuxiaofeng 2004-5-24
#ifdef CF_CARD_WRITE
|| (!(full_scrn & PERIPHERAL)) //wuxiaofeng if define card, use preview for IR input
#endif
)
#else
#ifdef CF_CARD_WRITE
if(!(full_scrn & PERIPHERAL)) //wuxiaofeng if define card, use preview for IR input
#endif
#endif
//wanghaoying changed 2003-12-9 14:21
full_scrn = 0;
#ifdef SOUND_NO_KEYPAGE
bEqDisplay = 0;
#endif
//terry,0513,yuxing ,
//bug1: cdda , display->goto->step or slow
//bug2: cdda , goto->step , goto highlight isn't cleared.
display_again=1;
} //if(StateChkKey[rx] & full_scrn)
} //if(full_scrn)
} //if(need_run_cmd!=2)
#ifndef IR_TOOL
#ifdef IR_DBG
printf("invalid:%x need_run_cmd:%x play_state:%x\n",invalid,need_run_cmd,play_state);
#endif
#endif
if((rx > IRC_P10) && (rx != IRC_SELECT)) {
#ifdef SUPPORT_DISPLAY_MENU
if(!In_Goto_Menu())
#endif//end #ifdef SUPPORT_DISPLAY_MENU
init_ir_num();
}
#ifdef USER_VERSION_INFORMATION
extern BYTE check_password_flag;
#endif
if(need_run_cmd==1)
{
//nono 2-6-2 15:09
//#ifndef FUSS_DVD
if(invalid&CN_REP)
cancel_rep();
//#endif
if( (invalid&CN_INTRO)&&bIntro )
{
bIntro=0;
}
if( (rx==IRC_EJECT)&&(dev_status_flag&ATAPI_WAIT_TIME_OUT))
{
keep_cmd_code=rx;
if(!is_user_opened()) {
OSD1000ISP_STATUS(OSDISP_OC_OPEN, OSDIR_OPEN);
PrintOsdMsg(STR_OS_OPEN,REGION1,0,0);
}
} else
{
//terry,0512 , avoid show error osd msg
ir_osd_post_show=1;
#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]();
#ifdef USER_VERSION_INFORMATION //sunzhh add for after showing USER_VERSION_INFORMATION,there is hand showing (east)
if(((RegionOnOff[1][2]== STR_OS_NO)&&(check_password_flag == 1))||((rx==IRC_SETUP)&&(play_state==VCD_STATE_OPEN)))//||(rx==IRC_SETUP)))//(play_state==VCD_STATE_OPEN))
{
ir_osd_post_show = 0;
check_password_flag =0;
}
#endif
if(ir_osd_post_show>1) {
//#ifdef DVDRELEASE//2-7-29 16:00
osdshow(1,osd_buf);//2-8-1 20:15
//#else
//osd_tog_region(1,OSD_ON);
//#endif
}
ir_osd_post_show=0;
}
//terry,0513,reduce code
display_again=1;
} else if(need_run_cmd!=2)
{
invalid_key();
}
ShowDSPCodecNameByAngleKey( rx ); // 2005/02/18 yltseng
ChangeFontByAngleKey( rx ); // 2005/03/10 yltseng
if( (display_again)&&(t_disp) )
{//terry,0513 ,reduce code
t_disp=t_disp%10;
t_disp+=10;
}
#ifdef NEW_STYLE_SETUP
printf("===>logo_type:%x sys_cmd:%x setup_state:%x full_scrn:%x\n",logo_type,sys_cmd,setup_state,full_scrn & SETUP);
//if (full_scrn & SETUP)//terry,2003/9/13 01:04AM
{
#ifdef SDRAM_16Mb_Mode
if( (logo_type == 1)&&(play_state!=VCD_STATE_NORMAL)&&(prog_state==0)&&((cd_type_loaded!=CDROM)||(Is_MP3_STATE()==1)) )
#else
if( (logo_type == 1)&&(play_state!=VCD_STATE_NORMAL)&&(setup_state==0)&&((cd_type_loaded!=CDROM)||(Is_MP3_STATE()==1)) )
#endif //SDRAM_16Mb_Mode
ShowTitle();
}
#endif// NEW_STYLE_SETUP
}
/* wanghaoying marked 2004-7-1 16:51, for not use any more
#if defined(SUPPORT_TUNER) //freyman add 2002-8-28 21:40
void ircmd_power_volume(BYTE rx)
{
extern void set_volume(BYTE x);
if(rx==IRC_VOLUME_UP)
if(audio_volume<15)
audio_volume++;
if(rx==IRC_VOLUME_DN)
if(audio_volume>0)
audio_volume--;
set_volume(2*audio_volume+50);
#ifdef VFD_VOLUME_DISPLAY
timeout_vfd = 2*VFD_TIMEOUT;
vfd_set_volume(0);
#endif
}
#endif
*/
#include "password.c"
#ifdef SUPPORT_APOGEE_AMP //huziqin
extern BYTE amp_enter_flag;
#endif
#ifdef SUPPORT_RECEIVER //huziqin 2004-2-26
/*
BYTE call_ir_func_receiver_hook(BYTE rx)
I seperate this function from call_ir_func(),to make code
easy to read.
return 0-->don't return
return 1-->return
*/
#if defined(SUPPORT_TUNER_MV114) || defined(SUPPORT_TUNER_ALPS)
extern void tuner_key();
#endif
#if defined(SUPPORT_TUNER_MV114) || defined(SUPPORT_TUNER_ALPS)
void call_ir_func_tuner(BYTE rx)
{
if((system_state== SYSTEM_DOING_TUNER)&&(!(full_scrn & SOUND)))
{
#if defined(XINGQIU_DVD_RECEIVER)//xyy 2004-8-5
if(rx==IRC_PREV||rx==IRC_NEXT||rx==IRC_BACKWARD||rx==IRC_FORWARD||rx==IRC_LEFT||rx==IRC_RIGHT||rx==IRC_SELECT||
rx==IRC_MUTE||rx==IRC_RCVR_BAND||rx==IRC_GOTO||rx==IRC_SETUP||rx==IRC_AUD_LANGUAGE||rx==IRC_CLEAR||rx==IRC_TITLEMENU)//xyy 2004-5-24 9:38
#elif defined(ORITRON_DVD_RECEIVER)//xyy 2004-8-14
if(rx==IRC_PREV||rx==IRC_NEXT||rx==IRC_BACKWARD||rx==IRC_FORWARD||rx==IRC_LEFT||rx==IRC_RIGHT||
rx==IRC_MUTE||rx==IRC_RCVR_BAND||rx==IRC_PLAY_SELECT||rx==IRC_RCVR_EQ||rx==IRC_P_SCAN
|| rx==IRC_VFD_LEFT || rx==IRC_VFD_RIGHT)//xyy 2004-5-24 9:38
#elif defined(ORITRON_RECEIVER_6001) //hongfeng 2005-08-05
if(rx == IRC_UP||rx == IRC_DOWN||rx == IRC_LEFT||rx == IRC_RIGHT
||rx == IRC_AB||rx == IRC_SELECT||rx == IRC_MUTE||rx == IRC_AUD_LANGUAGE)
//||rx == IRC_PLAYMODE)
#else
#ifndef SUPPORT_Radio_NEW_UI //wuzhj 2004/12/10
if(rx==IRC_UP||rx==IRC_DOWN||rx==IRC_LEFT||rx==IRC_RIGHT
||rx == IRC_ZOOM||rx == IRC_SELECT||rx == IRC_MUTE||IRC_PROGRAM == rx
||IRC_FORMAT == rx )
#else
//printf("-=----------------------------------\n");
//printf("%x %x\n",IRC_VOLUME_DN,rx);
if(rx==IRC_UP||rx==IRC_DOWN||rx==IRC_LEFT||rx==IRC_RIGHT
||rx == IRC_ZOOM||rx == IRC_SELECT||rx == IRC_MUTE||IRC_PROGRAM == rx
||IRC_FORMAT == rx||IRC_PREV== rx||IRC_NEXT== rx||IRC_PAUSE== rx
||IRC_PROLOGIC== rx ||IRC_VOLUME_DN== rx||IRC_VOLUME_UP== rx)
#endif
#endif
{
//printf("-=----------------------------------\n");
//printf("%x %x\n",IRC_STEP,rx);
//if(amp_enter_flag == 0)
tuner_key(rx);
printf(" invalid key ?\n");
return;
}
#if defined(SUPPORT_STATION_INPUT)//xyy 2004-8-5
else if(rx<=IRC_10)
irc_func_table[(BYTE)rx]();
#endif
}
}
#endif
#ifdef AVOID_READDISC_WHEN_STARTUP //xyy add for Oritron
extern UINT16 uStartCounter;
extern UINT16 uCounterFlag;
#endif
BYTE call_ir_func_receiver_hook(BYTE rx)
{
if((system_state == SYSTEM_DOING_AV1)||(system_state == SYSTEM_DOING_AV2)\
||(system_state == SYSTEM_DOING_SPDIF)
|| (system_state == SYSTEM_DOING_TUNER))//xyy add for Oritron 2004-11-8 15:14
{
if(rx == IRC_EJECT)
{
return 1;
}
}
//for invalid state hongfeng 2005-07-14
if(((current_rcvr_mode == RECEIVER_MODE_DVD)&&(rx == IRC_RCVR_SELECT_DVD)) \
||((current_rcvr_mode == RECEIVER_MODE_AV1)&&(rx == IRC_RCVR_SELECT_AV1)) \
||((current_rcvr_mode == RECEIVER_MODE_AV2)&&(rx == IRC_RCVR_SELECT_AV2)) \
||((current_rcvr_mode == RECEIVER_MODE_TUNER)&&(rx == IRC_RCVR_SELECT_TUNER)) \
||((current_rcvr_mode == RECEIVER_MODE_SPDIF)&&(rx == IRC_RCVR_SELECT_SPDIF)))
{
invalid_key();
return 1;
}
#ifdef RECEIVER_USE_PSCAN_BUTTON
if (rx == IRC_P_SCAN)
{
rx = IRC_RCVR_NEXT_MODE;
}
#endif
#ifdef RECEIVER_USE_GAME_KEY_SWITCH_MODE //hongfeng 2005-08-09
if (rx == IRC_GAME)
{
rx = IRC_RCVR_NEXT_MODE;
}
#endif
#if 1 //TAS_5026_PWM//wuzhj 2004/10/09
#ifndef SUPPORT_Radio_NEW_UI //wuzhj 2004/12/10
if(IRC_ANGLE==rx)
{
#ifdef MONE_DSP24_SHOW_CODEC_NAME_BY_ANGLE_KEY //hongfeng add for receiver 2005-06-16
ShowDSPCodecNameByAngleKey( rx ); // 2005/02/18 yltseng
#else
subvol_next_channel();
#endif
return 1;
}
#else
if(IRC_ANGLE==rx)
{
if(system_state == SYSTEM_DOING_TUNER)
{
return 1;
}
else
{
#ifdef MONE_DSP24_SHOW_CODEC_NAME_BY_ANGLE_KEY //hongfeng add for receiver 2005-06-16
ShowDSPCodecNameByAngleKey( rx ); // 2005/02/18 yltseng
#else
subvol_next_channel();
#endif
return 1;
}
}
#endif
#endif
#ifdef RECEIVER_USE_DISPLAY_BUTTON
if (rx == IRC_DISPLAY)
{
rx = IRC_RCVR_ANALOG_DIGITAL;
}
#endif
#ifdef DOLBY_AMP_VOLUME_CTRL
//wuzhj 2004/12/1
#ifndef SUPPORT_Radio_NEW_UI //wuzhj 2004/12/10
if((rx == IRC_VOLUME_DN)||(rx == IRC_VOLUME_UP))
{
//ircmd_prologic();
return 0;
}
#endif
#ifdef SUPPORT_BASS_TREBLE
if(rx == IRC_SET_BASS)
{
ircmd_set_bass();
return 1;
}
if(rx == IRC_SET_TRE)
{
ircmd_set_treble();
return 1;
}
#endif
#endif
#ifdef USE_PROLOGIC_II_KEY
//wuzhj 2004/12/1
#ifndef SUPPORT_Radio_NEW_UI //wuzhj 2004/12/10
if(rx == IRC_PROLOGIC)
{
//ircmd_prologic();
return 0;
}
#endif
#endif
#if defined(AMP_SUPPORT_EQ)
if(rx == IRC_3D)
{
amp_toggle_EQ();
return 1;
}
#endif
#ifdef SUPPORT_RECEIVER_EQ //hongfeng 2005-02-19
if(rx == IRC_3D)
{
ircmd_3dsound();
return 1;
}
if(full_scrn == SOUND)
{
if(rx == IRC_RIGHT)
{
ircmd_right();
return 1;
}
if(rx == IRC_LEFT)
{
ircmd_left();
return 1;
}
if(rx == IRC_UP)
{
ircmd_up();
return 1;
}
if(rx == IRC_DOWN)
{
ircmd_down();
return 1;
}
if(rx == IRC_SELECT)
{
ircmd_select();
return 1;
}
}
#endif
// Simon: 1/7/2004
// If we eject, switch automatically back to DVD mode
if ((rx == IRC_EJECT) && (current_rcvr_mode != RECEIVER_MODE_DVD))
{
system_state = SYSTEM_EJECT_CHANGE;
return 1;
}
//xyy delete 2004-8-17
/*
#if defined(BAND_SWITCH_KEY)
if((system_state!= SYSTEM_DOING_TUNER)&&(rx==IRC_RCVR_BAND))
{
invalid_key();
return 1;
}
#endif
*/
if ((rx == IRC_RCVR_NEXT_MODE)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?