SD-Card: proper HAL (#3058)
* Storage: remove unused error from SDInfo * FatFS: remove sd_spi_io * HAL: sd card api * Update: use sd hal * FatFS: use sd hal * Storage: use sd hal * API: sd hal * Fix TODO workflow * SD Hal: Fix source buffer overflow * fix for fix! * HAL: cleanup sd detection api * HAL: FURI_HAL_SD_SPI_DEBUG flag * HAL: FuriHalSdStatus -> FuriStatus * API: downgrade * Change define logic * HAL: presence
This commit is contained in:
@@ -23,8 +23,8 @@ static FATFS* pfs = NULL;
|
||||
}
|
||||
|
||||
static bool flipper_update_mount_sd() {
|
||||
for(int i = 0; i < sd_max_mount_retry_count(); ++i) {
|
||||
if(sd_init((i % 2) == 0) != SdSpiStatusOK) {
|
||||
for(int i = 0; i < furi_hal_sd_max_mount_retry_count(); ++i) {
|
||||
if(furi_hal_sd_init((i % 2) == 0) != FuriStatusOk) {
|
||||
/* Next attempt will be without card reset, let it settle */
|
||||
furi_delay_ms(1000);
|
||||
continue;
|
||||
@@ -51,7 +51,7 @@ static bool flipper_update_init() {
|
||||
furi_hal_spi_config_init();
|
||||
|
||||
fatfs_init();
|
||||
if(!hal_sd_detect()) {
|
||||
if(!furi_hal_sd_is_present()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user