forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9963 from FoamyGuy/add_mini_sparkle_motion
adding mini sparkle motion board
- Loading branch information
Showing
5 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
25
ports/espressif/boards/adafruit_mini_sparkle_motion/mpconfigboard.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) 2022 Dan Halbert for Adafruit Industries | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
#pragma once | ||
|
||
// Micropython setup | ||
|
||
#define MICROPY_HW_BOARD_NAME "Adafruit Mini Sparkle Motion" | ||
#define MICROPY_HW_MCU_NAME "ESP32" | ||
|
||
#define MICROPY_HW_LED_STATUS (&pin_GPIO12) | ||
#define MICROPY_HW_NEOPIXEL (&pin_GPIO18) | ||
|
||
#define CIRCUITPY_BOARD_I2C (1) | ||
#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO22, .sda = &pin_GPIO19}} | ||
|
||
#define CIRCUITPY_BOARD_UART (1) | ||
#define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO25, .rx = &pin_GPIO26}} | ||
|
||
// UART pins attached to the USB-serial converter chip | ||
#define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) | ||
#define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO3) |
11 changes: 11 additions & 0 deletions
11
ports/espressif/boards/adafruit_mini_sparkle_motion/mpconfigboard.mk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CIRCUITPY_CREATOR_ID = 0x0000239A | ||
CIRCUITPY_CREATION_ID = 0x00320007 | ||
|
||
IDF_TARGET = esp32 | ||
|
||
CIRCUITPY_ESP_FLASH_MODE = qio | ||
CIRCUITPY_ESP_FLASH_FREQ = 80m | ||
CIRCUITPY_ESP_FLASH_SIZE = 4MB | ||
|
||
CIRCUITPY_BLEIO = 0 | ||
CIRCUITPY_ESPCAMERA = 0 |
49 changes: 49 additions & 0 deletions
49
ports/espressif/boards/adafruit_mini_sparkle_motion/pins.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// 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 | ||
|
||
// External pins are in silkscreen order, from top to bottom, left side, then right side | ||
{ MP_ROM_QSTR(MP_QSTR_BOOT), MP_ROM_PTR(&pin_GPIO0) }, | ||
{ MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) }, | ||
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, | ||
|
||
{ MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO14) }, | ||
{ MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_GPIO27) }, | ||
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO25) }, | ||
{ MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO25) }, | ||
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO26) }, | ||
{ MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, | ||
|
||
{ MP_ROM_QSTR(MP_QSTR_D33), MP_ROM_PTR(&pin_GPIO33) }, | ||
{ MP_ROM_QSTR(MP_QSTR_D32), MP_ROM_PTR(&pin_GPIO32) }, | ||
|
||
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, | ||
{ MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO18) }, | ||
|
||
{ MP_ROM_QSTR(MP_QSTR_MIC), MP_ROM_PTR(&pin_GPIO9) }, | ||
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, | ||
|
||
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO22) }, | ||
{ MP_ROM_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_GPIO22) }, | ||
|
||
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO19) }, | ||
{ MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_GPIO19) }, | ||
|
||
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO13) }, | ||
|
||
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO12) }, | ||
{ MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO12) }, | ||
|
||
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, | ||
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, | ||
{ MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_i2c_obj) }, | ||
|
||
}; | ||
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); |
Empty file.