Do I have to disable high interrupts while inside one, if I am using 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 here below? (I would then put the disables in appropriate places within 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