moved lcdSetFont() from macro to function

This commit is contained in:
Tectu 2012-06-13 21:09:26 +02:00
parent 25ff65d207
commit 6599378981
2 changed files with 7 additions and 2 deletions

6
glcd.c
View File

@ -118,8 +118,12 @@ 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 lcdEnableTransparentText(uint8_t en) {
tpText=en;
tpText = en;
}
void lcdDrawChar(char c) {

3
glcd.h
View File

@ -3,6 +3,7 @@
#include "ch.h"
#include "hal.h"
#include "fonts.h"
#include "drivers/ssd1289_lld.h"
#include "drivers/s6d1121_lld.h"
@ -38,7 +39,6 @@ extern const uint8_t* font;
// A few macros
#define lcdGotoXY(x,y) { cx=x; cy=y; }
#define lcdGetCurFontHeight() (font[FONT_TABLE_HEIGHT_IDX])
#define lcdSetFont(fnt) { font=fnt; }
void lcdInit(void);
@ -54,6 +54,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 lcdEnableTransparentText(uint8_t en);
void lcdSetFont(uint8_t *fnt);
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);