14,7 → 14,7 |
// priority interrupts, but this code is not setup for that and this nesting |
// is not enabled. |
|
void interrupt_init() { |
void Interrupt_Init() { |
// Peripheral interrupts can have their priority set to high or low |
// Decide on the priority of the enabled peripheral interrupts (0 is low, 1 is high) |
|
39,7 → 39,7 |
// INTCON3bits.INT1IE = 1; |
} |
|
void interrupt_enable() { |
void Interrupt_Enable() { |
// Peripheral interrupts can have their priority set to high or low. |
// Enable both high-priority interrupts and low-priority interrupts |
RCONbits.IPEN = 1; |
47,31 → 47,11 |
INTCONbits.GIEL = 1; |
} |
|
//int interrupt_in_high_interrupt_routine() { |
// return (!INTCONbits.GIEH); |
//} |
// |
//int interrupt_low_int_active() { |
// return (!INTCONbits.GIEL); |
//} |
// |
//int interrupt_in_low_interrupt_routine() { |
// if (INTCONbits.GIEL == 1) { |
// return (0); |
// } else if (interrupt_in_high_interrupt_routine()) { |
// return (0); |
// } else { |
// return (1); |
// } |
//} |
// |
//int interrupt_in_main_routine() { |
// if ((!interrupt_in_low_interrupt_routine()) && (!interrupt_in_high_interrupt_routine())) { |
// return (1); |
// } else { |
// return (0); |
// } |
//} |
void Interrupt_Disable() { |
RCONbits.IPEN = 0; |
INTCONbits.GIEH = 0; |
INTCONbits.GIEL = 0; |
} |
|
// Set up the interrupt vectors |
void InterruptHandlerHigh(); |