/******************************************************************************* ** Function Name :timser_isr ** Input :device num of timer ** Return :void ** Author :wk ** Version :v1.0 ** Date :130330 ** Dessription :LPT 定时器0中断函数入口 ** Reverse : *******************************************************************************/ static void timer_isr ( pointer parameter ) { uint_32 timer = (uint_32)parameter; /* Stop the timer */ _lpt_run (timer, FALSE); _lpt_clear_int (timer); // printf("\nhellow\n"); SavePowerFlg =1; // EventKeyFlg=1; SPIEventFlg=1;// wk @130401 --> test event data save _lpt_init(0,3 * 1000000 , LPT_FLAG_CLOCK_SOURCE_LPO,TRUE); }
static void timer_wakeup_isr(pointer parameter) { uint_32 timer = (uint_32)parameter; /* Stop the timer */ #if MQX_VERSION == (402) _lpt_run (timer, FALSE); _lpt_clear_int (timer); #else hwtimer_stop(&hwtimer2); hwtimer_deinit(&hwtimer2); #endif /* Do not return to sleep after isr again */ _lpm_wakeup_core (); }