| 1234567891011121314151617181920212223242526 |
- // The driver header must come before GxEPD2_BW.h - it defines the
- // GxEPD_WHITE/BLACK/RED macros run_wrapper_harness.h's template body uses
- // (macros are purely textual, need to exist before that text is seen), and
- // GxEPD2_BW.h itself has a handful of bare `WIDTH`/`HEIGHT` references in
- // its method bodies that aren't qualified with `GxEPD2_Type::` (most uses
- // in that file are; a few aren't - looks like a latent vendor oversight
- // that real Arduino board builds happen not to hit, presumably because
- // some board variant header defines WIDTH/HEIGHT globals GxEPD2_BW.h's
- // unqualified uses silently pick up). Defining the same two names as
- // ordinary global constants (not macros, to avoid also rewriting the
- // already-qualified `GxEPD2_Type::WIDTH` occurrences) before including
- // GxEPD2_BW.h satisfies plain unqualified name lookup the same way.
- #include "epd/GxEPD2_290_T94.h"
- constexpr int16_t WIDTH = GxEPD2_290_T94::WIDTH;
- constexpr int16_t HEIGHT = GxEPD2_290_T94::HEIGHT;
- #include "GxEPD2_BW.h"
- #include "run_wrapper_harness.h"
- using Driver = Peek<GxEPD2_290_T94>;
- using Wrapper = GxEPD2_BW<Driver, GxEPD2_290_T94::HEIGHT>;
- int main() {
- run_wrapper_harness<Wrapper, Driver>("GxEPD2_290_T94", /*three_color=*/false);
- return 0;
- }
|