Skip to content

Commit 6e0af52

Browse files
committed
ff_sd_status should use ‘AcquireSPI card_locked()’ to prevent conflicts when sharing the SPI bus in multi tasks
1 parent 099b432 commit 6e0af52

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libraries/SD/src/sd_diskio.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,9 @@ DSTATUS ff_sd_initialize(uint8_t pdrv)
616616

617617
DSTATUS ff_sd_status(uint8_t pdrv)
618618
{
619+
ardu_sdcard_t * card = s_cards[pdrv];
620+
AcquireSPI card_locked(card);
621+
619622
if(sdTransaction(pdrv, SEND_STATUS, 0, NULL))
620623
{
621624
log_e("Check status failed");

0 commit comments

Comments
 (0)