void TIM2_IRQHandler(void) // Timer2 Interrupt Handler { TIM_ClearITPendingBit(TIM2, TIM_IT_Update); (void) irsnd_ISR(); // call irmp ISR (void) irmp_ISR(); // call other timer interrupt routines... }
void interrupt high_priority high_isr(void) { if (TMR2IF) { TMR2IF = 0; // clear Timer 0 interrupt flag irmp_ISR(); } }
/*--------------------------------------------------------------------------------------------------------------------------------------------------- * timer 15 update handler, called every 1/15000 sec *--------------------------------------------------------------------------------------------------------------------------------------------------- */ extern "C" void TIM1_BRK_TIM15_IRQHandler(void) { // if irsnd_ISR not busy call irmp ISR if (!irsnd_ISR()) { irmp_ISR(); } STM_EVAL_LEDToggle(LED7); // GREEN RIGHT TIM_ClearITPendingBit(TIM15, TIM_IT_Update ); }
/*--------------------------------------------------------------------------------------------------------------------------------------------------- * timer 15 update handler, called every 1/15000 sec *--------------------------------------------------------------------------------------------------------------------------------------------------- */ extern "C" void TIM1_BRK_TIM15_IRQHandler(void) { // if irsnd_ISR not busy call irmp ISR if (!irsnd_ISR()) { irmp_ISR(); } BSP_LED_Toggle(LED_GREEN_2); // GREEN RIGHT __HAL_TIM_CLEAR_FLAG(&TIM15Handle, TIM_IT_UPDATE); }
void TIMER1_COMPA_vect(void) { /* main functions for irmp */ irmp_ISR(); // call irmp ISR if ((intCount++ % 512) == 0) { ADCSRA |= (1 << ADSC); //intCount = 0; } }
void interrupt isr(void) { TMR1=0xffff-_XTAL_FREQ/F_INTERRUPTS; TMR1IF=0; // clear timer 1 interrupt if (!irsnd_ISR()) { irmp_ISR(); } }
void TIM2_IRQHandler ( void ) { TIM_ClearITPendingBit ( TIM2, TIM_IT_Update ); irmp_ISR ( ); // call irmp ISR };
void irmp_timer(void) { irmp_ISR (); }
void Timer1IntHandler(void) // Timer1 Interrupt Handler { (void) irmp_ISR(); // call irmp ISR // call other timer interrupt routines... }
/*------------------------------------------------------------------------------------------------------------------------------------------- * timer2 IRQ handler for IRMP, soft clock, dcf77, animations, several timeouts *------------------------------------------------------------------------------------------------------------------------------------------- */ void TIM2_IRQHandler (void) { static uint_fast16_t ldr_cnt; static uint_fast16_t animation_cnt; static uint_fast16_t clk_cnt; static uint_fast16_t dcf77_cnt; static uint_fast16_t net_time_cnt; static uint_fast16_t eeprom_cnt; static uint_fast16_t ds3231_cnt; TIM_ClearITPendingBit(TIM2, TIM_IT_Update); if (short_isr) // run this handler in short version { clk_cnt++; if (clk_cnt == F_INTERRUPTS) // increment internal clock every second { clk_cnt = 0; uptime++; second++; if (second == 60) { second = 0; minute++; show_time_flag = 1; if (minute == 60) { minute = 0; hour++; if (hour == 24) { hour = 0; wday++; if (wday == 7) { wday = 0; } } } } } } else { // no short version, run all #if SAVE_RAM == 0 (void) irmp_ISR (); // call irmp ISR #endif if (uptime > 1) { ldr_cnt++; if (ldr_cnt == F_INTERRUPTS / 4) // start LDR conversion every 1/4 seconds { ldr_conversion_flag = 1; ldr_cnt = 0; } } animation_cnt++; if (animation_cnt == F_INTERRUPTS / 40) // set animation_flag every 1/40 of a second { animation_flag = 1; animation_cnt = 0; } dcf77_cnt++; if (dcf77_cnt == F_INTERRUPTS / 100) // set dcf77_flag every 1/100 of a second { dcf77_flag = 1; dcf77_cnt = 0; } net_time_cnt++; if (net_time_cnt == F_INTERRUPTS / 100) // set esp8266_ten_ms_tick every 1/100 of a second { esp8266_ten_ms_tick = 1; net_time_cnt = 0; } eeprom_cnt++; if (eeprom_cnt == F_INTERRUPTS / 1000) // set eeprom_ms_tick every 1/1000 of a second { eeprom_ms_tick = 1; eeprom_cnt = 0; } clk_cnt++; if (clk_cnt == F_INTERRUPTS) // increment internal clock every second { clk_cnt = 0; uptime++; second++; ds3231_cnt++; if (ds3231_cnt >= 70) // get rtc time every 70 seconds { ds3231_flag = 1; ds3231_cnt = 0; } if (second == 60) { second = 0; minute++; show_time_flag = 1; if (minute == 60) { minute = 0; hour++; if (hour == 24) { hour = 0; wday++; if (wday == 7) { wday = 0; } } } } if (net_time_countdown) { net_time_countdown--; if (net_time_countdown == 0) // net time update every 3800 minutes { net_time_flag = 1; } } } } }
void Timer2IntHandler(void) { HWREG(TIMER2_BASE + TIMER_O_ICR) = TIMER_TIMA_TIMEOUT; irmp_ISR(); }
/***************************************** * Timer 5 Callback @10kHz * - Used for: IR Remote sampling *****************************************/ void UB_TIMER5_ISR_CallBack( void ) { // routine for IR remote signal processing irmp_ISR( UB_DigIn_Read( DIN_PA15 ) ); }