Add simple SPI slave example

This commit is contained in:
Victor Lamoine 2018-04-23 19:27:37 +02:00
parent 652569c079
commit 6e4a80f106
1 changed files with 1 additions and 3 deletions

View File

@ -9,11 +9,9 @@
void setupSPI(void)
{
// MOSI, MISO, SCK PINs are set by the library
pinMode(BOARD_SPI_DEFAULT_SS, INPUT); // SS
// The clock value is not used
// SPI1 is selected by default
// MOSI, MISO, SCK and NSS PINs are set by the library
SPI.beginTransactionSlave(SPISettings(18000000, MSBFIRST, SPI_MODE0, DATA_SIZE_8BIT));
}