Commit 1f8e50de authored by Rahix's avatar Rahix
Browse files

chore(epicardium): Factor out the display init code

Move display initialization from hardware_early_init() into the display
module to keep it closer to related functionality.
parent c925d222
#include "drivers/display/lcd.h"
#include "display.h"
void disp_init(void)
{
/*
* This call can be removed once all gfx stuff is replaced.
*/
display_init_slim();
/*
* The bootloader has already initialized the display, so we only need
* to do the bare minimum here.
*/
lcd_reconfigure();
}
......@@ -59,6 +59,8 @@ int pmic_read_amux(enum pmic_amux_signal sig, float *result);
/* ---------- Display ------------------------------------------------------ */
/* Do display and graphics initialization/configuration. */
void disp_init(void);
/* Forces an unlock of the display. Only to be used in Epicardium */
void disp_forcelock();
void disp_update_backlight_clock(void);
......
......@@ -20,4 +20,5 @@ driver_sources = files(
'display/lcd.c',
'display/api.c',
'display/init.c',
)
......@@ -9,10 +9,8 @@
#include "drivers/drivers.h"
#include "user_core/interrupts.h"
#include "user_core/user_core.h"
#include "drivers/display/lcd.h"
#include "card10.h"
#include "display.h"
#include "leds.h"
#include "pb.h"
#include "pmic.h"
......@@ -114,15 +112,9 @@ int hardware_early_init(void)
}
/*
* This call can be removed once all gfx stuff is replaced.
*/
display_init_slim();
/*
* The bootloader has already initialized the display, so we only need
* to do the bare minimum here.
* Display
*/
lcd_reconfigure();
disp_init();
/*
* RGB LEDs
......@@ -278,7 +270,7 @@ int hardware_reset(void)
/*
* Display
*/
display_init_slim();
disp_init();
epic_disp_backlight(20);
/*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment