Skip to content

Commit 5536617

Browse files
committed
Add Arduino/Genuino 101 support to SD library
1 parent 3c1bdb0 commit 5536617

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

libraries/SD/src/utility/Sd2PinMap.h

+15
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,21 @@ static inline __attribute__((always_inline))
491491
}
492492
#endif // Sd2PinMap_h
493493

494+
#elif defined (__CPU_ARC__)
495+
496+
#if defined (__ARDUINO_ARC__)
497+
// Two Wire (aka I2C) ports
498+
uint8_t const SDA_PIN = 18;
499+
uint8_t const SCL_PIN = 19;
500+
501+
// SPI port
502+
uint8_t const SS_PIN = 10;
503+
uint8_t const MOSI_PIN = 11;
504+
uint8_t const MISO_PIN = 12;
505+
uint8_t const SCK_PIN = 13;
506+
507+
#endif // Arduino ARC
508+
494509
#else
495510
#error Architecture or board not supported.
496511
#endif

libraries/SD/src/utility/SdFat.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* \file
2424
* SdFile and SdVolume classes
2525
*/
26-
#ifdef __AVR__
26+
#if defined (__AVR__) || defined (__CPU_ARC__)
2727
#include <avr/pgmspace.h>
2828
#endif
2929
#include "Sd2Card.h"

0 commit comments

Comments
 (0)