Added other files for Tiny2040
This commit is contained in:
parent
ad8916499d
commit
66dd74cd12
24
ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.h
Normal file
24
ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.h
Normal file
@ -0,0 +1,24 @@
|
||||
#define MICROPY_HW_BOARD_NAME "Pimoroni Tiny 2040"
|
||||
#define MICROPY_HW_MCU_NAME "rp2040"
|
||||
|
||||
#define MICROPY_HW_LED_R (&pin_GPIO18)
|
||||
#define MICROPY_HW_LED_G (&pin_GPIO19)
|
||||
#define MICROPY_HW_LED_B (&pin_GPIO20)
|
||||
|
||||
#define MICROPY_HW_USER_SW (&pin_GPIO23)
|
||||
|
||||
// These pins are unconnected
|
||||
#define IGNORE_PIN_GPIO8 1
|
||||
#define IGNORE_PIN_GPIO9 1
|
||||
#define IGNORE_PIN_GPIO10 1
|
||||
#define IGNORE_PIN_GPIO11 1
|
||||
#define IGNORE_PIN_GPIO12 1
|
||||
#define IGNORE_PIN_GPIO13 1
|
||||
#define IGNORE_PIN_GPIO14 1
|
||||
#define IGNORE_PIN_GPIO15 1
|
||||
#define IGNORE_PIN_GPIO16 1
|
||||
#define IGNORE_PIN_GPIO17 1
|
||||
#define IGNORE_PIN_GPIO21 1
|
||||
#define IGNORE_PIN_GPIO22 1
|
||||
#define IGNORE_PIN_GPIO24 1
|
||||
#define IGNORE_PIN_GPIO25 1
|
11
ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.mk
Normal file
11
ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.mk
Normal file
@ -0,0 +1,11 @@
|
||||
USB_VID = 0x16D0
|
||||
USB_PID = 0x08C7
|
||||
USB_PRODUCT = "Tiny 2040"
|
||||
USB_MANUFACTURER = "Pimoroni"
|
||||
|
||||
CHIP_VARIANT = RP2040
|
||||
CHIP_FAMILY = rp2
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
|
||||
CIRCUITPY__EVE = 1
|
39
ports/raspberrypi/boards/pimoroni_tiny2040/pins.c
Normal file
39
ports/raspberrypi/boards/pimoroni_tiny2040/pins.c
Normal file
@ -0,0 +1,39 @@
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
|
||||
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GP2), MP_ROM_PTR(&pin_GPIO2) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GP3), MP_ROM_PTR(&pin_GPIO3) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GP4), MP_ROM_PTR(&pin_GPIO4) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GP5), MP_ROM_PTR(&pin_GPIO5) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GP6), MP_ROM_PTR(&pin_GPIO6) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GP7), MP_ROM_PTR(&pin_GPIO7) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_LED_R), MP_ROM_PTR(&pin_GPIO18) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_LED_G), MP_ROM_PTR(&pin_GPIO19) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_LED_B), MP_ROM_PTR(&pin_GPIO20) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_USER_SW), MP_ROM_PTR(&pin_GPIO23) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GP26_A0), MP_ROM_PTR(&pin_GPIO26) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GP27_A1), MP_ROM_PTR(&pin_GPIO27) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GP27), MP_ROM_PTR(&pin_GPIO27) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GP28_A2), MP_ROM_PTR(&pin_GPIO28) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GP29_A3), MP_ROM_PTR(&pin_GPIO29) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GP29), MP_ROM_PTR(&pin_GPIO29) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
|
||||
};
|
||||
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
|
Loading…
x
Reference in New Issue
Block a user