Clean up after changes

This commit is contained in:
Scott Lahteine
2020-07-25 01:53:07 -05:00
parent d20d459132
commit bc688f27dc
17 changed files with 88 additions and 94 deletions

View File

@@ -41,8 +41,7 @@
}
bool SDIO_Init() {
if (hsd.State == HAL_SD_STATE_READY) return 1; // return passing status
return 0; // return failing status
return hsd.State == HAL_SD_STATE_READY; // return pass/fail status
}
bool SDIO_ReadBlock(uint32_t block, uint8_t *src) {
@@ -58,7 +57,6 @@
#else // !USBD_USE_CDC_COMPOSITE
// use local drivers
#if defined(STM32F103xE) || defined(STM32F103xG)
#include <stm32f1xx_hal_rcc_ex.h>
#include <stm32f1xx_hal_sd.h>
@@ -274,7 +272,6 @@
bool SDIO_WriteBlock(uint32_t block, const uint8_t *src) {
hsd.Instance = SDIO;
uint8_t retryCnt = SD_RETRY_COUNT;
bool status;
for (;;) {
status = (bool) HAL_SD_WriteBlocks(&hsd, (uint8_t*)src, block, 1, 500); // write one 512 byte block with 500mS timeout