Merge pull request #5421 from microDev1/microdev-micro-s2

Minor updates for board MicroDev microS2
This commit is contained in:
Dan Halbert 2021-10-02 08:05:31 -04:00 committed by GitHub
commit fd9c3d17ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 49 additions and 25 deletions

View File

@ -3,7 +3,7 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2020 Scott Shawcroft for Adafruit Industries * Copyright (c) 2021 microDev
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
@ -37,7 +37,7 @@ void board_init(void) {
#ifdef DEBUG #ifdef DEBUG
common_hal_never_reset_pin(&pin_GPIO43); common_hal_never_reset_pin(&pin_GPIO43);
common_hal_never_reset_pin(&pin_GPIO44); common_hal_never_reset_pin(&pin_GPIO44);
#endif /* DEBUG */ #endif
// SPI Flash and RAM // SPI Flash and RAM
common_hal_never_reset_pin(&pin_GPIO26); common_hal_never_reset_pin(&pin_GPIO26);
@ -54,7 +54,6 @@ bool board_requests_safe_mode(void) {
} }
void reset_board(void) { void reset_board(void) {
} }
void board_deinit(void) { void board_deinit(void) {

View File

@ -3,7 +3,7 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Scott Shawcroft for Adafruit Industries * Copyright (c) 2021 microDev
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
@ -24,10 +24,11 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
// Micropython setup // Board setup
#define MICROPY_HW_BOARD_NAME "microS2" #define MICROPY_HW_BOARD_NAME "MicroDev microS2"
#define MICROPY_HW_MCU_NAME "ESP32S2" #define MICROPY_HW_MCU_NAME "ESP32-S2"
// Status LED
#define MICROPY_HW_NEOPIXEL (&pin_GPIO33) #define MICROPY_HW_NEOPIXEL (&pin_GPIO33)
// Default bus pins // Default bus pins
@ -41,9 +42,8 @@
#define DEFAULT_UART_BUS_TX (&pin_GPIO43) #define DEFAULT_UART_BUS_TX (&pin_GPIO43)
#define DEFAULT_UART_BUS_RX (&pin_GPIO44) #define DEFAULT_UART_BUS_RX (&pin_GPIO44)
// For entering safe mode
#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0)
// Explanation of how a user got into safe mode. // Explanation of how a user got into safe mode
#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") #define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n")
#define AUTORESET_DELAY_MS 500

View File

@ -1,17 +1,16 @@
USB_VID = 0x239A USB_VID = 0x239A
USB_PID = 0x80C6 USB_PID = 0x80C6
USB_PRODUCT = "microS2" USB_PRODUCT = "microS2"
USB_MANUFACTURER = "microDev" USB_MANUFACTURER = "MicroDev"
IDF_TARGET = esp32s2 IDF_TARGET = esp32s2
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = MPZ
# The default queue depth of 16 overflows on release builds, # The default queue depth of 16 overflows on release builds,
# so increase it to 32. # so increase it to 32.
CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32
CIRCUITPY_ESP_FLASH_MODE=qio CIRCUITPY_ESP_FLASH_MODE=qio
CIRCUITPY_ESP_FLASH_FREQ=40m CIRCUITPY_ESP_FLASH_FREQ=80m
CIRCUITPY_ESP_FLASH_SIZE=16MB CIRCUITPY_ESP_FLASH_SIZE=16MB

View File

@ -1,3 +1,29 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2021 microDev
*
* 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 "shared-bindings/board/__init__.h" #include "shared-bindings/board/__init__.h"
STATIC const mp_rom_map_elem_t board_module_globals_table[] = { STATIC const mp_rom_map_elem_t board_module_globals_table[] = {

View File

@ -18,8 +18,8 @@ CONFIG_DEFAULT_PSRAM_CS_IO=26
# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set
# CONFIG_SPIRAM_RODATA is not set # CONFIG_SPIRAM_RODATA is not set
# CONFIG_SPIRAM_SPEED_80M is not set CONFIG_SPIRAM_SPEED_80M=y
CONFIG_SPIRAM_SPEED_40M=y # CONFIG_SPIRAM_SPEED_40M is not set
# CONFIG_SPIRAM_SPEED_26M is not set # CONFIG_SPIRAM_SPEED_26M is not set
# CONFIG_SPIRAM_SPEED_20M is not set # CONFIG_SPIRAM_SPEED_20M is not set
CONFIG_SPIRAM=y CONFIG_SPIRAM=y
@ -35,5 +35,5 @@ CONFIG_SPIRAM_MEMTEST=y
# #
# LWIP # LWIP
# #
CONFIG_LWIP_LOCAL_HOSTNAME="microS2" CONFIG_LWIP_LOCAL_HOSTNAME="MicroDev-microS2"
# end of LWIP # end of LWIP