Subversion Repositories Code-Repo

Rev

Rev 280 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 280 Rev 281
Line 1... Line -...
1
#include <xc.h>
-
 
2
#include "defines.h"
1
#include "defines.h"
3
#include "INTERRUPTS.h"
2
#include "INTERRUPTS.h"
-
 
3
#include "I2C1.h"
4
 
4
 
5
void Interrupt_Enable() {
5
void Interrupt_Enable() {
6
    INTCONbits.GIE = 1;
6
    INTCONbits.GIE = 1;
7
    INTCONbits.PEIE = 1;
7
    INTCONbits.PEIE = 1;
8
}
8
}
Line 12... Line 12...
12
    INTCONbits.PEIE = 0;
12
    INTCONbits.PEIE = 0;
13
}
13
}
14
 
14
 
15
void interrupt InterruptHandler(void) {
15
void interrupt InterruptHandler(void) {
16
    
16
    
17
//    // Check to see if we have an I2C interrupt
17
    // Check to see if we have an I2C1 interrupt
18
//    if (PIR1bits.SSPIF) {
18
    if (PIR1bits.SSP1IF) {
19
//        I2C_Interrupt_Handler();
19
        I2C1_Interrupt_Handler();
20
//        PIR1bits.SSPIF = 0;
20
        PIR1bits.SSP1IF = 0;
21
//    }
21
    }
22
 
22
 
23
//#ifndef UART_TX_ONLY
23
//#ifndef UART_TX_ONLY
24
//    // Check to see if we have an interrupt on USART1 RX
24
//    // Check to see if we have an interrupt on USART1 RX
25
//    if (PIR1bits.RCIF) {
25
//    if (PIR1bits.RCIF) {
26
//        UART_Recv_Interrupt_Handler();
26
//        UART_Recv_Interrupt_Handler();