From 45bfe04537922cff189307dc1bb5fd2f851fc76c Mon Sep 17 00:00:00 2001 From: finga Date: Fri, 24 Sep 2021 12:29:35 +0200 Subject: [PATCH] Also move and rename drawing the splash screen For consistency `lcd_splash()` was moved before `draw_home()` and renamed to `draw_splash()`. --- firmware/src/main.c | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/firmware/src/main.c b/firmware/src/main.c index 6c4379d..69aaae6 100644 --- a/firmware/src/main.c +++ b/firmware/src/main.c @@ -316,25 +316,6 @@ static void lcd_write_integer_page(const uint8_t integer, } } -static void lcd_splash(void) { - lcd_fill(0x00); - - for (uint8_t i = 0; i < 5; i++) { - lcd_move_cursor(31, 1 + i); - - for (uint8_t j = 0; j < 40; j++) - lcd_write(sacred_chao[i * 40 + j]); - - } - - for (uint8_t i = 0; i < 2; i++) { - lcd_move_cursor(26, 6 + i); - - for (uint8_t j = 0; j < 48; j++) - lcd_write(onders_org[i * 48 + j]); - } -} - static void twi_error(bool inverted) { if (inverted) lcd_fill(0xFF); @@ -429,6 +410,24 @@ static void twi_write_register(const uint8_t address, twi_stop(); } +static void draw_splash(void) { + lcd_fill(0x00); + + for (uint8_t i = 0; i < 5; i++) { + lcd_move_cursor(31, 1 + i); + + for (uint8_t j = 0; j < 40; j++) + lcd_write(sacred_chao[i * 40 + j]); + } + + for (uint8_t i = 0; i < 2; i++) { + lcd_move_cursor(26, 6 + i); + + for (uint8_t j = 0; j < 48; j++) + lcd_write(onders_org[i * 48 + j]); + } +} + static void draw_home(void) { lcd_fill(0x00); @@ -793,7 +792,7 @@ int main(void) { TIMSK1 |= (1 << OCIE1A); // Enable match compare A // Show splash screen - lcd_splash(); + draw_splash(); _delay_ms(2000); // Load the menu