Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
#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); ...@@ -59,6 +59,8 @@ int pmic_read_amux(enum pmic_amux_signal sig, float *result);
/* ---------- Display ------------------------------------------------------ */ /* ---------- Display ------------------------------------------------------ */
/* Do display and graphics initialization/configuration. */
void disp_init(void);
/* Forces an unlock of the display. Only to be used in Epicardium */ /* Forces an unlock of the display. Only to be used in Epicardium */
void disp_forcelock(); void disp_forcelock();
void disp_update_backlight_clock(void); void disp_update_backlight_clock(void);
......
...@@ -20,4 +20,5 @@ driver_sources = files( ...@@ -20,4 +20,5 @@ driver_sources = files(
'display/lcd.c', 'display/lcd.c',
'display/api.c', 'display/api.c',
'display/init.c',
) )
...@@ -9,10 +9,8 @@ ...@@ -9,10 +9,8 @@
#include "drivers/drivers.h" #include "drivers/drivers.h"
#include "user_core/interrupts.h" #include "user_core/interrupts.h"
#include "user_core/user_core.h" #include "user_core/user_core.h"
#include "drivers/display/lcd.h"
#include "card10.h" #include "card10.h"
#include "display.h"
#include "leds.h" #include "leds.h"
#include "pb.h" #include "pb.h"
#include "pmic.h" #include "pmic.h"
...@@ -114,15 +112,9 @@ int hardware_early_init(void) ...@@ -114,15 +112,9 @@ int hardware_early_init(void)
} }
/* /*
* This call can be removed once all gfx stuff is replaced. * Display
*/
display_init_slim();
/*
* The bootloader has already initialized the display, so we only need
* to do the bare minimum here.
*/ */
lcd_reconfigure(); disp_init();
/* /*
* RGB LEDs * RGB LEDs
...@@ -278,7 +270,7 @@ int hardware_reset(void) ...@@ -278,7 +270,7 @@ int hardware_reset(void)
/* /*
* Display * Display
*/ */
display_init_slim(); disp_init();
epic_disp_backlight(20); epic_disp_backlight(20);
/* /*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment