main: define pinout for v2.37
This commit is contained in:
parent
319a783de0
commit
298f0ea3ca
15
main.c
15
main.c
|
@ -1,6 +1,7 @@
|
|||
/* firmware template for STM8S microcontroller
|
||||
* Copyright (C) 2019-2022 King Kévin <kingkevin@cuvoodoo.info>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
* for HDMI firewall v2.37
|
||||
*/
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue