Subversion Repositories Code-Repo

Compare Revisions

Ignore whitespace Rev 111 → Rev 112

/Classwork/ECE4534 - Embedded Systems/PIC 27J13/pin_interrupts.c
14,14 → 14,14
 
RPINR1 = 2; // Bind INT1 interrupt to RP2
 
INTCON3bits.INT1IE = 1; // Enable interrupt for INT1
INTCON2bits.INTEDG1 = 0; // Trigger on falling edge
}
 
void int1_interrupt_handler() {
LATCbits.LATC2 = 1;
Delay10TCYx(1);
Delay10TCYx(255);
LATCbits.LATC2 = 0;
MQ_sendmsg_ToMainFromLow(0, MSGTYPE_INT1, (void *) 0);
}
 
void port_b_int_init() {