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

📄 main.c

📁 mifarea卡程序mifarea卡程序mifarea卡程序
💻 C
字号:
/*Fstk.C*//*Fstk's C file*/
/* last update: 2007-05-01 */

#include "includes.h"


void main(void)
{
    // initializations
    // system timer
    InitTimer(SYSCLOCK);
    
    // serial port
    ComOpen(SYSCLOCK, 9600);
    ComSetTimeOut(500, 500);
    
    // init and read parameters
    ParaInit();
    
    // initialize touch card
    TcInit();
    
    // M1 rf card 
    M1Init();
    
    // init reader
    SysInit();
    
    // enable watch dog
    //EnableWDT(255-15);
    
    // ready for running!
    led(0xff);
    delay(100);
    led(0);
    // led1(50);
    beep(3, 10);
    
    // main loop
    while(1)
    {
        // idle();

        //ResetWDT();
        
        // check host command and excute it.
        Command();
        
        // check if a card is inserted to the card slot and if I have sent a
        // notice to host but the host give no response, I will send the 
        // notice once every second untill I get a response or a command for 
        // card slot.
        CardSlot();
        
        // check if a rf card is arrived and if I have sent a notice to host
        // but the host give no response, I will send the notice once every
        // second untill I get a response or a command for rf card.
        M1Card();
    }
}
    

⌨️ 快捷键说明

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