software/libbase/spisdcard: add USE_SPISDCARD_RECLOCKING define to easily disable reclocking.

This commit is contained in:
Florent Kermarrec 2020-03-26 07:46:32 +01:00
parent b509df8bb6
commit 73b4347587
1 changed files with 6 additions and 2 deletions

View File

@ -21,6 +21,8 @@
#include <time.h>
#include <string.h>
#define USE_SPISCARD_RECLOCKING
#ifdef CSR_SPISDCARD_BASE
// Import prototypes for the functions
#include <spisdcard.h>
@ -444,6 +446,7 @@ uint8_t spi_sdcard_readMBR(void)
return FAILURE;
}
#ifdef USE_SPISCARD_RECLOCKING
// Reclock the card
// Calculate 16MHz as an integer divider from the CONFIG_CLOCK_FREQUENCY
// Add 1 as will be rounded down
@ -468,6 +471,7 @@ uint8_t spi_sdcard_readMBR(void)
return FAILURE;
}
}
#endif
// Read in FAT16 Root Directory
// Calculate Storage from TOP of MAIN RAM