| Index: target/stm32f746g-disco/lcd.c
|
| diff --git a/target/stm32f746g-disco/lcd.c b/target/stm32f746g-disco/lcd.c
|
| index fd0f6bbe5042731235508419f6f8eff1b9eefd1e..3a27996494cc774339043f8864ca445ce56fa8ab 100644
|
| --- a/target/stm32f746g-disco/lcd.c
|
| +++ b/target/stm32f746g-disco/lcd.c
|
| @@ -54,7 +54,6 @@
|
| #include <target.h>
|
| #include <compiler.h>
|
| #include <string.h>
|
| -#include <lib/gfx.h>
|
| #include <dev/gpio.h>
|
| #include <dev/display.h>
|
| #include <kernel/novm.h>
|
| @@ -402,14 +401,37 @@ uint8_t BSP_LCD_Init(void)
|
| }
|
|
|
| /* LK display (lib/gfx.h) calls this function */
|
| -status_t display_get_info(struct display_info *info)
|
| +status_t display_get_framebuffer(struct display_framebuffer *fb)
|
| {
|
| - info->framebuffer = (void *)ltdc_handle.LayerCfg[active_layer].FBStartAdress;
|
| + fb->image.pixels = (void *)ltdc_handle.LayerCfg[active_layer].FBStartAdress;
|
|
|
| if (ltdc_handle.LayerCfg[active_layer].PixelFormat == LTDC_PIXEL_FORMAT_ARGB8888) {
|
| - info->format = GFX_FORMAT_ARGB_8888;
|
| + fb->format = DISPLAY_FORMAT_ARGB_8888;
|
| + fb->image.format = IMAGE_FORMAT_ARGB_8888;
|
| + fb->image.rowbytes = BSP_LCD_GetXSize() * 4;
|
| } else if (ltdc_handle.LayerCfg[active_layer].PixelFormat == LTDC_PIXEL_FORMAT_RGB565) {
|
| - info->format = GFX_FORMAT_RGB_565;
|
| + fb->format = DISPLAY_FORMAT_RGB_565;
|
| + fb->image.format = IMAGE_FORMAT_RGB_565;
|
| + fb->image.rowbytes = BSP_LCD_GetXSize() * 2;
|
| + } else {
|
| + panic("unhandled pixel format\n");
|
| + return ERR_NOT_FOUND;
|
| + }
|
| +
|
| + fb->image.width = BSP_LCD_GetXSize();
|
| + fb->image.height = BSP_LCD_GetYSize();
|
| + fb->image.stride = BSP_LCD_GetXSize();
|
| + fb->flush = NULL;
|
| +
|
| + return NO_ERROR;
|
| +}
|
| +
|
| +status_t display_get_info(struct display_info *info)
|
| +{
|
| + if (ltdc_handle.LayerCfg[active_layer].PixelFormat == LTDC_PIXEL_FORMAT_ARGB8888) {
|
| + info->format = DISPLAY_FORMAT_ARGB_8888;
|
| + } else if (ltdc_handle.LayerCfg[active_layer].PixelFormat == LTDC_PIXEL_FORMAT_RGB565) {
|
| + info->format = DISPLAY_FORMAT_RGB_565;
|
| } else {
|
| panic("unhandled pixel format\n");
|
| return ERR_NOT_FOUND;
|
| @@ -417,9 +439,6 @@ status_t display_get_info(struct display_info *info)
|
|
|
| info->width = BSP_LCD_GetXSize();
|
| info->height = BSP_LCD_GetYSize();
|
| - info->stride = BSP_LCD_GetXSize();
|
| - info->flush = NULL;
|
|
|
| return NO_ERROR;
|
| }
|
| -
|
|
|