English
Language : 

PIC32MX440F256H-80I Datasheet, PDF (409/646 Pages) Microchip Technology – 64/100-Pin General Purpose and USB 32-Bit Flash Microcontrollers
PIC32MX3XX/4XX
EXAMPLE 17-4: SPI1 ISR
/*
The following code example demonstrates a simple interrupt service routine for SPI1
interrupts. The user’s code at this vector should perform any application specific
operations and must clear the SPI1 interrupt flags before exiting.
*/
void __ISR(_SPI_1_VECTOR, ipl3) __SPI1Interrupt(void)
{
// ... perform application specific operations in response to the interrupt
IFS0CLR = 0x03800000;
}
// Be sure to clear the SPI1 interrupt flags
// before exiting the service routine.
Note:
The SPI1 ISR code example shows
MPLAB® C32 C Compiler-specific syntax.
Refer to your compiler manual regarding
support for ISRs.
© 2008 Microchip Technology Inc.
Preliminary
DS61143E-page 407