From 3adbe476f304136dcd79a8e9a6724c881a0724bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20NEDJAR?= Date: Thu, 26 Sep 2024 15:42:10 +0200 Subject: [PATCH] fix(wb55): Correct pin inversion for I2C --- .../WB55R(C-E-G)V/variant_STEAM32_WB55RG.cpp | 39 +++++++++---------- .../WB55R(C-E-G)V/variant_STEAM32_WB55RG.h | 38 +++++++++--------- 2 files changed, 38 insertions(+), 39 deletions(-) diff --git a/variants/STM32WBxx/WB55R(C-E-G)V/variant_STEAM32_WB55RG.cpp b/variants/STM32WBxx/WB55R(C-E-G)V/variant_STEAM32_WB55RG.cpp index 02a82070ab..0d783e620e 100644 --- a/variants/STM32WBxx/WB55R(C-E-G)V/variant_STEAM32_WB55RG.cpp +++ b/variants/STM32WBxx/WB55R(C-E-G)V/variant_STEAM32_WB55RG.cpp @@ -16,28 +16,27 @@ #include "lock_resource.h" #include "pins_arduino.h" -// Pin number // Pin number const PinName digitalPin[] = { - PC_4, // D0/A1 - PA_5, // D1/A3 - PC_5, // D2/A5 - PA_2, // D3/A0 - PA_4, // D4/A2 - PA_7, // D5 - PC_3, // D6 - PA_9, // D7 - PA_15, // D8 - PC_2, // D9 - PA_6, // D10/A4 - PA_8, // D11 - PC_6, // D12 - PB_13, // D13 - PB_14, // D14 - PB_15, // D15 - PE_4, // D16 - PC_1, // D17 - PC_0, // D18 + PC_4, // P0/D0/A1 + PA_5, // P1/D1/A3 + PC_5, // P2/D2/A5 + PA_2, // P3/D3/A0 + PA_4, // P4/D4/A2 + PA_7, // P5/D5 + PC_3, // P6/D6 + PA_9, // P7/D7 + PA_15, // P8/D8 + PC_2, // P9/D9 + PA_6, // P10/D10/A4 + PA_8, // P11/D11 + PC_6, // P12/D12 + PB_13, // P13/D13 + PB_14, // P14/D14 + PB_15, // P15/D15 + PE_4, // P16/D16 + PC_0, // P19/D17 + PC_1, // P20/D18 PB_2, // D19 PD_0, // D20 PB_8, // D21 diff --git a/variants/STM32WBxx/WB55R(C-E-G)V/variant_STEAM32_WB55RG.h b/variants/STM32WBxx/WB55R(C-E-G)V/variant_STEAM32_WB55RG.h index 7507d5593b..bab1843d27 100644 --- a/variants/STM32WBxx/WB55R(C-E-G)V/variant_STEAM32_WB55RG.h +++ b/variants/STM32WBxx/WB55R(C-E-G)V/variant_STEAM32_WB55RG.h @@ -34,8 +34,8 @@ #define PB14 14 #define PB15 15 #define PE4 16 -#define PC1 17 -#define PC0 18 +#define PC0 17 +#define PC1 18 // Not on connectors #define PB2 19 @@ -68,16 +68,16 @@ #define NUM_ANALOG_INPUTS 6 // Upper pad -#define GP0 44 -#define GP1 45 -#define GP2 46 -#define GP3 47 +#define GPIO1 44 // P28 +#define GPIO2 45 // P29 +#define GPIO3 46 // P24 +#define GPIO4 47 // P25 // 4 directions switches -#define GP4 48 -#define GP5 49 -#define GP6 50 -#define GP7 51 +#define GPIO5 48 +#define GPIO6 49 +#define GPIO7 50 +#define GPIO8 51 // STeaMi's PinName #define ACTIVATE_3V3_STLINK PB2 @@ -115,10 +115,10 @@ #define P16 PE4 #define P19 PC1 #define P20 PC0 -#define P24 GP0 -#define P25 GP1 -#define P28 GP2 -#define P29 GP3 +#define P24 GPIO3 +#define P25 GPIO4 +#define P28 GPIO1 +#define P29 GPIO2 #define RST_DISPLAY PA12 #define RST_EXPANDER PB1 @@ -155,11 +155,11 @@ // On-board user button #define A_BUTTON PA7 #define B_BUTTON PA8 -#define DOWN_BUTTON GP5 -#define LEFT_BUTTON GP7 +#define DOWN_BUTTON GPIO6 +#define LEFT_BUTTON GPIO7 #define MENU_BUTTON PA0 -#define RIGHT_BUTTON GP4 -#define UP_BUTTON GP6 +#define RIGHT_BUTTON GPIO5 +#define UP_BUTTON GPIO8 #ifndef USER_BTN #define USER_BTN MENU_BUTTON @@ -169,7 +169,7 @@ #define PIN_SPI_SS P16 #define PIN_SPI_MOSI SPI_EXT_MOSI #define PIN_SPI_MISO SPI_EXT_MISO -#define PIN_SPI_SCK PB13 +#define PIN_SPI_SCK SPI_EXT_SCK // I2C Definitions #define PIN_WIRE_SDA I2C_EXT_SDA