Skip to content

Commit 00dd150

Browse files
committed
Removed white space at EOL, added some EOLs at EOF
Many code editors are set to do this automatically now, so it ends up being annoying to scrape back out of commits to keep them easily reviewable. Also added '.DS_Store' and 'build' entries to .gitignore
1 parent 7b571a7 commit 00dd150

File tree

8 files changed

+48
-42
lines changed

8 files changed

+48
-42
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,9 @@ modules.order
5050
Module.symvers
5151
Mkfile.old
5252
dkms.conf
53+
54+
# MacOS
55+
.DS_Store
56+
57+
# ESP-IDF build dir
58+
build

lvgl_tft/EVE_commands.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ void EVE_get_cmdoffset(void);
6868
/* commands to operate on memory: */
6969
void EVE_cmd_memzero(uint32_t ptr, uint32_t num);
7070
void EVE_cmd_memset(uint32_t ptr, uint8_t value, uint32_t num);
71-
void EVE_cmd_memwrite(uint32_t dest, uint32_t num, const uint8_t *data);
71+
void EVE_cmd_memwrite(uint32_t dest, uint32_t num, const uint8_t *data);
7272
void EVE_cmd_memcpy(uint32_t dest, uint32_t src, uint32_t num);
7373

7474
#if FT81X_FULL

lvgl_tft/FT81x.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ void TFT_bitmap_display(void)
250250
EVE_cmd_dl(TAG(0));
251251

252252
EVE_cmd_dl(DL_DISPLAY); /* instruct the graphics processor to show the list */
253-
253+
254254
EVE_cmd_dl(CMD_SWAP); /* make this list active */
255255

256256
EVE_end_cmd_burst(); /* stop writing to the cmd-fifo */
@@ -273,7 +273,7 @@ void FT81x_init(void)
273273
#endif
274274

275275
spi_acquire();
276-
276+
277277
if(EVE_init())
278278
{
279279
tft_active = 1;
@@ -284,7 +284,7 @@ void FT81x_init(void)
284284

285285
EVE_cmd_memset(SCREEN_BITMAP_ADDR, BLACK, SCREEN_BUFFER_SIZE); // clear screen buffer
286286
EVE_cmd_execute();
287-
287+
288288
TFT_bitmap_display(); // set DL for fullscreen bitmap display
289289
}
290290

@@ -326,4 +326,4 @@ void TFT_WriteBitmap(uint8_t* Bitmap, uint16_t X, uint16_t Y, uint16_t Width, ui
326326
void FT81x_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * color_map)
327327
{
328328
TFT_WriteBitmap((uint8_t*)color_map, area->x1, area->y1, lv_area_get_width(area), lv_area_get_height(area));
329-
}
329+
}

lvgl_tft/GC9A01.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,23 +173,23 @@ void GC9A01_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * colo
173173
uint8_t data[4];
174174

175175
/*Column addresses*/
176-
GC9A01_send_cmd(0x2A); //0x2A
176+
GC9A01_send_cmd(0x2A); //0x2A
177177
data[0] = (area->x1 >> 8) & 0xFF;
178178
data[1] = area->x1 & 0xFF;
179179
data[2] = (area->x2 >> 8) & 0xFF;
180180
data[3] = area->x2 & 0xFF;
181181
GC9A01_send_data(data, 4);
182182

183183
/*Page addresses*/
184-
GC9A01_send_cmd(0x2B); //0x2B
184+
GC9A01_send_cmd(0x2B); //0x2B
185185
data[0] = (area->y1 >> 8) & 0xFF;
186186
data[1] = area->y1 & 0xFF;
187187
data[2] = (area->y2 >> 8) & 0xFF;
188188
data[3] = area->y2 & 0xFF;
189189
GC9A01_send_data(data, 4);
190190

191191
/*Memory write*/
192-
GC9A01_send_cmd(0x2C); //0x2C
192+
GC9A01_send_cmd(0x2C); //0x2C
193193

194194

195195
uint32_t size = lv_area_get_width(area) * lv_area_get_height(area);
@@ -217,7 +217,7 @@ void GC9A01_sleep_in()
217217
{
218218
uint8_t data[] = {0x08};
219219
GC9A01_send_cmd(0x10); //0x10 Enter Sleep Mode
220-
GC9A01_send_data(&data, 1);
220+
GC9A01_send_data(&data, 1);
221221
}
222222

223223
void GC9A01_sleep_out()

lvgl_tft/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -744,11 +744,11 @@ menu "LVGL TFT Display controller"
744744

745745
config LV_DISP_ST7789_SOFT_RESET
746746
bool "Soft reset - use software reset instead of reset pin"
747-
depends on LV_TFT_DISPLAY_CONTROLLER_ST7789
747+
depends on LV_TFT_DISPLAY_CONTROLLER_ST7789
748748
default n
749749
help
750750
Use software reset and ignores configured reset pin (some hardware does not use a reset pin).
751-
751+
752752
endmenu
753753

754754
# menu will be visible only when LV_PREDEFINED_DISPLAY_NONE is y

lvgl_tft/il3820.c

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ static uint8_t il3820_lut_initial[] = {
7373
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
7474
};
7575
static uint8_t il3820_lut_default[] = {
76-
0x10, 0x18, 0x18, 0x08, 0x18, 0x18,
77-
0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
78-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
76+
0x10, 0x18, 0x18, 0x08, 0x18, 0x18,
77+
0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
78+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7979
0x00, 0x00, 0x13, 0x14, 0x44, 0x12,
8080
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
8181
};
@@ -113,7 +113,7 @@ void il3820_flush(lv_disp_drv_t *drv, const lv_area_t *area, lv_color_t *color_m
113113
uint8_t *buffer = (uint8_t*) color_map;
114114
uint16_t x_addr_counter = 0;
115115
uint16_t y_addr_counter = 0;
116-
116+
117117
/* Configure entry mode */
118118
il3820_write_cmd(IL3820_CMD_ENTRY_MODE, &il3820_scan_mode, 1);
119119

@@ -131,15 +131,15 @@ void il3820_flush(lv_disp_drv_t *drv, const lv_area_t *area, lv_color_t *color_m
131131
il3820_set_cursor(x_addr_counter, y_addr_counter);
132132

133133
il3820_send_cmd(IL3820_CMD_WRITE_RAM);
134-
134+
135135
/* Write the pixel data to graphic RAM, linelen bytes at the time. */
136136
for(size_t row = 0; row <= (EPD_PANEL_HEIGHT - 1); row++){
137137
il3820_send_data(buffer, linelen);
138138
buffer += IL3820_COLUMNS;
139139
}
140140

141141
il3820_set_window(0, EPD_PANEL_WIDTH - 1, 0, EPD_PANEL_HEIGHT - 1);
142-
142+
143143
il3820_update_display();
144144

145145
/* IMPORTANT!!!
@@ -152,7 +152,7 @@ void il3820_flush(lv_disp_drv_t *drv, const lv_area_t *area, lv_color_t *color_m
152152
* BIT_SET(byte_index, bit_index) clears the bit_index pixel at byte_index of
153153
* the display buffer.
154154
* BIT_CLEAR(byte_index, bit_index) sets the bit_index pixel at the byte_index
155-
* of the display buffer. */
155+
* of the display buffer. */
156156
void il3820_set_px_cb(lv_disp_drv_t * disp_drv, uint8_t* buf,
157157
lv_coord_t buf_w, lv_coord_t x, lv_coord_t y,
158158
lv_color_t color, lv_opa_t opa)
@@ -217,7 +217,7 @@ void il3820_init(void)
217217

218218
/* Software reset */
219219
il3820_write_cmd(IL3820_CMD_SW_RESET, NULL, 0);
220-
220+
221221
/* Busy wait for the BUSY signal to go low */
222222
il3820_waitbusy(IL3820_WAIT);
223223

@@ -245,10 +245,10 @@ void il3820_init(void)
245245

246246
// allow partial updates now
247247
il3820_partial = true;
248-
248+
249249
/* Update LUT */
250250
il3820_write_cmd(IL3820_CMD_UPDATE_LUT, il3820_lut_default, sizeof(il3820_lut_default));
251-
251+
252252
/* Clear control memory and update */
253253
il3820_clear_cntlr_mem(IL3820_CMD_WRITE_RAM, true);
254254
}
@@ -257,10 +257,10 @@ void il3820_init(void)
257257
void il3820_sleep_in(void)
258258
{
259259
uint8_t data[] = {0x01};
260-
260+
261261
/* Wait for the BUSY signal to go low */
262262
il3820_waitbusy(IL3820_WAIT);
263-
263+
264264
il3820_write_cmd(IL3820_CMD_SLEEP_MODE, data, 1);
265265
}
266266

@@ -270,15 +270,15 @@ static void il3820_waitbusy(int wait_ms)
270270
int i = 0;
271271

272272
vTaskDelay(10 / portTICK_RATE_MS); // 10ms delay
273-
273+
274274
for(i = 0; i < (wait_ms * 10); i++) {
275275
if(gpio_get_level(IL3820_BUSY_PIN) != IL3820_BUSY_LEVEL) {
276276
return;
277277
}
278-
278+
279279
vTaskDelay(10 / portTICK_RATE_MS);
280280
}
281-
281+
282282
ESP_LOGE( TAG, "busy exceeded %dms", i*10 );
283283
}
284284

@@ -294,10 +294,10 @@ static inline void il3820_data_mode(void)
294294
gpio_set_level(IL3820_DC_PIN, 1);
295295
}
296296

297-
static inline void il3820_write_cmd(uint8_t cmd, uint8_t *data, size_t len)
297+
static inline void il3820_write_cmd(uint8_t cmd, uint8_t *data, size_t len)
298298
{
299299
disp_wait_for_pending_transactions();
300-
300+
301301
il3820_command_mode();
302302
disp_spi_send_data(&cmd, 1);
303303

@@ -308,10 +308,10 @@ static inline void il3820_write_cmd(uint8_t cmd, uint8_t *data, size_t len)
308308
}
309309

310310
/* Send cmd to the display */
311-
static inline void il3820_send_cmd(uint8_t cmd)
311+
static inline void il3820_send_cmd(uint8_t cmd)
312312
{
313313
disp_wait_for_pending_transactions();
314-
314+
315315
il3820_command_mode();
316316
disp_spi_send_data(&cmd, 1);
317317
}
@@ -320,14 +320,14 @@ static inline void il3820_send_cmd(uint8_t cmd)
320320
static void il3820_send_data(uint8_t *data, uint16_t length)
321321
{
322322
disp_wait_for_pending_transactions();
323-
323+
324324
il3820_data_mode();
325325
disp_spi_send_colors(data, length);
326326
}
327327

328328
/* Specify the start/end positions of the window address in the X and Y
329329
* directions by an address unit.
330-
*
330+
*
331331
* @param sx: X Start position.
332332
* @param ex: X End position.
333333
* @param ys: Y Start position.
@@ -336,7 +336,7 @@ static void il3820_send_data(uint8_t *data, uint16_t length)
336336
static inline void il3820_set_window( uint16_t sx, uint16_t ex, uint16_t ys, uint16_t ye)
337337
{
338338
uint8_t tmp[4] = {0};
339-
339+
340340
tmp[0] = sx / 8;
341341
tmp[1] = ex / 8;
342342

@@ -384,7 +384,7 @@ static void il3820_update_display(void)
384384
} else {
385385
tmp = (IL3820_CTRL2_ENABLE_CLK | IL3820_CTRL2_ENABLE_ANALOG | IL3820_CTRL2_TO_PATTERN);
386386
}
387-
387+
388388
il3820_write_cmd(IL3820_CMD_UPDATE_CTRL2, &tmp, 1);
389389

390390
il3820_write_cmd(IL3820_CMD_MASTER_ACTIVATION, NULL, 0);
@@ -400,10 +400,10 @@ static void il3820_clear_cntlr_mem(uint8_t ram_cmd, bool update)
400400
/* Arrays used by SPI must be word alligned */
401401
WORD_ALIGNED_ATTR uint8_t clear_page[IL3820_COLUMNS];
402402
memset(clear_page, 0xff, sizeof clear_page);
403-
403+
404404
/* Configure entry mode */
405405
il3820_write_cmd(IL3820_CMD_ENTRY_MODE, &il3820_scan_mode, 1);
406-
406+
407407
/* Configure the window */
408408
il3820_set_window(0, EPD_PANEL_WIDTH - 1, 0, EPD_PANEL_HEIGHT - 1);
409409

lvgl_tft/ili9486.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ void ili9486_init(void)
6060
{0xE0, {0x0F, 0x1F, 0x1C, 0x0C, 0x0F, 0x08, 0x48, 0x98, 0x37, 0x0A, 0x13, 0x04, 0x11, 0x0D, 0x00}, 15},
6161
{0XE1, {0x0F, 0x32, 0x2E, 0x0B, 0x0D, 0x05, 0x47, 0x75, 0x37, 0x06, 0x10, 0x03, 0x24, 0x20, 0x00}, 15},
6262
{0x20, {0}, 0}, /* display inversion OFF */
63-
{0x36, {0x48}, 1},
64-
{0x29, {0}, 0x80}, /* display on */
63+
{0x36, {0x48}, 1},
64+
{0x29, {0}, 0x80}, /* display on */
6565
{0x00, {0}, 0xff},
6666
};
6767

@@ -140,7 +140,7 @@ void ili9486_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * col
140140
ili9486_send_cmd(0x2C);
141141

142142
size = lv_area_get_width(area) * lv_area_get_height(area);
143-
143+
144144
ili9486_send_color((void*) color_map, size * 2);
145145
}
146146

lvgl_tft/ili9488.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static void ili9488_send_color(void * data, uint16_t length);
5050
/**********************
5151
* GLOBAL FUNCTIONS
5252
**********************/
53-
// From github.com/jeremyjh/ESP32_TFT_library
53+
// From github.com/jeremyjh/ESP32_TFT_library
5454
// From github.com/mvturnho/ILI9488-lvgl-ESP32-WROVER-B
5555
void ili9488_init(void)
5656
{
@@ -102,7 +102,7 @@ void ili9488_init(void)
102102
// Exit sleep
103103
ili9488_send_cmd(0x01); /* Software reset */
104104
vTaskDelay(100 / portTICK_RATE_MS);
105-
105+
106106
//Send all the commands
107107
uint16_t cmd = 0;
108108
while (ili_init_cmds[cmd].databytes!=0xff) {
@@ -151,7 +151,7 @@ void ili9488_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * col
151151
(uint8_t) (area->x2 >> 8) & 0xFF,
152152
(uint8_t) (area->x2) & 0xFF,
153153
};
154-
154+
155155
/* Page addresses */
156156
uint8_t yb[] = {
157157
(uint8_t) (area->y1 >> 8) & 0xFF,

0 commit comments

Comments
 (0)