Skip to content

Port refactor - #2938

Merged
pr3y merged 28 commits into
BruceDevices:devfrom
bmorcelli:port-refactor
Oct 2, 2026
Merged

pr3y merged 28 commits into
BruceDevices:devfrom
bmorcelli:port-refactor

Conversation

@bmorcelli

Copy link
Copy Markdown
Member

Changes the way we port Bruce to new devices

Now we set device specific pinouts on boards/<board folder>/interface.cpp at function _setup_gpio()

Removed the old pins_arduino.h include path files, that used to point to these constants

boards/<board folder>/<board environment>.ini now holds only environmental flags, things that need to be applied to the libraries, that are not reached by global variables and depends on specific build flags

Removed the boards/_jsonfiles/*.json specific and redundant files

A better guide to porting devices was written

remover the lib/HAL/display/*.* files and centered into DisplayDrivers which was based in this implementation, making easier the usage of I2C, e-ink and other displays supported by the library (and used on Launcher)

Added some libraries into submodules.. so now you need to use git submodule init to download them and build the project.

bmorcelli and others added 28 commits September 16, 2026 05:43
# Conflicts:
#	boards/_jsonfiles/esp-wroom32-ili9341.json
#	boards/_jsonfiles/esp-wroom32-st7789.json
#	boards/_jsonfiles/esp32s3-ili9341.json
#	boards/_jsonfiles/esp32s3-st7789.json
#	boards/pinouts/pins_arduino.h
esp-wroom32-ili9341, esp-wroom32-st7789, esp32s3-ili9341 and esp32s3-st7789
(merged from dev, PR BruceDevices#2334) still used the pre-port-refactor scheme: a custom
boards/_boards_json/*.json profile plus a per-board pins_arduino.h overriding
Arduino-core pin macros. Deleted both, switched to the generic esp32/esp32s3
PlatformIO board profile with the same extra flags as -D, and moved every
migrated pin group (i2c_bus, uart_bus/gps_bus/badusb_bus, outer_bus, CC1101_bus,
NRF24_bus, SDCARD_bus, PN532_bus, rotation, irTx, rfTx/rfRx) into _setup_gpio(),
matching all other boards.

Also fixed two bugs found along the way: IR_TX_PINS/RF_TX_PINS on the esp32s3
boards referenced GROVE_SDA/GROVE_SCL as compile-time macros that no longer
exist once GROVE_SDA/SCL stopped being -D'd (replaced with the literal pins),
and esp32s3-st7789's pins_arduino.h silently redefined SDCARD_CS=4 over the
.ini's explicit SDCARD_CS=-1 ("no SD card by default") - resolved in favor of
the .ini's stated intent.

All 4 boards build-verified individually (never in parallel).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@pr3y
pr3y merged commit e25622f into BruceDevices:dev Oct 2, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants