mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-18 07:52:14 +01:00
[sam] Fixed compilation problem on SPI class. SPI device is now called SPI_0 to avoid name clashes.
This commit is contained in:
parent
95738df9bf
commit
00ceed55d2
@ -56,7 +56,7 @@ void SPIClass::detachInterrupt(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if SPI_INTERFACES_COUNT > 0
|
#if SPI_INTERFACES_COUNT > 0
|
||||||
static void SPI0_Init(void) {
|
static void SPI_0_Init(void) {
|
||||||
PIO_Configure(g_APinDescription[PIN_SPI_MOSI].pPort,
|
PIO_Configure(g_APinDescription[PIN_SPI_MOSI].pPort,
|
||||||
g_APinDescription[PIN_SPI_MOSI].ulPinType,
|
g_APinDescription[PIN_SPI_MOSI].ulPinType,
|
||||||
g_APinDescription[PIN_SPI_MOSI].ulPin,
|
g_APinDescription[PIN_SPI_MOSI].ulPin,
|
||||||
@ -71,5 +71,5 @@ static void SPI0_Init(void) {
|
|||||||
g_APinDescription[PIN_SPI_SCK].ulPinConfiguration);
|
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
|
#endif
|
||||||
|
@ -57,7 +57,7 @@ class SPIClass {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#if SPI_INTERFACES_COUNT > 0
|
#if SPI_INTERFACES_COUNT > 0
|
||||||
extern SPIClass SPI0;
|
extern SPIClass SPI_0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -80,8 +80,8 @@
|
|||||||
*/
|
*/
|
||||||
#define SPI_INTERFACES_COUNT 1
|
#define SPI_INTERFACES_COUNT 1
|
||||||
|
|
||||||
#define SPI_INTERFACE SPI
|
#define SPI_INTERFACE SPI0
|
||||||
#define SPI_INTERFACE_ID ID_SPI
|
#define SPI_INTERFACE_ID ID_SPI0
|
||||||
#define PIN_SPI_SS (77u)
|
#define PIN_SPI_SS (77u)
|
||||||
#define PIN_SPI_MOSI (75u)
|
#define PIN_SPI_MOSI (75u)
|
||||||
#define PIN_SPI_MISO (74u)
|
#define PIN_SPI_MISO (74u)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user