/******************************************************************************/ /*Files to Include */ /******************************************************************************/ #if defined(__XC) #include /* XC8 General Include File */ #elif defined(HI_TECH_C) #include /* HiTech General Include File */ #endif #include /* For uint8_t definition */ #include /* For true/false definition */ #include "user.h" /******************************************************************************/ /* Interrupt Routines */ /******************************************************************************/ /* Baseline devices don't have interrupts. Unfortunately the baseline detection * macro is named _PIC12 */ #ifndef _PIC12 void interrupt isr(void) { /* This code stub shows general interrupt handling. Note that these conditional statements are not handled within 3 seperate if blocks. Do not use a seperate if block for each interrupt flag to avoid run time errors. */ if (PIE1bits.TXIE && PIR1bits.TXIF) msg_sendnext(); if (PIE1bits.RCIE && PIR1bits.RCIF) msg_recvnext(); if (T1CONbits.TMR1ON && PIR1bits.TMR1IF) { timer_rollover(); } #if 0 /* TODO Add interrupt routine code here. */ /* Determine which flag generated the interrupt */ if() { ; /* Clear Interrupt Flag 1 */ } else if () { ; /* Clear Interrupt Flag 2 */ } else { /* Unhandled interrupts */ } #endif } #endif