Subversion Repositories Code-Repo

Rev

Rev 279 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
279 Kevin 1
#include <xc.h>
2
#include "defines.h"
3
#include "INTERRUPTS.h"
4
 
5
void Interrupt_Enable() {
6
    INTCONbits.GIE = 1;
7
    INTCONbits.PEIE = 1;
8
}
9
 
10
void Interrupt_Disable() {
11
    INTCONbits.GIE = 0;
12
    INTCONbits.PEIE = 0;
13
}
14
 
15
void interrupt InterruptHandler(void) {
16
 
17
//    // Check to see if we have an I2C interrupt
18
//    if (PIR1bits.SSPIF) {
19
//        I2C_Interrupt_Handler();
20
//        PIR1bits.SSPIF = 0;
21
//    }
22
 
23
//#ifndef UART_TX_ONLY
24
//    // Check to see if we have an interrupt on USART1 RX
25
//    if (PIR1bits.RCIF) {
26
//        UART_Recv_Interrupt_Handler();
27
//        PIR1bits.RCIF = 0;
28
//        if (INTCONbits.TMR0IF)
29
//            tmr0_rollover = 1;
30
//    }
31
//#endif
32
 
33
//    // Check to see if we have an interrupt on USART1 TX
34
//    if (PIR1bits.TXIF) {
35
//        UART_Send_Interrupt_Handler();
36
////        PIR1bits.TXIF = 0;
37
//        if (INTCONbits.TMR0IF)
38
//            tmr0_rollover = 1;
39
//    }
40
 
41
}