cleanups
This commit is contained in:
parent
475e990f3c
commit
c7f2aa6188
3 changed files with 4 additions and 8 deletions
6
glcd.c
6
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;
|
uint8_t TempChar;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
TempChar = *str++;
|
TempChar = *str++;
|
||||||
lcdDrawChar(x,y,TempChar,color,bkcolor);
|
lcdDrawChar(x, y, TempChar, color, bkcolor);
|
||||||
if(x<232) {
|
if(x<232) {
|
||||||
x+=8;
|
x+=8;
|
||||||
} else if(y<304) {
|
} 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) {
|
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);
|
lcdDrawRect(x0, y0, x1, y1, 1, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
glcd.h
2
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 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 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 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);
|
void lcdDrawChar(uint16_t x, uint16_t y, unsigned char c, uint16_t charcolor, uint16_t bkColor);
|
||||||
uint16_t lcdGetHeight(void);
|
uint16_t lcdGetHeight(void);
|
||||||
uint16_t lcdGetWidth(void);
|
uint16_t lcdGetWidth(void);
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
static struct cal cal;
|
static struct cal cal;
|
||||||
|
|
||||||
static void spicb(SPIDriver *spip);
|
|
||||||
static const SPIConfig spicfg = {
|
static const SPIConfig spicfg = {
|
||||||
NULL,
|
NULL,
|
||||||
GPIOC,
|
GPIOC,
|
||||||
|
@ -49,7 +48,7 @@ static __inline uint16_t readY(void) {
|
||||||
return y;
|
return y;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t __inline tpIRQ(void) {
|
uint8_t tpIRQ(void) {
|
||||||
return (!palReadPad(TP_PORT, TP_IRQ));
|
return (!palReadPad(TP_PORT, TP_IRQ));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,7 +111,6 @@ void tpCalibrate(void) {
|
||||||
uint16_t cross[2][2] = {{40,40}, {200, 280}};
|
uint16_t cross[2][2] = {{40,40}, {200, 280}};
|
||||||
uint16_t points[2][2];
|
uint16_t points[2][2];
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
char buffer[32];
|
|
||||||
|
|
||||||
lcdClear(Red);
|
lcdClear(Red);
|
||||||
lcdDrawString(40, 10, "Touchpad Calibration", White, Red);
|
lcdDrawString(40, 10, "Touchpad Calibration", White, Red);
|
||||||
|
|
Loading…
Add table
Reference in a new issue