📄 ui_input_uart.c
字号:
Initialize_Setting( uicc_initial_num );
}
else if ((wUARTKey == 0xff) || (wUARTKey == 0xee))
{
Putch2('+');
Initialize_Setting( 0xcf );
}
}
#endif
return UIKey;
}
// else if (wUARTKey == 'y')
// UIKey = UICC_CLRPASS; //Release Parental Lock
// else if (wUARTKey == 'z')
// UIKey = UICC_VERSION; //Version OSD
// else if (wUARTKey == 'c')
// UIKey = UICC_SUBTITLE_DISABLE; //Subtitle prohibit on
// else if (wUARTKey == 'r')
// UIKey = UICC_SUBTITLE_ENABLE; //Subtitle prohibit off
// else if (wUARTKey == 'i')
// UIKey = UICC_CLRPASS; //Release Parental Lock
// else if (wUARTKey == 't')
// UIKey = UICC_PROGRESSIVE; //Progressive on/off
else if (wUARTKey == 's')
{
int time_out = 50;
Putch2('+');
while( !(inport(SxSTS) & SER_RDR) && (time_out != 0) )
{
time_out --;
usleep( 20000L );
}
if (time_out)
{
wUARTKey = Getch2();
#if 0
switch (wUARTKey)
{
case '1':
if (colorbar_status == FALSE){
if (gps->prog_inter_select == 0)
{
set_color_bar( TRUE );
colorbar_status = TRUE;
}
else
{
PROHIBIT;
}
} else {
set_color_bar( FALSE );
colorbar_status = FALSE;
}
Putch2('+');
break;
}
#endif
}
return UIKey;
}
// else if (wUARTKey == '?')
// UIKey = UICC_TRAYLOCK; //Tray lock control
if (UIKey != UICC_NULL) {
if ( return_char != '#')
Putch2(return_char);
if (!return_cmd)
UIKey = UICC_NULL;
}
return UIKey;
}
void set_reply_value(void)
{
extern DEC_LL_SEQHDR_INFO DecLL_SeqHdrInfo;
extern BYTE CPS_TY;
reply_value_0 = 0xff;
reply_value_1 = 0xff;
reply_value_2 = 0xff;
reply_value_3 = 0x00;
reply_value_4 = 0x00;
switch(DeviceManager_GetDeviceState(DEVICE_DISC))
{
case DEVICE_LOADING:
if (return_tray_state_opening == 0)
{
reply_value_3 |= REPLY_VALUE_READING; //DiscType:Reading,PlayStatus:Reserved
reply_value_4 |= REPLY_VALUE_OTHER_STREAM;
}
else
{
reply_value_3 |= REPLY_VALUE_NO_DISC;
reply_value_4 |= REPLY_VALUE_OTHER_STREAM;
}
break;
case DEVICE_NO_DEVICE:
reply_value_3 |= REPLY_VALUE_NO_DISC; //DiscType:Reserved,PlayStatus:Reserved
reply_value_4 |= REPLY_VALUE_OTHER_STREAM;
break;
#if 0
case MST_UPDATE_DISC :
if (get_power_on_first() == TRUE)
reply_value_3 |= REPLY_VALUE_READING;
else
reply_value_3 |= REPLY_VALUE_UPDATE; //DiscType:Incorrect,PlayStatus:fw update
reply_value_4 |= REPLY_VALUE_OTHER_STREAM;
break;
#endif
case DEVICE_UNKNOWN:
reply_value_3 |= REPLY_VALUE_UNKNOWN; //DiscType:Incorrect,PlayStatus:Reserved
reply_value_4 |= REPLY_VALUE_OTHER_STREAM;
break;
//case MST_POWER_OFF :
//case MST_POWER_DOWN :
case DEVICE_TRAY_OPENING:
return_tray_state_opening = 0;
case DEVICE_TRAY_CLOSING:
case DEVICE_TRAY_OPENED:
reply_value_3 |= REPLY_VALUE_NO_DISC; //DiscType:Reserved,PlayStatus:Reserved
reply_value_4 |= REPLY_VALUE_OTHER_STREAM;
break;
case DEVICE_READY:
reply_value_3 |= REPLY_VALUE_DVD;
switch (g_disc_type){
case DEC_DISC_TYPE_DVD_VIDEO :
case DEC_DISC_TYPE_DVD_AUDIO :
#if 0
if ((last_error_code == DEC_ERROR_PAL_TO_NTSC) ||
(last_error_code == DVDNAV_ERR_INVALID_REGION) ||
(last_error_code == DVDNAV_ERR_PARENTAL_LEVEL_PROHIBIT)) {
reply_value_3 |= REPLY_VALUE_DVD_ERR;
}
#endif
if (gcs.pstate != PST_STOP)
{
#if 0
#ifdef DUBBING_POLICY
if(CPS_TY==0){
if(((gns.dvd.ucCurrCGMS_Mode & 0xb0) == 0xb0) &&
(gns.dvd.ucCurrCGMS_Mode != 0xff) &&
(gns.dvd.pci.previous_APSTB != 0) &&
(gns.dvd.pci.previous_APSTB != 0xffff) )
reply_value_3 |= REPLY_VALUE_MACROVISION;
} else{
if(((gns.dvd.ucCurrCGMS_Mode & 0x80) == 0x80) &&
(gns.dvd.ucCurrCGMS_Mode != 0xff) )
{
if(((gns.dvd.ucCurrCGMS_Mode & 0x30) != 0x00) &&
(gns.dvd.ucCurrCGMS_Mode != 0xff) )
reply_value_3 |= REPLY_VALUE_MACROVISION;
else if ((gns.dvd.pci.previous_APSTB != 0) &&
(gns.dvd.pci.previous_APSTB != 0xffff))
reply_value_3 |= REPLY_VALUE_MACROVISION;
}
}
#else
if ((gns.dvd.pci.previous_APSTB != 0) &&
(gns.dvd.pci.previous_APSTB != 0xffff) )
reply_value_3 |= REPLY_VALUE_MACROVISION;
#endif
#endif
}
break;
case DEC_DISC_TYPE_SVCD :
case DEC_DISC_TYPE_VCD :
reply_value_3 |= REPLY_VALUE_VCD;
break;
case DEC_DISC_TYPE_CDROM :
#ifdef D_KADAK_PICTURE_CD_SUPPORT
case DEC_DISC_TYPE_KADAK_PICTURE_CD :
#endif
#ifdef D_FUJICOLOR_PICTURE_CD_SUPPORT
case DEC_DISC_TYPE_FUJICOLOR_PICTURE_CD :
#endif
#if 0
if(eCLS_Finalized != Clips_getClipsListStatus())
{
if(SI_CLIPS_MAX_CLIP_NUM == 0)
{
if (return_tray_state_opening == 1)
reply_value_3 |= REPLY_VALUE_NO_DISC;
else
reply_value_3 |= REPLY_VALUE_READING;
}
else
{
reply_value_3 |= REPLY_VALUE_MP3;
}
}
else
{
if((UINT16)eClipType_None == Clips_getAvailableTypes())
{
reply_value_3 |= REPLY_VALUE_UNKNOWN;
}
else
{
reply_value_3 |= REPLY_VALUE_MP3;
}
}
#endif
break;
case DEC_DISC_TYPE_CDDA :
reply_value_3 |= REPLY_VALUE_CDDA;
break;
}
switch (gcs.pstate){
case PST_STOP :
if (g_in_full_stop == FALSE){ //===in case ResumeStop===
reply_value_3 |= REPLY_VALUE_RESUME;
Set_Playback_Status( TRUE );
} else { //===in case Stop===
reply_value_3 |= REPLY_VALUE_STOP;
Set_Playback_Status( FALSE );
}
break;
case PST_PAUSE :
reply_value_3 |= REPLY_VALUE_PAUSE;
Set_Playback_Status( TRUE );
break;
case PST_SCAN :
#if 0
if(g_ui_scan_speed == 0x0000)
reply_value_3 |= REPLY_VALUE_SLOW;
else
reply_value_3 |= REPLY_VALUE_SEARCH;
Set_Playback_Status( TRUE );
#endif
break;
case PST_SLOW :
reply_value_3 |= REPLY_VALUE_SLOW;
Set_Playback_Status( TRUE );
break;
case PST_STILL :
case PST_PLAY :
case PST_REVERSE :
case PST_WAIT_UI :
reply_value_3 |= REPLY_VALUE_PLAY;
Set_Playback_Status( TRUE );
break;
}
if (g_disc_type == DEC_DISC_TYPE_DVD_VIDEO) {
#if 0
if (last_wide_output == 1)
reply_value_4 |= REPLY_VALUE_WIDE;
else if (last_wide_output == 2)
#endif
reply_value_4 |= REPLY_VALUE_43LB;
}
else if (g_disc_type == DEC_DISC_TYPE_CDDA) {
if (gcst.mAudioStream == 0x03)
reply_value_4 |= REPLY_VALUE_DTS;
else
reply_value_4 |= REPLY_VALUE_OTHER_STREAM;
}
else {
reply_value_4 |= REPLY_VALUE_OTHER_STREAM;
}
break;
default :
reply_value_4 |= REPLY_VALUE_OTHER_STREAM;
break;
}
if((MST_POWER_OFF == gcs.mstate)
#ifdef D_GINGER_I96
||(MST_POWER_DOWN == gcs.mstate)
#endif
)
{
return_tray_state_opening = 0;
reply_value_3 |= REPLY_VALUE_NO_DISC; //DiscType:Reserved,PlayStatus:Reserved
reply_value_4 |= REPLY_VALUE_OTHER_STREAM;
}
#if 0
if (gps->prog_inter_select == 1)
reply_value_4 |= REPLY_VALUE_PROGRESSIVE;
else if (gps->vid_out == VID_OUT_RGB)
#else
if (gps->vid_out == VID_OUT_RGB)
#endif
reply_value_4 |= REPLY_VALUE_RGB;
else if (gps->vid_out == VID_OUT_YUV)
reply_value_4 |= REPLY_VALUE_S_VIDEO;
else if (gps->vid_out == VID_OUT_CVBS)
reply_value_4 |= REPLY_VALUE_COMPOSITE;
if (gcst.actual_tv_std != DEC_LL_OUT_VIDEO_STANDARD_PAL)
reply_value_4 |= REPLY_VALUE_60Hz;
reply_value_of_com[0] = reply_value_0;
reply_value_of_com[1] = reply_value_1;
reply_value_of_com[2] = reply_value_2;
reply_value_of_com[3] = reply_value_3;
reply_value_of_com[4] = reply_value_4;
}
void Set_Playback_Status( BOOL current)
{
WORD work_time;
WORD work_track;
WORD tmp;
// UINT8 CDROM_stop = 0;
extern int Clips_Interval_Time;
switch (g_disc_type){
case DEC_DISC_TYPE_DVD_VIDEO :
case DEC_DISC_TYPE_DVD_AUDIO :
if (current == FALSE) { //set max. program time to reply_value_of_com2
break;
} else { //set current time to reply_value_of_com2
work_time = SI_DVD_ELAPSED_TIME;
}
tmp = work_time / 3600; //--Hour--
reply_value_0 = 0;
reply_value_0 = (tmp / 10) << 4;
reply_value_0 += tmp % 10;
tmp = (work_time % 3600) / 60; //--Minute--
reply_value_1 = 0;
reply_value_1 = (tmp / 10) << 4;
reply_value_1 += tmp % 10;
tmp = work_time % 60; //--Second--
reply_value_2 = 0;
reply_value_2 = (tmp / 10) << 4;
reply_value_2 += tmp % 10;
break;
case DEC_DISC_TYPE_CDDA :
case DEC_DISC_TYPE_MP3 :
case DEC_DISC_TYPE_SVCD :
case DEC_DISC_TYPE_VCD :
case DEC_DISC_TYPE_CDROM :
#ifdef D_KADAK_PICTURE_CD_SUPPORT
case DEC_DISC_TYPE_KADAK_PICTURE_CD :
#endif
#ifdef D_FUJICOLOR_PICTURE_CD_SUPPORT
case DEC_DISC_TYPE_FUJICOLOR_PICTURE_CD :
#endif
//--set track--
if (g_disc_type == DEC_DISC_TYPE_CDDA){
#if 0
if (current == FALSE) { //set max. track num to reply_value_of_com2
work_time = SI_CDDA_MAX_TRACK_NUM;
} else { //set current track num to reply_value_of_com2
work_time = SI_CDDA_TRACK_NUM;
}
}
if ((g_disc_type == DEC_DISC_TYPE_CDROM) ||
(g_disc_type == DEC_DISC_TYPE_PICTURE_CD)){
if (current == FALSE) {
CDROM_stop = 1;
} else {
work_time = SI_CLIPS_CLIP_NUM;
}
}
if ((g_disc_type == DEC_DISC_TYPE_SVCD)||(g_disc_type == DEC_DISC_TYPE_VCD)){
if (current == FALSE) {
work_time = SI_SVCD_MAX_TRACK_NUM;
} else {
work_time = SI_SVCD_TRACK_NUM;
}
#endif
}
work_track = work_time;
//--set time--
if ((g_disc_type == DEC_DISC_TYPE_SVCD)||(g_disc_type == DEC_DISC_TYPE_VCD)){
if (current == FALSE) {
work_time = SI_SVCD_MAX_PROGRAM_TIME;
if (DEC_DISC_TYPE_SVCD == g_disc_type)
work_time /= 2;
else if ( (g_disc_type == DEC_DISC_TYPE_VCD) && (work_time > 3) )
work_time = work_time - 3;
#if 0
} else {
if ( (g_disc_type == DEC_DISC_TYPE_SVCD) && (SI_SVCD_ELAPSED_TIME > SI_SVCD_CUR_TRACK_TIME) )
work_time = SI_SVCD_CUR_TRACK_TIME;
else if( (g_disc_type == DEC_DISC_TYPE_VCD) && (SI_SVCD_ELAPSED_TIME > (SI_SVCD_CUR_TRACK_TIME - 3)) )
work_time = SI_SVCD_CUR_TRACK_TIME - 3;
else
work_time = SI_SVCD_ELAPSED_TIME;
#endif
}
}
if (g_disc_type == DEC_DISC_TYPE_CDDA) {
#if 0
if (current == FALSE) { //set max. program time to reply_value_of_com2
work_time = SI_CDDA_MAX_PROGRAM_TIME;
} else { //set current time to reply_value_of_com2
work_time = SI_CDDA_ELAPSED_TIME;
}
}
if ((g_disc_type == DEC_DISC_TYPE_CDROM) ||
(g_disc_type == DEC_DISC_TYPE_PICTURE_CD)){
if (current == FALSE) {
CDROM_stop = 1;
} else {
work_time = SI_CLIPS_ELAPSED_TIME;
}
}
if( JPEG_Playing ){
work_time = Clips_Interval_Time;
#endif
}
//--set track2--
if ((g_disc_type == DEC_DISC_TYPE_CDROM) ||
#ifdef D_KADAK_PICTURE_CD_SUPPORT
(g_disc_type == DEC_DISC_TYPE_KADAK_PICTURE_CD)||
#endif
#ifdef D_FUJICOLOR_PICTURE_CD_SUPPORT
(g_disc_type == DEC_DISC_TYPE_FUJICOLOR_PICTURE_CD)
#endif
)
{
reply_value_2 = 0xff;
} else {
reply_value_2 = 0;
reply_value_2 = (work_track / 10) << 4;
reply_value_2 += work_track % 10;
}
//in case playback VideoCD with PBC, we must set 1
// to 7th bit of 4th byte of reply-value.
//in case playback 1st track of VideoCD with PBC,
// we must set 0xEE to 3rd byte of reply-value.
#if 0
if (((g_disc_type == DEC_DISC_TYPE_SVCD) ||
(g_disc_type == DEC_DISC_TYPE_VCD)) &&
(PM_IsPBC(PM_GetPlaybackMode()) == TRUE) &&
(current == TRUE)) {
reply_value_3 |= REPLY_VALUE_PBC_ON;
if (SI_SVCD_TRACK_NUM == 0) {
reply_value_2 = 0x0EE;
}
}
#endif
tmp = work_time / 60; //--Minute--
reply_value_0 = 0;
if ((g_disc_type == DEC_DISC_TYPE_CDROM) && (tmp >= 100))
{
tmp = tmp % 100;
}
reply_value_0 = (tmp / 10) << 4;
reply_value_0 += tmp % 10;
tmp = work_time % 60; //--Second--
reply_value_1 = 0;
reply_value_1 = (tmp / 10) << 4;
reply_value_1 += tmp % 10;
#if 0
if ((g_ui_active_menu_id == DIGEST_MENU_ID) ||
(JPEG_Playing && (gps->jpg_interval == JPG_INTERVAL_OFF)) ||
(CDROM_stop == 1))
{
reply_value_0 = 0xee;
reply_value_1 = 0xee;
}
#endif
break;
default :
break;
}
}
#if 0
void reset_fw_update_wait(void)
{
fw_update_wait = FW_UPDATE_WATI_TIME;
#ifdef OEC_UART_SUPPORT
reply_value_3 = (reply_value_of_com[3] & 0xf1);
reply_value_3 |= REPLY_VALUE_UPDATE;
reply_value_of_com[3] = reply_value_3;
#endif //defined OEC_UART_SUPPORT
}
BYTE get_fw_update_wait(void)
{
return fw_update_wait;
}
void fw_update_wait_sub(void)
{
fw_update_wait --;
}
#endif
#endif //defined OEC_UART_SUPPORT
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -