Skip to content

Commit 1b90bf8

Browse files
committed
lfsshim_hsd fixed
1 parent 15379fb commit 1b90bf8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stm32h7/littlefs_shim.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ int lfsshim_read(const struct lfs_config *c, lfs_block_t block, lfs_off_t off, v
2525
// Wait for card to be ready (polling)
2626
uint32_t start = HAL_GetTick();
2727
while (HAL_SD_GetCardState(lfsshim_hsd) != HAL_SD_CARD_TRANSFER) {
28-
if ((HAL_GetTick() - start) > timeout_ms) {
28+
if ((HAL_GetTick() - start) > SD_RW_TIMEOUT_MS) {
2929
return -1; // timeout -> LFS_ERR_IO
3030
}
3131
}
@@ -51,7 +51,7 @@ int lfsshim_write(const struct lfs_config *c, lfs_block_t block, lfs_off_t off,
5151
// Wait for card to be ready (polling)
5252
uint32_t start = HAL_GetTick();
5353
while (HAL_SD_GetCardState(lfsshim_hsd) != HAL_SD_CARD_TRANSFER) {
54-
if ((HAL_GetTick() - start) > timeout_ms) {
54+
if ((HAL_GetTick() - start) > SD_RW_TIMEOUT_MS) {
5555
return -1; // timeout -> LFS_ERR_IO
5656
}
5757
}

0 commit comments

Comments
 (0)