Skip to content

Commit 2537ab3

Browse files
cmagliesandeepmistry
authored andcommitted
MKRZero: added definitions for SD library
1 parent f9ed436 commit 2537ab3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

variants/mkrzero/variant.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ static const uint8_t MISO = PIN_SPI_MISO;
106106
static const uint8_t SCK = PIN_SPI_SCK;
107107

108108
// SPI1: Connected to SD
109-
#define USE_SPI1
110109
#define PIN_SPI1_MISO (29u)
111110
#define PIN_SPI1_MOSI (26u)
112111
#define PIN_SPI1_SCK (27u)
@@ -119,6 +118,13 @@ static const uint8_t MOSI1 = PIN_SPI1_MOSI;
119118
static const uint8_t MISO1 = PIN_SPI1_MISO;
120119
static const uint8_t SCK1 = PIN_SPI1_SCK;
121120

121+
// Needed for SD library
122+
#define SDCARD_SPI SPI1
123+
#define SDCARD_MISO_PIN PIN_SPI1_MISO
124+
#define SDCARD_MOSI_PIN PIN_SPI1_MOSI
125+
#define SDCARD_SCK_PIN PIN_SPI1_SCK
126+
#define SDCARD_SS_PIN PIN_SPI1_SS
127+
122128
// Wire Interfaces
123129
// ---------------
124130
#define WIRE_INTERFACES_COUNT 1

0 commit comments

Comments
 (0)