/** * \fn void HMIRoutine(const TTimerChannel channelNb) * \brief Default HMI time driven interupt process routine * \param channelNb Indicate the parent timer channel */ void HMIRoutine(const TTimerChannel channelNb) { static UINT16 count = 0; // 2ms every cycle //HMI_Poll(); ++count; if (count == 49) // 10 fps or 100ms { count = 0; HMI_Poll(); if (HMIContext.renderMode == HMI_RENDER_MODE_CONTINUITY || HMIContext.isDirty) { // TODO: replace unused with a debug macro UNUSED(HMI_RenderFrame()); } } Timer_ScheduleRoutine(channelNb, HMIRoutinePeriod); }
void Sched_Init() { int cpu; sched_ProcessorStatus[0] = SCHED_PROCESSOR_ACTIVE; for(cpu = 0; cpu < MACH_MAX_NUM_PROCESSORS; cpu++) { sched_ProcessorStatus[cpu] = SCHED_PROCESSOR_NOT_STARTED; sched_OnDeck[cpu].procPtr = (Proc_ControlBlock *) NIL; } bzero((Address) &(sched_Instrument),sizeof(sched_Instrument)); List_Init(schedReadyQueueHdrPtr); Sync_SemInitDynamic(sched_MutexPtr, "sched_Mutex"); Sync_SemRegister(sched_MutexPtr); forgetUsageElement.routine = Sched_ForgetUsage; forgetUsageElement.clientData = 0; forgetUsageElement.interval = FORGET_INTERVAL; Timer_ScheduleRoutine(&forgetUsageElement, TRUE); init = TRUE; }