From 5c45cbff3f8420d526616bd680aed0f204393833 Mon Sep 17 00:00:00 2001 From: Tectu Date: Mon, 28 May 2012 19:52:19 +0200 Subject: [PATCH] fixes --- glcd.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/glcd.c b/glcd.c index c0ee01b3..add31a20 100755 --- a/glcd.c +++ b/glcd.c @@ -77,11 +77,16 @@ static void lcdSetCursor(uint16_t x, uint16_t y) { } } else if(DeviceCode==0x9919) { - lcdWriteReg(0x004e,x); - lcdWriteReg(0x004f,y); + if(orientation == portrait) { + lcdWriteReg(0x004e, x); + lcdWriteReg(0x004f, y); + } else if(orientation == landscape) { + lcdWriteReg(0x004e, y); + lcdWriteReg(0x004f, x); + } } else { - lcdWriteReg(0x0020,x); - lcdWriteReg(0x0021,y); + lcdWriteReg(0x0020, x); + lcdWriteReg(0x0021, y); } }