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

📄 e20_dip.c

📁 HSAV DR53E CF卡MP3录放板应用编程源代码
💻 C
📖 第 1 页 / 共 5 页
字号:
 
    if (FEEP_Already_Write){
        FEEP_Already_Write = 0;
        MDIPWriteChinese_String(64-16*3,cDOTLine2, "成功清");
        MDIPChineseToScreen(64, cDOTLine2, cDIP_cu);
        MDIPWriteChinese_String(128-16*3,cDOTLine2, "内容");
    }
    else MDIPWriteChinese_String(64-16*3,cDOTLine2, "此项无内容");
    MDIP_Menu_Quit(); //按"EXIT"返回   
    return;
}

void Enter_ProgramOtherDay_ClearAddr(){
    BYTE gLocal_0;
    BYTE gLocal_2;
    BYTE gLocal_3;
    BYTE gLocal_5;
    BYTE gLocal_6;
    BYTE gLocal_7;

    gLocal_3 = 0;
    gLocal_2 = 0;
    gLocal_0 = 0;
    gLocal_7 = gCOL_Week;
    if (gCursorMove == 1){
        if (gOption_group < gAdd_Option_groupMax){
//将要最后的项数赋值给当前要清除的项数            
        }
        MEEPAddr_Clear_Day();
    }
    else if (gCursorMove == 2){
//查找此日期的内容
        do {
            gLocal_3 = MEEP_ByteRead(cEEPAddr_OtherDayStart+gLocal_0);
            gLocal_2 = MEEP_ByteRead(cEEPAddr_OtherDayMontyStart+gLocal_0);
            if ((gLocal_3 == gTAB_YearWeekDay[2]) 
                && (gLocal_2 == gTAB_YearWeekDay[1])){
                MDIPWriteChinese_String(64-16*3,cDOTLine2, "请稍候..");
                gOption_group = MEEP_ByteRead(cEEPAddr_OtherDayItem+gLocal_0); 
                MEEPAddr_Clear_Day();

                MEEP_ByteWrite(cEEPAddr_SecondStart+gLocal_0, 0xff);
                MEEP_ByteWrite(cEEPAddr_MinuteStart+gLocal_0, 0xff);
                MEEP_ByteWrite(cEEPAddr_HoureStart+gLocal_0, 0xff);

            }
        } while (++gLocal_0 != 0);
        gOption_group = 1;
        gAdd_Option_groupMax = 0;
        mEEPAddr_WirteDayItemMax();
    }
    else if (gCursorMove == 3){
        gLocal_5 = gTAB_YearWeekDay[1];
        gLocal_6 = gTAB_YearWeekDay[2];
        MDIPWriteChinese_String(64-16*3,cDOTLine2, "请稍候..");
        do {
            if ((MEEP_ByteRead(cEEPAddr_SecondStart+gLocal_0) != 0xff) || (MEEP_ByteRead(cEEPAddr_MinuteStart+gLocal_0) != 0xff)
                || (MEEP_ByteRead(cEEPAddr_HoureStart+gLocal_0) != 0xff)){
                    gOption_group = MEEP_ByteRead(cEEPAddr_OtherDayItem+gLocal_0); 
                    gTAB_YearWeekDay[2] = gLocal_3;
                    gTAB_YearWeekDay[1] = gLocal_2;
                    MEEPAddr_Clear_Day();

                    gOption_group = MEEP_ByteRead(cEEPAddr_WeekItem+gLocal_0); 
                    gCOL_Week = MEEP_ByteRead(cEEPAddr_WeekStart+gLocal_0); 
                    MEEPAddr_Clear_Week();
                    MEEP_ByteWrite(cEEPAddr_WeekItem+gLocal_0, 0xff);
                    MEEP_ByteWrite(cEEPAddr_SecondStart+gLocal_0, 0xff);
                    MEEP_ByteWrite(cEEPAddr_MinuteStart+gLocal_0, 0xff);
                    MEEP_ByteWrite(cEEPAddr_HoureStart+gLocal_0, 0xff);
                }
        } while (++gLocal_0 != 0);
        gTAB_YearWeekDay[1] = gLocal_5;
        gTAB_YearWeekDay[2] = gLocal_6;
        MEEP_ByteWrite(cEEPAddr_TaskTotal, 0xff); 
MDEBUG(0xab);

    }
    if (FEEP_Already_Write){
        FEEP_Already_Write = 0;
        MDIPWriteChinese_String(64-16*3,cDOTLine2, "成功清");
        MDIPChineseToScreen(64, cDOTLine2, cDIP_cu);
        MDIPWriteChinese_String(128-16*3,cDOTLine2, "内容");
    }
    else MDIPWriteChinese_String(64-16*3,cDOTLine2, "此项无内容");
    MDIP_Menu_Quit(); //按"EXIT"返回   
    return;
}

void Enter_Main04_ProgramMIC(){
    BYTE gLocal_1;
    
    gLocal_1 = gBroadcast[28]; 
    if (gCursorMove == 1){
        FEEP_Will_MIC = ~FEEP_Will_MIC;
    }
    if (gMenuSelectBuffer == cMenu_Menu_WeekOtherCtrl){
        if (gCursorMove == 2) FWeek_One = ~FWeek_One;
        else if (gCursorMove == 3) FWeek_Two = ~FWeek_Two;
        else if (gCursorMove == 4)FWeek_Three = ~FWeek_Three;
        else if (gCursorMove == 5) FWeek_Four = ~FWeek_Four;
        else if (gCursorMove == 6) FWeek_Five = ~FWeek_Five;
        else if (gCursorMove == 7) FWeek_Six = ~FWeek_Six;
        else if (gCursorMove == 8){
            FWeek_Seven = ~FWeek_Seven;
            gCursorMove = 1;
        }
        MProgramCurreDay();
        gMain00 = gBroadcast[28];
        gBroadcast[28] = MDIP_EnterSelectWeek(gBroadcast[28]);
        MProgramWorkDay(gCursorMove-1);
        if (gBroadcast[28] != gMain00)gEEPSureWrite = 0x07;
    }
    if (gCursorMove == 1) MDIP_Main04_ProgramMIC(gCursorMove);
    if (FEEP_Will_MIC || (gLocal_1 != gBroadcast[28]))gEEPSureWrite = 0x02;
    return;
}

BYTE MMenu_Cursor_Return(BYTE gLocal_2){
    BYTE gLocal_0;

    switch (gLocal_2){
        case cMenu_Main01_Timer : 
        case cMenu_Main02_Record_MIC :
        case cMenu_Main02_SectionErase :            
        case cMenu_Main02_Select_MIC :
             gLocal_0 = 1; 
             break; 
        case cMenu_Menu_PowerCtrl :
             gLocal_0 = 1; 
             break; 
        case cMenu_Main01_Program :
        case cMenu_Menu_SelectProgram : //"节目选择内容菜单"返回
        case cMenu_Main02_Select_Tuner :
        case cMenu_Main02_Record_LINE :
        case cMenu_Main04_ProgramTuner :
            gLocal_0 = 2; 
            break;            
        case cMenu_Main01_Power :  
        case cMenu_Main02_Start_up_TimerList : 
        case cMenu_Main02_Record_Tuner :
        case cMenu_Main04_ProgramLINE :
        case cMenu_Main02_Record_doing :
        case cMenu_Main02_Select_LINE :
        case cMenu_EnterSaveRevord :
            gLocal_0 = 3; 
            break;            
        case cMenu_Main01_PlayMusic :
        case cMenu_Main02_Select_MP3 :
        case cMenu_Main03_LoopPlayMP3 :
        case cMenu_Main03_MP3Name : //再次按时返回播音菜单
        case cMenu_Main04_ProgramMusic :
        case cMenu_Prewarming_SetupTime :   
             gLocal_0 = 4; 
             break; 
        #ifndef OTG_MODE
            case cMenu_Main01_Record :
                 gLocal_0 = 5; 
                 break; 
            case cMenu_Main01_Erase :  
                gLocal_0 = 6; 
                break;            
        #endif
        case cMenu_Menu_WeekOtherCtrl :
            gLocal_0 = 13; 
            break;            
        case cMenu_Menu_DayOtherCtrl :
            gLocal_0 = 13; 
            break; 
        case cMenu_Main04_ProgramMIC :
        case cMenu_Main02_Week :
            gLocal_0 = 1; 
            break; 
        case cMenu_Menu_Broadcast_Select :
            gLocal_0 = 3; 
            break; 
        case cMenu_Main02_WeekList :  
            gLocal_0 = 5; 
            break; 
        case cMenu_Main02_OtherDay_List : 
            gLocal_0 = 8; 
            break; 
        case cMenu_Day_Program_ClearAddr :
            if (gMenuBroadcastBuffer == cMenu_Main02_OtherDay) gLocal_0 = 9; 
            else gLocal_0 = 6; 
            break; 
        case cMenu_Main02_OtherDay : 
            gLocal_0 = 2; 
            break; 
        case cMenu_Day_Program_Broadcast :
            if (gMenuBroadcastBuffer == cMenu_Main02_OtherDay) gLocal_0 = 7; 
            else gLocal_0 = 4;
            break; 
        case cMenu_Menu_Broadcast_PowerValue :
        case cMenu_Menu_Broadcast_PlayList :
            gLocal_0 = 3; 
            break; 
        case cMenu_Main02_ALLErase :
            gLocal_0 = 2; 
            break; 
        default :  break;		  	
    }
    return gLocal_0;
}
//返回一个改变后的数
//参数1 显示位置,参数2 FPress_Enter_Modify,  
void MEnter_Menu_TimerList(){
    FPress_Enter_Modify = ~FPress_Enter_Modify;
    MMDIP_Modify_Date(); 
    if (gCursorMove < 7) {
        MMDIP_Modify_Status(8*2,cDOTLine1,gCursorMove); //反白光标1~6  显示"?"
    }
    else if (gCursorMove < 13){
        MMDIP_Modify_Status(0,cDOTLine2,gCursorMove-6); //反白光标7~12 (7-6,即1,2,3,4,5,6) 显示"?"
    }
    else if (gCursorMove == 13){
        gBellLong_Max = 7;
        gBellLong_Min = 1;
        if (FPress_Enter_Modify) {
            FDIPReverse = 1;
            MDIPASCIIToScreen(128-8*2,cDOTLine2,'?');
            MDIPASCIIToScreen(128-10,cDOTLine2,' ');
            gBellLong = gRTC_Week;
        }
        else {
            gCursorMove = 1;
            MDIP_Menu_TimerList(gCursorMove);            
        }
    }
    //改变的变数赋值,显示的位置
    return;
}
#ifndef OTG_MODE
void MDIP_Menu_EnterSaveRevord(BYTE gLocal_1){

    FDIPReverse = 0;
    if (gLocal_1 == 1) FDIPReverse = 1;  //光标
    MDIPWriteChinese_String(64-16*3,cDOTLine2, "确定储存退出");
    FDIPReverse = 0;
    if (gLocal_1 == 2) FDIPReverse = 1;  //光标
    MDIPWriteChinese_String(64-3*16,cDOTLine3,"无用储存退出"); //按"EXIT"返回   
    MDIP_Menu_Quit();
    return;
}
void MEnter_Menu_Record_doing(BYTE gLocal_1){
    switch (gLocal_1){
        case 1 : //进入"音量微调"菜单
             FPress_Enter_Modify = ~FPress_Enter_Modify;
             MDIP_Menu_Record(gCursorMove,gRecord_Type);
             break; 
        case 2 :  //进入"定制录音时间"菜单
             FPress_Enter_Modify = ~FPress_Enter_Modify;
            if (FPress_Enter_Modify){
                gBellLong_Max = 60;
                gBellLong_Min = 1;
                gBellLong = gRecord_Minute;
            }
            else gRecord_Minute = gBellLong;
             MDIP_Menu_Record(gCursorMove,gRecord_Type);
            break; 
        case 3 : //进入"输入录音中"菜单
            gMenuSelect = cMenu_Main02_Record_doing;
            FDIPReverse = 0;
            MDIPWriteChinese_String(64-16*2,cDOTLine2, "请稍候..");
            gCTBCommandBuffer[0] = cCTB_CommandA02;
            gCTBCommandBuffer[1] = cCTB_RECORD;                             
            MCTBCommandWrite();
            FRecord_doing = 0;
            break; 
        default :  break;		  	
    }
    return;
}

void MEnter_Menu_Record(BYTE gLocal_1){
    gRecord_Minute = 02;
    gCursorMove = 1;//将反白光标置于下一子菜单第一项
    FAUDMuteEnl = 0;
    gAUDMuteTm = cAUDMuteTm1000;
    switch (gLocal_1){
        case cMenu_Main02_Record_MIC-14 : //进入"MIC录音"菜单
             gRecord_Type = 1;
             MDIP_Menu_Record(gCursorMove,gRecord_Type);
             gMenuSelect = cMenu_Main02_Record_MIC; 
             if  (gInputType != cInput_MIC) {
                gInputType = cInput_MIC;
                mInputSwitch(); //切换4053通道
             }
             break; 
        case cMenu_Main02_Record_LINE-14 : //进入"LINE录音"菜单
             gRecord_Type = 2;
             MDIP_Menu_Record(gCursorMove,gRecord_Type);
             gMenuSelect = cMenu_Main02_Record_LINE; 
             if  (gInputType != cInput_AUX) {
                gInputType = cInput_AUX;
                mInputSwitch(); //切换4053通道
             }
             break; 
        case cMenu_Main02_Record_Tuner-14 : //进入"收音录音"菜单
             gRecord_Type = 3;
             MDIP_Menu_Record(gCursorMove,gRecord_Type);
             gMenuSelect = cMenu_Main02_Record_Tuner; 
             if  (gInputType != cInput_Tuner) {
                gInputType = cInput_Tuner;
                mInputSwitch(); //切换4053通道
             }
             break; 
        default :  break;		  	
    }
//    Mplay_Stop(cCTB_STOP);
    gMenuSelectBuffer = gMenuSelect; //暂记确定前的三种菜单之一
    return;
}
#endif
void MMenu_Exit(){
    FPress_Enter_Modify = 0;
    gAutoExitTime = 130;
    switch (gMenuSelect){
        case cMenu_Main :
            gMenuSelect = cMenu_Exit;
            MDIP_Main_Logo();
            break;            
        case cMenu_Main01_Timer : //当前显示调时菜单
        case cMenu_Main01_Program : //当前显示编程菜单 
        case cMenu_Main01_Power : //当前显示调时菜单
        case cMenu_Main01_PlayMusic : //当前播音菜单
        #ifndef OTG_MODE
            case cMenu_Main01_Record : //当前播音菜单
            case cMenu_Main01_Erase : //当前播音菜单
        #endif
            gCursorMove = MMenu_Cursor_Return(gMenuSelect); //返回时反白光标位置
            MDIP_Main_Menu(gCursorMove); //返回主菜单&反白光标位置
            gMenuSelect = cMenu_Main;   //退回主菜单
            break;            

⌨️ 快捷键说明

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