summaryrefslogtreecommitdiff
path: root/src/object
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2026-01-10 13:12:33 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2026-01-10 13:12:33 +0100
commitd7525456752e182b2e20ae0f38ed022f881eec9e (patch)
treeefa295b2f0132142de94c12efa7aef52121d5ba1 /src/object
parent11533e773394511215bfebdf413a1139cddb150d (diff)
framebuffer, pixelfont: use HAVE_PROGMEM rather than hardcoding arch checks
Diffstat (limited to 'src/object')
-rw-r--r--src/object/framebuffer.cc6
1 files changed, 3 insertions, 3 deletions
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 <avr/pgmspace.h>
#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];