From d7525456752e182b2e20ae0f38ed022f881eec9e Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sat, 10 Jan 2026 13:12:33 +0100 Subject: framebuffer, pixelfont: use HAVE_PROGMEM rather than hardcoding arch checks --- src/object/framebuffer.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/object/framebuffer.cc') diff --git a/src/object/framebuffer.cc b/src/object/framebuffer.cc index e7b914d..a3848ef 100644 --- a/src/object/framebuffer.cc +++ b/src/object/framebuffer.cc @@ -1,6 +1,6 @@ #include "object/framebuffer.h" -#ifdef MULTIPASS_ARCH_arduino_nano +#ifdef HAVE_PROGMEM #include #endif @@ -119,7 +119,7 @@ void Framebuffer::put(char c) if ((c < 32) || (c > 126)) { c = '?'; } -#ifdef MULTIPASS_ARCH_arduino_nano +#ifdef HAVE_PROGMEM uint8_t *glyph_addr = (uint8_t *)pgm_read_ptr(&font[c - 32]); const unsigned char glyph_w = pgm_read_byte(&glyph_addr[0]); #else @@ -136,7 +136,7 @@ void Framebuffer::put(char c) for (unsigned char i = 0; i < glyph_w; i++) { unsigned char x = i / fontSize; unsigned char y = i % fontSize; -#ifdef MULTIPASS_ARCH_arduino_nano +#ifdef HAVE_PROGMEM data[(height/8) * (fontX + x) + fontY/8 + y] = pgm_read_byte(&glyph_addr[i+1]); #else data[(height/8) * (fontX + x) + fontY/8 + y] = glyph[i+1]; -- cgit v1.2.3