Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ports/atmel-samd/boards/ugame10/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void board_init(void) {
spi,
MP_OBJ_FROM_PTR(&pin_PA09), // Command or data
MP_OBJ_FROM_PTR(&pin_PA08), // Chip select
MP_OBJ_NULL, // Reset
mp_const_none, // Reset
24000000, // Baudrate
0, // Polarity
0); // Phase
Expand Down
4 changes: 2 additions & 2 deletions ports/espressif/boards/elecrow_crowpanel_3.5/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ void board_init(void) {
bus->base.type = &fourwire_fourwire_type;
common_hal_fourwire_fourwire_construct(bus,
spi,
MP_OBJ_FROM_PTR(&pin_GPIO2), // TFT_DC Command or data
MP_OBJ_FROM_PTR(&pin_GPIO2), // TFT_DC Command or data
MP_OBJ_FROM_PTR(&pin_GPIO15), // TFT_CS Chip select
NULL, // TFT_RST Reset
mp_const_none, // TFT_RST Reset
20000000, // Baudrate
0, // Polarity
0); // Phase
Expand Down
2 changes: 1 addition & 1 deletion ports/espressif/boards/espressif_esp32s3_eye/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void board_init(void) {
spi,
MP_OBJ_FROM_PTR(&pin_GPIO43), // DC
MP_OBJ_FROM_PTR(&pin_GPIO44), // CS
NULL, // no reset pin
mp_const_none, // no reset pin
40000000, // baudrate
0, // polarity
0 // phase
Expand Down
4 changes: 2 additions & 2 deletions ports/espressif/boards/hardkernel_odroid_go/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ void board_init(void) {
common_hal_fourwire_fourwire_construct(bus,
spi,
MP_OBJ_FROM_PTR(&pin_GPIO21), // TFT_DC Command or data
MP_OBJ_FROM_PTR(&pin_GPIO5), // TFT_CS Chip select
NULL, // TFT_RST Reset
MP_OBJ_FROM_PTR(&pin_GPIO5), // TFT_CS Chip select
mp_const_none, // TFT_RST Reset
40000000, // Baudrate
0, // Polarity
0); // Phase
Expand Down
2 changes: 1 addition & 1 deletion ports/espressif/boards/hiibot_iots2/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static void display_init(void) {
spi,
MP_OBJ_FROM_PTR(&pin_GPIO35), // DC
MP_OBJ_FROM_PTR(&pin_GPIO36), // CS
NULL, // NO RST ?
mp_const_none, // NO RST ?
40000000, // baudrate
0, // polarity
0 // phase
Expand Down
2 changes: 1 addition & 1 deletion ports/espressif/boards/lilygo_tdeck/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void board_init(void) {
spi,
MP_OBJ_FROM_PTR(&pin_GPIO11), // TFT_DC Command or data
MP_OBJ_FROM_PTR(&pin_GPIO12), // TFT_CS Chip select
NULL, // TFT_RST Reset
mp_const_none, // TFT_RST Reset
60000000, // Baudrate
0, // Polarity
0); // Phase
Expand Down
2 changes: 1 addition & 1 deletion ports/espressif/boards/lilygo_twatch_2020_v3/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static void display_init(void) {
spi,
MP_OBJ_FROM_PTR(&pin_GPIO27), // DC
MP_OBJ_FROM_PTR(&pin_GPIO5), // CS
NULL, // RST
mp_const_none, // RST
24000000, // baudrate
0, // polarity
0 // phase
Expand Down
2 changes: 1 addition & 1 deletion ports/espressif/boards/lilygo_twatch_s3/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ void board_init(void) {
spi,
MP_OBJ_FROM_PTR(&pin_GPIO38), // DC
MP_OBJ_FROM_PTR(&pin_GPIO12), // CS
NULL, // RST
mp_const_none, // RST
40000000, // baudrate
0, // polarity
0 // phase
Expand Down
2 changes: 1 addition & 1 deletion ports/espressif/boards/m5stack_core2/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ static bool display_init(void) {
spi,
MP_OBJ_FROM_PTR(&pin_GPIO15), // DC
MP_OBJ_FROM_PTR(&pin_GPIO5), // CS
MP_OBJ_NULL, // RST
mp_const_none, // RST
32000000, // baudrate
0, // polarity
0 // phase
Expand Down
2 changes: 1 addition & 1 deletion ports/espressif/boards/m5stack_cores3/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static bool display_init(void) {
spi,
MP_OBJ_FROM_PTR(&pin_GPIO35), // DC
MP_OBJ_FROM_PTR(&pin_GPIO3), // CS
MP_OBJ_NULL, // RST
mp_const_none, // RST
40000000, // baudrate
0, // polarity
0 // phase
Expand Down
2 changes: 1 addition & 1 deletion ports/espressif/boards/m5stack_cores3_se/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static bool display_init(void) {
spi,
MP_OBJ_FROM_PTR(&pin_GPIO35), // DC
MP_OBJ_FROM_PTR(&pin_GPIO3), // CS
NULL, // RST
mp_const_none, // RST
40000000, // baudrate
0, // polarity
0 // phase
Expand Down
26 changes: 26 additions & 0 deletions ports/espressif/boards/nhbsystems_jl401_4mbflash_2mbpsram/board.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// 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"
#include "mpconfigboard.h"
#include "shared-bindings/microcontroller/Pin.h"
#include "driver/gpio.h"

void board_init(void) {
reset_board();
}

void reset_board(void) {
// Turn on I2C power by default.
gpio_set_direction(14, GPIO_MODE_DEF_OUTPUT);
gpio_set_level(14, true);

// Turn on SD power by default
gpio_set_direction(3, GPIO_MODE_DEF_OUTPUT);
gpio_set_level(3, true);
}

// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// 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 "NHB Systems JL401-S3 4MB Flash 2MB PSRAM"
#define MICROPY_HW_MCU_NAME "ESP32S3"

#define MICROPY_HW_NEOPIXEL (&pin_GPIO1)
#define CIRCUITPY_STATUS_LED_POWER (&pin_GPIO2)

// #define MICROPY_HW_LED_STATUS (&pin_GPIO13)

#define DEFAULT_I2C_BUS_SCL (&pin_GPIO48)
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO47)

#define DEFAULT_SPI_BUS_SCK (&pin_GPIO12)
#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO11)
#define DEFAULT_SPI_BUS_MISO (&pin_GPIO13)

#define DEFAULT_UART_BUS_RX (&pin_GPIO18)
#define DEFAULT_UART_BUS_TX (&pin_GPIO17)

#define DOUBLE_TAP_PIN (&pin_GPIO38)

#define DEFAULT_SD_SCK (&pin_GPIO12)
#define DEFAULT_SD_MOSI (&pin_GPIO11)
#define DEFAULT_SD_MISO (&pin_GPIO13)
#define DEFAULT_SD_CS (&pin_GPIO10)
#define DEFAULT_SD_CARD_DETECT (&pin_GPIO9)
#define DEFAULT_SD_CARD_INSERTED true
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
USB_VID = 0x303A
USB_PID = 0x834A
USB_PRODUCT = "NHB Systems JL401-S3 4MB Flash 2MB PSRAM"
USB_MANUFACTURER = "NHB Systems"

IDF_TARGET = esp32s3

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
89 changes: 89 additions & 0 deletions ports/espressif/boards/nhbsystems_jl401_4mbflash_2mbpsram/pins.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
// 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_NEOPIXEL), MP_ROM_PTR(&pin_GPIO1) },
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO2) },

{ MP_ROM_QSTR(MP_QSTR_SD_PWR), MP_ROM_PTR(&pin_GPIO3)},
{ MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO3) },
{ MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO4) },

{ MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) },
{ MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) },

{ MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO7) },

{ MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO8) },
{ MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) },
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) },


// { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) },
// { MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_GPIO13) },

{ MP_ROM_QSTR(MP_QSTR_I2C_POWER), MP_ROM_PTR(&pin_GPIO14) },
{ MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO14) },
{ MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO14) },

{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO15) },
{ MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO15) },

{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO16) },
{ MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO16) },

{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO17) },
{ MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO17) },

{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO18) },
{ MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO18) },

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

{ MP_OBJ_NEW_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_GPIO10) },
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO10) },

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

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

{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO13) },
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO13) },

// D33 to D36 used for AD7124 SPI
{ MP_ROM_QSTR(MP_QSTR_D33), MP_ROM_PTR(&pin_GPIO33) },
{ MP_ROM_QSTR(MP_QSTR_D34), MP_ROM_PTR(&pin_GPIO34) },
{ MP_ROM_QSTR(MP_QSTR_D35), MP_ROM_PTR(&pin_GPIO35) },
{ MP_ROM_QSTR(MP_QSTR_D36), MP_ROM_PTR(&pin_GPIO36) },

{ MP_ROM_QSTR(MP_QSTR_D37), MP_ROM_PTR(&pin_GPIO37) },
// { MP_ROM_QSTR(MP_QSTR_D38), MP_ROM_PTR(&pin_GPIO38) },
{ MP_ROM_QSTR(MP_QSTR_D39), MP_ROM_PTR(&pin_GPIO39) },

{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) },
{ MP_ROM_QSTR(MP_QSTR_D43), MP_ROM_PTR(&pin_GPIO43) },
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) },
{ MP_ROM_QSTR(MP_QSTR_D44), MP_ROM_PTR(&pin_GPIO44) },

{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO47) },
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO48) },

{ 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_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_module_globals_table);
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# Espressif IoT Development Framework Configuration
#
#
# Component config
#
#
# LWIP
#
# end of LWIP

# end of Component config

# end of Espressif IoT Development Framework Configuration
2 changes: 1 addition & 1 deletion ports/espressif/boards/sunton_esp32_2424S012/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static void display_init(void) {
spi,
MP_OBJ_FROM_PTR(&pin_GPIO2), // DC
MP_OBJ_FROM_PTR(&pin_GPIO10), // CS
MP_OBJ_NULL, // RST
mp_const_none, // RST
80000000, // baudrate
0, // polarity
0 // phase
Expand Down
2 changes: 1 addition & 1 deletion ports/espressif/boards/sunton_esp32_2432S024C/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static void display_init(void) {
spi,
MP_OBJ_FROM_PTR(&pin_GPIO2), // TFT_DC Command or data
MP_OBJ_FROM_PTR(&pin_GPIO15), // TFT_CS Chip select
MP_OBJ_NULL, // TFT_RST Reset
mp_const_none, // TFT_RST Reset
6000000, // Baudrate
0, // Polarity
0); // Phase
Expand Down
2 changes: 1 addition & 1 deletion ports/espressif/boards/sunton_esp32_2432S028/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static void display_init(void) {
spi,
MP_OBJ_FROM_PTR(&pin_GPIO2), // TFT_DC Command or data
MP_OBJ_FROM_PTR(&pin_GPIO15), // TFT_CS Chip select
MP_OBJ_NULL, // TFT_RST Reset
mp_const_none, // TFT_RST Reset
6000000, // Baudrate
0, // Polarity
0); // Phase
Expand Down
2 changes: 1 addition & 1 deletion ports/espressif/boards/sunton_esp32_2432S032C/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static void display_init(void) {
spi,
MP_OBJ_FROM_PTR(&pin_GPIO2), // TFT_DC
MP_OBJ_FROM_PTR(&pin_GPIO15), // TFT_CS
MP_OBJ_NULL, // TFT_RST
mp_const_none, // TFT_RST
26600000, // Baudrate
0, // Polarity
0 // Phase
Expand Down
2 changes: 1 addition & 1 deletion ports/espressif/boards/vidi_x/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void board_init(void) {
spi,
MP_OBJ_FROM_PTR(&pin_GPIO21), // TFT_DC Command or data
MP_OBJ_FROM_PTR(&pin_GPIO5), // TFT_CS Chip select
MP_OBJ_NULL, // TFT_RST Reset
mp_const_none, // TFT_RST Reset
40000000, // Baudrate
0, // Polarity
0); // Phase
Expand Down
1 change: 0 additions & 1 deletion ports/nordic/boards/espruino_banglejs2/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "mpconfigboard.h"

#include "shared-bindings/busio/SPI.h"
#include "shared-bindings/fourwire/FourWire.h"
#include "shared-bindings/framebufferio/FramebufferDisplay.h"
#include "shared-bindings/sharpdisplay/SharpMemoryFramebuffer.h"
#include "shared-module/displayio/__init__.h"
Expand Down
2 changes: 1 addition & 1 deletion ports/nordic/boards/hiibot_bluefi/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void board_init(void) {
spi,
MP_OBJ_FROM_PTR(&pin_P0_27), // TFT_DC Command or data
MP_OBJ_FROM_PTR(&pin_P0_05), // TFT_CS Chip select
MP_OBJ_NULL, // no TFT_RST Reset
mp_const_none, // no TFT_RST Reset
// &pin_P1_14, // TFT_RST Reset
60000000, // Baudrate
0, // Polarity
Expand Down
2 changes: 1 addition & 1 deletion ports/raspberrypi/boards/adafruit_floppsy_rp2040/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void board_init(void) {
spi,
MP_OBJ_FROM_PTR(CIRCUITPY_BOARD_TFT_DC),
MP_OBJ_FROM_PTR(CIRCUITPY_BOARD_TFT_CS),
MP_OBJ_NULL, // TFT_RESET Reset
mp_const_none, // TFT_RESET Reset
40000000, // Baudrate
0, // Polarity
0); // Phase
Expand Down
2 changes: 1 addition & 1 deletion ports/raspberrypi/boards/heiafr_picomo_v2/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void board_init(void) {
spi,
MP_OBJ_FROM_PTR(&pin_GPIO16), // TFT_DC Command or data
MP_OBJ_FROM_PTR(&pin_GPIO17), // TFT_CS Chip select
MP_OBJ_NULL, // TFT_RST Reset
mp_const_none, // TFT_RST Reset
62500000, // Baudrate
0, // Polarity
0); // Phase
Expand Down
2 changes: 1 addition & 1 deletion ports/raspberrypi/boards/heiafr_picomo_v3/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void board_init(void) {
spi,
MP_OBJ_FROM_PTR(&pin_GPIO16), // TFT_DC Command or data
MP_OBJ_FROM_PTR(&pin_GPIO17), // TFT_CS Chip select
MP_OBJ_NULL, // TFT_RST Reset
mp_const_none, // TFT_RST Reset
62500000, // Baudrate
0, // Polarity
0); // Phase
Expand Down
2 changes: 1 addition & 1 deletion ports/raspberrypi/boards/lilygo_t_display_rp2040/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static void display_init(void) {
spi,
MP_OBJ_FROM_PTR(&pin_GPIO1), // DC
MP_OBJ_FROM_PTR(&pin_GPIO5), // CS
MP_OBJ_NULL, // RST (Reset pin tie to 0, do not set here)
mp_const_none, // RST (Reset pin tie to 0, do not set here)
40000000, // baudrate
1, // polarity
0 // phase
Expand Down
Loading