refactor: SD card SPI HAL (#3957)
* refactor: SD card SPI driver * Removed SPI and DMA StdPeriph drivers * Allow for disabling SPI DMA support * Disable SPI sdcard CRC support * Fix 2MHz timer on NV14 * Shared VS1053b driver * Fix: SPI2 uses PCLK1 * feat: new generic diskio API * More generic SD_CARD_PRESENT() * Fixes * Flush incoming block on token mismatch * Scratch buffer test * Incredible hack to re-sync sd card * fix: SDIO driver
This commit is contained in:
@@ -64,16 +64,6 @@ enum {
|
||||
PCBREV_X7_40 = 1,
|
||||
};
|
||||
|
||||
// SD driver
|
||||
#define __disk_read disk_read
|
||||
#define __disk_write disk_write
|
||||
|
||||
#if defined(SIMU) || !defined(SD_PRESENT_GPIO)
|
||||
#define SD_CARD_PRESENT() true
|
||||
#else
|
||||
#define SD_CARD_PRESENT() ((SD_PRESENT_GPIO->IDR & SD_PRESENT_GPIO_PIN) == 0)
|
||||
#endif
|
||||
|
||||
// Flash Write driver
|
||||
#define FLASH_PAGESIZE 256
|
||||
void unlockFlash();
|
||||
|
||||
Reference in New Issue
Block a user