diff options
author | Tectu <joel@unormal.org> | 2012-05-31 14:34:13 +0200 |
---|---|---|
committer | Tectu <joel@unormal.org> | 2012-05-31 14:34:13 +0200 |
commit | 92329beb902e3ea37f59f05e9898b8b5c94f437e (patch) | |
tree | b10ad1666d30a6ef759d8404ddf7efcd6baf246e /glcd.c | |
parent | 95133a3544b9f59e0145346b7ca77c8de8ee0d03 (diff) | |
download | uGFX-92329beb902e3ea37f59f05e9898b8b5c94f437e.tar.gz uGFX-92329beb902e3ea37f59f05e9898b8b5c94f437e.tar.bz2 uGFX-92329beb902e3ea37f59f05e9898b8b5c94f437e.zip |
fixes
Diffstat (limited to 'glcd.c')
-rwxr-xr-x | glcd.c | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -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;
|