1+ /* !
2+ * @file src/components/display/hardware.h
3+ *
4+ * Hardware interface for display components.
5+ *
6+ * Adafruit invests time and resources providing this open source code,
7+ * please support Adafruit and open-source hardware by purchasing
8+ * products from Adafruit!
9+ *
10+ * Copyright (c) Brent Rubell 2025 for Adafruit Industries.
11+ *
12+ * BSD license, all text here must be included in any redistribution.
13+ *
14+ */
15+ #ifndef WS_DISPLAY_HARDWARE_H
16+ #define WS_DISPLAY_HARDWARE_H
17+ #include " Wippersnapper.h"
18+
19+ #include " Adafruit_ThinkInk.h"
20+
21+ /* *************************************************************************/
22+ /* !
23+ @brief Interface for interacting with display hardware (TFT, eInk,
24+ OLED, etc.)
25+ This class provides methods to initialize, write to, and
26+ manage the state of display hardware.
27+ */
28+ /* *************************************************************************/
29+ class DisplayHardware {
30+ public:
31+ DisplayHardware ();
32+ ~DisplayHardware ();
33+ // High-level API functions
34+ void setType (wippersnapper_display_v1_DisplayType type);
35+ bool begin (bool reset = true );
36+ // API functions to abstract Adafruit_GFX
37+ void setTextSize (uint8_t sz);
38+
39+ private:
40+ wippersnapper_display_v1_DisplayType _type; // /< Display type
41+ // TODO: Make these drivers instead?
42+ ThinkInk_290_Grayscale4_EAAMFGN *disp_thinkink_grayscale4_eaamfgn = nullptr ; // < 2025 MagTag with SSD1680Z chipset
43+ ThinkInk_290_Grayscale4_T5 *disp_thinkink_grayscale4_t5 = nullptr ; // /< Pre-2025 MagTag with IL0373 chipset
44+ };
45+ #endif // WS_DISPLAY_HARDWARE_H
0 commit comments