Subversion Repositories Code-Repo

Compare Revisions

Ignore whitespace Rev 108 → Rev 109

/Classwork/ECE4534 - Embedded Systems/PIC 27J13/interrupts.c
97,13 → 97,13
if (PIR1bits.SSPIF) {
// Nofity the xbee to stop sending serial data
xbee_set_RTS(1);
 
// Clear the interrupt flag
PIR1bits.SSPIF = 0;
// Call the handler
i2c_interrupt_handler();
 
// Clear the interrupt flag
PIR1bits.SSPIF = 0;
 
// Notify xbee to resume sending serial data
xbee_set_RTS(0);
}
120,12 → 120,19
#ifdef _MASTER
// Check to see if we have an interrupt on INT1
if (INTCON3bits.INT1IF) {
int1_interrupt_handler();
 
INTCON3bits.INT1IF = 0;
 
int1_interrupt_handler();
}
#endif
 
// Check to see if we have an interrupt on any port B inputs <4:7>
if (INTCONbits.RBIF) {
port_b_int_interrupt_handler();
 
INTCONbits.RBIF = 0;
}
// // Check to see if we have an interrupt on timer 1
// if (PIR1bits.TMR1IF) {
// // Clear the interrupt flag
135,13 → 142,6
// timer1_interrupt_handler();
// }
 
// // Check to see if we have an interrupt on any port B inputs <4:7>
// if (INTCONbits.RBIF) {
// port_b_int_interrupt_handler();
//
// INTCONbits.RBIF = 0;
// }
 
// The *last* thing I do here is check to see if we can
// allow the processor to go to sleep
// This code *DEPENDS* on the code in messages.c being