VOS_UINT OM_ComRx_ICCError_CB(VOS_UINT ulChanID, VOS_UINT ulEvent, VOS_VOID* pParam)
{
    OAM_MNTN_ICC_ERROR_EVENT_STRU stIccErrorInfo;

    stIccErrorInfo.ulEvent = ulEvent;

    if (g_astOMCCPUIccCtrlTable[OM_OM_ICC_CHANNEL].UDIHdle == (UDI_HANDLE)ulChanID)
    {
        stIccErrorInfo.ulChannelID = OM_OM_ICC_CHANNEL;
    }
    else if(g_astOMCCPUIccCtrlTable[OM_OSA_MSG_ICC_CHANNEL].UDIHdle == (UDI_HANDLE)ulChanID)
    {
        stIccErrorInfo.ulChannelID = OM_OSA_MSG_ICC_CHANNEL;
    }
    else
    {
        LogPrint("OM_ComRx_ICCError_CB: The Channel ID is not used by OAM\n");

        return VOS_ERR;
    }

    LogPrint2("OM_ComRx_ICCError_CB: The Error ICC Channel is %d, and Error Event is %d",
                    (VOS_INT32)stIccErrorInfo.ulChannelID, (VOS_INT32)ulEvent);

    /*通道ID和错误原因写入ErrorLog*/
    MNTN_RecordErrorLog(MNTN_OAM_ICC_ERROR_EVENT, &stIccErrorInfo, sizeof(stIccErrorInfo));

    return VOS_OK;
}
VOS_VOID OM_DspMsgProc(MsgBlock* pMsg)
{
    VOS_UINT16         usPrimId;
    DSP_ERROR_LOG_STRU *pstMsg;

    usPrimId = *(VOS_UINT16 *)(pMsg->aucValue);

    if (OM_RECORD_DSP_ERRORLOG == usPrimId)
    {
        pstMsg  = (DSP_ERROR_LOG_STRU *)pMsg;

        if(pstMsg->ulTotalLength > OM_ERRORLOG_DSP_LEN_MAX)
        {
            return;
        }

        MNTN_RecordErrorLog(pstMsg->ulErrNo, &pstMsg->ulTotalLength, pstMsg->ulTotalLength);
    }
    else if ( OM_DSP_DCXO_UPDATE_NV_DATA == usPrimId )
    {
        Print(" Start DCXO NV UPDATE!\n");

        OM_WriteDspNv(pMsg);
    }
    else
    {
        /* Make  Pclint happy */
        /* blank */
    }

    return;
}
/*****************************************************************************
 Function   : TF_NVAutoResume
 Description: resume NV
 Input      : void
 Return     : void
 Other      :
 *****************************************************************************/
VOS_VOID TF_NVAutoResume(VOS_VOID)
{
    VOS_INT                             lNVResumeFlag;
    VOS_UINT16                          usNVResumeFlag = VOS_FALSE;
    OAM_MNTN_NV_ERRLOG_EVENT_STRU       stErrLog;

    /* get the flag from DRV */
    lNVResumeFlag = DRV_GET_CDROM_FLAG();

    if ( DRV_ISO_NOT_LOAD == lNVResumeFlag )/* need to do */
    {
        /* clear DRV's flag */
        DRV_SET_CDROM_FLAG(DRV_ISO_LOAD);
    }

    /* Get Flag */
    if ( VOS_OK != NV_Read(en_NV_Resume_Flag,
                    (VOS_VOID *)(&usNVResumeFlag), sizeof(VOS_UINT16)) )
    {
        Print("TF can't read NV resume flag.\r\n");
    }

    if ( VOS_TRUE != usNVResumeFlag )
    {
        return;
    }

    /* light LED updating */
    PS_TURN_ON_UPDATE_VERSION_LED();

    /*lint -e534*/
    VOS_TaskLock();
    /*lint +e534*/

    if ( VOS_FALSE == DRV_BOOT_FORCELOAD_MODE_CHECK() )/* noraml update */
    {
        if ( VOS_OK != NV_RestoreAll() )
        {
            /* light LED.fail. */
            PS_TURN_ON_UPDATE_VERSION_NVFAIL_LED();

            Print("TF can't resume All NV.\r\n");

            DRV_SDMMC_CLEAR_WHOLE_SCREEN();
            DRV_SDMMC_UPDATE_DISPLAY(VOS_FALSE);

            /*lint -e534*/
            VOS_TaskUnlock();
            /*lint +e534*/

            return;
        }
        else
        {
            /* clear flag */
            usNVResumeFlag = VOS_FALSE;

            if ( VOS_OK != NV_Write(en_NV_Resume_Flag,
                            (VOS_VOID *)(&usNVResumeFlag), sizeof(VOS_UINT16)))
            {
                Print("TF can't write NV resume flag.\r\n");
            }

            /* light LED sucess. */
            PS_TURN_ON_UPDATE_VERSION_SUCCESS_LED();

            DRV_SDMMC_CLEAR_WHOLE_SCREEN();
            DRV_SDMMC_UPDATE_DISPLAY(VOS_TRUE);
        }
    }
    else    /* force update */
    {
        if ( VOS_OK != NV_RestoreManufacture() )
        {
            /* light LED.fail. */
            PS_TURN_ON_UPDATE_VERSION_NVFAIL_LED();

            Print("TF can't resume Manufacture NV.\r\n");

            DRV_SDMMC_CLEAR_WHOLE_SCREEN();
            DRV_SDMMC_UPDATE_DISPLAY(VOS_FALSE);

            /*lint -e534*/
            VOS_TaskUnlock();
            /*lint +e534*/

            return;
        }
        else
        {
            /* clear flag */
            usNVResumeFlag = VOS_FALSE;

            if ( VOS_OK != NV_Write(en_NV_Resume_Flag,
                            (VOS_VOID *)(&usNVResumeFlag), sizeof(VOS_UINT16)))
            {
                Print("TF can't write NV resume flag.\r\n");
            }

            /* light LED sucess. */
            PS_TURN_ON_UPDATE_VERSION_SUCCESS_LED();

            DRV_SDMMC_CLEAR_WHOLE_SCREEN();
            DRV_SDMMC_UPDATE_DISPLAY(VOS_TRUE);
        }
    }

    /* NV Backup*/
    if ( VOS_OK != NV_Backup() )
    {
        MNTN_RecordErrorLog(MNTN_OAM_MNTN_NV_ERRLOG_EVENT, (void *)&stErrLog,
                    sizeof(OAM_MNTN_NV_ERRLOG_EVENT_STRU));
    }

    /*lint -e534*/
    VOS_TaskUnlock();
    /*lint +e534*/

    return;
}