Reference for Wiring version 0027+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.

Name

attachInterrupt()

Examples
...

// attaches 'myFunction' function to SPI transfer complete interruption
SPI.attachInterrupt(myFunction); 

// print to serial when a transfer complete interruption is generated
void myFunction() {
  Serial.println("SPI transfer complete...");  
}

...
Description The Serial Peripheral Interface Bus or SPI bus is a synchronous serial data link standard named by Motorola that operates in full duplex mode. Devices communicate in a master/slave mode where the master device initiates the data frame. Multiple slave devices are allowed with individual slave select (chip select) lines using a pin for each device. The attachInterrupt() method activate the SPI interrupt and attaches a function to be executed when the SPI transfer complete interruption is generated during SPI communication.
Syntax
SPI.attachInterrupt(function)
Parameters
function the name of the user defined function to execute when transfer complete
Returns None
Usage Application
Updated on September 16, 2010 10:32:01pm PDT

Creative Commons License