Merge branch 'main' of github.com:adafruit/circuitpython into s2mini
This commit is contained in:
commit
ec20b2a02e
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -512,6 +512,7 @@ jobs:
|
||||
- "atmegazero_esp32s2"
|
||||
- "crumpspace_crumps2"
|
||||
- "electroniccats_bastwifi"
|
||||
- "espressif_hmi_devkit_1"
|
||||
- "espressif_kaluga_1"
|
||||
- "espressif_kaluga_1.3"
|
||||
- "espressif_saola_1_wroom"
|
||||
@ -532,6 +533,7 @@ jobs:
|
||||
- "targett_module_clip_wroom"
|
||||
- "targett_module_clip_wrover"
|
||||
- "unexpectedmaker_feathers2"
|
||||
- "unexpectedmaker_feathers2_neo"
|
||||
- "unexpectedmaker_feathers2_prerelease"
|
||||
- "unexpectedmaker_tinys2"
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit b2f21e6e42e681b2da91bf95d586ac8e4ad8266b
|
||||
Subproject commit 0f4661c45a578d816323b5ad0f432aff73b5522f
|
@ -1 +1 @@
|
||||
Subproject commit 3a248951e2744ba89f5fb96eda85a971001115f0
|
||||
Subproject commit 831a45f14bcc833d536cab39bef61cc67533fa73
|
@ -3982,6 +3982,7 @@ msgstr ""
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h
|
||||
|
@ -3942,6 +3942,7 @@ msgstr ""
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h
|
||||
|
@ -4011,6 +4011,7 @@ msgstr "pow() mit 3 Argumenten erfordert Integer"
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h
|
||||
|
@ -3939,6 +3939,7 @@ msgstr ""
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h
|
||||
|
375
locale/en_GB.po
375
locale/en_GB.po
File diff suppressed because it is too large
Load Diff
@ -4028,6 +4028,7 @@ msgstr "pow() con 3 argumentos requiere enteros"
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h
|
||||
|
@ -3988,6 +3988,7 @@ msgstr "pow() na may 3 argumento kailangan ng integers"
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h
|
||||
|
@ -4039,6 +4039,7 @@ msgstr "pow() avec 3 arguments nécessite des entiers"
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h
|
||||
|
@ -3939,6 +3939,7 @@ msgstr ""
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h
|
||||
|
@ -4004,6 +4004,7 @@ msgstr "pow() con 3 argomenti richiede interi"
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h
|
||||
|
@ -3961,6 +3961,7 @@ msgstr "pow()の第3引数には整数が必要"
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h
|
||||
|
@ -3943,6 +3943,7 @@ msgstr ""
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h
|
||||
|
@ -3985,6 +3985,7 @@ msgstr "pow() met 3 argumenten vereist integers"
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h
|
||||
|
@ -3958,6 +3958,7 @@ msgstr "trzyargumentowe pow() wymaga liczb całkowitych"
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h
|
||||
|
@ -4042,6 +4042,7 @@ msgstr "o pow() com 3 argumentos requer números inteiros"
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h
|
||||
|
@ -4001,6 +4001,7 @@ msgstr "pow() med 3 argument kräver heltal"
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h
|
||||
|
@ -3998,6 +3998,7 @@ msgstr "pow() yǒu 3 cānshù xūyào zhěngshù"
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h
|
||||
#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h
|
||||
|
@ -27,8 +27,12 @@ SECTIONS
|
||||
. = ALIGN(4);
|
||||
_sfixed = .;
|
||||
KEEP(*(.vectors)) /* isr vector table */
|
||||
*(.text) /* .text sections (code) */
|
||||
*(.text*) /* .text* sections (code) */
|
||||
|
||||
/* Sort text sections so that they have fewer *fill* bytes needed. */
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.text))) /* .text sections (code) */
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.text*))) /* .text* sections (code) */
|
||||
|
||||
/* Don't sort rodata because it impacts codegen size. */
|
||||
*(.rodata) /* .rodata sections (constants, strings, etc.) */
|
||||
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
|
||||
|
||||
@ -62,8 +66,8 @@ SECTIONS
|
||||
_srelocate = .; /* create a global symbol at data start; used by startup code in order to initialize the .data section in RAM */
|
||||
*(.ramfunc)
|
||||
*(.ramfunc*)
|
||||
*(.data) /* .data sections */
|
||||
*(.data*) /* .data* sections */
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.data))) /* .data sections */
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.data*))) /* .data* sections */
|
||||
|
||||
. = ALIGN(4);
|
||||
_erelocate = .; /* define a global symbol at data end; used by startup code in order to initialize the .data section in RAM */
|
||||
@ -75,8 +79,8 @@ SECTIONS
|
||||
. = ALIGN(4);
|
||||
_sbss = .;
|
||||
_szero = .; /* define a global symbol at bss start; used by startup code */
|
||||
*(.bss)
|
||||
*(.bss*)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.bss)))
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.bss*)))
|
||||
*(COMMON)
|
||||
|
||||
. = ALIGN(4);
|
||||
|
@ -10,6 +10,7 @@ INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
# Not needed.
|
||||
CIRCUITPY_AESIO = 0
|
||||
CIRCUITPY_AUDIOBUSIO = 0
|
||||
CIRCUITPY_AUDIOMP3 = 0
|
||||
CIRCUITPY_BLEIO_HCI = 0
|
||||
|
@ -10,6 +10,7 @@ QSPI_FLASH_FILESYSTEM = 1
|
||||
EXTERNAL_FLASH_DEVICES = GD25Q16C
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
CIRCUITPY_AESIO = 0
|
||||
CIRCUITPY_GAMEPADSHIFT = 1
|
||||
CIRCUITPY_STAGE = 1
|
||||
|
||||
|
@ -10,6 +10,7 @@ QSPI_FLASH_FILESYSTEM = 1
|
||||
EXTERNAL_FLASH_DEVICES = GD25Q64C
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
CIRCUITPY_AESIO = 0
|
||||
CIRCUITPY_GAMEPADSHIFT = 1
|
||||
CIRCUITPY_STAGE = 1
|
||||
|
||||
|
@ -35,6 +35,7 @@ ifeq ($(CHIP_FAMILY),samd21)
|
||||
# Some of these are on by default with CIRCUITPY_FULL_BUILD, but don't
|
||||
# fit in 256kB of flash
|
||||
|
||||
CIRCUITPY_AESIO ?= 0
|
||||
CIRCUITPY_AUDIOMIXER ?= 0
|
||||
CIRCUITPY_BINASCII ?= 0
|
||||
CIRCUITPY_BITBANGIO ?= 0
|
||||
|
50
ports/esp32s2/boards/espressif_hmi_devkit_1/board.c
Normal file
50
ports/esp32s2/boards/espressif_hmi_devkit_1/board.c
Normal file
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "shared-bindings/microcontroller/Pin.h"
|
||||
|
||||
void board_init(void) {
|
||||
// USB
|
||||
common_hal_never_reset_pin(&pin_GPIO19);
|
||||
common_hal_never_reset_pin(&pin_GPIO20);
|
||||
|
||||
// Debug UART
|
||||
common_hal_never_reset_pin(&pin_GPIO43);
|
||||
common_hal_never_reset_pin(&pin_GPIO44);
|
||||
}
|
||||
|
||||
bool board_requests_safe_mode(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void reset_board(void) {
|
||||
|
||||
}
|
||||
|
||||
void board_deinit(void) {
|
||||
}
|
47
ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h
Normal file
47
ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h
Normal file
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2019 Scott Shawcroft for Adafruit Industries
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
// Micropython setup
|
||||
|
||||
#define MICROPY_HW_BOARD_NAME "HMI-DevKit-1.1"
|
||||
#define MICROPY_HW_MCU_NAME "ESP32S2"
|
||||
|
||||
#define MICROPY_HW_NEOPIXEL (&pin_GPIO21)
|
||||
|
||||
#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0)
|
||||
|
||||
#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n")
|
||||
|
||||
#define AUTORESET_DELAY_MS 500
|
||||
|
||||
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO39)
|
||||
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO40)
|
||||
|
||||
#define DEFAULT_SPI_BUS_SCK (&pin_GPIO36)
|
||||
#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35)
|
||||
#define DEFAULT_SPI_BUS_MISO (&pin_GPIO37)
|
||||
|
||||
#define CIRCUITPY_I2C_ALLOW_INTERNAL_PULL_UP (1)
|
17
ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.mk
Normal file
17
ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.mk
Normal file
@ -0,0 +1,17 @@
|
||||
USB_VID = 0x303A
|
||||
USB_PID = 0x7001
|
||||
USB_PRODUCT = "ESP32-S2-HMI-DevKit-1"
|
||||
USB_MANUFACTURER = "Espressif"
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
# The default queue depth of 16 overflows on release builds,
|
||||
# so increase it to 32.
|
||||
CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32
|
||||
|
||||
CIRCUITPY_ESP_FLASH_MODE=dio
|
||||
CIRCUITPY_ESP_FLASH_FREQ=80m
|
||||
CIRCUITPY_ESP_FLASH_SIZE=4MB
|
||||
|
||||
CIRCUITPY_MODULE=wrover
|
78
ports/esp32s2/boards/espressif_hmi_devkit_1/pins.c
Normal file
78
ports/esp32s2/boards/espressif_hmi_devkit_1/pins.c
Normal file
@ -0,0 +1,78 @@
|
||||
#include "py/objtuple.h"
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
|
||||
STATIC const mp_rom_obj_tuple_t lcd_data_tuple = {
|
||||
{&mp_type_tuple},
|
||||
8,
|
||||
{
|
||||
MP_ROM_PTR(&pin_GPIO1),
|
||||
MP_ROM_PTR(&pin_GPIO10),
|
||||
MP_ROM_PTR(&pin_GPIO2),
|
||||
MP_ROM_PTR(&pin_GPIO11),
|
||||
MP_ROM_PTR(&pin_GPIO3),
|
||||
MP_ROM_PTR(&pin_GPIO12),
|
||||
MP_ROM_PTR(&pin_GPIO4),
|
||||
MP_ROM_PTR(&pin_GPIO13),
|
||||
MP_ROM_PTR(&pin_GPIO5),
|
||||
MP_ROM_PTR(&pin_GPIO14),
|
||||
MP_ROM_PTR(&pin_GPIO6),
|
||||
MP_ROM_PTR(&pin_GPIO15),
|
||||
MP_ROM_PTR(&pin_GPIO7),
|
||||
MP_ROM_PTR(&pin_GPIO16),
|
||||
MP_ROM_PTR(&pin_GPIO8),
|
||||
MP_ROM_PTR(&pin_GPIO17),
|
||||
}
|
||||
};
|
||||
|
||||
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO45) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_LCD_RS), MP_ROM_PTR(&pin_GPIO38) },
|
||||
|
||||
// LCD
|
||||
{ MP_ROM_QSTR(MP_QSTR_LCD_DATA), MP_ROM_PTR(&lcd_data_tuple) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_LCD_WR), MP_ROM_PTR(&pin_GPIO33) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_LCD_RS), MP_ROM_PTR(&pin_GPIO38) },
|
||||
|
||||
// SPI and SD
|
||||
{ MP_ROM_QSTR(MP_QSTR_CS_SD), MP_ROM_PTR(&pin_GPIO34) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_CS_CNN), MP_ROM_PTR(&pin_GPIO45) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(DEFAULT_SPI_BUS_MISO) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(DEFAULT_SPI_BUS_MOSI) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(DEFAULT_SPI_BUS_SCK) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
|
||||
|
||||
// I2C
|
||||
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(DEFAULT_I2C_BUS_SCL) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(DEFAULT_I2C_BUS_SDA) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
|
||||
|
||||
// canbus (TWAI)
|
||||
{ MP_ROM_QSTR(MP_QSTR_CAN_RX), MP_ROM_PTR(&pin_GPIO41) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_CAN_TX), MP_ROM_PTR(&pin_GPIO42) },
|
||||
|
||||
// Audio
|
||||
{ MP_ROM_QSTR(MP_QSTR_MIC_ADC_M), MP_ROM_PTR(&pin_GPIO9) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_DAC_OUT), MP_ROM_PTR(&pin_GPIO18) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUDIO_SPI_MISO), MP_ROM_PTR(&pin_GPIO42) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUDIO_SPI_MOSI), MP_ROM_PTR(&pin_GPIO40) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUDIO_SPI_SCK), MP_ROM_PTR(&pin_GPIO38) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUDIO_SPI_CS), MP_ROM_PTR(&pin_GPIO33) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUDIO_BT_ADC), MP_ROM_PTR(&pin_GPIO6) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUDIO_SCL), MP_ROM_PTR(&pin_GPIO7) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUDIO_SDA), MP_ROM_PTR(&pin_GPIO8) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUDIO_I2S0_MCLK), MP_ROM_PTR(&pin_GPIO41) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUDIO_I2S0_BCLK), MP_ROM_PTR(&pin_GPIO39) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUDIO_I2S0_LRCK), MP_ROM_PTR(&pin_GPIO21) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUDIO_I2S0_SDI), MP_ROM_PTR(&pin_GPIO1) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUDIO_I2S0_SDO), MP_ROM_PTR(&pin_GPIO3) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUDIO_RST), MP_ROM_PTR(&pin_GPIO5) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUDIO_WAKE_INT), MP_ROM_PTR(&pin_GPIO46) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUDIO_I2S1_MCLK), MP_ROM_PTR(&pin_GPIO35) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUDIO_PA_CTRL), MP_ROM_PTR(&pin_GPIO10) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUDIO_I2S1_SDI), MP_ROM_PTR(&pin_GPIO34) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUDIO_I2S1_SDO), MP_ROM_PTR(&pin_GPIO12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUDIO_I2S1_LRCK_DAC1), MP_ROM_PTR(&pin_GPIO17) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUDIO_I2S1_BCLK_DAC2), MP_ROM_PTR(&pin_GPIO18) },
|
||||
|
||||
};
|
||||
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
|
33
ports/esp32s2/boards/espressif_hmi_devkit_1/sdkconfig
Normal file
33
ports/esp32s2/boards/espressif_hmi_devkit_1/sdkconfig
Normal file
@ -0,0 +1,33 @@
|
||||
CONFIG_ESP32S2_SPIRAM_SUPPORT=y
|
||||
|
||||
#
|
||||
# SPI RAM config
|
||||
#
|
||||
# CONFIG_SPIRAM_TYPE_AUTO is not set
|
||||
CONFIG_SPIRAM_TYPE_ESPPSRAM16=y
|
||||
# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set
|
||||
# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set
|
||||
CONFIG_SPIRAM_SIZE=2097152
|
||||
|
||||
#
|
||||
# PSRAM clock and cs IO for ESP32S2
|
||||
#
|
||||
CONFIG_DEFAULT_PSRAM_CLK_IO=30
|
||||
CONFIG_DEFAULT_PSRAM_CS_IO=26
|
||||
# end of PSRAM clock and cs IO for ESP32S2
|
||||
|
||||
# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set
|
||||
# CONFIG_SPIRAM_RODATA is not set
|
||||
# CONFIG_SPIRAM_SPEED_80M is not set
|
||||
CONFIG_SPIRAM_SPEED_40M=y
|
||||
# CONFIG_SPIRAM_SPEED_26M is not set
|
||||
# CONFIG_SPIRAM_SPEED_20M is not set
|
||||
CONFIG_SPIRAM=y
|
||||
CONFIG_SPIRAM_BOOT_INIT=y
|
||||
# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set
|
||||
CONFIG_SPIRAM_USE_MEMMAP=y
|
||||
# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set
|
||||
# CONFIG_SPIRAM_USE_MALLOC is not set
|
||||
CONFIG_SPIRAM_MEMTEST=y
|
||||
# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set
|
||||
# end of SPI RAM config
|
61
ports/esp32s2/boards/unexpectedmaker_feathers2_neo/board.c
Normal file
61
ports/esp32s2/boards/unexpectedmaker_feathers2_neo/board.c
Normal file
@ -0,0 +1,61 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "shared-bindings/microcontroller/Pin.h"
|
||||
|
||||
void board_init(void) {
|
||||
// USB
|
||||
common_hal_never_reset_pin(&pin_GPIO19);
|
||||
common_hal_never_reset_pin(&pin_GPIO20);
|
||||
|
||||
// Debug UART
|
||||
#ifdef DEBUG
|
||||
common_hal_never_reset_pin(&pin_GPIO43);
|
||||
common_hal_never_reset_pin(&pin_GPIO44);
|
||||
#endif /* DEBUG */
|
||||
|
||||
// SPI Flash and RAM
|
||||
common_hal_never_reset_pin(&pin_GPIO26);
|
||||
common_hal_never_reset_pin(&pin_GPIO27);
|
||||
common_hal_never_reset_pin(&pin_GPIO28);
|
||||
common_hal_never_reset_pin(&pin_GPIO29);
|
||||
common_hal_never_reset_pin(&pin_GPIO30);
|
||||
common_hal_never_reset_pin(&pin_GPIO31);
|
||||
common_hal_never_reset_pin(&pin_GPIO32);
|
||||
}
|
||||
|
||||
bool board_requests_safe_mode(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void reset_board(void) {
|
||||
|
||||
}
|
||||
|
||||
void board_deinit(void) {
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2019 Scott Shawcroft for Adafruit Industries
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
// Micropython setup
|
||||
|
||||
#define MICROPY_HW_BOARD_NAME "FeatherS2 Neo"
|
||||
#define MICROPY_HW_MCU_NAME "ESP32S2"
|
||||
|
||||
#define MICROPY_HW_NEOPIXEL (&pin_GPIO40)
|
||||
#define CIRCUITPY_STATUS_LED_POWER (&pin_GPIO39)
|
||||
#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0)
|
||||
#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n")
|
||||
|
||||
#define AUTORESET_DELAY_MS 500
|
||||
|
||||
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO9)
|
||||
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO8)
|
||||
|
||||
#define DEFAULT_SPI_BUS_SCK (&pin_GPIO36)
|
||||
#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35)
|
||||
#define DEFAULT_SPI_BUS_MISO (&pin_GPIO37)
|
||||
|
||||
#define DEFAULT_UART_BUS_RX (&pin_GPIO44)
|
||||
#define DEFAULT_UART_BUS_TX (&pin_GPIO43)
|
@ -0,0 +1,20 @@
|
||||
USB_VID = 0x303A
|
||||
USB_PID = 0x80B5
|
||||
USB_PRODUCT = "FeatherS2 Neo"
|
||||
USB_MANUFACTURER = "UnexpectedMaker"
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
# The default queue depth of 16 overflows on release builds,
|
||||
# so increase it to 32.
|
||||
CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32
|
||||
|
||||
CIRCUITPY_ESP_FLASH_MODE=qio
|
||||
CIRCUITPY_ESP_FLASH_FREQ=80m
|
||||
CIRCUITPY_ESP_FLASH_SIZE=4MB
|
||||
|
||||
CIRCUITPY_BITBANG_NEOPIXEL = 1
|
||||
|
||||
# Include these Python libraries in firmware.
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
|
119
ports/esp32s2/boards/unexpectedmaker_feathers2_neo/pins.c
Normal file
119
ports/esp32s2/boards/unexpectedmaker_feathers2_neo/pins.c
Normal file
@ -0,0 +1,119 @@
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
|
||||
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO0) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO17) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO17) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_DAC1), MP_ROM_PTR(&pin_GPIO17) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO18) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO18) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_DAC2), MP_ROM_PTR(&pin_GPIO18) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO14) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO14) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO12) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO6) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO6) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO5) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_GPIO5) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO36) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SDO), MP_ROM_PTR(&pin_GPIO35) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D24), MP_ROM_PTR(&pin_GPIO35) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO37) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SDI), MP_ROM_PTR(&pin_GPIO37) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_GPIO37) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO44) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO43) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO45) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO8) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO8) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO9) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_GPIO9) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO33) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO38) },
|
||||
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO1) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_GPIO1) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO3) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_GPIO3) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO7) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_GPIO7) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO10) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_GPIO10) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO11) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_A10), MP_ROM_PTR(&pin_GPIO11) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, // Blue LED
|
||||
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) }, // Blue LED
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_GPIO2) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_VBAT), MP_ROM_PTR(&pin_GPIO2) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_VBAT_SENSE), MP_ROM_PTR(&pin_GPIO2) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_GPIO2) },
|
||||
|
||||
// 5V present sense pin
|
||||
{ MP_ROM_QSTR(MP_QSTR_VBUS), MP_ROM_PTR(&pin_GPIO34) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_VBUS_SENSE), MP_ROM_PTR(&pin_GPIO34) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO39) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO40) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL_MATRIX_POWER), MP_ROM_PTR(&pin_GPIO4) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL_MATRIX), MP_ROM_PTR(&pin_GPIO21) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) },
|
||||
|
||||
{ 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);
|
39
ports/esp32s2/boards/unexpectedmaker_feathers2_neo/sdkconfig
Normal file
39
ports/esp32s2/boards/unexpectedmaker_feathers2_neo/sdkconfig
Normal file
@ -0,0 +1,39 @@
|
||||
CONFIG_ESP32S2_SPIRAM_SUPPORT=y
|
||||
|
||||
#
|
||||
# SPI RAM config
|
||||
#
|
||||
# CONFIG_SPIRAM_TYPE_AUTO=y
|
||||
CONFIG_SPIRAM_TYPE_ESPPSRAM16=y
|
||||
# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set
|
||||
# CONFIG_SPIRAM_TYPE_ESPPSRAM64=y
|
||||
CONFIG_SPIRAM_SIZE=2097152
|
||||
|
||||
#
|
||||
# PSRAM clock and cs IO for ESP32S2
|
||||
#
|
||||
CONFIG_DEFAULT_PSRAM_CLK_IO=30
|
||||
CONFIG_DEFAULT_PSRAM_CS_IO=26
|
||||
# end of PSRAM clock and cs IO for ESP32S2
|
||||
|
||||
# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set
|
||||
# CONFIG_SPIRAM_RODATA is not set
|
||||
# CONFIG_SPIRAM_SPEED_80M is not set
|
||||
CONFIG_SPIRAM_SPEED_40M=y
|
||||
# CONFIG_SPIRAM_SPEED_26M is not set
|
||||
# CONFIG_SPIRAM_SPEED_20M is not set
|
||||
CONFIG_SPIRAM=y
|
||||
CONFIG_SPIRAM_BOOT_INIT=y
|
||||
# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set
|
||||
CONFIG_SPIRAM_USE_MEMMAP=y
|
||||
# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set
|
||||
# CONFIG_SPIRAM_USE_MALLOC is not set
|
||||
CONFIG_SPIRAM_MEMTEST=y
|
||||
# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set
|
||||
# end of SPI RAM config
|
||||
|
||||
#
|
||||
# LWIP
|
||||
#
|
||||
CONFIG_LWIP_LOCAL_HOSTNAME="UMFeatherS2Neo"
|
||||
# end of LWIP
|
@ -16,5 +16,7 @@ CIRCUITPY_ESP_FLASH_SIZE=4MB
|
||||
|
||||
CIRCUITPY_BITBANG_NEOPIXEL = 1
|
||||
|
||||
CIRCUITPY_STAGE = 1
|
||||
|
||||
# Include these Python libraries in firmware.
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
|
||||
|
@ -78,8 +78,13 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
|
||||
gpio_pulldown_dis(sda->number);
|
||||
gpio_pulldown_dis(scl->number);
|
||||
|
||||
#if CIRCUITPY_I2C_ALLOW_INTERNAL_PULL_UP
|
||||
gpio_pullup_en(sda->number);
|
||||
gpio_pullup_en(scl->number);
|
||||
#endif
|
||||
|
||||
// We must pull up within 3us to achieve 400khz.
|
||||
common_hal_mcu_delay_us(3);
|
||||
common_hal_mcu_delay_us((1200000 + frequency - 1) / frequency);
|
||||
|
||||
if (gpio_get_level(sda->number) == 0 || gpio_get_level(scl->number) == 0) {
|
||||
reset_pin_number(sda->number);
|
||||
@ -112,8 +117,13 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
|
||||
.mode = I2C_MODE_MASTER,
|
||||
.sda_io_num = self->sda_pin->number,
|
||||
.scl_io_num = self->scl_pin->number,
|
||||
#if CIRCUITPY_I2C_ALLOW_INTERNAL_PULL_UP
|
||||
.sda_pullup_en = GPIO_PULLUP_ENABLE, /*!< Internal GPIO pull mode for I2C sda signal*/
|
||||
.scl_pullup_en = GPIO_PULLUP_ENABLE, /*!< Internal GPIO pull mode for I2C scl signal*/
|
||||
#else
|
||||
.sda_pullup_en = GPIO_PULLUP_DISABLE, /*!< Internal GPIO pull mode for I2C sda signal*/
|
||||
.scl_pullup_en = GPIO_PULLUP_DISABLE, /*!< Internal GPIO pull mode for I2C scl signal*/
|
||||
#endif
|
||||
|
||||
.master = {
|
||||
.clk_speed = frequency,
|
||||
|
@ -52,4 +52,13 @@
|
||||
#define CIRCUITPY_INTERNAL_NVM_SIZE (8 * 1024)
|
||||
#endif
|
||||
|
||||
// Define to (1) in mpconfigboard.h if the board has a defined I2C port that
|
||||
// lacks pull up resistors (Espressif's HMI Devkit), and the internal pull-up
|
||||
// resistors will be enabled for all busio.I2C objects. This is only to
|
||||
// compensate for design decisions that are out of the control of the authors
|
||||
// of CircuitPython and is not an endorsement of running without appropriate
|
||||
// external pull up resistors.
|
||||
#ifndef CIRCUITPY_I2C_ALLOW_INTERNAL_PULL_UP
|
||||
#define CIRCUITPY_I2C_ALLOW_INTERNAL_PULL_UP (0)
|
||||
#endif
|
||||
#endif // __INCLUDED_ESP32S2_MPCONFIGPORT_H
|
||||
|
@ -62,8 +62,8 @@ SECTIONS
|
||||
.text :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.text) /* .text sections (code) */
|
||||
*(.text*) /* .text* sections (code) */
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.text))) /* .text sections (code) */
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.text*))) /* .text* sections (code) */
|
||||
*(.rodata) /* .rodata sections (constants, strings, etc.) */
|
||||
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
|
||||
/* *(.glue_7) */ /* glue arm to thumb code */
|
||||
@ -73,32 +73,32 @@ SECTIONS
|
||||
_etext = .; /* define a global symbol at end of code */
|
||||
} >FLASH_FIRMWARE
|
||||
|
||||
/* used by the startup to initialize data */
|
||||
_sidata = .;
|
||||
|
||||
/* This is the initialized data section
|
||||
The program executes knowing that the data is in the RAM
|
||||
but the loader puts the initial values in the FLASH (inidata).
|
||||
It is one task of the startup to copy the initial values from FLASH to RAM. */
|
||||
.data : AT (_sidata)
|
||||
.data :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
_sdata = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */
|
||||
_ram_start = .; /* create a global symbol at ram start for garbage collector */
|
||||
*(.data) /* .data sections */
|
||||
*(.data*) /* .data* sections */
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.data))) /* .data sections */
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.data*))) /* .data* sections */
|
||||
|
||||
. = ALIGN(4);
|
||||
_edata = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */
|
||||
} >APP_RAM
|
||||
} >APP_RAM AT > FLASH_FIRMWARE
|
||||
|
||||
/* used by the startup to initialize data */
|
||||
_sidata = LOADADDR(.data);
|
||||
|
||||
/* Zero-initialized data section */
|
||||
.bss :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
_sbss = .; /* define a global symbol at bss start; used by startup code */
|
||||
*(.bss)
|
||||
*(.bss*)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.bss)))
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.bss*)))
|
||||
*(COMMON)
|
||||
|
||||
. = ALIGN(4);
|
||||
|
@ -7,6 +7,7 @@ MCU_CHIP = nrf52833
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
|
||||
CIRCUITPY_AESIO = 0
|
||||
CIRCUITPY_ALARM = 0
|
||||
CIRCUITPY_AUDIOMP3 = 0
|
||||
CIRCUITPY_BINASCII = 0
|
||||
|
@ -17,6 +17,7 @@ LD_FILE = boards/STM32F401xd_fs.ld
|
||||
# INTERNAL_FLASH_FILESYSTEM. It can probably be reenabled if we enable
|
||||
# lto for this port, and if other stuff hasn't been added in the
|
||||
# meantime
|
||||
CIRCUITPY_AESIO = 0
|
||||
CIRCUITPY_AUDIOCORE = 0
|
||||
CIRCUITPY_AUDIOPWMIO = 0
|
||||
CIRCUITPY_BUSDEVICE = 0
|
||||
|
@ -20,6 +20,7 @@ LD_FILE = boards/STM32F401xe_boot.ld
|
||||
# For debugging - also comment BOOTLOADER_OFFSET and BOARD_VTOR_DEFER
|
||||
# LD_FILE = boards/STM32F401xe_fs.ld
|
||||
|
||||
CIRCUITPY_AESIO = 0
|
||||
CIRCUITPY_BLEIO_HCI = 0
|
||||
CIRCUITPY_ULAB = 0
|
||||
CIRCUITPY_STAGE = 1
|
||||
|
@ -16,6 +16,7 @@ MCU_PACKAGE = UFQFPN48
|
||||
LD_COMMON = boards/common_nvm.ld
|
||||
LD_FILE = boards/STM32F411_nvm.ld
|
||||
|
||||
CIRCUITPY_AESIO = 0
|
||||
CIRCUITPY_BLEIO_HCI = 0
|
||||
CIRCUITPY_VECTORIO = 0
|
||||
CIRCUITPY_ULAB = 0
|
||||
|
@ -244,35 +244,6 @@ typedef long mp_off_t;
|
||||
// These CIRCUITPY_xxx values should all be defined in the *.mk files as being on or off.
|
||||
// So if any are not defined in *.mk, they'll throw an error here.
|
||||
|
||||
#if CIRCUITPY_AESIO
|
||||
extern const struct _mp_obj_module_t aesio_module;
|
||||
#define AESIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_aesio), (mp_obj_t)&aesio_module },
|
||||
#else
|
||||
#define AESIO_MODULE
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_ALARM
|
||||
extern const struct _mp_obj_module_t alarm_module;
|
||||
#define ALARM_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_alarm), (mp_obj_t)&alarm_module },
|
||||
#else
|
||||
#define ALARM_MODULE
|
||||
#endif
|
||||
|
||||
// CIRCUITPY_ANALOGIO uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_ATEXIT uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_AUDIOBUSIO uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_AUDIOCORE uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_AUDIOIO uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_AUDIOMIXER uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_AUDIOMP3 uses MP_REGISTER_MODULE
|
||||
|
||||
#if CIRCUITPY_AUDIOPWMIO
|
||||
#define AUDIOPWMIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_audiopwmio), (mp_obj_t)&audiopwmio_module },
|
||||
extern const struct _mp_obj_module_t audiopwmio_module;
|
||||
#else
|
||||
#define AUDIOPWMIO_MODULE
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_BINASCII
|
||||
#define MICROPY_PY_UBINASCII CIRCUITPY_BINASCII
|
||||
#define BINASCII_MODULE { MP_ROM_QSTR(MP_QSTR_binascii), MP_ROM_PTR(&mp_module_ubinascii) },
|
||||
@ -280,19 +251,6 @@ extern const struct _mp_obj_module_t audiopwmio_module;
|
||||
#define BINASCII_MODULE
|
||||
#endif
|
||||
|
||||
// CIRCUITPY_BITBANGIO uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_BITMAPTOOLS uses MP_REGISTER_MODULE
|
||||
|
||||
#if CIRCUITPY_BITOPS
|
||||
extern const struct _mp_obj_module_t bitops_module;
|
||||
#define BITOPS_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_bitops),(mp_obj_t)&bitops_module },
|
||||
#else
|
||||
#define BITOPS_MODULE
|
||||
#endif
|
||||
|
||||
// CIRCUITPY_BLEIO uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_BOARD uses MP_REGISTER_MODULE
|
||||
|
||||
#if CIRCUITPY_BOARD
|
||||
#define BOARD_I2C (defined(DEFAULT_I2C_BUS_SDA) && defined(DEFAULT_I2C_BUS_SCL))
|
||||
#define BOARD_SPI (defined(DEFAULT_SPI_BUS_SCK) && defined(DEFAULT_SPI_BUS_MISO) && defined(DEFAULT_SPI_BUS_MOSI))
|
||||
@ -310,30 +268,6 @@ extern const struct _mp_obj_module_t bitops_module;
|
||||
#define BOARD_UART_ROOT_POINTER
|
||||
#endif
|
||||
|
||||
// CIRCUITPY_BUSDEVICE (adafruit_bus_device_module) uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_BUSIO uses MP_REGISTER_MODULE
|
||||
|
||||
#if CIRCUITPY_CAMERA
|
||||
extern const struct _mp_obj_module_t camera_module;
|
||||
#define CAMERA_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_camera), (mp_obj_t)&camera_module },
|
||||
#else
|
||||
#define CAMERA_MODULE
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_CANIO
|
||||
extern const struct _mp_obj_module_t canio_module;
|
||||
#define CANIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_canio), (mp_obj_t)&canio_module },
|
||||
#else
|
||||
#define CANIO_MODULE
|
||||
#endif
|
||||
|
||||
// CIRCUITPY_COUNTIO uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_DIGITALIO uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_DISPLAYIO uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_PARALLELDISPLAY uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_TERMINALIO uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_FONTIO uses MP_REGISTER_MODULE
|
||||
|
||||
#if CIRCUITPY_DISPLAYIO
|
||||
#ifndef CIRCUITPY_DISPLAY_LIMIT
|
||||
#define CIRCUITPY_DISPLAY_LIMIT (1)
|
||||
@ -342,13 +276,6 @@ extern const struct _mp_obj_module_t canio_module;
|
||||
#define CIRCUITPY_DISPLAY_LIMIT (0)
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_DUALBANK
|
||||
extern const struct _mp_obj_module_t dualbank_module;
|
||||
#define DUALBANK_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_dualbank), (mp_obj_t)&dualbank_module },
|
||||
#else
|
||||
#define DUALBANK_MODULE
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_ERRNO
|
||||
#define MICROPY_PY_UERRNO (1)
|
||||
// Uses about 80 bytes.
|
||||
@ -366,19 +293,6 @@ extern const struct _mp_obj_module_t espidf_module;
|
||||
#define ESPIDF_MODULE
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY__EVE
|
||||
extern const struct _mp_obj_module_t _eve_module;
|
||||
#define _EVE_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR__eve), (mp_obj_t)&_eve_module },
|
||||
#else
|
||||
#define _EVE_MODULE
|
||||
#endif
|
||||
|
||||
// CIRCUITPY_FRAMEBUFFERIO uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_VECTORIO uses MP_REGISTER_MODULE
|
||||
|
||||
// CIRCUITPY_FREQUENCYIO uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_GAMEPADSHIFT uses MP_REGISTER_MODULE
|
||||
|
||||
#if CIRCUITPY_GAMEPADSHIFT
|
||||
// Scan gamepad every 32ms
|
||||
#define CIRCUITPY_GAMEPAD_TICKS 0x1f
|
||||
@ -387,36 +301,6 @@ extern const struct _mp_obj_module_t _eve_module;
|
||||
#define GAMEPAD_ROOT_POINTERS
|
||||
#endif
|
||||
|
||||
// CIRCUITPY_GETPASS uses MP_REGISTER_MODULE
|
||||
|
||||
#if CIRCUITPY_GNSS
|
||||
extern const struct _mp_obj_module_t gnss_module;
|
||||
#define GNSS_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_gnss), (mp_obj_t)&gnss_module },
|
||||
#else
|
||||
#define GNSS_MODULE
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_I2CPERIPHERAL
|
||||
extern const struct _mp_obj_module_t i2cperipheral_module;
|
||||
#define I2CPERIPHERAL_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_i2cperipheral), (mp_obj_t)&i2cperipheral_module },
|
||||
#else
|
||||
#define I2CPERIPHERAL_MODULE
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_IMAGECAPTURE
|
||||
extern const struct _mp_obj_module_t imagecapture_module;
|
||||
#define IMAGECAPTURE_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_imagecapture), (mp_obj_t)&imagecapture_module },
|
||||
#else
|
||||
#define IMAGECAPTURE_MODULE
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_IPADDRESS
|
||||
extern const struct _mp_obj_module_t ipaddress_module;
|
||||
#define IPADDRESS_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_ipaddress), (mp_obj_t)&ipaddress_module },
|
||||
#else
|
||||
#define IPADDRESS_MODULE
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_JSON
|
||||
#define MICROPY_PY_UJSON (1)
|
||||
#define MICROPY_PY_IO (1)
|
||||
@ -429,36 +313,24 @@ extern const struct _mp_obj_module_t ipaddress_module;
|
||||
#define JSON_MODULE
|
||||
#endif
|
||||
|
||||
// CIRCUITPY_KEYPAD uses MP_REGISTER_MODULE
|
||||
|
||||
#if CIRCUITPY_KEYPAD
|
||||
#define KEYPAD_ROOT_POINTERS mp_obj_t keypad_scanners_linked_list;
|
||||
#else
|
||||
#define KEYPAD_ROOT_POINTERS
|
||||
#endif
|
||||
|
||||
// CIRCUITPY_MATH uses MP_REGISTER_MODULE
|
||||
|
||||
#if CIRCUITPY_MEMORYMONITOR
|
||||
extern const struct _mp_obj_module_t memorymonitor_module;
|
||||
#define MEMORYMONITOR_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_memorymonitor), (mp_obj_t)&memorymonitor_module },
|
||||
#define MEMORYMONITOR_ROOT_POINTERS mp_obj_t active_allocationsizes; \
|
||||
mp_obj_t active_allocationalarms;
|
||||
#else
|
||||
#define MEMORYMONITOR_MODULE
|
||||
#define MEMORYMONITOR_ROOT_POINTERS
|
||||
#endif
|
||||
|
||||
// CIRCUITPY_MICROCONTROLLER uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_NEOPIXEL_WRITE uses MP_REGISTER_MODULE
|
||||
|
||||
// This is not a top-level module; it's microcontroller.nvm.
|
||||
#if CIRCUITPY_NVM
|
||||
extern const struct _mp_obj_module_t nvm_module;
|
||||
#endif
|
||||
|
||||
// CIRCUITPY_ONEWIREIO_WRITE uses MP_REGISTER_MODULE
|
||||
|
||||
#if CIRCUITPY_OS
|
||||
extern const struct _mp_obj_module_t os_module;
|
||||
#define OS_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_os), (mp_obj_t)&os_module },
|
||||
@ -468,21 +340,6 @@ extern const struct _mp_obj_module_t os_module;
|
||||
#define OS_MODULE_ALT_NAME
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_PEW
|
||||
extern const struct _mp_obj_module_t pew_module;
|
||||
#define PEW_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR__pew),(mp_obj_t)&pew_module },
|
||||
#else
|
||||
#define PEW_MODULE
|
||||
#endif
|
||||
|
||||
// CIRCUITPY_PIXELBUF (pixelbuf_module) uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_PS2IO uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_PULSEIO uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_PWMIO uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_QRIO uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_RAINBOWIO uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_RANDOM uses MP_REGISTER_MODULE
|
||||
|
||||
#if CIRCUITPY_RE
|
||||
#define MICROPY_PY_URE (1)
|
||||
#define RE_MODULE { MP_ROM_QSTR(MP_QSTR_re), MP_ROM_PTR(&mp_module_ure) },
|
||||
@ -490,9 +347,6 @@ extern const struct _mp_obj_module_t pew_module;
|
||||
#define RE_MODULE
|
||||
#endif
|
||||
|
||||
// CIRCUITPY_RGBMATRIX uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_ROTARYIO uses MP_REGISTER_MODULE
|
||||
|
||||
#if CIRCUITPY_RP2PIO
|
||||
extern const struct _mp_obj_module_t rp2pio_module;
|
||||
#define RP2PIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_rp2pio),(mp_obj_t)&rp2pio_module },
|
||||
@ -500,8 +354,6 @@ extern const struct _mp_obj_module_t rp2pio_module;
|
||||
#define RP2PIO_MODULE
|
||||
#endif
|
||||
|
||||
// CIRCUITPY_RTC uses MP_REGISTER_MODULE
|
||||
|
||||
#if CIRCUITPY_SAMD
|
||||
extern const struct _mp_obj_module_t samd_module;
|
||||
#define SAMD_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_samd),(mp_obj_t)&samd_module },
|
||||
@ -509,37 +361,6 @@ extern const struct _mp_obj_module_t samd_module;
|
||||
#define SAMD_MODULE
|
||||
#endif
|
||||
|
||||
// CIRCUITPY_SDCARDIO uses MP_REGISTER_MODULE
|
||||
|
||||
#if CIRCUITPY_SDIOIO
|
||||
extern const struct _mp_obj_module_t sdioio_module;
|
||||
#define SDIOIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_sdioio), (mp_obj_t)&sdioio_module },
|
||||
#else
|
||||
#define SDIOIO_MODULE
|
||||
#endif
|
||||
|
||||
// CIRCUITPY_SHARPDISPLAY uses MP_REGISTER_MODULE
|
||||
|
||||
#if CIRCUITPY_SOCKETPOOL
|
||||
extern const struct _mp_obj_module_t socketpool_module;
|
||||
#define SOCKETPOOL_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_socketpool), (mp_obj_t)&socketpool_module },
|
||||
#else
|
||||
#define SOCKETPOOL_MODULE
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_SSL
|
||||
extern const struct _mp_obj_module_t ssl_module;
|
||||
#define SSL_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_ssl), (mp_obj_t)&ssl_module },
|
||||
#else
|
||||
#define SSL_MODULE
|
||||
#endif
|
||||
|
||||
// CIRCUITPY_STAGE uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_STORAGE uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_STRUCT uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_SUPERVISOR uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_SYNTHIO uses MP_REGISTER_MODULE
|
||||
|
||||
#if CIRCUITPY_TIME
|
||||
extern const struct _mp_obj_module_t time_module;
|
||||
#define TIME_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_time), (mp_obj_t)&time_module },
|
||||
@ -549,27 +370,6 @@ extern const struct _mp_obj_module_t time_module;
|
||||
#define TIME_MODULE_ALT_NAME
|
||||
#endif
|
||||
|
||||
// CIRCUITPY_TOUCHIO uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_TRACEBACK uses MP_REGISTER_MODULE
|
||||
|
||||
#if CIRCUITPY_UHEAP
|
||||
extern const struct _mp_obj_module_t uheap_module;
|
||||
#define UHEAP_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_uheap),(mp_obj_t)&uheap_module },
|
||||
#else
|
||||
#define UHEAP_MODULE
|
||||
#endif
|
||||
|
||||
// CIRCUITPY_USB_CDC uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_USB_HID uses MP_REGISTER_MODULE
|
||||
// CIRCUITPY_USB_MIDI uses MP_REGISTER_MODULE
|
||||
|
||||
#if CIRCUITPY_USTACK
|
||||
extern const struct _mp_obj_module_t ustack_module;
|
||||
#define USTACK_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_ustack),(mp_obj_t)&ustack_module },
|
||||
#else
|
||||
#define USTACK_MODULE
|
||||
#endif
|
||||
|
||||
#if defined(CIRCUITPY_ULAB) && CIRCUITPY_ULAB
|
||||
// ulab requires reverse special methods
|
||||
#if defined(MICROPY_PY_REVERSE_SPECIAL_METHODS) && !MICROPY_PY_REVERSE_SPECIAL_METHODS
|
||||
@ -581,23 +381,6 @@ extern const struct _mp_obj_module_t ustack_module;
|
||||
#define ULAB_MODULE
|
||||
#endif
|
||||
|
||||
// This is not a top-level module; it's microcontroller.watchdog.
|
||||
#if CIRCUITPY_WATCHDOG
|
||||
extern const struct _mp_obj_module_t watchdog_module;
|
||||
#define WATCHDOG_MODULE { MP_ROM_QSTR(MP_QSTR_watchdog), MP_ROM_PTR(&watchdog_module) },
|
||||
#else
|
||||
#define WATCHDOG_MODULE
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_WIFI
|
||||
extern const struct _mp_obj_module_t wifi_module;
|
||||
#define WIFI_MODULE { MP_ROM_QSTR(MP_QSTR_wifi), MP_ROM_PTR(&wifi_module) },
|
||||
#else
|
||||
#define WIFI_MODULE
|
||||
#endif
|
||||
|
||||
// CIRCUITPY_MSGPACK uses MP_REGISTER_MODULE
|
||||
|
||||
// Define certain native modules with weak links so they can be replaced with Python
|
||||
// implementations. This list may grow over time.
|
||||
#define MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS \
|
||||
@ -616,35 +399,91 @@ extern const struct _mp_obj_module_t wifi_module;
|
||||
// including dependencies.
|
||||
// Some of these definitions will be blank depending on what is turned on and off.
|
||||
// Some are omitted because they're in MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS above.
|
||||
|
||||
#define MICROPY_PORT_BUILTIN_MODULES_STRONG_LINKS \
|
||||
AESIO_MODULE \
|
||||
ALARM_MODULE \
|
||||
AUDIOPWMIO_MODULE \
|
||||
BINASCII_MODULE \
|
||||
BITOPS_MODULE \
|
||||
CAMERA_MODULE \
|
||||
CANIO_MODULE \
|
||||
DUALBANK_MODULE \
|
||||
ERRNO_MODULE \
|
||||
ESPIDF_MODULE \
|
||||
_EVE_MODULE \
|
||||
GNSS_MODULE \
|
||||
I2CPERIPHERAL_MODULE \
|
||||
IPADDRESS_MODULE \
|
||||
IMAGECAPTURE_MODULE \
|
||||
JSON_MODULE \
|
||||
MEMORYMONITOR_MODULE \
|
||||
PEW_MODULE \
|
||||
RE_MODULE \
|
||||
RP2PIO_MODULE \
|
||||
SAMD_MODULE \
|
||||
SDIOIO_MODULE \
|
||||
SOCKETPOOL_MODULE \
|
||||
SSL_MODULE \
|
||||
UHEAP_MODULE \
|
||||
USTACK_MODULE \
|
||||
WATCHDOG_MODULE \
|
||||
WIFI_MODULE \
|
||||
|
||||
// The following modules are defined in their respective __init__.c file in the
|
||||
// shared-bindings directory using MP_REGISTER_MODULE.
|
||||
//
|
||||
// CIRCUITPY_AESIO
|
||||
// CIRCUITPY_ANALOGIO
|
||||
// CIRCUITPY_ATEXIT
|
||||
// CIRCUITPY_AUDIOBUSIO
|
||||
// CIRCUITPY_AUDIOCORE
|
||||
// CIRCUITPY_AUDIOIO
|
||||
// CIRCUITPY_AUDIOMIXER
|
||||
// CIRCUITPY_AUDIOMP3
|
||||
// CIRCUITPY_AUDIOPWMIO
|
||||
// CIRCUITPY_BITBANGIO
|
||||
// CIRCUITPY_BITMAPTOOLS
|
||||
// CIRCUITPY_BITOPS
|
||||
// CIRCUITPY_BLEIO
|
||||
// CIRCUITPY_BOARD
|
||||
// CIRCUITPY_BUSDEVICE
|
||||
// CIRCUITPY_BUSIO
|
||||
// CIRCUITPY_CAMERA
|
||||
// CIRCUITPY_CANIO
|
||||
// CIRCUITPY_COUNTIO
|
||||
// CIRCUITPY_DIGITALIO
|
||||
// CIRCUITPY_DISPLAYIO
|
||||
// CIRCUITPY_DUALBANK
|
||||
// CIRCUITPY__EVE
|
||||
// CIRCUITPY_FONTIO
|
||||
// CIRCUITPY_FRAMEBUFFERIO
|
||||
// CIRCUITPY_FREQUENCYIO
|
||||
// CIRCUITPY_GAMEPADSHIFT
|
||||
// CIRCUITPY_GETPASS
|
||||
// CIRCUITPY_GNSS
|
||||
// CIRCUITPY_I2CPERIPHERAL
|
||||
// CIRCUITPY_IMAGECAPTURE
|
||||
// CIRCUITPY_IPADDRESS
|
||||
// CIRCUITPY_KEYPAD
|
||||
// CIRCUITPY_MATH
|
||||
// CIRCUITPY_MEMORYMONITOR
|
||||
// CIRCUITPY_MICROCONTROLLER
|
||||
// CIRCUITPY_MSGPACK
|
||||
// CIRCUITPY_NEOPIXEL_WRITE
|
||||
// CIRCUITPY_ONEWIREIO_WRITE
|
||||
// CIRCUITPY_PARALLELDISPLAY
|
||||
// CIRCUITPY_PEW
|
||||
// CIRCUITPY_PIXELBUF
|
||||
// CIRCUITPY_PS2IO
|
||||
// CIRCUITPY_PULSEIO
|
||||
// CIRCUITPY_PWMIO
|
||||
// CIRCUITPY_QRIO
|
||||
// CIRCUITPY_RAINBOWIO
|
||||
// CIRCUITPY_RANDOM
|
||||
// CIRCUITPY_RGBMATRIX
|
||||
// CIRCUITPY_ROTARYIO
|
||||
// CIRCUITPY_RTC
|
||||
// CIRCUITPY_SDCARDIO
|
||||
// CIRCUITPY_SDIOIO
|
||||
// CIRCUITPY_SHARPDISPLAY
|
||||
// CIRCUITPY_SOCKETPOOL
|
||||
// CIRCUITPY_SSL
|
||||
// CIRCUITPY_STAGE
|
||||
// CIRCUITPY_STORAGE
|
||||
// CIRCUITPY_STRUCT
|
||||
// CIRCUITPY_SUPERVISOR
|
||||
// CIRCUITPY_SYNTHIO
|
||||
// CIRCUITPY_TERMINALIO
|
||||
// CIRCUITPY_TOUCHIO
|
||||
// CIRCUITPY_TRACEBACK
|
||||
// CIRCUITPY_UHEAP
|
||||
// CIRCUITPY_USB_CDC
|
||||
// CIRCUITPY_USB_HID
|
||||
// CIRCUITPY_USB_MIDI
|
||||
// CIRCUITPY_USTACK
|
||||
// CIRCUITPY_VECTORIO
|
||||
// CIRCUITPY_WATCHDOG
|
||||
// CIRCUITPY_WIFI
|
||||
|
||||
// If weak links are enabled, just include strong links in the main list of modules,
|
||||
// and also include the underscore alternate names.
|
||||
|
@ -36,7 +36,7 @@ CFLAGS += -DCIRCUITPY_FULL_BUILD=$(CIRCUITPY_FULL_BUILD)
|
||||
MICROPY_PY_ASYNC_AWAIT ?= $(CIRCUITPY_FULL_BUILD)
|
||||
CFLAGS += -DMICROPY_PY_ASYNC_AWAIT=$(MICROPY_PY_ASYNC_AWAIT)
|
||||
|
||||
CIRCUITPY_AESIO ?= 0
|
||||
CIRCUITPY_AESIO ?= $(CIRCUITPY_FULL_BUILD)
|
||||
CFLAGS += -DCIRCUITPY_AESIO=$(CIRCUITPY_AESIO)
|
||||
|
||||
# TODO: CIRCUITPY_ALARM will gradually be added to
|
||||
|
@ -1105,3 +1105,5 @@ const mp_obj_module_t _eve_module = {
|
||||
.base = { &mp_type_module },
|
||||
.globals = (mp_obj_dict_t *)&mp_module__eve_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR__eve, _eve_module, CIRCUITPY__EVE);
|
||||
|
@ -63,3 +63,5 @@ const mp_obj_module_t pew_module = {
|
||||
.base = { &mp_type_module },
|
||||
.globals = (mp_obj_dict_t *)&pew_module_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR__pew, pew_module, CIRCUITPY_PEW);
|
||||
|
@ -63,3 +63,5 @@ const mp_obj_module_t aesio_module = {
|
||||
.base = {&mp_type_module},
|
||||
.globals = (mp_obj_dict_t *)&aesio_module_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_aesio, aesio_module, CIRCUITPY_AESIO);
|
||||
|
@ -248,3 +248,5 @@ extern void port_idle_until_interrupt(void);
|
||||
MP_WEAK void common_hal_alarm_pretending_deep_sleep(void) {
|
||||
port_idle_until_interrupt();
|
||||
}
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_alarm, alarm_module, CIRCUITPY_ALARM);
|
||||
|
@ -57,3 +57,5 @@ const mp_obj_module_t audiopwmio_module = {
|
||||
.base = { &mp_type_module },
|
||||
.globals = (mp_obj_dict_t *)&audiopwmio_module_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_audiopwmio, audiopwmio_module, CIRCUITPY_AUDIOPWMIO);
|
||||
|
@ -99,3 +99,5 @@ const mp_obj_module_t bitops_module = {
|
||||
.base = { &mp_type_module },
|
||||
.globals = (mp_obj_dict_t *)&bitops_module_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_bitops, bitops_module, CIRCUITPY_BITOPS);
|
||||
|
@ -48,3 +48,5 @@ const mp_obj_module_t camera_module = {
|
||||
.base = { &mp_type_module },
|
||||
.globals = (mp_obj_dict_t *)&camera_module_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_camera, camera_module, CIRCUITPY_CAMERA);
|
||||
|
@ -108,6 +108,7 @@ MAKE_PRINTER(canio, canio_bus_state);
|
||||
MAKE_ENUM_TYPE(canio, BusState, canio_bus_state);
|
||||
|
||||
STATIC const mp_rom_map_elem_t canio_module_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_canio) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_BusState), MP_ROM_PTR(&canio_bus_state_type) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_CAN), MP_ROM_PTR(&canio_can_type) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_Listener), MP_ROM_PTR(&canio_listener_type) },
|
||||
@ -123,3 +124,5 @@ const mp_obj_module_t canio_module = {
|
||||
.base = { &mp_type_module },
|
||||
.globals = (mp_obj_dict_t *)&canio_module_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_canio, canio_module, CIRCUITPY_CANIO);
|
||||
|
@ -86,7 +86,7 @@ STATIC mp_obj_t displayio_colorconverter_obj_convert(mp_obj_t self_in, mp_obj_t
|
||||
MP_DEFINE_CONST_FUN_OBJ_2(displayio_colorconverter_convert_obj, displayio_colorconverter_obj_convert);
|
||||
|
||||
//| dither: bool
|
||||
//| """When true the color converter dithers the output by adding random noise when
|
||||
//| """When `True` the ColorConverter dithers the output by adding random noise when
|
||||
//| truncating to display bitdepth"""
|
||||
//|
|
||||
STATIC mp_obj_t displayio_colorconverter_obj_get_dither(mp_obj_t self_in) {
|
||||
@ -111,8 +111,11 @@ const mp_obj_property_t displayio_colorconverter_dither_obj = {
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
|
||||
//| def make_transparent(self, pixel: int) -> None:
|
||||
//| """Sets a pixel to not opaque."""
|
||||
//| def make_transparent(self, color: int) -> None:
|
||||
//| """Set the transparent color or index for the ColorConverter. This will
|
||||
//| raise an Exception if there is already a selected transparent index.
|
||||
//|
|
||||
//| :param int color: The color to be transparent"""
|
||||
//|
|
||||
STATIC mp_obj_t displayio_colorconverter_make_transparent(mp_obj_t self_in, mp_obj_t transparent_color_obj) {
|
||||
displayio_colorconverter_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
@ -123,8 +126,10 @@ STATIC mp_obj_t displayio_colorconverter_make_transparent(mp_obj_t self_in, mp_o
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_2(displayio_colorconverter_make_transparent_obj, displayio_colorconverter_make_transparent);
|
||||
|
||||
//| def make_opaque(self, pixel: int) -> None:
|
||||
//| """Sets a pixel to opaque."""
|
||||
//| def make_opaque(self, color: int) -> None:
|
||||
//| """Make the ColorConverter be opaque and have no transparent pixels.
|
||||
//|
|
||||
//| :param int color: [IGNORED] Use any value"""
|
||||
//|
|
||||
STATIC mp_obj_t displayio_colorconverter_make_opaque(mp_obj_t self_in, mp_obj_t transparent_color_obj) {
|
||||
displayio_colorconverter_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
|
@ -230,22 +230,23 @@ STATIC mp_obj_t displayio_display_obj_show(mp_obj_t self_in, mp_obj_t group_in)
|
||||
MP_DEFINE_CONST_FUN_OBJ_2(displayio_display_show_obj, displayio_display_obj_show);
|
||||
|
||||
//| def refresh(self, *, target_frames_per_second: Optional[int] = None, minimum_frames_per_second: int = 0) -> bool:
|
||||
//| """When auto refresh is off, waits for the target frame rate and then refreshes the display,
|
||||
//| returning True. If the call has taken too long since the last refresh call for the given
|
||||
//| target frame rate, then the refresh returns False immediately without updating the screen to
|
||||
//| """When auto_refresh is off, and :py:attr:`target_frames_per_second` is not `None` this waits
|
||||
//| for the target frame rate and then refreshes the display,
|
||||
//| returning `True`. If the call has taken too long since the last refresh call for the given
|
||||
//| target frame rate, then the refresh returns `False` immediately without updating the screen to
|
||||
//| hopefully help getting caught up.
|
||||
//|
|
||||
//| If the time since the last successful refresh is below the minimum frame rate, then an
|
||||
//| exception will be raised. The default ``minimum_frames_per_second`` of 0 disables this behavior.
|
||||
//| exception will be raised. The default :py:attr:`minimum_frames_per_second` of 0 disables this behavior.
|
||||
//|
|
||||
//| When auto refresh is off, ``display.refresh()`` or ``display.refresh(target_frames_per_second=None)``
|
||||
//| When auto_refresh is off, and :py:attr:`target_frames_per_second` is `None` this
|
||||
//| will update the display immediately.
|
||||
//|
|
||||
//| When auto refresh is on, updates the display immediately. (The display will also update
|
||||
//| When auto_refresh is on, updates the display immediately. (The display will also update
|
||||
//| without calls to this.)
|
||||
//|
|
||||
//| :param int target_frames_per_second: How many times a second `refresh` should be called and the screen updated.
|
||||
//| Set to `None` for immediate refresh.
|
||||
//| :param Optional[int] target_frames_per_second: The target frame rate that :py:func:`refresh` should try to
|
||||
//| achieve. Set to `None` for immediate refresh.
|
||||
//| :param int minimum_frames_per_second: The minimum number of times the screen should be updated per second."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -48,14 +48,14 @@
|
||||
//|
|
||||
//| A single tile grid is also known as a Sprite."""
|
||||
//|
|
||||
//| def __init__(self, bitmap: Union[Bitmap, Shape], *, pixel_shader: Union[ColorConverter, Palette], width: int = 1, height: int = 1, tile_width: Optional[int] = None, tile_height: Optional[int] = None, default_tile: int = 0, x: int = 0, y: int = 0) -> None:
|
||||
//| def __init__(self, bitmap: Union[Bitmap, OnDiskBitmap, Shape], *, pixel_shader: Union[ColorConverter, Palette], width: int = 1, height: int = 1, tile_width: Optional[int] = None, tile_height: Optional[int] = None, default_tile: int = 0, x: int = 0, y: int = 0) -> None:
|
||||
//| """Create a TileGrid object. The bitmap is source for 2d pixels. The pixel_shader is used to
|
||||
//| convert the value and its location to a display native pixel color. This may be a simple color
|
||||
//| palette lookup, a gradient, a pattern or a color transformer.
|
||||
//|
|
||||
//| tile_width and tile_height match the height of the bitmap by default.
|
||||
//|
|
||||
//| :param Bitmap,Shape bitmap: The bitmap storing one or more tiles.
|
||||
//| :param Bitmap,OnDiskBitmap,Shape bitmap: The bitmap storing one or more tiles.
|
||||
//| :param ColorConverter,Palette pixel_shader: The pixel shader that produces colors from values
|
||||
//| :param int width: Width of the grid in tiles.
|
||||
//| :param int height: Height of the grid in tiles.
|
||||
|
@ -113,3 +113,5 @@ const mp_obj_module_t dualbank_module = {
|
||||
.base = { &mp_type_module },
|
||||
.globals = (mp_obj_dict_t *)&dualbank_module_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_dualbank, dualbank_module, CIRCUITPY_DUALBANK);
|
||||
|
@ -29,3 +29,5 @@ const mp_obj_module_t gnss_module = {
|
||||
.base = { &mp_type_module },
|
||||
.globals = (mp_obj_dict_t *)&gnss_module_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_gnss, gnss_module, CIRCUITPY_GNSS);
|
||||
|
@ -104,3 +104,5 @@ const mp_obj_module_t i2cperipheral_module = {
|
||||
.base = { &mp_type_module },
|
||||
.globals = (mp_obj_dict_t *)&i2cperipheral_module_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_i2cperipheral, i2cperipheral_module, CIRCUITPY_I2CPERIPHERAL);
|
||||
|
@ -45,3 +45,5 @@ const mp_obj_module_t imagecapture_module = {
|
||||
.base = { &mp_type_module },
|
||||
.globals = (mp_obj_dict_t *)&imagecapture_module_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_imagecapture, imagecapture_module, CIRCUITPY_IMAGECAPTURE);
|
||||
|
@ -111,3 +111,5 @@ const mp_obj_module_t ipaddress_module = {
|
||||
.base = { &mp_type_module },
|
||||
.globals = (mp_obj_dict_t *)&ipaddress_module_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_ipaddress, ipaddress_module, CIRCUITPY_IPADDRESS);
|
||||
|
@ -74,3 +74,5 @@ const mp_obj_module_t memorymonitor_module = {
|
||||
.base = { &mp_type_module },
|
||||
.globals = (mp_obj_dict_t *)&memorymonitor_module_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_memorymonitor, memorymonitor_module, CIRCUITPY_MEMORYMONITOR);
|
||||
|
@ -42,7 +42,7 @@
|
||||
//| protocol may be refered to as 8080-I Series Parallel Interface in datasheets. It doesn't handle
|
||||
//| display initialization."""
|
||||
//|
|
||||
//| def __init__(self, *, data0: microcontroller.Pin, command: microcontroller.Pin, chip_select: microcontroller.Pin, write: microcontroller.Pin, read: microcontroller.Pin, reset: microcontroller.Pin) -> None:
|
||||
//| def __init__(self, *, data0: microcontroller.Pin, command: microcontroller.Pin, chip_select: microcontroller.Pin, write: microcontroller.Pin, read: microcontroller.Pin, reset: microcontroller.Pin, frequency: int = 30_000_000) -> None:
|
||||
//| """Create a ParallelBus object associated with the given pins. The bus is inferred from data0
|
||||
//| by implying the next 7 additional pins on a given GPIO port.
|
||||
//|
|
||||
@ -56,7 +56,8 @@
|
||||
//| :param microcontroller.Pin chip_select: Chip select pin
|
||||
//| :param microcontroller.Pin write: Write pin
|
||||
//| :param microcontroller.Pin read: Read pin
|
||||
//| :param microcontroller.Pin reset: Reset pin"""
|
||||
//| :param microcontroller.Pin reset: Reset pin
|
||||
//| :param int frequency: The communication frequency in Hz for the display on the bus"""
|
||||
//| ...
|
||||
//|
|
||||
STATIC mp_obj_t paralleldisplay_parallelbus_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
|
||||
|
@ -45,3 +45,5 @@ const mp_obj_module_t sdioio_module = {
|
||||
.base = { &mp_type_module },
|
||||
.globals = (mp_obj_dict_t *)&sdioio_module_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_sdio, sdioio_module, CIRCUITPY_SDIOIO);
|
||||
|
@ -51,3 +51,5 @@ const mp_obj_module_t socketpool_module = {
|
||||
.base = { &mp_type_module },
|
||||
.globals = (mp_obj_dict_t *)&socketpool_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_socketpool, socketpool_module, CIRCUITPY_SOCKETPOOL);
|
||||
|
@ -64,3 +64,5 @@ const mp_obj_module_t ssl_module = {
|
||||
.base = { &mp_type_module },
|
||||
.globals = (mp_obj_dict_t *)&ssl_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_ssl, ssl_module, CIRCUITPY_SSL);
|
||||
|
@ -57,3 +57,5 @@ const mp_obj_module_t uheap_module = {
|
||||
.base = { &mp_type_module },
|
||||
.globals = (mp_obj_dict_t *)&uheap_module_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_uheap, uheap_module, CIRCUITPY_UHEAP);
|
||||
|
@ -85,3 +85,5 @@ const mp_obj_module_t ustack_module = {
|
||||
.base = { &mp_type_module },
|
||||
.globals = (mp_obj_dict_t *)&ustack_module_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_ustack, ustack_module, CIRCUITPY_USTACK);
|
||||
|
@ -77,3 +77,5 @@ const mp_obj_module_t watchdog_module = {
|
||||
.base = { &mp_type_module },
|
||||
.globals = (mp_obj_dict_t *)&watchdog_module_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_watchdog, watchdog_module, CIRCUITPY_WATCHDOG);
|
||||
|
@ -70,3 +70,5 @@ const mp_obj_module_t wifi_module = {
|
||||
.base = { &mp_type_module },
|
||||
.globals = (mp_obj_dict_t *)&wifi_module_globals,
|
||||
};
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_wifi, wifi_module, CIRCUITPY_WIFI);
|
||||
|
@ -53,7 +53,7 @@ STATIC bleio_uuid_obj_t supervisor_ble_circuitpython_version_uuid;
|
||||
const uint8_t circuitpython_base_uuid[16] = {0x6e, 0x68, 0x74, 0x79, 0x50, 0x74, 0x69, 0x75, 0x63, 0x72, 0x69, 0x43, 0x00, 0x00, 0xaf, 0xad };
|
||||
|
||||
STATIC mp_obj_list_t characteristic_list;
|
||||
STATIC mp_obj_t characteristic_list_items[2];
|
||||
STATIC mp_obj_t characteristic_list_items[3];
|
||||
|
||||
STATIC uint32_t _outgoing1[BLE_GATTS_VAR_ATTR_LEN_MAX / 4];
|
||||
STATIC uint32_t _outgoing2[BLE_GATTS_VAR_ATTR_LEN_MAX / 4];
|
||||
|
Loading…
x
Reference in New Issue
Block a user