Skip to content
Snippets Groups Projects
Commit 264a5a59 authored by Thibaut VIARD's avatar Thibaut VIARD
Browse files

[zero/SPI] Adding default values for SPI custom definitions

parent 9440d5bf
No related branches found
No related tags found
No related merge requests found
......@@ -204,6 +204,21 @@ void SPIClass::detachInterrupt() {
#if SPI_INTERFACES_COUNT > 0
/* In case new variant doesn't define these macros,
* we put here the ones for Arduino Zero.
*
* These values should be different on some variants!
*
* The SPI PAD values can be found in cores/arduino/SERCOM.h:
* - SercomSpiTXPad
* - SercomRXPad
*/
#ifndef PERIPH_SPI
#define PERIPH_SPI sercom4
#define PAD_SPI_TX SPI_PAD_2_SCK_3
#define PAD_SPI_RX SERCOM_RX_PAD_0
#endif // PERIPH_SPI
SPIClass SPI( &PERIPH_SPI, PIN_SPI_MISO, PIN_SPI_SCK, PIN_SPI_MOSI, PAD_SPI_TX, PAD_SPI_RX );
#endif // SPI_INTERFACES_COUNT > 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment