Update boot_detect.c
This commit is contained in:
1 parent
f1078f48cb
commit
5c2cf01ac1
1 file changed
+4
-3
+4
-3
@@ -20,7 +20,7 @@ bool wait_for_boot(int timeout_ms) {
|
|||||||
bool was_cmd1 = false;
|
bool was_cmd1 = false;
|
||||||
int reset_attempts = 0;
|
int reset_attempts = 0;
|
||||||
|
|
||||||
while(!time_reached(tio_full)) {
|
while(1) {
|
||||||
if (time_reached(tio_cmd1))
|
if (time_reached(tio_cmd1))
|
||||||
{
|
{
|
||||||
if (reset_attempts > 4)
|
if (reset_attempts > 4)
|
||||||
@@ -28,6 +28,9 @@ bool wait_for_boot(int timeout_ms) {
|
|||||||
if (was_read_zero) {
|
if (was_read_zero) {
|
||||||
halt_with_error(1, 3);
|
halt_with_error(1, 3);
|
||||||
}
|
}
|
||||||
|
else if (tio_cmd1 != tio_full) {
|
||||||
|
halt_with_error(0, 3);
|
||||||
|
}
|
||||||
else if (was_cmd1) {
|
else if (was_cmd1) {
|
||||||
halt_with_error(2, 3);
|
halt_with_error(2, 3);
|
||||||
} else {
|
} else {
|
||||||
@@ -66,6 +69,4 @@ bool wait_for_boot(int timeout_ms) {
|
|||||||
last_word = word;
|
last_word = word;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
halt_with_error(0, 3);
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user