Do I need to disable high interrupts while inside if I use multiple interrupts on the Microchip C18?
Consider the code below:
#ifndef OTHER_INTERRUPT_H #pragma interrupt InterruptHook // interrupt fname void InterruptHook(void) { #ifdef STEPPER_H Stepper_Interrupt(); #endif #ifdef FLOW_H Flow_Interrupt(); #endif } #endif
Should I follow the same approach as in the code below? (Then I would disable them in the appropriate places inside the functions.)
#ifndef OTHER_INTERRUPT_H #pragma interrupt InterruptHook // interrupt fname void InterruptHook(void) { #ifdef STEPPER_H INTCONbits.GIEH = 0; Stepper_Interrupt(); INTCONbits.GIEH = 1; #endif #ifdef FLOW_H INTCONbits.GIEH = 0; Flow_Interrupt(); INTCONbits.GIEH = 1; #endif } #endif
source share