Skip to content

Commit ad4c16c

Browse files
committed
feat: adding pimoroni plasma2350w
1 parent 27beb0e commit ad4c16c

File tree

6 files changed

+159
-0
lines changed

6 files changed

+159
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// This file is part of the CircuitPython project: https://circuitpython.org
2+
//
3+
// SPDX-FileCopyrightText: Copyright (c) 2021 Scott Shawcroft for Adafruit Industries
4+
//
5+
// SPDX-License-Identifier: MIT
6+
7+
#include "supervisor/board.h"
8+
9+
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
firmware_size = 3064k;
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// This file is part of the CircuitPython project: https://circuitpython.org
2+
//
3+
// SPDX-FileCopyrightText: Copyright (c) 2024 Scott Shawcroft for Adafruit Industries
4+
//
5+
// SPDX-License-Identifier: MIT
6+
7+
#define MICROPY_HW_BOARD_NAME "Pimoroni Plasma 2350W"
8+
#define MICROPY_HW_MCU_NAME "rp2350A"
9+
10+
#define CIRCUITPY_RGB_STATUS_INVERTED_PWM
11+
#define CIRCUITPY_RGB_STATUS_R (&pin_GPIO16)
12+
#define CIRCUITPY_RGB_STATUS_G (&pin_GPIO17)
13+
#define CIRCUITPY_RGB_STATUS_B (&pin_GPIO18)
14+
15+
#define CIRCUITPY_BOARD_I2C (1)
16+
#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO21, .sda = &pin_GPIO20}}
17+
18+
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO21)
19+
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO20)
20+
21+
#define DEFAULT_SPI_BUS_SCK (&pin_GPIO10)
22+
#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO11)
23+
#define DEFAULT_SPI_BUS_MISO (&pin_GPIO8)
24+
25+
#define DEFAULT_UART_BUS_RX (&pin_GPIO1)
26+
#define DEFAULT_UART_BUS_TX (&pin_GPIO0)
27+
28+
#define CIRCUITPY_DIGITALIO_HAVE_INVALID_PULL (1)
29+
#define CIRCUITPY_DIGITALIO_HAVE_INVALID_DRIVE_MODE (1)
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
USB_VID = 0x2E8A
2+
USB_PID = 0x10BF
3+
USB_PRODUCT = "Plasma 2350 W"
4+
USB_MANUFACTURER = "Pimoroni"
5+
6+
CHIP_VARIANT = RP2350
7+
CHIP_PACKAGE = A
8+
CHIP_FAMILY = rp2
9+
10+
EXTERNAL_FLASH_DEVICES = "W25Q32JVxQ"
11+
12+
CIRCUITPY__EVE = 1
13+
14+
CIRCUITPY_CYW43 = 1
15+
CIRCUITPY_SSL = 1
16+
CIRCUITPY_HASHLIB = 1
17+
CIRCUITPY_WEB_WORKFLOW = 1
18+
CIRCUITPY_MDNS = 1
19+
CIRCUITPY_SOCKETPOOL = 1
20+
CIRCUITPY_WIFI = 1
21+
CIRCUITPY_PICODVI = 0
22+
CIRCUITPY_USB_HOST = 0
23+
24+
CFLAGS += \
25+
-DCYW43_PIN_WL_DYNAMIC=0 \
26+
-DCYW43_DEFAULT_PIN_WL_HOST_WAKE=24 \
27+
-DCYW43_DEFAULT_PIN_WL_REG_ON=23 \
28+
-DCYW43_DEFAULT_PIN_WL_CLOCK=29 \
29+
-DCYW43_DEFAULT_PIN_WL_DATA_IN=24 \
30+
-DCYW43_DEFAULT_PIN_WL_DATA_OUT=24 \
31+
-DCYW43_DEFAULT_PIN_WL_CS=25 \
32+
-DCYW43_WL_GPIO_COUNT=3 \
33+
-DCYW43_WL_GPIO_LED_PIN=0
34+
# Must be accompanied by a linker script change
35+
CFLAGS += -DCIRCUITPY_FIRMWARE_SIZE='(3064 * 1024)'
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// This file is part of the CircuitPython project: https://circuitpython.org
2+
//
3+
// SPDX-FileCopyrightText: Copyright (c) 2021 Scott Shawcroft for Adafruit Industries
4+
//
5+
// SPDX-License-Identifier: MIT
6+
7+
// Put board-specific pico-sdk definitions here. This file must exist.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
// This file is part of the CircuitPython project: https://circuitpython.org
2+
//
3+
// SPDX-FileCopyrightText: Copyright (c) 2024 Scott Shawcroft for Adafruit Industries
4+
//
5+
// SPDX-License-Identifier: MIT
6+
7+
#include "shared-bindings/board/__init__.h"
8+
9+
static const mp_rom_map_elem_t board_module_globals_table[] = {
10+
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS
11+
12+
{ MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) },
13+
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) },
14+
15+
{ MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) },
16+
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO1) },
17+
18+
// GPIO2 through GPIO11 are unconnected
19+
20+
{ MP_ROM_QSTR(MP_QSTR_GP12), MP_ROM_PTR(&pin_GPIO12) },
21+
{ MP_ROM_QSTR(MP_QSTR_SW_A), MP_ROM_PTR(&pin_GPIO12) },
22+
{ MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO12) },
23+
24+
// GPIO13 is unconnected
25+
26+
{ MP_ROM_QSTR(MP_QSTR_GP14), MP_ROM_PTR(&pin_GPIO14) },
27+
{ MP_ROM_QSTR(MP_QSTR_CLK), MP_ROM_PTR(&pin_GPIO14) },
28+
29+
{ MP_ROM_QSTR(MP_QSTR_GP15), MP_ROM_PTR(&pin_GPIO15) },
30+
{ MP_ROM_QSTR(MP_QSTR_DATA), MP_ROM_PTR(&pin_GPIO15) },
31+
32+
{ MP_ROM_QSTR(MP_QSTR_GP16), MP_ROM_PTR(&pin_GPIO16) },
33+
{ MP_ROM_QSTR(MP_QSTR_LED_R), MP_ROM_PTR(&pin_GPIO16) },
34+
35+
{ MP_ROM_QSTR(MP_QSTR_GP17), MP_ROM_PTR(&pin_GPIO17) },
36+
{ MP_ROM_QSTR(MP_QSTR_LED_G), MP_ROM_PTR(&pin_GPIO17) },
37+
38+
{ MP_ROM_QSTR(MP_QSTR_GP18), MP_ROM_PTR(&pin_GPIO18) },
39+
{ MP_ROM_QSTR(MP_QSTR_LED_B), MP_ROM_PTR(&pin_GPIO18) },
40+
41+
{ MP_ROM_QSTR(MP_QSTR_GP19), MP_ROM_PTR(&pin_GPIO19) },
42+
{ MP_ROM_QSTR(MP_QSTR_INT), MP_ROM_PTR(&pin_GPIO19) },
43+
44+
{ MP_ROM_QSTR(MP_QSTR_GP20), MP_ROM_PTR(&pin_GPIO20) },
45+
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO20) },
46+
47+
{ MP_ROM_QSTR(MP_QSTR_GP21), MP_ROM_PTR(&pin_GPIO21) },
48+
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO21) },
49+
50+
{ MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) },
51+
{ MP_ROM_QSTR(MP_QSTR_SW_BOOT), MP_ROM_PTR(&pin_GPIO22) },
52+
{ MP_ROM_QSTR(MP_QSTR_BOOT), MP_ROM_PTR(&pin_GPIO22) },
53+
{ MP_ROM_QSTR(MP_QSTR_USER_SW), MP_ROM_PTR(&pin_GPIO22) },
54+
55+
// GPIO23 through GPIO25 are connected to the RM2 module
56+
57+
{ MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) },
58+
{ MP_ROM_QSTR(MP_QSTR_GP26_A0), MP_ROM_PTR(&pin_GPIO26) },
59+
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) },
60+
61+
{ MP_ROM_QSTR(MP_QSTR_GP27), MP_ROM_PTR(&pin_GPIO27) },
62+
{ MP_ROM_QSTR(MP_QSTR_GP27_A1), MP_ROM_PTR(&pin_GPIO27) },
63+
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) },
64+
65+
{ MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) },
66+
{ MP_ROM_QSTR(MP_QSTR_GP28_A2), MP_ROM_PTR(&pin_GPIO28) },
67+
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) },
68+
69+
// GPIO29 is connected to the RM2 module
70+
71+
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
72+
73+
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
74+
75+
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
76+
{ MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_i2c_obj) },
77+
};
78+
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy