boardloader, sdcard: avoid fatal error when card is ejected during countdown

pull/25/head
mcudev 6 years ago committed by Pavol Rusnak
parent a932816a25
commit 8cd8be9bd1

@ -45,12 +45,10 @@ static const uint8_t * const BOARDLOADER_KEYS[] = {
static uint32_t check_sdcard(void)
{
if (sectrue != sdcard_is_present()) {
if (sectrue != sdcard_power_on()) {
return 0;
}
ensure(sdcard_power_on(), NULL);
uint64_t cap = sdcard_get_capacity_in_bytes();
if (cap < 1024 * 1024) {
sdcard_power_off();

Loading…
Cancel
Save