SPI

endTransaction()

Since 0.6.1:

Releases the SPI peripheral.

This function releases the SPI peripheral lock, allowing other threads to use it. See Synchronizing Access to Shared System Resources section for additional information on shared resource locks.

// SYNTAX
SPI.endTransaction();

Returns: Negative integer in case of an error.

Note that you must use the same SPI object as used with SPI.begin() so if you used SPI1.begin() also use SPI1.endTransaction().