1
0
mirror of https://github.com/jscrane/r65emu.git synced 2024-07-18 15:28:54 +00:00

minor updates

This commit is contained in:
Stephen Crane 2014-11-13 14:10:11 +00:00
parent 5e5116229b
commit 8d28a52708
4 changed files with 13 additions and 4 deletions

View File

@ -30,8 +30,6 @@ bool hardware_reset() {
digitalWrite(TFT_BACKLIGHT, HIGH);
#endif
utft.InitLCD();
extern uint8_t SmallFont[];
utft.setFont(SmallFont);
_cpu->reset();
return sd;

View File

@ -6,6 +6,13 @@ public:
virtual void up(byte) = 0;
virtual void down(byte) = 0;
virtual void reset() = 0;
inline bool isshift(byte scan) {
return scan == 0x12 || scan == 0x59;
}
inline bool isctrl(byte scan) {
return scan == 0x14;
}
};
#endif

View File

@ -5,11 +5,14 @@
extern UTFT utft;
void UTFTDisplay::begin(unsigned bg, unsigned fg) {
void UTFTDisplay::begin(unsigned bg, unsigned fg, uint8_t *font) {
_bg = bg;
_fg = fg;
_dx = utft.getDisplayXSize();
_dy = utft.getDisplayYSize();
utft.setFont(font);
utft.setColor(fg);
_cx = utft.getFontXsize();
_cy = utft.getFontYsize();
_oxs = _dx;

View File

@ -2,10 +2,11 @@
#define __UTFT_DISPLAY_H__
class Stream;
extern uint8_t SmallFont[];
class UTFTDisplay: public Memory::Device {
public:
void begin(unsigned bg, unsigned fg);
void begin(unsigned bg, unsigned fg, uint8_t *font = SmallFont);
void clear();
void error(char *);
void status(const char *);