diff options
author | Tectu <joel@unormal.org> | 2012-05-28 19:52:19 +0200 |
---|---|---|
committer | Tectu <joel@unormal.org> | 2012-05-28 19:52:19 +0200 |
commit | 5c45cbff3f8420d526616bd680aed0f204393833 (patch) | |
tree | 2494714a167ee3c06c8260c3aecb14a551887d29 | |
parent | 7d1a46d2fcbdbecf1fba9c915ef757d66989f199 (diff) | |
download | uGFX-5c45cbff3f8420d526616bd680aed0f204393833.tar.gz uGFX-5c45cbff3f8420d526616bd680aed0f204393833.tar.bz2 uGFX-5c45cbff3f8420d526616bd680aed0f204393833.zip |
fixes
-rwxr-xr-x | glcd.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -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);
}
}
|