Skip to content

Commit

Permalink
fix(wb55): Correct pin inversion for I2C
Browse files Browse the repository at this point in the history
  • Loading branch information
nedseb committed Oct 1, 2024
1 parent 7cdd169 commit 2b11c75
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 39 deletions.
39 changes: 19 additions & 20 deletions variants/STM32WBxx/WB55R(C-E-G)V/variant_STEAM32_WB55RG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 19 additions & 19 deletions variants/STM32WBxx/WB55R(C-E-G)V/variant_STEAM32_WB55RG.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 2b11c75

Please sign in to comment.