Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Unified Diff: target/dartuinoP0/memory_lcd.c

Issue 1741463002: [target][dartuinoP0] Allow for varying framebuffer format and stride. (Closed) Base URL: https://github.com/littlekernel/lk.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « target/dartuinoP0/include/target/display/LS027B7DH01.h ('k') | target/dartuinoP0/rules.mk » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: target/dartuinoP0/memory_lcd.c
diff --git a/target/dartuinoP0/memory_lcd.c b/target/dartuinoP0/memory_lcd.c
index 4e9d9bf6b871bd7317f23b2581694d464856e6ee..1f792f3349d08538ffcc82c6f59d7bc403048284 100644
--- a/target/dartuinoP0/memory_lcd.c
+++ b/target/dartuinoP0/memory_lcd.c
@@ -27,7 +27,6 @@
#include <rand.h>
#include <dev/display.h>
-#include <lib/gfx.h>
#include <platform/gpio.h>
#include <target/memory_lcd.h>
@@ -35,6 +34,8 @@
#include <target/display/LS013B7DH06.h>
#elif defined (LCD_LS027B7DH01)
#include <target/display/LS027B7DH01.h>
+#elif defined (LCD_LS013B7DH03)
+#include <target/display/LS013B7DH03.h>
#endif
#define LOCAL_TRACE 0
@@ -51,7 +52,7 @@ SPI_HandleTypeDef SpiHandle;
#define VCOM_HI 0x02
#define VCOM_LO 0x00
-static uint8_t framebuffer[MLCD_HEIGHT *MLCD_WIDTH];
+static uint8_t framebuffer[MLCD_HEIGHT * FB_STRIDE];
static uint8_t vcom_state;
static void chip_select(bool s)
@@ -157,10 +158,10 @@ status_t display_get_info(struct display_info *info)
LTRACEF("display_info %p\n", info);
info->framebuffer = (void *)framebuffer;
- info->format = MLCD_GFX_FORMAT;
+ info->format = FB_FORMAT;
info->width = MLCD_WIDTH;
info->height = MLCD_HEIGHT;
- info->stride = MLCD_WIDTH;
+ info->stride = FB_STRIDE;
info->flush = mlcd_flush;
return NO_ERROR;
« no previous file with comments | « target/dartuinoP0/include/target/display/LS027B7DH01.h ('k') | target/dartuinoP0/rules.mk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698