mirror of
git://projects.qi-hardware.com/antorcha.git
synced 2024-11-22 06:54:40 +02:00
tornado/fw/mmc.c (mmc_wait): add 1 ms delay to wait loop
MMC-SPI specifies a card delay of up to 100 ms, which is easier to match with an explicit delay than with a loop count.
This commit is contained in:
parent
d2f569fbf2
commit
0703611bbd
@ -19,6 +19,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "delay.h"
|
||||
#include "mmc-hw.h"
|
||||
#include "mmc.h"
|
||||
|
||||
@ -84,6 +85,7 @@ static bool mmc_wait(void)
|
||||
v = mmc_recv();
|
||||
if (v == MMC_START_SINGLE_BLOCK)
|
||||
return 1;
|
||||
_delay_ms(1);
|
||||
}
|
||||
while (--tries);
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user