aboutsummaryrefslogtreecommitdiffstats
path: root/glcd.c
diff options
context:
space:
mode:
authorTectu <joel@unormal.org>2012-05-31 14:34:13 +0200
committerTectu <joel@unormal.org>2012-05-31 14:34:13 +0200
commit92329beb902e3ea37f59f05e9898b8b5c94f437e (patch)
treeb10ad1666d30a6ef759d8404ddf7efcd6baf246e /glcd.c
parent95133a3544b9f59e0145346b7ca77c8de8ee0d03 (diff)
downloaduGFX-92329beb902e3ea37f59f05e9898b8b5c94f437e.tar.gz
uGFX-92329beb902e3ea37f59f05e9898b8b5c94f437e.tar.bz2
uGFX-92329beb902e3ea37f59f05e9898b8b5c94f437e.zip
fixes
Diffstat (limited to 'glcd.c')
-rwxr-xr-xglcd.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/glcd.c b/glcd.c
index 1c67841b..55c1dc7a 100755
--- a/glcd.c
+++ b/glcd.c
@@ -69,11 +69,17 @@ static __inline uint16_t lcdReadReg(uint16_t lcdReg) {
}
uint16_t lcdGetHeight(void) {
- return lcd_height;
+ if(orientation == portrait || orientation == portraitInv)
+ return lcd_height;
+ else if(orientation == landscape || orientation == landscapeInv)
+ return lcd_width;
}
uint16_t lcdGetWidth(void) {
- return lcd_width;
+ if(orientation == portrait || orientation == portraitInv)
+ return lcd_width;
+ else if(orientation == landscape || orientation == landscapeInv)
+ return lcd_height;
}
static void lcdSetCursor(uint16_t x, uint16_t y) {
@@ -252,6 +258,12 @@ void lcdDrawLine(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t co
}
}
+void lcdDrawArrow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t color) {
+ lcdDrawLine(x0, y0, x1, y1, color);
+ lcdDrawLine(x1, y1, x1-5, y1+5, color);
+ lcdDrawLine(x1, y1, x1-5, y1-5, color);
+}
+
void lcdDrawChar(uint16_t x, uint16_t y, unsigned char c, uint16_t charcolor, uint16_t bkcolor) {
uint16_t i = 0;
uint16_t j = 0;