Skip to content

Commit 5f33bc1

Browse files
author
oclyke
committed
patch support for Arduino SD lib
this is a temporary patch for #271 the better fix would be for Arduino to implement an SD lib that has fall-backs that leverage the SPI api or the digital pin functions in that order
1 parent 76e9814 commit 5f33bc1

File tree

5 files changed

+30
-0
lines changed

5 files changed

+30
-0
lines changed

variants/SFE_ARTEMIS/variant.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,10 @@
2525
// UART
2626
extern UART Serial1;
2727

28+
// temporary patch to support Arduino SD library
29+
#define SS 0
30+
#define MOSI SPI_SDO
31+
#define MISO SPI_SDI
32+
#define SCK SPI_CLK
33+
2834
#endif // _VARIANT_H_

variants/SFE_ARTEMIS_ATP/variant.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,10 @@
2525
// UART
2626
extern UART Serial1;
2727

28+
// temporary patch to support Arduino SD library
29+
#define SS 0
30+
#define MOSI SPI_SDO
31+
#define MISO SPI_SDI
32+
#define SCK SPI_CLK
33+
2834
#endif // _VARIANT_H_

variants/SFE_ARTEMIS_DK/variant.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,10 @@
3030
#define VARIANT_Wire_SDA I2C_SDA
3131
#define VARIANT_Wire_SCL I2C_SCL
3232

33+
// temporary patch to support Arduino SD library
34+
#define SS 0
35+
#define MOSI SPI_SDO
36+
#define MISO SPI_SDI
37+
#define SCK SPI_CLK
38+
3339
#endif // _VARIANT_H_

variants/SFE_ARTEMIS_NANO/variant.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,10 @@
2828
// UART
2929
extern UART Serial1;
3030

31+
// temporary patch to support Arduino SD library
32+
#define SS 0
33+
#define MOSI SPI_SDO
34+
#define MISO SPI_SDI
35+
#define SCK SPI_CLK
36+
3137
#endif // _VARIANT_H_

variants/SFE_ARTEMIS_THING_PLUS/variant.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,10 @@
2525
// UART
2626
extern UART Serial1;
2727

28+
// temporary patch to support Arduino SD library
29+
#define SS 0
30+
#define MOSI SPI_SDO
31+
#define MISO SPI_SDI
32+
#define SCK SPI_CLK
33+
2834
#endif // _VARIANT_H_

0 commit comments

Comments
 (0)