run_290_t94_wrapper.cpp 1.2 KB

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