Skip to content
Snippets Groups Projects
Verified Commit 53e3b1d5 authored by rahix's avatar rahix
Browse files

feat(epicardium): Only perform fast display init


The bootloader will have initialized the display in all cases so we
don't need to repeat the same init code all over again.

Signed-off-by: default avatarRahix <rahix@rahix.de>
parent b76ac8fc
No related branches found
No related tags found
No related merge requests found
......@@ -80,7 +80,11 @@ int hardware_early_init(void)
;
}
display_init();
/*
* The bootloader has already initialized the display, so we only need
* to do the bare minimum here (mostly the gfx datastructures).
*/
display_init_slim();
/*
* RGB LEDs
......
......@@ -103,3 +103,18 @@ void display_init(void)
txt_init(&display_textb, &display_screen, &Font12);
gfx_clear(&display_screen);
}
void display_init_slim(void)
{
if (!portexpander_detected()) {
// Open-drain
MAX77650_setDRV(false);
// Output
MAX77650_setDIR(false);
}
GPIO_Config(&DEV_DC_PIN);
display_screen = gfx_screen(LCD_framebuffer());
txt_init(&display_textb, &display_screen, &Font12);
}
......@@ -6,5 +6,6 @@ extern struct gfx_region display_screen;
extern struct txt_buffer display_textb;
void display_init(void);
void display_init_slim(void);
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment