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

📄 other.c.bak

📁 电机测速程序,用nec芯片,5mhz晶振,调试通过
💻 BAK
字号:
#define SUBRAM
#include "ram.c"

extern void setEPRomSave(); 

void keyread();
void dryness_sub();

/*-----------------------------*/
/*-----------------------------*/

void emergsub()
{
    /* emer_timer */
    /*
    if (emergency_test && emergency1s)
    {
        emergency1s = 0;
        if ((++emergency_test_time) >= 1801) 
        {
            emergency_test_time = 0x0000;
            emergency_test = 0;
        }
    }
	*/
    
    keyread();
    if (keyisOK)
    {
        keyisOK = 0;

        if (k_ck_T < 10)
        {
            /* to do add here */

            if (k_ID == 0x01)
            {
            	k_ID  = 0x00;
            	PluseOneCyc = 30;
            }
            else
            {
            	k_ID  = 0x01;
            	PluseOneCyc = 10;
            }                        
        }
        else
        {
            /*
            if (short_EN)
            {
                buz = 1;
                beeLong = 1;

                if (To100msFLG == 0)
                {
                    To100msFLG = 1;
                }
                else
                {
                    To100msFLG = 0;
                }
            }
            */
        }
    }
}
/*-----------------------------*/
/*-----------------------------*/
/*-----------------------------*/
void heatersub()
{
}
/*-----------------------------*/
/*-----------------------------*/
/*-----------------------------*/
/*-----------------------------*/
/*-----------------------------*/
/*-----------------------------*/

void setEPRomSave()
{
    save_power = 1; /* remote code should be saved */
    E2PRom1s = 0; /* 2002-3-15 */
    saveTflg = 0; /* init */
}

void jiema()
{
}
/*--------------------------*/
void rmotsub()
{
}
/*-----------------------------*/
/*-----------------------------*/
/*-----------------------------*/
/*-----------------------------*/
/*-----------------------------*/
/*-----------------------------*/
void timersub()
{
}
/*-----------------------------*/
/*-----------------------------*/
/*-----------------------------*/
/*-----------------------------*/
/*-----------------------------*/
/*-----------------------------*/
void ctimesub()
{
}

/*-----------------------------*/

void output()
{    
}
/*-----------------------------*/
void keyread()
{
    /* read key in */
    #define key_times 4

    if (oldkey == 0)
    {
        /* to do modify the SFR */
        if ((P2 & 0b00000001) == 0b00000001)
        {
            if (++key_cnt >= key_times)
            {
                key_cnt = 0x00;

                oldkey = 1;
                oldkeystd = 0;
            }
        }
        else
        {
            key_cnt = 0x00;
        }
    }
    else
    {
        if (oldkeystd == 0)
        {
            if ((P2 & 0b00000001) != 0b00000000)
            {
                key_cnt = 0x00;
            }
            else
            {
                if (++key_cnt >= key_times)
                {
                    oldkeystd = 1;
                    k_ck_T = 0x00;
                }
            }
        }
        else
        {
            if ((P2 & 0b00000001) != 0b00000001)
            {
                key_cnt = 0x00;
            }
            else
            {
                if (++key_cnt >= key_times)
                {
                    key_cnt = 0x00;

                    oldkey = 0;
                    oldkeystd = 0;

                    keyisOK = 1;
                }
            }
        }
    }
}
/*-----------------*/
/*关机时是否干燥*/
void dryness_sub()
{
}

⌨️ 快捷键说明

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