mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-09 23:11:10 +00:00
refactor(core): use function to get GFXMMU LUT in ltdc_dsi driver
[no changelog]
This commit is contained in:
parent
b76a2161a1
commit
36d0ce79f9
@ -8,8 +8,6 @@
|
||||
extern uint8_t physical_frame_buffer_0[PHYSICAL_FRAME_BUFFER_SIZE];
|
||||
extern uint8_t physical_frame_buffer_1[PHYSICAL_FRAME_BUFFER_SIZE];
|
||||
|
||||
extern const uint32_t gfxmmu_lut_config[2 * GFXMMU_LUT_SIZE];
|
||||
|
||||
bool display_gfxmmu_init(display_driver_t *drv) {
|
||||
__HAL_RCC_GFXMMU_FORCE_RESET();
|
||||
__HAL_RCC_GFXMMU_RELEASE_RESET();
|
||||
@ -52,7 +50,7 @@ bool display_gfxmmu_init(display_driver_t *drv) {
|
||||
|
||||
/* Initialize LUT */
|
||||
if (HAL_GFXMMU_ConfigLut(&drv->hlcd_gfxmmu, 0, LCD_HEIGHT,
|
||||
(uint32_t)&gfxmmu_lut_config) != HAL_OK) {
|
||||
(uint32_t)panel_lut_get()) != HAL_OK) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -81,6 +81,8 @@ void display_ensure_refreshed(void);
|
||||
bool panel_init(display_driver_t *drv);
|
||||
|
||||
#ifdef DISPLAY_GFXMMU
|
||||
const uint32_t *panel_lut_get(void);
|
||||
|
||||
bool display_gfxmmu_init(display_driver_t *drv);
|
||||
#endif
|
||||
|
||||
|
@ -966,6 +966,8 @@ const uint32_t gfxmmu_lut_config[2 * GFXMMU_LUT_SIZE] = {
|
||||
0x000B2ED0 // GFXMMU_LUT479H
|
||||
};
|
||||
|
||||
const uint32_t* panel_lut_get(void) { return gfxmmu_lut_config; }
|
||||
|
||||
bool panel_init(display_driver_t* drv) {
|
||||
HAL_StatusTypeDef ret;
|
||||
/* CMD Mode */
|
||||
|
Loading…
Reference in New Issue
Block a user