diff --git a/lib/sd.c b/lib/sd.c index 1fb8462..2ea0e19 100644 --- a/lib/sd.c +++ b/lib/sd.c @@ -45,10 +45,13 @@ bool sd_init() return false; // timeout + // f_cpu/8 speed (-> 2 MHz) + SPSR |= _BV(SPI2X); + SPCR &= 0xFC | _BV(SPR0); + // Set block size to 512 bytes (SD card default) sd_command(SD_SET_BLOCKLEN, 512); - return true; }