Skip to content

Commit 8cb7558

Browse files
cumin777dpgeorge
authored andcommitted
rp2/boards: Extend SEEED_XIAO_RP2040 to support new Plus boards.
This commit adds board support for the Seeed Studio XIAO RP2040 Plus to the rp2 port. It reuses the existing SEEED_XIAO_RP2040 board definition so that a single firmware works on both the Standard and the Plus variants. Also fix the Standard I2C instance: it must be I2C1 on pins 7/6. Signed-off-by: cumin <[email protected]>
1 parent 336427f commit 8cb7558

2 files changed

Lines changed: 32 additions & 3 deletions

File tree

ports/rp2/boards/SEEED_XIAO_RP2040/mpconfigboard.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@
66
// #define MICROPY_HW_USB_VID (0x)
77
// #define MICROPY_HW_USB_PID (0x)
88

9-
// I2C0
10-
#define MICROPY_HW_I2C0_SCL (7)
11-
#define MICROPY_HW_I2C0_SDA (6)
9+
// I2C0 is available on XIAO RP2040 Plus on GPIO20/GPIO21.
10+
// These pins are not fitted on the standard XIAO RP2040.
11+
#define MICROPY_HW_I2C0_SCL (21)
12+
#define MICROPY_HW_I2C0_SDA (20)
13+
14+
// I2C1 is the default bus on GPIO6/GPIO7 (the standard XIAO RP2040 pins).
15+
#define MICROPY_HW_I2C1_SCL (7)
16+
#define MICROPY_HW_I2C1_SDA (6)
1217

1318
// SPI0
1419
#define MICROPY_HW_SPI0_SCK (2)

ports/rp2/boards/SEEED_XIAO_RP2040/pins.csv

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,31 @@ A2,GPIO28
1515
A3,GPIO29
1616
NEOPIXEL_POWER,GPIO11
1717
NEOPIXEL,GPIO12
18+
NEO_PWR,GPIO11
1819
LED_R,GPIO17
1920
LED_G,GPIO16
2021
LED_B,GPIO25
2122
LED,GPIO25
23+
SDA,GPIO6
24+
SCL,GPIO7
25+
26+
# Pins available only on XIAO RP2040 Plus.
27+
D12,GPIO18
28+
D13,GPIO19
29+
D14,GPIO20
30+
D15,GPIO21
31+
D16,GPIO22
32+
D17,GPIO23
33+
D19,GPIO5
34+
D20,GPIO13
35+
D21,GPIO14
36+
D22,GPIO15
37+
D23,GPIO16
38+
D24,GPIO17
39+
D25,GPIO10
40+
D26,GPIO9
41+
D27,GPIO8
42+
SDA1,GPIO20
43+
SCL1,GPIO21
44+
RGB_EN,GPIO11
45+
BAT_EN,GPIO24

0 commit comments

Comments
 (0)