From 08b7ee440269c881546421da6efe1b6ae122b566 Mon Sep 17 00:00:00 2001 From: Thomas Albers Raviola Date: Tue, 3 Dec 2024 21:46:19 +0100 Subject: Change pixel format --- src/tft.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/tft.c') diff --git a/src/tft.c b/src/tft.c index d0c7d8f..b75e8bb 100644 --- a/src/tft.c +++ b/src/tft.c @@ -94,10 +94,16 @@ enum memory_access { ML = 0x10 }; +extern u8 blink; + void clear_screen(void) { DI; + u8 tmp = blink; + blink = 0; + EI; + tft_set_col_addr(0, TFT_WIDTH - 1); tft_set_page_addr(0, TFT_HEIGHT - 1); @@ -106,9 +112,11 @@ clear_screen(void) for (u16 j = 0; j < TFT_WIDTH; ++j) { tft_data = 0x00; tft_data = 0x00; - tft_data = 0x00; } } + + DI; + blink = tmp; EI; } @@ -124,7 +132,7 @@ tft_init(void) tft_set_rgb_interface(); - tft_pixel_format(BIT18, BIT18); + tft_pixel_format(BIT16, BIT16); tft_memory_access_ctrl(MV | 0x0C); tft_sleep_out(); -- cgit v1.2.3