mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-18 21:48:13 +00:00
boardloader, sdcard: avoid fatal error when card is ejected during countdown
This commit is contained in:
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…
Reference in New Issue
Block a user