From 5d76a67bd373fcc2e96f4de2c11c9439f0899b25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Fri, 5 Aug 2022 12:48:37 +0200 Subject: [PATCH] main: check EEPROM at boot --- main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.c b/main.c index ac9d9a3..5b931a6 100644 --- a/main.c +++ b/main.c @@ -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) {