/*---------------------------------------------------------------------*/ /* --- STC MCU Limited ------------------------------------------------*/ /* --- STC 1T Series MCU Demo Programme -------------------------------*/ /* --- Mobile: (86)13922805190 ----------------------------------------*/ /* --- Fax: 86-0513-55012956,55012947,55012969 ------------------------*/ /* --- Tel: 86-0513-55012928,55012929,55012966 ------------------------*/ /* --- Web: www.STCMCU.com --------------------------------------------*/ /* --- Web: www.STCMCUDATA.com ---------------------------------------*/ /* --- QQ: 800003751 -------------------------------------------------*/ /* 如果要在程序中使用此代码,请在程序中注明使用了STC的资料及程序 */ /*---------------------------------------------------------------------*/ #include "Task.h" #include "app.h" //======================================================================== // 本地变量声明 //======================================================================== static TASK_COMPONENTS Task_Comps[]= { //状态 计数 周期 函数 // {0, 250, 250, Sample_Lamp}, /* task 1 Period: 250ms */ // {0, 200, 200, Sample_ADtoUART}, /* task 2 Period: 200ms */ // {0, 20, 20, Sample_INTtoUART}, /* task 3 Period: 20ms */ // {0, 1, 1, Sample_RTC}, /* task 4 Period: 1ms */ // {0, 1, 1, Sample_I2C_PS}, /* task 5 Period: 1ms */ // {0, 1, 1, Sample_SPI_PS}, /* task 6 Period: 1ms */ // {0, 1, 1, Sample_EEPROM}, /* task 7 Period: 1ms */ // {0, 100, 100, Sample_WDT}, /* task 8 Period: 100ms */ // {0, 10, 10, Sample_PCA_PWM}, /* task 9 Period: 10ms */ // {0, 1, 1, Sample_PCA_Capture}, /* task 10 Period: 1ms */ // {0, 1, 1, Sample_PWM15bit}, /* task 11 Period: 1ms */ // {0, 500, 500, Sample_BMM_AD}, /* task 12 Period: 500ms */ // {0, 500, 500, Sample_BMM_M2M}, /* task 13 Period: 100ms */ // {0, 1, 1, Sample_BMM_UART}, /* task 14 Period: 1ms */ // {0, 1, 1, Sample_BMM_SPI_PS}, /* task 15 Period: 1ms */ {0, 1, 1, Sample_BMM_LCM}, /* task 16 Period: 1ms */ /* Add new task here */ }; u8 Tasks_Max = sizeof(Task_Comps)/sizeof(Task_Comps[0]); //======================================================================== // 函数: Task_Handler_Callback // 描述: 任务标记回调函数. // 参数: None. // 返回: None. // 版本: V1.0, 2012-10-22 //======================================================================== void Task_Marks_Handler_Callback(void) { u8 i; for(i=0; i