Skip to content

Commit 28d0ec4

Browse files
committed
ugfx/driver: remove flush flag
1 parent a009b6b commit 28d0ec4

File tree

3 files changed

+0
-21
lines changed

3 files changed

+0
-21
lines changed

components/ugfx/drivers/gdisp/CUBE0414/gdisp_lld_CUBE0414.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@
4242
#define GDISP_INITIAL_BACKLIGHT 100
4343
#endif
4444

45-
#define GDISP_FLG_NEEDFLUSH (GDISP_FLG_DRIVER<<0)
46-
4745
#include "CUBE0414.h"
4846

4947
static const uint8_t ram_addr_table[64] = {
@@ -101,11 +99,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
10199

102100
#if GDISP_HARDWARE_FLUSH
103101
LLDSPEC void gdisp_lld_flush(GDisplay *g) {
104-
if (!(g->flags & GDISP_FLG_NEEDFLUSH)) {
105-
return;
106-
}
107102
refresh_gram(g, (uint8_t *)g->priv);
108-
g->flags &= ~GDISP_FLG_NEEDFLUSH;
109103
}
110104
#endif
111105

@@ -147,7 +141,6 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
147141
stream_write_cx = 0;
148142
stream_write_y = 0;
149143
stream_write_cy = 0;
150-
g->flags |= GDISP_FLG_NEEDFLUSH;
151144
}
152145
#endif
153146

components/ugfx/drivers/gdisp/ST7735/gdisp_lld_ST7735.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@
4242
#define GDISP_INITIAL_BACKLIGHT 255
4343
#endif
4444

45-
#define GDISP_FLG_NEEDFLUSH (GDISP_FLG_DRIVER<<0)
46-
4745
#include "ST7735.h"
4846

4947
LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
@@ -169,11 +167,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
169167

170168
#if GDISP_HARDWARE_FLUSH
171169
LLDSPEC void gdisp_lld_flush(GDisplay *g) {
172-
if (!(g->flags & GDISP_FLG_NEEDFLUSH)) {
173-
return;
174-
}
175170
refresh_gram(g, (uint8_t *)g->priv);
176-
g->flags &= ~GDISP_FLG_NEEDFLUSH;
177171
}
178172
#endif
179173

@@ -208,7 +202,6 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
208202
stream_write_cx = 0;
209203
stream_write_y = 0;
210204
stream_write_cy = 0;
211-
g->flags |= GDISP_FLG_NEEDFLUSH;
212205
}
213206
#endif
214207

components/ugfx/drivers/gdisp/ST7789/gdisp_lld_ST7789.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@
4242
#define GDISP_INITIAL_BACKLIGHT 255
4343
#endif
4444

45-
#define GDISP_FLG_NEEDFLUSH (GDISP_FLG_DRIVER<<0)
46-
4745
#include "ST7789.h"
4846

4947
LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
@@ -154,11 +152,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
154152

155153
#if GDISP_HARDWARE_FLUSH
156154
LLDSPEC void gdisp_lld_flush(GDisplay *g) {
157-
if (!(g->flags & GDISP_FLG_NEEDFLUSH)) {
158-
return;
159-
}
160155
refresh_gram(g, (uint8_t *)g->priv);
161-
g->flags &= ~GDISP_FLG_NEEDFLUSH;
162156
}
163157
#endif
164158

@@ -193,7 +187,6 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
193187
stream_write_cx = 0;
194188
stream_write_y = 0;
195189
stream_write_cy = 0;
196-
g->flags |= GDISP_FLG_NEEDFLUSH;
197190
}
198191
#endif
199192

0 commit comments

Comments
 (0)