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