Skip to content
Closed
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
9 changes: 9 additions & 0 deletions ports/espressif/boards/adafruit_magtag_2.9_grayscale/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#include "shared-bindings/fourwire/FourWire.h"
#include "shared-bindings/microcontroller/Pin.h"
#include "shared-module/displayio/__init__.h"
#include "shared-module/os/__init__.h"

#include "supervisor/shared/board.h"

#include "esp_log.h"
Expand Down Expand Up @@ -218,6 +220,13 @@ void board_init(void) {

if (is_ssd1680) {
epaperdisplay_construct_args_t args = EPAPERDISPLAY_CONSTRUCT_ARGS_DEFAULTS;

// Newer SSD1680 MagTags need a colstart of 8. Older ones need 0.
mp_int_t colstart = 8;
// If the value is in settings.toml, it will be set.
(void)common_hal_os_getenv_int("CIRCUITPY_MAGTAG_SSD1680_COLSTART", &colstart);
args.colstart = (int16_t)colstart;

args.bus = bus;
args.start_sequence = ssd1680_display_start_sequence;
args.start_sequence_len = sizeof(ssd1680_display_start_sequence);
Expand Down