aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTectu <joel@unormal.org>2012-06-04 21:11:19 +0200
committerTectu <joel@unormal.org>2012-06-04 21:11:19 +0200
commitc7f2aa6188f7c638aa5dd542d40be93fbbcab35a (patch)
tree222ed1e3fefee85318fa5aff403d72cd0008ff01
parent475e990f3c6bfc4cd0e5df4b7ada6eb6fb29961c (diff)
downloaduGFX-c7f2aa6188f7c638aa5dd542d40be93fbbcab35a.tar.gz
uGFX-c7f2aa6188f7c638aa5dd542d40be93fbbcab35a.tar.bz2
uGFX-c7f2aa6188f7c638aa5dd542d40be93fbbcab35a.zip
cleanups
-rw-r--r--glcd.c6
-rw-r--r--glcd.h2
-rw-r--r--touchpad.c4
3 files changed, 4 insertions, 8 deletions
diff --git a/glcd.c b/glcd.c
index 6e511a23..bfb1f17d 100644
--- a/glcd.c
+++ b/glcd.c
@@ -275,12 +275,12 @@ void lcdDrawChar(uint16_t x, uint16_t y, unsigned char c, uint16_t charcolor, ui
}
}
-void lcdDrawString(uint16_t x, uint16_t y, uint8_t *str, uint16_t color, uint16_t bkcolor) {
+void lcdDrawString(uint16_t x, uint16_t y, unsigned char *str, uint16_t color, uint16_t bkcolor) {
uint8_t TempChar;
do {
TempChar = *str++;
- lcdDrawChar(x,y,TempChar,color,bkcolor);
+ lcdDrawChar(x, y, TempChar, color, bkcolor);
if(x<232) {
x+=8;
} else if(y<304) {
@@ -306,8 +306,6 @@ uint16_t lcdBGR2RGB(uint16_t color) {
}
void lcdFillArea(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t color) {
- uint16_t i;
-
lcdDrawRect(x0, y0, x1, y1, 1, color);
}
diff --git a/glcd.h b/glcd.h
index 15dea81e..16ce20bf 100644
--- a/glcd.h
+++ b/glcd.h
@@ -59,7 +59,7 @@ void lcdDrawLine(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t co
void lcdDrawRect(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint8_t filled, uint16_t color);
void lcdDrawRectString(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint8_t* str, uint16_t fontColor, uint16_t bkColor);
void lcdDrawCircle(uint16_t x, uint16_t y, uint16_t radius, uint8_t filled, uint16_t color);
-void lcdDrawString(uint16_t x, uint16_t y, uint8_t *str,uint16_t color, uint16_t bkColor);
+void lcdDrawString(uint16_t x, uint16_t y, unsigned char *str, uint16_t color, uint16_t bkColor);
void lcdDrawChar(uint16_t x, uint16_t y, unsigned char c, uint16_t charcolor, uint16_t bkColor);
uint16_t lcdGetHeight(void);
uint16_t lcdGetWidth(void);
diff --git a/touchpad.c b/touchpad.c
index 6570a45c..87bdcd49 100644
--- a/touchpad.c
+++ b/touchpad.c
@@ -3,7 +3,6 @@
static struct cal cal;
-static void spicb(SPIDriver *spip);
static const SPIConfig spicfg = {
NULL,
GPIOC,
@@ -49,7 +48,7 @@ static __inline uint16_t readY(void) {
return y;
}
-uint8_t __inline tpIRQ(void) {
+uint8_t tpIRQ(void) {
return (!palReadPad(TP_PORT, TP_IRQ));
}
@@ -112,7 +111,6 @@ void tpCalibrate(void) {
uint16_t cross[2][2] = {{40,40}, {200, 280}};
uint16_t points[2][2];
uint8_t i;
- char buffer[32];
lcdClear(Red);
lcdDrawString(40, 10, "Touchpad Calibration", White, Red);