Skip to content

Commit 4cadde0

Browse files
authored
Merge pull request #9575 from bablokb/pimoroni_tinyfx
New board: Pimoroni Tiny FX
2 parents 0720dd5 + 74dcf53 commit 4cadde0

File tree

5 files changed

+94
-0
lines changed

5 files changed

+94
-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: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
#pragma once
8+
9+
#define MICROPY_HW_BOARD_NAME "Pimoroni Tiny FX"
10+
#define MICROPY_HW_MCU_NAME "rp2040"
11+
12+
#define CIRCUITPY_RGB_STATUS_INVERTED_PWM
13+
#define CIRCUITPY_RGB_STATUS_R (&pin_GPIO13)
14+
#define CIRCUITPY_RGB_STATUS_G (&pin_GPIO14)
15+
#define CIRCUITPY_RGB_STATUS_B (&pin_GPIO15)
16+
17+
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO17)
18+
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO16)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
USB_VID = 0x2E8A
2+
USB_PID = 0x10A2
3+
USB_PRODUCT = "Tiny FX"
4+
USB_MANUFACTURER = "Pimoroni"
5+
6+
CHIP_VARIANT = RP2040
7+
CHIP_FAMILY = rp2
8+
9+
EXTERNAL_FLASH_DEVICES = "W25Q32JVxQ"
10+
11+
CIRCUITPY__EVE = 1
12+
CIRCUITPY_PICODVI = 0
13+
CIRCUITPY_USB_HOST = 0
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+
#pragma once
8+
9+
// Put board-specific pico-sdk definitions here. This file must exist.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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 "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_LED_1), MP_ROM_PTR(&pin_GPIO3) },
13+
{ MP_ROM_QSTR(MP_QSTR_LED_2), MP_ROM_PTR(&pin_GPIO2) },
14+
{ MP_ROM_QSTR(MP_QSTR_LED_3), MP_ROM_PTR(&pin_GPIO4) },
15+
{ MP_ROM_QSTR(MP_QSTR_LED_4), MP_ROM_PTR(&pin_GPIO5) },
16+
{ MP_ROM_QSTR(MP_QSTR_LED_5), MP_ROM_PTR(&pin_GPIO8) },
17+
{ MP_ROM_QSTR(MP_QSTR_LED_6), MP_ROM_PTR(&pin_GPIO9) },
18+
19+
{ MP_ROM_QSTR(MP_QSTR_LED_R), MP_ROM_PTR(&pin_GPIO13) },
20+
{ MP_ROM_QSTR(MP_QSTR_LED_G), MP_ROM_PTR(&pin_GPIO14) },
21+
{ MP_ROM_QSTR(MP_QSTR_LED_B), MP_ROM_PTR(&pin_GPIO15) },
22+
23+
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO16) },
24+
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO17) },
25+
26+
{ MP_ROM_QSTR(MP_QSTR_I2S_DATA), MP_ROM_PTR(&pin_GPIO18) },
27+
{ MP_ROM_QSTR(MP_QSTR_I2S_BCLK), MP_ROM_PTR(&pin_GPIO19) },
28+
{ MP_ROM_QSTR(MP_QSTR_I2S_LRCLK), MP_ROM_PTR(&pin_GPIO20) },
29+
{ MP_ROM_QSTR(MP_QSTR_AMP_EN), MP_ROM_PTR(&pin_GPIO21) },
30+
31+
{ MP_ROM_QSTR(MP_QSTR_USER_SW), MP_ROM_PTR(&pin_GPIO22) },
32+
33+
{ MP_ROM_QSTR(MP_QSTR_SENSOR), MP_ROM_PTR(&pin_GPIO26) },
34+
{ MP_ROM_QSTR(MP_QSTR_CURRENT_SENSE), MP_ROM_PTR(&pin_GPIO28) },
35+
36+
{ MP_ROM_QSTR(MP_QSTR_GP16), MP_ROM_PTR(&pin_GPIO16) },
37+
{ MP_ROM_QSTR(MP_QSTR_GP17), MP_ROM_PTR(&pin_GPIO17) },
38+
{ MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) },
39+
40+
{ MP_ROM_QSTR(MP_QSTR_GP26_A0), MP_ROM_PTR(&pin_GPIO26) },
41+
42+
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
43+
{ MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_i2c_obj) },
44+
};
45+
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);

0 commit comments

Comments
 (0)