Fix I2C1 pinout.

This commit is contained in:
Daniel P. Carvalho 2023-09-21 10:53:28 -03:00 committed by Xiang Xiao
parent 4f985f4367
commit f0bc20c815
2 changed files with 7 additions and 7 deletions

View file

@ -126,10 +126,10 @@
* but are normally-high GPIOs.
*/
#define GPIO_I2C1_D4 \
(GPIO_INPUT | GPIO_FLOAT | GPIO_PORTB | GPIO_PIN7)
#define GPIO_I2C1_D5 \
(GPIO_INPUT | GPIO_FLOAT | GPIO_PORTB | GPIO_PIN6)
#define GPIO_I2C1_A4 \
(GPIO_INPUT | GPIO_FLOAT | GPIO_PORTA | GPIO_PIN5)
#define GPIO_I2C1_A5 \
(GPIO_INPUT | GPIO_FLOAT | GPIO_PORTA | GPIO_PIN6)
#define GPIO_I2C1_SCL \
(GPIO_I2C1_SCL_1 | GPIO_OPENDRAIN | GPIO_SPEED_50MHz | GPIO_OUTPUT_SET)
#define GPIO_I2C1_SDA \

View file

@ -80,10 +80,10 @@ int stm32_ina226initialize(const char *devpath)
sninfo("Initializing INA226\n");
/* Configure D4(PA5) and D5(PA6) as input floating */
/* Configure A4(PA5) and A5(PA6) as input floating */
stm32l4_configgpio(GPIO_I2C1_D4);
stm32l4_configgpio(GPIO_I2C1_D5);
stm32l4_configgpio(GPIO_I2C1_A4);
stm32l4_configgpio(GPIO_I2C1_A5);
/* Get an instance of the I2C1 interface */