clean up
This commit is contained in:
parent
045cc3cac7
commit
976ab0ffd5
1 changed files with 20 additions and 24 deletions
12
glcd.c
12
glcd.c
|
@ -257,23 +257,19 @@ void lcdDrawChar(uint16_t x, uint16_t y, unsigned char c, uint16_t charcolor, ui
|
|||
uint16_t j = 0;
|
||||
unsigned char buffer[16];
|
||||
unsigned char tmp_char=0;
|
||||
|
||||
GetASCIICode(buffer,c);
|
||||
for (i=0;i<16;i++)
|
||||
{
|
||||
|
||||
for (i=0;i<16;i++) {
|
||||
tmp_char=buffer[i];
|
||||
for (j=0;j<8;j++)
|
||||
{
|
||||
for (j=0;j<8;j++) {
|
||||
if (((tmp_char >> (7-j)) & 0x01) == 0x01)
|
||||
{
|
||||
lcdDrawPixel(x+j,y+i,charcolor);
|
||||
}
|
||||
else
|
||||
{
|
||||
lcdDrawPixel(x+j,y+i,bkcolor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void lcdDrawString(uint16_t x, uint16_t y, uint8_t *str, uint16_t color, uint16_t bkcolor) {
|
||||
uint8_t TempChar;
|
||||
|
|
Loading…
Add table
Reference in a new issue