Arduino Function: SPI.SPISettings


With the new SPI library, each SPI device can be configure once as an SPISettings object.


SPISettings mySettting(speed, dataOrder, datamode)
SPISettings mySettting(speed, dataOrder, datamode, pinMISO, pinMOSI, pinSCK) (only for Arduino Primo Core)


  • speed: the speed of the communication
  • dataOrder: MSBFIRST or LSBFIRST
  • dataMode : SPI_MODE0, SPI_MODE1, SPI_MODE2, or SPI_MODE3
Only for the Arduino Primo Core is possible to change the SPI pins, specifying the new pins as parameters of function:
  • pinMISO: the pin number of new MISO (default is 4)
  • pinMOSI: the pin number of new MOSI (default is 5)
  • pinSCK: the pin number of new SCK (default is 6)

Based on the reference originally written by Arduino Community, and