|
@ -38,8 +38,13 @@ |
|
|
#define SPI_CLOCK_MAX SPI_BAUD_PCLK_DIV_2 |
|
|
#define SPI_CLOCK_MAX SPI_BAUD_PCLK_DIV_2 |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#define CS_LOW() WRITE(ONBOARD_SD_CS_PIN, LOW) // Set OnboardSPI cs low
|
|
|
#if PIN_EXISTS(ONBOARD_SD_CS) && ONBOARD_SD_CS_PIN != SD_SS_PIN |
|
|
#define CS_HIGH() WRITE(ONBOARD_SD_CS_PIN, HIGH) // Set OnboardSPI cs high
|
|
|
#define CS_LOW() WRITE(ONBOARD_SD_CS_PIN, LOW) // Set OnboardSPI cs low
|
|
|
|
|
|
#define CS_HIGH() WRITE(ONBOARD_SD_CS_PIN, HIGH) // Set OnboardSPI cs high
|
|
|
|
|
|
#else |
|
|
|
|
|
#define CS_LOW() |
|
|
|
|
|
#define CS_HIGH() |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
#define FCLK_FAST() ONBOARD_SD_SPI.setClockDivider(SPI_CLOCK_MAX) |
|
|
#define FCLK_FAST() ONBOARD_SD_SPI.setClockDivider(SPI_CLOCK_MAX) |
|
|
#define FCLK_SLOW() ONBOARD_SD_SPI.setClockDivider(SPI_BAUD_PCLK_DIV_256) |
|
|
#define FCLK_SLOW() ONBOARD_SD_SPI.setClockDivider(SPI_BAUD_PCLK_DIV_256) |
|
|