Also move and rename drawing the splash screen

For consistency `lcd_splash()` was moved before `draw_home()` and
renamed to `draw_splash()`.
This commit is contained in:
finga 2021-09-24 12:29:35 +02:00
parent 144da8d7f2
commit 45bfe04537

View file

@ -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