main: check EEPROM at boot

This commit is contained in:
King Kévin 2022-08-05 12:48:37 +02:00
parent 31815bd66e
commit 5d76a67bd3
1 changed files with 6 additions and 0 deletions

6
main.c
View File

@ -466,6 +466,12 @@ level pulse on the Hot Plug Detect pin. This pulse shall be at least 100 msec.
}
}
// verify stored EDID validity
if (!edid_length((uint8_t*)EEPROM_ADDR)) {
LED_PORT->ODR.reg &= ~LED_PIN; // switch LED on to indicate I²C read fail
puts("EEPROM EDID invalid\r\n");
}
bool action = false; // if an action has been performed
puts("loop\r\n");
while (true) {