2626#include " SDRAM.h"
2727#include " ArduinoGraphics.h"
2828#define HAS_ARDUINOGRAPHICS
29+ #endif
2930
3031static uint32_t lcd_x_size = 480 ;
3132static uint32_t lcd_y_size = 800 ;
32- #endif
33-
3433
3534/* *
3635 * @enum DisplayPixelFormat
@@ -77,46 +76,54 @@ class Display
7776#endif
7877{
7978public:
80- /* *
81- * @brief Construct a new Camera object.
82- */
83- Display (int width = 800 , int height = 480 );
84-
85- /* *
86- * @brief Initialize the display
87- */
88- bool begin (DisplayPixelFormat pixformat = DISPLAY_RGB565);
89-
90- /* *
91- * @brief a frame.
92- *
93- * @param fb Reference to a FrameBuffer object to store the frame data.
94- * @param timeout Time in milliseconds to wait for a frame (default: 5000).
95- * @return true if the frame is successfully captured, otherwise false.
96- */
97- // bool grabFrame(FrameBuffer &fb, uint32_t timeout = 5000);
98-
99-
100- /* *
101- *
102- *
103- *
104- *
105- */
106- int write8 (const uint16_t x,
107- const uint16_t y,
108- const void *buf);
109-
110- void setFrameDesc (uint16_t w, uint16_t h, uint16_t pitch, uint32_t buf_size);
111- void startFrameBuffering ();
112- void endFrameBuffering ();
113-
114- int setBlanking (bool on);
79+ /* *
80+ * @brief Construct a new Camera object.
81+ */
82+ Display (int width = 800 , int height = 480 );
11583
116- void * getFrameBuffer ();
84+ /* *
85+ * @brief Initialize the display
86+ */
87+ bool begin (DisplayPixelFormat pixformat = DISPLAY_RGB565);
88+
89+ /* *
90+ * @brief a frame.
91+ *
92+ * @param fb Reference to a FrameBuffer object to store the frame data.
93+ * @param timeout Time in milliseconds to wait for a frame (default: 5000).
94+ * @return true if the frame is successfully captured, otherwise false.
95+ */
96+ // bool grabFrame(FrameBuffer &fb, uint32_t timeout = 5000);
97+
98+
99+ /* *
100+ *
101+ *
102+ *
103+ *
104+ */
105+ int write8 (const uint16_t x,
106+ const uint16_t y,
107+ const void *buf);
108+
109+ void setFrameDesc (uint16_t w, uint16_t h, uint16_t pitch, uint32_t buf_size);
110+ void startFrameBuffering ();
111+ void endFrameBuffering ();
112+
113+ int setBlanking (bool on);
114+
115+ void * getFrameBuffer ();
116+
117+ int16_t width (void ) { return _width; }
118+ int16_t height (void ) { return _height; }
119+
120+ uint32_t getDisplayXSize (){
121+ return lcd_x_size;
122+ }
117123
118- int16_t width (void ) { return _width; }
119- int16_t height (void ) { return _height; }
124+ uint32_t getDisplayYSize (){
125+ return lcd_y_size;
126+ }
120127
121128
122129#ifdef HAS_ARDUINOGRAPHICS
@@ -146,14 +153,6 @@ class Display
146153 */
147154 virtual void set (int x, int y, uint8_t r, uint8_t g, uint8_t b);
148155
149- uint32_t getDisplayXSize (){
150- return lcd_x_size;
151- }
152-
153- uint32_t getDisplayYSize (){
154- return lcd_y_size;
155- }
156-
157156 void lcdClear (uint16_t Color);
158157
159158#endif
@@ -162,16 +161,13 @@ class Display
162161private:
163162 const struct device *gdev;
164163 struct display_buffer_descriptor *buf_desc;
165- #if defined(HAS_ARDUINOGRAPHICS) || __has_include ("lvgl.h")
166164 uint16_t *buffer = nullptr ;
167165 uint32_t sizeof_framebuffer;
168- #endif
169166 protected:
170167 int16_t _height, _width;
171168 bool _rotated = false ;
172169
173170};
174171
172+ #endif // __ZEPHYR__
175173#endif // __GIGA_DISPLAY_H__
176-
177- #endif // __ZEPHYR__
0 commit comments