More support functions

This commit is contained in:
Stefan `Sec` Zehl 2011-07-16 20:09:08 +02:00
parent 2a62c13c7e
commit 830ecd93d4
4 changed files with 21 additions and 0 deletions

View File

@ -1,6 +1,7 @@
#include <display.h>
#include <render.h>
#include <fonts.h>
#include <print.h>
int x=0;
int y=0;
@ -26,6 +27,14 @@ void lcdPrintIntHex(const int num){
x=DoIntX(x,y,num);
};
void lcdPrintCharHex(const uint8_t num){
x=DoCharX(x,y,num);
};
void lcdPrintShortHex(const uint16_t num){
x=DoShortX(x,y,num);
};
void lcdClear(){
x=0;y=0;
lcdFill(0);
@ -44,3 +53,7 @@ void lcdSetCrsr(int dx,int dy){
x=dx;
y=dy;
};
void lcdSetCrsrX(int dx){
x=dx;
};

View File

@ -3,8 +3,11 @@ void lcdNl(void);
void lcdPrintln(const char *string);
void lcdPrintInt(const int num);
void lcdPrintIntHex(const int num);
void lcdPrintCharHex(const uint8_t num);
void lcdPrintShortHex(const uint16_t num);
void lcdClear();
void lcdRefresh();
void lcdMoveCrsr(signed int dx,signed int dy);
void lcdSetCrsr(int dx,int dy);
void lcdSetCrsrX(int dx);

View File

@ -217,3 +217,7 @@ int DoIntX(int sx, int sy, unsigned int num){
int DoCharX(int sx, int sy, unsigned char num){
return DoIntXn(sx, sy, num, 2);
};
int DoShortX(int sx, int sy, uint16_t num){
return DoIntXn(sx, sy, num, 4);
};

View File

@ -32,5 +32,6 @@ int DoInt(int sx, int sy, int num);
int DoIntXn(int sx, int sy, unsigned int num, unsigned int maxlen);
int DoIntX(int sx, int sy, unsigned int num);
int DoCharX(int sx, int sy, unsigned char num);
int DoShortX(int sx, int sy, uint16_t num);
#endif