cleanups
This commit is contained in:
parent
a5ae067960
commit
76fafb7dbb
6
glcd.c
6
glcd.c
@ -7,7 +7,7 @@ uint16_t lcd_width, lcd_height;
|
||||
uint16_t bgcolor=White, fgcolor=Black;
|
||||
uint16_t cx, cy;
|
||||
static uint8_t tpText=0;
|
||||
uint8_t* font;
|
||||
const uint8_t* font;
|
||||
|
||||
void lcdInit(void) {
|
||||
lld_lcdInit();
|
||||
@ -117,8 +117,8 @@ void lcdDrawLine(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t co
|
||||
}
|
||||
}
|
||||
|
||||
void lcdSetFont(uint8_t *fnt) {
|
||||
font = fnt;
|
||||
void lcdSetFont(const uint8_t *newFont) {
|
||||
font = newFont;
|
||||
}
|
||||
|
||||
void lcdSetFontTransparency(uint8_t transparency) {
|
||||
|
4
glcd.h
4
glcd.h
@ -35,7 +35,7 @@ enum transparency {solid, transparent};
|
||||
// For text rendering only
|
||||
extern uint16_t bgcolor, fgcolor;
|
||||
extern uint16_t cx, cy;
|
||||
extern uint8_t* font;
|
||||
extern const uint8_t* font;
|
||||
|
||||
// A few macros
|
||||
#define lcdGotoXY(x,y) { cx=x; cy=y; }
|
||||
@ -55,7 +55,7 @@ void lcdDrawRectString(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, const
|
||||
void lcdDrawCircle(uint16_t x, uint16_t y, uint16_t radius, uint8_t filled, uint16_t color);
|
||||
|
||||
void lcdSetFontTransparency(uint8_t transparency);
|
||||
void lcdSetFont(uint8_t *fnt);
|
||||
void lcdSetFont(const uint8_t *newFont);
|
||||
void lcdDrawChar(char c);
|
||||
void lcdPutString(const char *str);
|
||||
void lcdDrawString(uint16_t x, uint16_t y, const char *str, uint16_t color, uint16_t bkcolor);
|
||||
|
Loading…
Reference in New Issue
Block a user