Update boot_detect.c
This commit is contained in:
1 parent
e307c02199
commit
f1078f48cb
1 file changed
+10
-9
+10
-9
@@ -25,7 +25,15 @@ bool wait_for_boot(int timeout_ms) {
|
|||||||
{
|
{
|
||||||
if (reset_attempts > 4)
|
if (reset_attempts > 4)
|
||||||
{
|
{
|
||||||
halt_with_error(0, 3);
|
if (was_read_zero) {
|
||||||
|
halt_with_error(1, 3);
|
||||||
|
}
|
||||||
|
else if (was_cmd1) {
|
||||||
|
halt_with_error(2, 3);
|
||||||
|
} else {
|
||||||
|
halt_with_error(3, 3);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
reset_attempts++;
|
reset_attempts++;
|
||||||
reset_cpu();
|
reset_cpu();
|
||||||
@@ -58,13 +66,6 @@ bool wait_for_boot(int timeout_ms) {
|
|||||||
last_word = word;
|
last_word = word;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (was_read_zero) {
|
halt_with_error(0, 3);
|
||||||
halt_with_error(1, 3);
|
|
||||||
}
|
|
||||||
else if (was_cmd1) {
|
|
||||||
halt_with_error(2, 3);
|
|
||||||
} else {
|
|
||||||
halt_with_error(3, 3);
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user