Skip to content

Commit e75a849

Browse files
Repositioning GFX_EXTRA_PRE_INIT() as DEV_DEVICE_INIT()
1 parent 33a8de9 commit e75a849

File tree

40 files changed

+170
-168
lines changed

40 files changed

+170
-168
lines changed

examples/ArduinoVNC/ArduinoVNC.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,15 +169,15 @@ void handle_keyboard()
169169

170170
void setup(void)
171171
{
172+
#ifdef DEV_DEVICE_INIT
173+
DEV_DEVICE_INIT();
174+
#endif
175+
172176
Serial.begin(115200);
173177
// Serial.setDebugOutput(true);
174178
// while(!Serial);
175179
Serial.println("Arduino_GFX VNC example");
176180

177-
#ifdef GFX_EXTRA_PRE_INIT
178-
GFX_EXTRA_PRE_INIT();
179-
#endif
180-
181181
// Init keyboard device
182182
keyboard_init();
183183

examples/AsciiTable/AsciiTable.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ Arduino_GFX *gfx = new Arduino_ILI9341(bus, DF_GFX_RST, 0 /* rotation */, false
4646

4747
void setup(void)
4848
{
49+
#ifdef DEV_DEVICE_INIT
50+
DEV_DEVICE_INIT();
51+
#endif
52+
4953
Serial.begin(115200);
5054
// Serial.setDebugOutput(true);
5155
// while(!Serial);
5256
Serial.println("Arduino_GFX AsciiTable example");
5357

54-
#ifdef GFX_EXTRA_PRE_INIT
55-
GFX_EXTRA_PRE_INIT();
56-
#endif
57-
5858
// Init Display
5959
if (!gfx->begin())
6060
{

examples/Clock/Clock.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ static int16_t *last_cached_point;
7777

7878
void setup(void)
7979
{
80+
#ifdef DEV_DEVICE_INIT
81+
DEV_DEVICE_INIT();
82+
#endif
83+
8084
Serial.begin(115200);
8185
// Serial.setDebugOutput(true);
8286
// while(!Serial);
8387
Serial.println("Arduino_GFX Clock example");
8488

85-
#ifdef GFX_EXTRA_PRE_INIT
86-
GFX_EXTRA_PRE_INIT();
87-
#endif
88-
8989
// Init Display
9090
if (!gfx->begin())
9191
{

examples/HelloWorld/HelloWorld.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ Arduino_GFX *gfx = new Arduino_ILI9341(bus, DF_GFX_RST, 0 /* rotation */, false
4040

4141
void setup(void)
4242
{
43+
#ifdef DEV_DEVICE_INIT
44+
DEV_DEVICE_INIT();
45+
#endif
46+
4347
Serial.begin(115200);
4448
// Serial.setDebugOutput(true);
4549
// while(!Serial);
4650
Serial.println("Arduino_GFX Hello World example");
4751

48-
#ifdef GFX_EXTRA_PRE_INIT
49-
GFX_EXTRA_PRE_INIT();
50-
#endif
51-
5252
// Init Display
5353
if (!gfx->begin())
5454
{

examples/HelloWorldGfxfont/HelloWorldGfxfont.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ Arduino_GFX *gfx = new Arduino_ILI9341(bus, DF_GFX_RST, 0 /* rotation */, false
4545

4646
void setup(void)
4747
{
48+
#ifdef DEV_DEVICE_INIT
49+
DEV_DEVICE_INIT();
50+
#endif
51+
4852
Serial.begin(115200);
4953
// Serial.setDebugOutput(true);
5054
// while(!Serial);
5155
Serial.println("Arduino_GFX Hello World Gfxfont example");
5256

53-
#ifdef GFX_EXTRA_PRE_INIT
54-
GFX_EXTRA_PRE_INIT();
55-
#endif
56-
5757
// Init Display
5858
if (!gfx->begin())
5959
{

examples/ImgViewer/ImgViewerAnimatedGIF_GIFDEC/ImgViewerAnimatedGIF_GIFDEC.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,15 @@ static GifClass gifClass;
103103

104104
void setup()
105105
{
106+
#ifdef DEV_DEVICE_INIT
107+
DEV_DEVICE_INIT();
108+
#endif
109+
106110
Serial.begin(115200);
107111
// Serial.setDebugOutput(true);
108112
// while(!Serial);
109113
Serial.println("Arduino_GFX Animated GIF Image Viewer example");
110114

111-
#ifdef GFX_EXTRA_PRE_INIT
112-
GFX_EXTRA_PRE_INIT();
113-
#endif
114-
115115
// Init Display
116116
if (!gfx->begin())
117117
{

examples/ImgViewer/ImgViewerAnimatedGIF_bitbank/ImgViewerAnimatedGIF_bitbank.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,15 +267,15 @@ void GIFDraw(GIFDRAW *pDraw)
267267

268268
void setup()
269269
{
270+
#ifdef DEV_DEVICE_INIT
271+
DEV_DEVICE_INIT();
272+
#endif
273+
270274
Serial.begin(115200);
271275
// Serial.setDebugOutput(true);
272276
// while(!Serial);
273277
Serial.println("Arduino_GFX Animated GIF Image Viewer example");
274278

275-
#ifdef GFX_EXTRA_PRE_INIT
276-
GFX_EXTRA_PRE_INIT();
277-
#endif
278-
279279
// Init Display
280280
if (!gfx->begin())
281281
{

examples/ImgViewer/ImgViewerBmp/ImgViewerBmp.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,15 @@ static void bmpDrawCallback(int16_t x, int16_t y, uint16_t *bitmap, int16_t w, i
101101

102102
void setup()
103103
{
104+
#ifdef DEV_DEVICE_INIT
105+
DEV_DEVICE_INIT();
106+
#endif
107+
104108
Serial.begin(115200);
105109
// Serial.setDebugOutput(true);
106110
// while(!Serial);
107111
Serial.println("Arduino_GFX BMP Image Viewer example");
108112

109-
#ifdef GFX_EXTRA_PRE_INIT
110-
GFX_EXTRA_PRE_INIT();
111-
#endif
112-
113113
// Init Display
114114
if (!gfx->begin())
115115
{

examples/ImgViewer/ImgViewerJpeg_ESP32_JPEG/ImgViewerJpeg_ESP32_JPEG.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,15 @@ _exit:
139139

140140
void setup()
141141
{
142+
#ifdef DEV_DEVICE_INIT
143+
DEV_DEVICE_INIT();
144+
#endif
145+
142146
Serial.begin(115200);
143147
// Serial.setDebugOutput(true);
144148
// while(!Serial);
145149
Serial.println("Arduino_GFX ESP32 SIMD JPEG Image Viewer example");
146150

147-
#ifdef GFX_EXTRA_PRE_INIT
148-
GFX_EXTRA_PRE_INIT();
149-
#endif
150-
151151
// Init Display
152152
if (!gfx->begin())
153153
{

examples/ImgViewer/ImgViewerJpeg_JPEGDEC/ImgViewerJpeg_JPEGDEC.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,15 @@ static int jpegDrawCallback(JPEGDRAW *pDraw)
100100

101101
void setup()
102102
{
103+
#ifdef DEV_DEVICE_INIT
104+
DEV_DEVICE_INIT();
105+
#endif
106+
103107
Serial.begin(115200);
104108
// Serial.setDebugOutput(true);
105109
// while(!Serial);
106110
Serial.println("Arduino_GFX JPEG Image Viewer example");
107111

108-
#ifdef GFX_EXTRA_PRE_INIT
109-
GFX_EXTRA_PRE_INIT();
110-
#endif
111-
112112
// Init Display
113113
if (!gfx->begin())
114114
{

0 commit comments

Comments
 (0)