[sam] Fixed compilation problem on SPI class. SPI device is now called SPI_0 to avoid name clashes.

This commit is contained in:
Cristian Maglie 2012-04-23 15:50:30 +02:00
parent 95738df9bf
commit 00ceed55d2
3 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -57,7 +57,7 @@ class SPIClass {
};
#if SPI_INTERFACES_COUNT > 0
extern SPIClass SPI0;
extern SPIClass SPI_0;
#endif
#endif

View File

@ -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)