Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 12 additions & 26 deletions variants/STM32WBxx/WB55R(C-E-G)V/variant_STEAM32_WB55RG.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,10 @@
#define NUM_DIGITAL_PINS 44
#define NUM_ANALOG_INPUTS 6

// GPIO expander
// Not used by Arduino only here for documentation purpose
// Upper pad
// GPIO1 --> P28
// GPIO2 --> P29
// GPIO3 --> P24
// GPIO4 --> P25

// 4 directions switches
// GPIO5
// GPIO6
// GPIO7
// GPIO8
// MCP23009E GPIO expander (I2C_INT bus, address 0x20), documentation only:
// these are expander pins, not MCU pins, so they have no Arduino pin number.
// Upper pads: GP0 --> P28, GP1 --> P29, GP2 --> P24, GP3 --> P25
// Direction buttons: GP4 --> RIGHT, GP5 --> DOWN, GP6 --> LEFT, GP7 --> UP

// STeaMi's PinName
#define ACTIVATE_3V3_STLINK PB2
Expand Down Expand Up @@ -115,12 +106,8 @@
#define P14 PB14
#define P15 PB15
#define P16 PE4
#define P19 PC1
#define P20 PC0
#define P24 GPIO3
#define P25 GPIO4
#define P28 GPIO1
#define P29 GPIO2
#define P19 PC0
#define P20 PC1

#define RST_DISPLAY PA12
#define RST_EXPANDER PB1
Expand Down Expand Up @@ -159,10 +146,7 @@
#define B_BUTTON PA8
#define MENU_BUTTON PA0

// DOWN_BUTTON --> GPIO6
// LEFT_BUTTON --> GPIO7
// RIGHT_BUTTON --> GPIO5
// UP_BUTTON --> GPIO8
// UP, DOWN, LEFT and RIGHT buttons are on the MCP23009E expander (see above)

#ifndef USER_BTN
#define USER_BTN MENU_BUTTON
Expand All @@ -179,12 +163,14 @@
#define PIN_WIRE_SCL I2C_EXT_SCL

// Timer Definitions
// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
// No TIM6/TIM7 on STM32WB55. TIM17 has no default PWM pin on the edge
// connector, so tone() (used with the on-board buzzer) does not disturb
// analogWrite(). Servo takes TIM16, shared with analogWrite() on P10 (PA6).
#ifndef TIMER_TONE
#define TIMER_TONE TIM16
#define TIMER_TONE TIM17
#endif
#ifndef TIMER_SERVO
#define TIMER_SERVO TIM17
#define TIMER_SERVO TIM16
#endif

// UART Definitions
Expand Down
Loading