Commit 17af145a authored by Rahix's avatar Rahix
Browse files

feat(epicardium): Splice in the new LCD driver

To not try and replace the entire gfx stack at once, start by "splicing
in" the new driver for the two to work alongside each other.  Primarily
the new driver takes control now and we reconfigure the orientation on
the fly whenever the old driver wants to update the screen.
parent 59679a8a
......@@ -8,6 +8,7 @@
#include "task.h"
#include "tmr.h"
#include "tmr_utils.h"
#include "drivers/display/lcd.h"
static TaskHandle_t lock = NULL;
......@@ -266,7 +267,13 @@ int epic_disp_update()
return cl;
}
/*
* Flip the screen because gfx still works with the upside down
* framebuffer.
*/
lcd_set_screenflip(true);
gfx_update(&display_screen);
lcd_set_screenflip(false);
return 0;
}
......@@ -277,7 +284,13 @@ int epic_disp_framebuffer(union disp_framebuffer *fb)
return cl;
}
LCD_Set(fb->raw, sizeof(fb->raw));
/*
* Flip the screen because that's what this API call historically
* expects.
*/
lcd_set_screenflip(true);
lcd_write_fb(fb->raw);
lcd_set_screenflip(false);
return 0;
}
......
......@@ -9,6 +9,7 @@
#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"
......@@ -113,11 +114,16 @@ int hardware_early_init(void)
}
/*
* The bootloader has already initialized the display, so we only need
* to do the bare minimum here (mostly the gfx datastructures).
* 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();
/*
* RGB LEDs
*/
......
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