/* * Handle the compare interupt by calling the callout dispatcher * and then re-scheduling the next deadline. */ static int hrt_tim_isr(int irq, void *context) { uint32_t status; /* copy interrupt status */ status = rSR; /* ack the interrupts we just read */ rSR = ~status; #ifdef CONFIG_HRT_PPM /* was this a PPM edge? */ if (status & (SR_INT_PPM | SR_OVF_PPM)) hrt_ppm_decode(status); #endif /* was this a timer tick? */ if (status & SR_INT_HRT) { /* run any callouts that have met their deadline */ hrt_call_invoke(); /* and schedule the next interrupt */ hrt_call_reschedule(); } return OK; }
/** * Timer interrupt handler * * This routine simulates a timer interrupt handler */ static void hrt_tim_isr(void *p) { //printf("hrt_tim_isr\n"); /* run any callouts that have met their deadline */ hrt_call_invoke(); hrt_lock(); /* and schedule the next interrupt */ hrt_call_reschedule(); hrt_unlock(); }
/** * Handle the compare interrupt by calling the callout dispatcher * and then re-scheduling the next deadline. */ static int hrt_tim_isr(int irq, void *context) { uint32_t status; /* grab the timer for latency tracking purposes */ latency_actual = rCNT; /* copy interrupt status */ status = rSR; /* ack the interrupts we just read */ rSR = ~status; #ifdef HRT_PPM_CHANNEL /* was this a PPM edge? */ if (status & (SR_INT_PPM | SR_OVF_PPM)) { /* if required, flip edge sensitivity */ # ifdef PPM_EDGE_FLIP rCCER ^= CCER_PPM_FLIP; # endif hrt_ppm_decode(status); } #endif /* was this a timer tick? */ if (status & SR_INT_HRT) { /* do latency calculations */ hrt_latency_update(); /* run any callouts that have met their deadline */ hrt_call_invoke(); /* and schedule the next interrupt */ hrt_call_reschedule(); } return OK; }
/** * Handle the compare interrupt by calling the callout dispatcher * and then re-scheduling the next deadline. */ static int hrt_tim_isr(int irq, void *context, void *arg) { /* grab the timer for latency tracking purposes */ latency_actual = rCNT; /* copy interrupt status */ uint32_t status = rSTATUS; /* ack the interrupts we just read */ rSTATUS = status; #ifdef HRT_PPM_CHANNEL /* was this a PPM edge? */ if (status & (STATUS_PPM)) { hrt_ppm_decode(status); } #endif /* was this a timer tick? */ if (status & STATUS_HRT) { /* do latency calculations */ hrt_latency_update(); /* run any callouts that have met their deadline */ hrt_call_invoke(); /* and schedule the next interrupt */ hrt_call_reschedule(); } return OK; }