From 298f0ea3ca6197030fc07a248b817dabf26865ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Fri, 5 Aug 2022 12:43:52 +0200 Subject: [PATCH] main: define pinout for v2.37 --- main.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/main.c b/main.c index fc35103..0c055e2 100644 --- a/main.c +++ b/main.c @@ -1,6 +1,7 @@ /* firmware template for STM8S microcontroller * Copyright (C) 2019-2022 King Kévin * SPDX-License-Identifier: GPL-3.0-or-later + * for HDMI firewall v2.37 */ #include #include @@ -29,15 +30,12 @@ static bool eeprom_valid = true; // if the EDID can be read from EEPROM #define SCL_SNK_PORT GPIO_PD #define SCL_SNK_PIN PD3 #define SDA_SNK_PU_PORT GPIO_PD -#define SDA_SNK_PU_PIN PD4 -#define SCL_SNK_PU_PORT GPIO_PA -#define SCL_SNK_PU_PIN PA1 +#define SDA_SNK_PU_PIN PD6 +#define SCL_SNK_PU_PORT GPIO_PC +#define SCL_SNK_PU_PIN PC5 static bool i2c_fwd = false; // if the I²C source lines are connected to sink static bool sink_present = false; // if he sink is present (tested using sink DDC) -// external EEPROM write protect pin -#define WP_PORT GPIO_PC -#define WP_PIN PC5 // hot plug detect pull up #define HPD_PORT GPIO_PC #define HPD_PIN PC6 @@ -296,11 +294,6 @@ we will only be able to provide 1 extension block since we can only respond to o I2C_ITR |= (I2C_ITR_ITBUFEN | I2C_ITR_ITEVTEN); // enable buffer and event interrupts } - // configure external EEPROM (actually not used) - WP_PORT->DDR.reg |= WP_PIN; // switch pin to output - WP_PORT->CR1.reg &= ~WP_PIN; // switch pin to open drain - WP_PORT->ODR.reg |= WP_PIN; // let write protect pulled up - // configure hot plug detect HPD_PORT->DDR.reg |= HPD_PIN; // switch pin to output HPD_PORT->CR1.reg &= ~HPD_PIN; // switch pin to open drain