aboutsummaryrefslogtreecommitdiff
path: root/src/tft.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tft.c')
-rw-r--r--src/tft.c12
1 files changed, 10 insertions, 2 deletions
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();