* GFXcanvas: Allow subclass to take charge of buffer allocations
In Adafruit_dvhstx, the low level driver takes charge of the framebuffer
allocations. Consequently, any allocation by the GFXcanvas class would be
an unused waste of memory.
Introduce a new constructor parameter `bool allocate_buffer=true`. The
default preserves the old behavior of allocating the buffer in the
constructor and freeing it in the destructor, while passing in `false`
skips buffer allocation & freeing.
In this case, the subclass must allocate the buffer before the first
drawing operation (such as in its constructor or begin method), and
free it in its own destructor or end method.
The subclass can also freely change the buffer pointer at runtime, for
instance in a swap method if the underlying framebuffer is double-buffered.
* experimentally run a different clang-format
This runs version 19.1.7: uvx clang-format -i *.cpp *.h
the changes look similar to what was shown during CI
* undo one edit that ci doesn't like
* Fix compiler warning [-Wunused-const-variable=]
Compiling a sketches that uses this library can report a warning
about the const variable `font` being defined, but never used.
Work around this by defining a (static inline) function which
references the variable.
* Remove unused variable (compiler warning)
The Teensy T4 (__IMXRT1062__) port registers need to be 32 bits unlike the Teensy 3.x which are 8 bits.
adafruit_ili9341 and adafruit_st7735 libraries graphic test
Removed compiler warning
that PROGMEM was previously defined. So undefine it first...
Note: Thought of simply doing nothing here
(do neither the #undef nor the #define).
But that gives compiler error
Teensy T4 - Make Bit Bang version work.
With T4, the Port/Set registers are masks not single value.
So need to setup those class variables:
Also found that bitbang of T4, was too fast for display, so put in same slow
down that ESP32 has, which gets the clock down to mayby 12.5mhz
Tried these changes out with both:
adafruit_ili9341 and adafruit_st7735 libraries graphic test
Update comments