⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cckey.c

📁 ct952 source code use for Digital Frame Photo
💻 C
📖 第 1 页 / 共 5 页
字号:
        //must be done before ModeInitial        __btFromStopMode=FALSE;        __btPlayFromBegin=FALSE;// Micky1.24, add a define to clet REPEAT status when real stop#ifdef CLEAR_REPEAT_WHEN_REAL_STOP		        if( (__bCountStop==2)&&__bRepeat )        {	    	__bRepeat=REPEAT_NONE;        }#endif        if (__bRepeatAB!=REPEAT_NONE)        {            // Micky0.85            __bRepeatAB = REPEAT_NONE;            OSD_OUTPUT_MACRO ( MSG_REPEATAB, REPEAT_NONE, 0);        }//alex1.23,20040218 combine gototime , search//        if (__btGoToTime)        if (__bSearchMode != SEARCH_MODE_OFF)        {            // Micky0.62-909            OSD_RemoveUI(OSD_UI_SEARCH);    // it will cal Exit(control_only)        }        if (__btProgram )//DVD_099dMicky, don't clear PROGRAM/RANDOM when pre-stop    	{            if (  __bCountStop >=2 )            {                //Alan2.32, bug #2025. When it is in Program mode, don't clear it.                // wyc2.32a, update Alan's code and modify to always clear program entries in CDROM mode.                if ((!__btInputProgram) || (__wDiscType & CDROM_M1))                {                    LINEAR_Program(LINEAR_PROGRAM_CLEAR,NULL_0);                }                // wyc1.10, update FM UI to normal because of real stop need to enter normal UI now.                if (__wDiscType & CDROM_M1)                {                    // wyc2.32-909S, when issue stop command in program list mode, need to back to normal mode.                    if (__bMMMenuID != MM_MENU_PROGLIST)                    {                        MM_InitialMenu(MM_MENU_NORMAL, TRUE);                    }                    else                    {                        MM_ProgramListToNormal();                    }                }            }    	}// Micky1.20, 4M flash#ifndef NO_DIGEST        if (__btDIGEST)        {            OSD_OUTPUT_MACRO ( MSG_DIGEST, NULL_0, NULL_0 );    // clear Digest            __btDIGEST=FALSE;//LJY1.24-3, restore DSP ucode after exited digest mode.#ifdef  USE_32M_SDRAM            //UTL_DSPuCodeBackup(FALSE);#endif                    }#endif        // wyc1.02-909, need to clear PIP when KEY_STOP.        if (!(__wDiscType & CDROM_M1))        {            if (__bZoomFactor != VIEW_NORMAL)            {                DISP_DisplayCtrl(DISP_PIP, FALSE);#ifdef SUPPORT_GRAPH_ZOOM                OSD_OUTPUT_MACRO ( MSG_ZOOM, VIEW_ZOOMX1, 0x3 );#endif //                OSD_OUTPUT_MACRO ( MSG_ZOOM_TEXT, VIEW_ZOOMX1, 0x3 );            }        }        if ( ! __btPBC )        {            // wyc1.10, make CDROM key stop in program playing same as other titles.            /*            // wyc1.05-2, not clear program entries in KEY_STOP in program playing mode.            if (__wDiscType & BOOK_M1)                UTL_ModeInitial( MODE_NOT_CLEAR_PROGRAM );            else            */                UTL_ModeInitial ( MODE_LINEAR );            // re-set __wplaytem to first Track of the title            // Micky0.91, keep the track number when pre-stop.            if ( __bCountStop==2 )            {                __wPlayItem= __wTrackBegin;            }        }        CHIPS_OpenAudio(FALSE);        {            // wyc2.53-909P,            SrcFilter_Stop (__dwSFStreamID);  // avoid CDROM operation when pseudo-STOP#ifndef    NO_DISC_MODE            NV_Action ( ACTION_STOP, NULL_0 );  // ** TCH0.37; Let NV stay on STOP mode#endif    // NO_DISC_MODE        }        CC_KeyCommand ( bKey );        break;        case    KEY_PAUSE:        // to avoid the CD-IF is colsed before I frame is detected.        // prohibit scan pause        // wyc2.35-909S. mark these code to support scan mode pause.        /*if ( (__bModeCmd==KEY_SCF) || (__bModeCmd==KEY_SCB)// DVD_160Micky, don't allow pause when KEY_FF mode#ifdef  SAME_FAST_AS_SCF2            || (__bModeCmd == KEY_FF)#endif            )            return  INVALID_KEY;*/#ifndef NO_DISC_MODE //CoCo2.37p        if (__wDiscType & BOOK_DVD)        {            // 1. Only check pause on UOP when non-setup mode            if (!__bSetupMode)            {               // DVD_170aMicky, ref. Annex J VIX-62.                // only pause on can do UOP check                // for pause off, it's not applicable.                if (!__btPause)                {                    // check pause UOP.                    if ( ! NV_QueryUOP (UOP_CAN_PAUSE_ON) )                        return INVALID_KEY; // don't allow pause.                }            }            else            // 2. Do nothing for cell/vobu still when setup.            {                // DVD_170aMicky, add protection  for Setup call CC_KeyCommand(KEY_PAUSE)                // When enter setup mode, can't do anything to cell/vobu still                // cell/vobu still release will be done by _CC_ReleaseStillTrigger                if (CELL_QueryStatus (CELL_VOBU_STILL_ON) || CELL_QueryStatus(CELL_IS_STILL) )                    return TRUE;            }        }#endif //#ifndef NO_DISC_MODE //CoCo2.37p        if ( __btPause )        {            CC_KeyCommand ( __bModeCmd );
        }        else        {   // enter Pause mode            if ( ! __btPlaying )                return  INVALID_KEY;            // For PLAY/SLOW, using STEP command to pause            __btPause= TRUE;            __btPlaying=FALSE;            CHIPS_OpenAudio(FALSE);            // Micky0.80a, issue pause command for all            UTL_TransferCommandID(KEY_PAUSE);            /*                        {                if ( (__bModeCmd==KEY_PLAY) ||                    (__bModeCmd==KEY_SF) )                {                    EX1=0;                    // DVD_155Micky, use hal new define API                    // Brian.161A, write a zero value for PAUSE mode to make sure SP display                    HAL_ControlAVSync(HAL_AVSYNC_STEP, 0);                  //Kevin1.23, close CDIF before issuing pause command                    HAL_CheckCDIF(HAL_CDIF_FREEZE_TIME, NULL_0);                    UTL_TransferCommandID(KEY_PAUSE);                  HAL_ReadInfo (HAL_INFO_STC, &__dwSTCStep);// keep the STC when pause for later case if pause-->step                }                else                if (__bModeCmd != KEY_STEP)                {                    HAL_CheckCDIF(HAL_CDIF_FREEZE_TIME, NULL_0);                }            }    */                        UTL_GetCurrentTime ();            __dwTimeNow++;// f/w 0.43 fix(01.19.98) begin// show pause message at last// so it won't have the effect that the OSD already show pause,// but the time just go ahead 1 sec.            UTL_OutputShowTime ();  // The function will call OSD/PANEL_TRIGGER            // LLY.099, don't show message to fix "MSG_PAUSE" will be seen            // while enter/exit SETUP menu            if(!__bSetupMode)            {                OSD_OUTPUT_MACRO ( MSG_PAUSE, NULL_0, 0xFF );            }// f/w 0.43 fix(01.19.98) end        }        break;    default:        // Micky0.65-909, must return INVALID_KEY;        return INVALID_KEY;}    return TRUE;}//  *****************************************************************//  Function    :   _KeyGroupTest//  Description :   Process Video Group//  Return      :   None//  Side Effect ://  *****************************************************************BYTE    _KeyGroupTest ( BYTE bKey){    // Micky0.62-909, process number key    //put at the group temporarily, as KEY_NUMBER is defined before GROUP2    if ( bKey == KEY_NUMBER )    {    	// Micky0.72    	// KEY_NUMBER will be issued when 1) Any number is pressed, 2)number is confirmed(or time out accept)        if (CC_NumberUtility(NUMBER_SET_INPUT)) // number is not decided        {        	// do nothing            return KEY_NO_KEY;        }        if ( !LINEAR_Action(KEY_NUMBER, __dwNumberPrevious) )        {	      	// Micky0.72, number action failed, clear current display number            OSD_OUTPUT_MACRO ( MSG_NUMBER, 0, 0 );                    bKey = INVALID_KEY;        }        else        {        	// Micky0.72, fix number can't be display when VCD number action.        	// number action is done. let the number OSD last for 1s.	        OSD_OUTPUT_MACRO ( MSG_NUMBER, __dwNumberPrevious, 1 );            bKey = KEY_NO_KEY;        }        CC_NumberUtility(NUMBER_CLEAR);        return bKey;    }            //kevin0.76, debug IR hang    // wyc2.32-909S, remove un-used testing code.    /*else if ( bKey == KEY_TEST1 )    {   #ifdef SUPPORT_CC_DEBUG_INFO        printf("REG_PLAT_RESET_CONTROL_DISABLE=%lx", REG_PLAT_RESET_CONTROL_DISABLE);        printf("REG_PLAT_IR_TIMING_CONTROL1=%lx", REG_PLAT_IR_TIMING_CONTROL1);        printf("REG_PLAT_IR_TIMING_CONTROL2=%lx", REG_PLAT_IR_TIMING_CONTROL2);        printf("REG_PLAT_IR_TIMING_CONTROL3=%lx", REG_PLAT_IR_TIMING_CONTROL3);        printf("REG_PLAT_IR_TIMING_CONTROL4=%lx", REG_PLAT_IR_TIMING_CONTROL4);        printf("REG_PLAT_IR_DATA=%lx", REG_PLAT_IR_DATA);                printf("REG_PLAT_IR_RAW_CODE=%lx", REG_PLAT_IR_RAW_CODE);         printf("REG_PLAT_IR_COUNTER=%lx", REG_PLAT_IR_COUNTER);                         printf("REG_PLAT_IR_STATUS=%lx", REG_PLAT_IR_STATUS);         #endif //        return KEY_NO_KEY;                      }            else if ( bKey == KEY_TEST2 )    {            extern VOID _ResetIR(VOID);         //printf("RS IR ");        _ResetIR();          return KEY_NO_KEY;                }    else if ( bKey == KEY_TEST4 )    {        //printf("\nDIS Par EDC");        PARSER_Command(0, PARSER_CMD_IGNORE_EDC, (DWORD*)1);        return KEY_NO_KEY;                }*/        return INVALID_KEY;        }// Micky1.00_909// Auto Sleep > Auto powerown// 1. Need to check the status after process each key.//    - After title detection, it was set as STOP(__dwTimeWaitPowerDown=__dwCountSystem) //    - The status of STOP : none of item was playing.(__bModecmd=STOP(except Digest/ Thumbnail))//    - There will have problem if the status flag was changed after Trigger//    - (Thumbnail-> __btPlaying=0-> __dwTimeWaitPowerDownset-> Trigger-> __btPlaying=1->//    - after thumbnail play end, it till enter power down mode// 2. If the status was kept at STOP, record the time(__dwTimeWaitPowerDown)// 3. If the status was not STOP, reset the time(__dwTimeWaitPowerDown=0xffffffff)// 4. Just need to monitor __dwCountSystem-__dwTimeWairPowerDown>WAITTIME_POWERDOWN#ifdef  AUTO_POWERDOWNvoid    _CC_Trigger_AutoPowerDown(void){        if (!__btPowerDown)        {            if (__dwTimeWaitPowerDown != 0xFFFFFFFF)            {                // Micky1.25, add auto powerdown for screen saver mode#ifdef  POWERDOWN_AFTER_SCREENSAVER                if ( __bScreenSaver != TRIGGER_SCREEN_SAVER )                {                    __dwTimeWaitPowerDown=0xFFFFFFFF;                    }#else                // after start trigger time                // and the key trigger into play state                // must clear the wait time                if (// Micky1.20, 4M flash#ifndef NO_DIGEST                    __btDIGEST || #endif                    __btPlaying || __btPause || __btNewTime ||                // DVD_101-2Micky, reference __bSetupMode instead of __bSetupID                    (__bSetupMode) && __btDriveOpen)                    __dwTimeWaitPowerDown=0xFFFFFFFF;                else                {                    // after start trigger time                    // and the key don't trigger into play state                    // must reset the wait time                    // just reset the start trigger time                    __dwTimeWaitPowerDown=OS_GetSysTimer();                }            }            else            {                // not in trigger time state                // if key pressed, but still don't trigger play status                // just reset the start trigger time                if (// Micky1.20, 4M flash#ifndef NO_DIGEST                    !__btDIGEST && #endif                    !__btPlaying && !__btPause && !__btNewTime &&                // DVD_101-2Micky, reference __bSetupMode instead of __bSetupID                    (!__bSetupMode) && !__btDriveOpen)                {                    __dwTimeWaitPowerDown=OS_GetSysTimer();                }#endif  //#ifdef  POWERDOWN_AFTER_SCREENSAVER            }        }}#endif  //#ifdef  AUTO_POWERDOWN//  *********************************************************************//  Function    :   CC_NumberUtility//  Description :   This function will do related number action//  Arguments   :   NUMBER_CLEAR,    reset current number input control.//              :   NUMBER_SHIFT,    shift the number value left one digit//		        :   NUMBER_DIGITS,   count the number of digits.//              :   NUMBER_SET_INPUT,    query the number input status    //              :   __dwNumberPrevious, __wNumberQueue//  Return      :   the status//  Side Effect ://  *********************************************************************BYTE    CC_NumberUtility(BYTE bAction){    WORD    wCheckDigit;    WORD    wNumberBase;    BYTE    i;    // Micky0.72    BYTE bFindZero;        if (bAction == NUMBER_CLEAR)    {    	// Micky0.72, let OSD auto clear        //OSD_OUTPUT_MACRO(MSG_NUMBER, 0, 0);        __dwTimeKey=NULL_0;        __wNumberQueue=0;        __dwNumberPrevious=0;        bNumberTimeOut=FALSE;    }    else if ( bAction == NUMBER_SHIFT )    {    	// 10045 shift will become 45, __wNumberQueue = 0x3;        wCheckDigit=0x10;   // Max. 5 digits        wNumberBase=MAX_DIGITS_NUMBER;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -