Skip to content

Commit

Permalink
Merge branch 'release/v0.4.9' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mcgowan committed Jan 31, 2016
2 parents ea786be + 78e4ac3 commit 0d66f34
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 23 deletions.
9 changes: 3 additions & 6 deletions wiring/inc/spark_wiring_spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,14 @@ class SPIClass {

#ifndef SPARK_WIRING_NO_SPI

#define SPI __fetch_global_SPI()
SPIClass& __fetch_global_SPI();
extern SPIClass SPI;

#if Wiring_SPI1
#ifdef SPI1
#undef SPI1
#endif // SPI1

#define SPI1 __fetch_global_SPI1()
SPIClass& __fetch_global_SPI1();
extern SPIClass SPI1;

#endif // Wiring_SPI1

Expand All @@ -130,8 +128,7 @@ SPIClass& __fetch_global_SPI1();
#undef SPI2
#endif // SPI2

#define SPI2 __fetch_global_SPI2()
SPIClass& __fetch_global_SPI2();
extern SPIClass SPI2;

#endif // Wiring_SPI2

Expand Down
2 changes: 1 addition & 1 deletion wiring/src/user.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ void system_initialize_user_backup_ram()

#include "platform_headers.h"

static retained_system volatile uint32_t __backup_sram_signature;
static retained volatile uint32_t __backup_sram_signature;
static bool backup_ram_was_valid_ = false;
const uint32_t signature = 0x9A271C1E;

Expand Down
19 changes: 3 additions & 16 deletions wiring_globals/src/wiring_globals_spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,14 @@

#ifndef SPARK_WIRING_NO_SPI


SPIClass& __fetch_global_SPI()
{
static SPIClass spi(HAL_SPI_INTERFACE1);
return spi;
}
SPIClass SPI(HAL_SPI_INTERFACE1);

#if Wiring_SPI1
SPIClass& __fetch_global_SPI1()
{
static SPIClass spi1(HAL_SPI_INTERFACE2);
return spi1;
}
SPIClass SPI1(HAL_SPI_INTERFACE2);
#endif

#if Wiring_SPI2
SPIClass& __fetch_global_SPI2()
{
static SPIClass spi2(HAL_SPI_INTERFACE3);
return spi2;
}
SPIClass SPI2(HAL_SPI_INTERFACE3);
#endif

#endif //SPARK_WIRING_NO_SPI
Expand Down

0 comments on commit 0d66f34

Please sign in to comment.