Subversion Repositories Code-Repo

Rev

Blame | Last modification | View Log | RSS feed

#include <xc.h>
#include "defines.h"
#include "INTERRUPTS.h"

void Interrupt_Enable() {
    INTCONbits.GIE = 1;
    INTCONbits.PEIE = 1;
}

void Interrupt_Disable() {
    INTCONbits.GIE = 0;
    INTCONbits.PEIE = 0;
}

void interrupt InterruptHandler(void) {
    
//    // Check to see if we have an I2C interrupt
//    if (PIR1bits.SSPIF) {
//        I2C_Interrupt_Handler();
//        PIR1bits.SSPIF = 0;
//    }

//#ifndef UART_TX_ONLY
//    // Check to see if we have an interrupt on USART1 RX
//    if (PIR1bits.RCIF) {
//        UART_Recv_Interrupt_Handler();
//        PIR1bits.RCIF = 0;
//        if (INTCONbits.TMR0IF)
//            tmr0_rollover = 1;
//    }
//#endif

//    // Check to see if we have an interrupt on USART1 TX
//    if (PIR1bits.TXIF) {
//        UART_Send_Interrupt_Handler();
////        PIR1bits.TXIF = 0;
//        if (INTCONbits.TMR0IF)
//            tmr0_rollover = 1;
//    }

}