Skip to content

Commit

Permalink
Merge pull request #9518 from adafruit/vindie_s2
Browse files Browse the repository at this point in the history
adding vindie s2
  • Loading branch information
tannewt authored Aug 14, 2024
2 parents 216f7cf + 8bea235 commit cd585a5
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ports/espressif/boards/adafruit_vindie_s2/board.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// This file is part of the CircuitPython project: https://circuitpython.org
//
// SPDX-FileCopyrightText: Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
//
// SPDX-License-Identifier: MIT

#include "supervisor/board.h"

// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.
25 changes: 25 additions & 0 deletions ports/espressif/boards/adafruit_vindie_s2/mpconfigboard.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// This file is part of the CircuitPython project: https://circuitpython.org
//
// SPDX-FileCopyrightText: Copyright (c) 2019 Scott Shawcroft for Adafruit Industries
//
// SPDX-License-Identifier: MIT

#pragma once

// Micropython setup

#define MICROPY_HW_BOARD_NAME "Adafruit Vindie S2"
#define MICROPY_HW_MCU_NAME "ESP32S2"

#define MICROPY_HW_NEOPIXEL (&pin_GPIO33)
#define MICROPY_HW_NEOPIXEL_COUNT (4)

#define MICROPY_HW_LED_STATUS (&pin_GPIO18)

#define DEFAULT_I2C_BUS_SCL (&pin_GPIO11)
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO12)

#define DEFAULT_UART_BUS_RX (&pin_GPIO21)
#define DEFAULT_UART_BUS_TX (&pin_GPIO45)

#define DOUBLE_TAP_PIN (&pin_GPIO17)
16 changes: 16 additions & 0 deletions ports/espressif/boards/adafruit_vindie_s2/mpconfigboard.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
USB_VID = 0x239A
USB_PID = 0x8160
USB_PRODUCT = "Adafruit Vindie S2"
USB_MANUFACTURER = "Adafruit"

IDF_TARGET = esp32s2

CIRCUITPY_ESP_FLASH_SIZE = 4MB
CIRCUITPY_ESP_FLASH_MODE = qio
CIRCUITPY_ESP_FLASH_FREQ = 80m

CIRCUITPY_ESP_PSRAM_SIZE = 2MB
CIRCUITPY_ESP_PSRAM_MODE = qio
CIRCUITPY_ESP_PSRAM_FREQ = 80m

CIRCUITPY_PARALLELDISPLAYBUS = 0
41 changes: 41 additions & 0 deletions ports/espressif/boards/adafruit_vindie_s2/pins.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// This file is part of the CircuitPython project: https://circuitpython.org
//
// SPDX-FileCopyrightText: Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
//
// SPDX-License-Identifier: MIT

#include "shared-bindings/board/__init__.h"

static const mp_rom_map_elem_t board_module_globals_table[] = {
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS

{ MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) },
{ MP_ROM_QSTR(MP_QSTR_BOOT0), MP_ROM_PTR(&pin_GPIO0) },
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) },

{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO12) },
{ MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO12) },

{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO11) },
{ MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO11) },

{ MP_ROM_QSTR(MP_QSTR_FAN), MP_ROM_PTR(&pin_GPIO34) },
{ MP_ROM_QSTR(MP_QSTR_D34), MP_ROM_PTR(&pin_GPIO34) },

{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO18) },
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO18) },
{ MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_GPIO18) },

{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO21) },
{ MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO21) },

{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO45) },
{ MP_ROM_QSTR(MP_QSTR_D45), MP_ROM_PTR(&pin_GPIO45) },

{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO33) },

{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }
};
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);
Empty file.

0 comments on commit cd585a5

Please sign in to comment.