aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--glcd.c4
-rw-r--r--glcd.h3
-rw-r--r--glcdconf.h2
3 files changed, 4 insertions, 5 deletions
diff --git a/glcd.c b/glcd.c
index df413154..52318a0c 100644
--- a/glcd.c
+++ b/glcd.c
@@ -11,8 +11,8 @@ const uint8_t* font;
void lcdInit(void) {
lld_lcdInit();
- lcd_width = SCREEN_WIDTH;
- lcd_height = SCREEN_HEIGHT;
+ lcd_width = lcdGetWidth();
+ lcd_height = lcdGetHeight();
lcdSetOrientation(portrait);
lcdSetFontTransparency(transparent);
diff --git a/glcd.h b/glcd.h
index 222a7eb2..29f92f68 100644
--- a/glcd.h
+++ b/glcd.h
@@ -7,9 +7,6 @@
#include "ssd1289_lld.h"
#include "s6d1121_lld.h"
-#define SCREEN_WIDTH 240
-#define SCREEN_HEIGHT 320
-
#define PORTRAIT (lcdGetOrientation() == portrait || lcdGetOrientation() == portraitInv)
#define LANDSCAPE (lcdGetOrientation() == landscape || lcdGetOrientation() == landscapeInv)
diff --git a/glcdconf.h b/glcdconf.h
index 657ee32d..b6445e93 100644
--- a/glcdconf.h
+++ b/glcdconf.h
@@ -1,6 +1,8 @@
#ifndef GLCDCONF_H
#define GLCDCONF_H
+#define SCREEN_WIDTH 240
+#define SCREEN_HEIGHT 320
/***** LCD CONTROLLER *****/
#define LCD_USE_SSD1289