|
@@ -38,8 +38,13 @@
|
38
|
38
|
#define SPI_CLOCK_MAX SPI_BAUD_PCLK_DIV_2
|
39
|
39
|
#endif
|
40
|
40
|
|
41
|
|
-#define CS_LOW() WRITE(ONBOARD_SD_CS_PIN, LOW) // Set OnboardSPI cs low
|
42
|
|
-#define CS_HIGH() WRITE(ONBOARD_SD_CS_PIN, HIGH) // Set OnboardSPI cs high
|
|
41
|
+#if PIN_EXISTS(ONBOARD_SD_CS) && ONBOARD_SD_CS_PIN != SD_SS_PIN
|
|
42
|
+ #define CS_LOW() WRITE(ONBOARD_SD_CS_PIN, LOW) // Set OnboardSPI cs low
|
|
43
|
+ #define CS_HIGH() WRITE(ONBOARD_SD_CS_PIN, HIGH) // Set OnboardSPI cs high
|
|
44
|
+#else
|
|
45
|
+ #define CS_LOW()
|
|
46
|
+ #define CS_HIGH()
|
|
47
|
+#endif
|
43
|
48
|
|
44
|
49
|
#define FCLK_FAST() ONBOARD_SD_SPI.setClockDivider(SPI_CLOCK_MAX)
|
45
|
50
|
#define FCLK_SLOW() ONBOARD_SD_SPI.setClockDivider(SPI_BAUD_PCLK_DIV_256)
|