Skip to content

Commit 8b5ea98

Browse files
committed
minor updates for board microdev_micro_s2
1 parent a63353f commit 8b5ea98

File tree

5 files changed

+49
-25
lines changed

5 files changed

+49
-25
lines changed

ports/espressif/boards/microdev_micro_s2/board.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* The MIT License (MIT)
55
*
6-
* Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
6+
* Copyright (c) 2021 microDev
77
*
88
* Permission is hereby granted, free of charge, to any person obtaining a copy
99
* of this software and associated documentation files (the "Software"), to deal
@@ -37,7 +37,7 @@ void board_init(void) {
3737
#ifdef DEBUG
3838
common_hal_never_reset_pin(&pin_GPIO43);
3939
common_hal_never_reset_pin(&pin_GPIO44);
40-
#endif /* DEBUG */
40+
#endif
4141

4242
// SPI Flash and RAM
4343
common_hal_never_reset_pin(&pin_GPIO26);
@@ -54,7 +54,6 @@ bool board_requests_safe_mode(void) {
5454
}
5555

5656
void reset_board(void) {
57-
5857
}
5958

6059
void board_deinit(void) {

ports/espressif/boards/microdev_micro_s2/mpconfigboard.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* The MIT License (MIT)
55
*
6-
* Copyright (c) 2019 Scott Shawcroft for Adafruit Industries
6+
* Copyright (c) 2021 microDev
77
*
88
* Permission is hereby granted, free of charge, to any person obtaining a copy
99
* of this software and associated documentation files (the "Software"), to deal
@@ -24,26 +24,26 @@
2424
* THE SOFTWARE.
2525
*/
2626

27-
// Micropython setup
28-
#define MICROPY_HW_BOARD_NAME "microS2"
29-
#define MICROPY_HW_MCU_NAME "ESP32S2"
27+
// Board setup
28+
#define MICROPY_HW_BOARD_NAME "MicroDev microS2"
29+
#define MICROPY_HW_MCU_NAME "ESP32-S2"
3030

31-
#define MICROPY_HW_NEOPIXEL (&pin_GPIO33)
31+
// Status LED
32+
#define MICROPY_HW_NEOPIXEL (&pin_GPIO33)
3233

3334
// Default bus pins
34-
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO1)
35-
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO2)
35+
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO1)
36+
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO2)
3637

37-
#define DEFAULT_SPI_BUS_SCK (&pin_GPIO36)
38-
#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35)
39-
#define DEFAULT_SPI_BUS_MISO (&pin_GPIO37)
38+
#define DEFAULT_SPI_BUS_SCK (&pin_GPIO36)
39+
#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35)
40+
#define DEFAULT_SPI_BUS_MISO (&pin_GPIO37)
4041

41-
#define DEFAULT_UART_BUS_TX (&pin_GPIO43)
42-
#define DEFAULT_UART_BUS_RX (&pin_GPIO44)
42+
#define DEFAULT_UART_BUS_TX (&pin_GPIO43)
43+
#define DEFAULT_UART_BUS_RX (&pin_GPIO44)
4344

44-
#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0)
45+
// For entering safe mode
46+
#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0)
4547

46-
// Explanation of how a user got into safe mode.
48+
// Explanation of how a user got into safe mode
4749
#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n")
48-
49-
#define AUTORESET_DELAY_MS 500
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
USB_VID = 0x239A
22
USB_PID = 0x80C6
33
USB_PRODUCT = "microS2"
4-
USB_MANUFACTURER = "microDev"
4+
USB_MANUFACTURER = "MicroDev"
55

66
IDF_TARGET = esp32s2
77

88
INTERNAL_FLASH_FILESYSTEM = 1
9-
LONGINT_IMPL = MPZ
109

1110
# The default queue depth of 16 overflows on release builds,
1211
# so increase it to 32.
1312
CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32
1413

1514
CIRCUITPY_ESP_FLASH_MODE=qio
16-
CIRCUITPY_ESP_FLASH_FREQ=40m
15+
CIRCUITPY_ESP_FLASH_FREQ=80m
1716
CIRCUITPY_ESP_FLASH_SIZE=16MB

ports/espressif/boards/microdev_micro_s2/pins.c

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
/*
2+
* This file is part of the MicroPython project, http://micropython.org/
3+
*
4+
* The MIT License (MIT)
5+
*
6+
* Copyright (c) 2021 microDev
7+
*
8+
* Permission is hereby granted, free of charge, to any person obtaining a copy
9+
* of this software and associated documentation files (the "Software"), to deal
10+
* in the Software without restriction, including without limitation the rights
11+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
* copies of the Software, and to permit persons to whom the Software is
13+
* furnished to do so, subject to the following conditions:
14+
*
15+
* The above copyright notice and this permission notice shall be included in
16+
* all copies or substantial portions of the Software.
17+
*
18+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24+
* THE SOFTWARE.
25+
*/
26+
127
#include "shared-bindings/board/__init__.h"
228

329
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {

ports/espressif/boards/microdev_micro_s2/sdkconfig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ CONFIG_DEFAULT_PSRAM_CS_IO=26
1818

1919
# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set
2020
# CONFIG_SPIRAM_RODATA is not set
21-
# CONFIG_SPIRAM_SPEED_80M is not set
22-
CONFIG_SPIRAM_SPEED_40M=y
21+
CONFIG_SPIRAM_SPEED_80M=y
22+
# CONFIG_SPIRAM_SPEED_40M is not set
2323
# CONFIG_SPIRAM_SPEED_26M is not set
2424
# CONFIG_SPIRAM_SPEED_20M is not set
2525
CONFIG_SPIRAM=y
@@ -35,5 +35,5 @@ CONFIG_SPIRAM_MEMTEST=y
3535
#
3636
# LWIP
3737
#
38-
CONFIG_LWIP_LOCAL_HOSTNAME="microS2"
38+
CONFIG_LWIP_LOCAL_HOSTNAME="MicroDev-microS2"
3939
# end of LWIP

0 commit comments

Comments
 (0)