?? ir_drv.c_org
字號:
#endif
#ifdef QISHENG_DVD // alan, 2003/9/7 06:30PM
if (pressed==IRC_PLAY)
{
if (not_rdy_times>=2)
{
rep_ir_times=0;
not_rdy_times=0;
pressed=IRC_NULL;
if(dvd_menu_play==1)
{//terry,2003/9/12 02:35PM
if(IsPBCOn()||(cd_type_loaded==CDDVD))
{
ircmd_playmode_toggle();
return IRC_NULL;
}
}
return Call_Ir_Fun(0x55); // call IRC_Play, at ir_mapcode position 0x55
} else {
not_rdy_times++;
}
} else if (pressed==IRC_DEFAULT_SETUP)
{
rep_ir_times=0;
pressed=IRC_NULL;
return Call_Ir_Fun(0x56); // call IRC_DEFAULT_SETUP, at ir_mapcode position 0x56
}
#endif
#if defined(HOLD_VOL_KEY_FAST_REPEAT)
if(ir_key_clone_times>0)//insert clone key
{
ir_key_clone_times--;
rx = TRANS_IR_CODE(rx);
}
else
#endif
return IRC_NULL;
}
else
{
//terry,2003/7/14 01:24PM
if ((rep_ab_mode==REPEAT_FIND_B) &&
(sys_cmd==(CMD_FUNC|CMD_FUNC_REPAB)) &&
(cd_type_loaded != CDROM)) // Robert 2004/02/06
{
//when system(nav.c) post CMD_FUNC_REPAB to navigation, and navigation tries to exit MediaMain and enter again
//In the meanwhile, rep_ab_mode can't be set to REPEAT_AB_IDLE
//For VCD, system will playtrack and then correct s_msf
//if rep_ab_mode==REPEAT_AB_IDLE, s_msf will not be corrected, and it will jump to the start of this track
printf("waiting for navigator\n");
return IRC_NULL;;
}
unCustId=IOP_IR_DATA();
regs0->iop_data[IR_PORT] = rx & (~IR_RDY);
#ifdef IR_TOOL
if (watch_ir_id_value==1)
{
watch_ir_custm_id(unCustId);
return IRC_NULL;
}
#else
watch_ir_custm_id(unCustId);
#endif
if(CHK_CUST_ID(unCustId))
{
#if 1//def IR_ADDR_PATT_ERR_SHOW_INVALID sunzhh 070412 mark.
show_ir_custid_err();
#elif !defined( SUPPORT_DPF_UI)
show_ir_custid_err(unCustId); //luoliuyi modify 2006-8-17
#endif
return IRC_NULL;
}
#ifdef XM_MODEL //fcr 2005-11-3 17:44
XMkey_release_hold=4;
#endif
#if defined(ONLY_VOLUME_REPEAT)||defined(HOLD_VOL_KEY_FAST_REPEAT)
rx = TRANS_IR_CODE(rx);
#ifdef IR_M3004
if((ir_mapcode[(BYTE) rx]==PANEL_EJECT)||(ir_mapcode[(BYTE) rx]==IRC_EJECT))
{
if(!((regs0->iop_data[IR_PORT])&IR_REPEAT))
regs0->iop_data[IR_PORT]|=IrRepeatRate(4);
}
else if((regs0->iop_data[IR_PORT])&IR_REPEAT)
{
regs0->iop_data[IR_PORT]&=~ IrRepeatRate(4);
}
#endif//#ifdef IR_M3004
#endif//#if defined(ONLY_VOLUME_REPEAT)||defined(HOLD_VOL_KEY_FAST_REPEAT)
#ifdef HOLD_VOL_KEY_FAST_REPEAT
if( ((regs0->iop_data[IR_PORT])&IR_REPEAT) &&
(rep_ir_hold_times>=(
((ir_mapcode[(BYTE) rx]!=IRC_VOLUME_UP)&&(ir_mapcode[(BYTE) rx]!=IRC_VOLUME_DN))
?MIN_IR_REPEAT_TIME_N:MIN_IR_REPEAT_TIME)))
#else
if( (regs0->iop_data[IR_PORT])&IR_REPEAT )
#endif
{
#ifdef OP_DVD5121_PANEL //qinhua ,add 2005-9-13 22:55
if (count==0)
{
count+=1;
printf("\n\n============ count1: ==============%d\n\n",count);
rep_ir_times++;
}
else if (count<6)
{
count++;
printf("\n\n============ count2: ==============%d\n\n",count);
return IRC_NULL;
}
else
{
rep_ir_times++;
count=1;
printf("\n\n============ count3: ==============%d\n\n",count);
}
#else//#ifdef OP_DVD5121_PANEL
rep_ir_times++;
#ifdef XM_MODEL //fcr 2005-11-3 17:39
if(rep_ir_times>10)rep_ir_times=10;
#endif
#endif//#ifdef OP_DVD5121_PANEL
#if defined(HOLD_VOL_KEY_FAST_REPEAT)
if((ir_mapcode[(BYTE) rx]==IRC_VOLUME_UP)||(ir_mapcode[(BYTE) rx]==IRC_VOLUME_DN))
ir_key_clone_times=IR_CLONE_TIME;
else
{
rep_ir_hold_times=0;
ir_key_clone_times=0;
}
#endif//#if defined(HOLD_VOL_KEY_FAST_REPEAT)
//printf("rep:%d bIrSkipState:%d\n",rep_ir_times,bIrSkipState);
#ifdef NEXT_FORWARD_IN_A_KEY
if(bIrSkipState)
{//bw:1 ff:2
NEXT_FORWARD_IN_A_KEY_long_time(rx);
return;//0;//0 maybe wrong , but a non-void function must return a value
}
#endif//NEXT_FORWARD_IN_A_KEY
#if defined(ANGLE_GOTO_IN_A_KEY)||defined(TITLE_RETURN_IN_A_KEY)
if(bIrSkipState1)
{
bIrSkipCnt1 = 0;
#ifdef TITLE_RETURN_IN_A_KEY
if(rep_ir_times<2)
#else
if(rep_ir_times<=2)
#endif
{
rep_ir_times=2;
#ifdef TITLE_RETURN_IN_A_KEY
rx=IRC_RETURN;
#else
rx=IRC_ANGLE;
#endif
//printf("run rx:%d \n",rx);
ircmd_pre_paser(rx);
}
#ifndef TITLE_RETURN_IN_A_KEY
else
if(rep_ir_times>3)
{
rep_ir_times = 1;
}
#endif
return;//0;//0 maybe wrong , but a non-void function must return a value
}
#endif//ANGLE_GOTO_IN_A_KEY
#ifdef SLOW_ZOOM_IN_A_KEY
if(bIrSkipState2)
{
bIrSkipCnt2 = 0;
if(rep_ir_times<=2)
{
rep_ir_times=2;
rx=IRC_SLOW;
ircmd_pre_paser(rx);
}
else if(rep_ir_times>3)
{
rep_ir_times = 1;
}
return;//0 maybe wrong , but a non-void function must return a value
}
#endif
#ifdef QISHENG_DVD // alan, 2003/9/7 06:31PM
not_rdy_times=0;
if (rep_ir_times>=4)
{
/*if (irc_value==IRC_STOP)
{
pressed=IRC_POWER;
irc_value=IRC_NULL;
}*/
if (irc_value==IRC_DEFAULT_SETUP)
{
pressed=IRC_DEFAULT_SETUP;
irc_value=IRC_NULL;
}
}
#endif
#ifdef ONLY_VOLUME_REPEAT//wangap add 04/5/20
if((ir_mapcode[(BYTE) rx]!=IRC_VOLUME_UP)&&(ir_mapcode[(BYTE) rx]!=IRC_VOLUME_DN))
return IRC_NULL;
#elif defined(ONLY_COMPUND_KEY_REPEAT)&&defined(NEXT_FORWARD_IN_A_KEY)&&defined(ANGLE_GOTO_IN_A_KEY)
if((ir_mapcode[(BYTE) rx]!=IRC_PREV)&&(ir_mapcode[(BYTE) rx]!=IRC_NEXT)&&(ir_mapcode[(BYTE) rx]!=IRC_ANGLE))
return IRC_NULL;
#elif defined(ONLY_VOL_DIR_REPEAT)//chenzhao20051013
if((ir_mapcode[(BYTE) rx]!=IRC_VOLUME_UP)&&(ir_mapcode[(BYTE) rx]!=IRC_VOLUME_DN)
&&(ir_mapcode[(BYTE) rx]!=IRC_UP)&&(ir_mapcode[(BYTE) rx]!=IRC_DOWN)
&&(ir_mapcode[(BYTE) rx]!=IRC_LEFT)&&(ir_mapcode[(BYTE) rx]!=IRC_RIGHT)
&&(ir_mapcode[(BYTE) rx]!=IRC_SELECT))
return IRC_NULL;
#endif
#ifdef IR_NO_REPEAT
return IRC_NULL;
#endif
}
else //have key no repeat
{
#ifdef HOLD_VOL_KEY_FAST_REPEAT
ir_key_clone_times=0;
if((regs0->iop_data[IR_PORT])&IR_REPEAT)
{
rep_ir_hold_times++;
return IRC_NULL;
}
else
{
rep_ir_hold_times=0;
}
#endif
rep_ir_times=0;
}
}
save_srn_start_t = get_rtc_val();
#if !(defined(ONLY_VOLUME_REPEAT)||defined(HOLD_VOL_KEY_FAST_REPEAT))
rx = TRANS_IR_CODE(rx);
#endif
#ifdef IR_TOOL
adj_ir_rxcode(unCustId==IRAddr,&rx,0x10);
#else
adj_ir_rxcode(unCustId==IR_ADDR_PATT,&rx,0x10);
#endif
adj_ir_rxcode(unCustId==IR_ADDR_PATT2,&rx,0x15);
#ifdef IR_TOOL
if (watch_ir_value==1)
{
watch_ir_id(rx);
return IRC_NULL;
}
#else
watch_ir_id(rx);
#endif
#ifdef QISHENG_DVD // alan, 2003/9/7 06:32PM
if (pressed==IRC_NULL)
{
irc_value = ir_mapcode[(BYTE) rx];
/*if (irc_value==IRC_STOP)
{
pressed=IRC_STOP;
return IRC_NULL;
}*/
if (irc_value==IRC_DEFAULT_SETUP)
{
pressed=IRC_PLAY;
return IRC_NULL;
}
}
#endif
#ifdef BBK_DV961_DVD // fengjl edit 4-2-5 19:56
//NOTE:
//need contious 3s to change video output.
//zhaoyanhua add 03-10-22 21:36
if( (ir_mapcode[(BYTE) rx] == IRC_ONLY_P_SCAN)
#ifdef ONLY_VGA_KEY
||(ir_mapcode[(BYTE) rx] == IRC_VGA)
#endif
||(ir_mapcode[(BYTE) rx] == IRC_INTERLACE)
)
{
if(rep_ir_times <= 3)
return;
}
#endif//BBK_DVD
#ifdef BOOMBOX_NOT_USE_SOME_IR_KEYS//nono 2003-11-17 1:02 for YILI.
if( (ir_mapcode[(BYTE) rx] == IRC_POWER)
||(ir_mapcode[(BYTE) rx] == IRC_MUTE)
||(ir_mapcode[(BYTE) rx] == IRC_VOLUME_UP)
||(ir_mapcode[(BYTE) rx] == IRC_VOLUME_DN)
)
{
return;
}
#endif//BOOMBOX_NOT_USE_SOME_IR_KEYS
#ifdef PORTABLE_DVD //rbhung for Portable DVD HOLD IR
#ifdef HOLD_KEY_DETECT
if(hold_state)
return IRC_NULL;
#endif
#endif
#ifdef SYBER_NATIVE_DVD_TYPE
if((rx == 0x1c) ||(rx == 0x0b) || (rx == 0x07) ||(rx == 0x13)
||(rx == 0x00) ||(rx == 0x40) || (rx == 0x14) || (rx == 0x47) || (rx == 0x48))
return 0;
#endif //Maoyong 2003/12/17 16:20 for mask syber DVD vol+-, stdby and so on
#ifdef IR_SUNPLUS_DPF //Jack 06/12/06 moved to here for native game
rx = rx & 0x1f;
#endif
#ifdef SUPPORT_DVD_NATIVE_GAME //linrc for NATIVE_GAME 2005-10-18 13:54
if(system_state==SYSTEM_DVDGAME)
{
if(Dvb_ircmd_pre_parser(rx))
return 0;
}
#endif
#ifdef SLOW_SOME_KEY_IN_MALATA_IR
#if 0
if((ir_mapcode[(BYTE) rx]==IRC_SETUP)||(ir_mapcode[(BYTE) rx]==IRC_DOWN)
||(ir_mapcode[(BYTE) rx]==IRC_UP)||(ir_mapcode[(BYTE) rx]==IRC_LEFT)
||(ir_mapcode[(BYTE) rx]==IRC_RIGHT)||(ir_mapcode[(BYTE) rx]==IRC_DVB_DVD))
#endif
if(ir_mapcode[(BYTE) rx] > 0)
{
if(clear_key == 1)
{
return IRC_NULL;
}
else
{
clear_key = 1;
clear_count = SLOW_TIME;
}
}
#endif
#ifdef SUPPORT_SHOW_KEYLOCK_WARNING//tianye 200607
if(rx == LOCKKEY_VALUE)
//if(ir_mapcode[(BYTE) rx] == IRC_1)
{ //IRC_1
psprintf(RegionValStr[REGION1],WARING_STRING);
if(Is_Dvb_State())
{
DVB_PrintOsdMsg(STR_OS_SPACE, REGION1, 1, 1);
}
else
{
PrintOsdMsg(STR_OS_SPACE, REGION1, 1, 1);
}
return 0;
}
#endif//end=> #ifdef SUPPORT_SHOW_KEYLOCK_WARNING
#ifdef IPTV_MODEL
return 0;
#endif
#ifdef SUPPORT_8202_DVB //Maoyong 2005-6-1 10:47
#if defined(SUPPORT_DVB_GUI_NEW)&&defined(DVB_IR_3D_ON)
if((Is_Dvb_State() && InDVB3DNow(rx)))
#elif defined(SUPPORT_DVB_GUI_NEW)
if(Is_Dvb_State()) //David for 8202/6600
#endif
{
#ifdef MALATA_KEY
BYTE ir_num = 0;
ir_num = malata_key_check(ir_mapcode[(BYTE) rx]);
if(ir_num)
{
if(Dvb_ircmd_pre_parser(ir_num))
{
return 0;
}
}
else
#endif//end=>#ifdef MALATA_KEY
if(Dvb_ircmd_pre_parser(ir_mapcode[(BYTE) rx]))
return 0;
}
#endif //SUPPORT_8202_DVB
#if 0//def SUPPORT_SHOW_KEYLOCK_WARNING////tianye mark 200607
if(rx == LOCKKEY_VALUE)
//if(ir_mapcode[(BYTE) rx] == IRC_1)
{ //IRC_1
psprintf(RegionValStr[REGION1],WARING_STRING);
PrintOsdMsg(STR_OS_SPACE, REGION1, 1, 1);
return 0;
}
#endif//end=> #ifdef SUPPORT_SHOW_KEYLOCK_WARNING
#ifdef DISPLAY_INDIVIDUAL_SPK_VOLUME//2005-4-19 10:23 zhoulin
if(regs0->iop_data[3]&0x000f)
{
show_channel_msg( (regs0->iop_data[3]&0x000f), rx);
regs0->iop_data[3]=0x0000;
return 0;
}
#endif
#ifdef NEED_DIFF_IR_PANEL_KEY
if(panel_key_flag)
panel_key_flag |= (0x01<<2);
#endif
return Call_Ir_Fun(rx);
#endif
}
#ifdef SUPPORT_SPI
#include "spi.c"
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -