/* Timer 0 Interrupt Service Routine */ void IRQ_Routine(void) { PmReturn_t retval; retval = pm_vmPeriodic(200); T0IR = 0x01; //clear timer interrupt VICVectAddr = 0; //end of interrupt - dummy write PM_REPORT_IF_ERROR(retval); }
/* Called from Windows every X ms */ VOID CALLBACK on_timer(HWND hWnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) { PmReturn_t retval = PM_RET_OK; DWORD delta = dwTime - dwLastTime; //printf("diff = %ld\n", delta); // update our system time pm_timerMsTicks = dwTime; retval = pm_vmPeriodic((uint16_t)delta); dwLastTime = dwTime; PM_REPORT_IF_ERROR(retval); }
void CALLBACK on_mm_timer(UINT uTimerID, UINT uMsg, DWORD_PTR dwUser, DWORD_PTR dw1, DWORD_PTR dw2) { PmReturn_t retval = PM_RET_OK; DWORD dwTime = GetTickCount(); DWORD delta = dwTime - dwLastTime; //printf("diff = %ld\n", delta); // update our system time pm_timerMsTicks = dwTime; retval = pm_vmPeriodic((uint16_t)delta); dwLastTime = dwTime; PM_REPORT_IF_ERROR(retval); }