/* * provide a base timer. * Author:Jimbo */ #include "timer_thread.h" #include "bmc_main.h" #include "errno.h" #include void *timer_task(void *args) { printf("start timer thread.\n"); g_BMCInfo.sensorTick = 0; g_BMCInfo.powerOnTick = 0; g_BMCInfo.sysResetTick = 0; while(1) { sleep(1); g_BMCInfo.sensorTick++; if(g_BMCInfo.powerOnTick < 0xffffffff) { g_BMCInfo.powerOnTick++; } // if(g_BMCInfo.powerSta.S3 == 0) //cpu reset // { // g_BMCInfo.sysResetTick = 0; // } // else { if(g_BMCInfo.sysResetTick < 0xffffffff) { g_BMCInfo.sysResetTick++; } } } }