diff --git a/hardware/arduino/sam/libraries/SPI/SPI.cpp b/hardware/arduino/sam/libraries/SPI/SPI.cpp index bd7a6433a..d27d13fcc 100644 --- a/hardware/arduino/sam/libraries/SPI/SPI.cpp +++ b/hardware/arduino/sam/libraries/SPI/SPI.cpp @@ -56,7 +56,7 @@ void SPIClass::detachInterrupt(void) { } #if SPI_INTERFACES_COUNT > 0 -static void SPI0_Init(void) { +static void SPI_0_Init(void) { PIO_Configure(g_APinDescription[PIN_SPI_MOSI].pPort, g_APinDescription[PIN_SPI_MOSI].ulPinType, g_APinDescription[PIN_SPI_MOSI].ulPin, @@ -71,5 +71,5 @@ static void SPI0_Init(void) { g_APinDescription[PIN_SPI_SCK].ulPinConfiguration); } -SPIClass SPI0(SPI_INTERFACE, SPI_INTERFACE_ID, SPI0_Init); +SPIClass SPI_0(SPI_INTERFACE, SPI_INTERFACE_ID, SPI_0_Init); #endif diff --git a/hardware/arduino/sam/libraries/SPI/SPI.h b/hardware/arduino/sam/libraries/SPI/SPI.h index ceeaa3f52..b183c886c 100644 --- a/hardware/arduino/sam/libraries/SPI/SPI.h +++ b/hardware/arduino/sam/libraries/SPI/SPI.h @@ -57,7 +57,7 @@ class SPIClass { }; #if SPI_INTERFACES_COUNT > 0 -extern SPIClass SPI0; +extern SPIClass SPI_0; #endif #endif diff --git a/hardware/arduino/sam/variants/arduino_due_x/variant.h b/hardware/arduino/sam/variants/arduino_due_x/variant.h index 3408849c7..5ab9d963c 100644 --- a/hardware/arduino/sam/variants/arduino_due_x/variant.h +++ b/hardware/arduino/sam/variants/arduino_due_x/variant.h @@ -80,8 +80,8 @@ */ #define SPI_INTERFACES_COUNT 1 -#define SPI_INTERFACE SPI -#define SPI_INTERFACE_ID ID_SPI +#define SPI_INTERFACE SPI0 +#define SPI_INTERFACE_ID ID_SPI0 #define PIN_SPI_SS (77u) #define PIN_SPI_MOSI (75u) #define PIN_SPI_MISO (74u)