1
0
mirror of https://github.com/jscrane/r65emu.git synced 2024-12-21 12:29:51 +00:00
This commit is contained in:
Stephen Crane 2018-11-10 13:34:36 +00:00
parent 67540df29f
commit 8836367767
3 changed files with 6 additions and 5 deletions

View File

@ -1,7 +1,7 @@
// TFT display...
#define USE_ESPI
//#define USER_SETUP_LOADED
//#define ILI9163_DRIVER
//#define ILI9341_DRIVER
//#define TFT_CS 5
//#define TFT_DC 2
//#define TFT_MOSI 23

View File

@ -2,7 +2,7 @@
#define USE_ESPI
//must define these in Makefile (or platformio)
//#define USER_SETUP_LOADED
//#define ILI9163_DRIVER
//#define ILI9341_DRIVER
//#define TFT_CS PIN_D6
//#define TFT_DC PIN_D8
//#define TFT_WIDTH 240

View File

@ -90,9 +90,10 @@ void TFTDisplay::status(const char *s) {
utft.print(s, xs, y);
_oxs = xs;
#elif defined(USE_ESPI)
espi.fillRect(_oxs, _dx, _dy - _cy, _dy, _bg);
espi.fillRect(_dx - _oxs, _dy - _cy, _oxs, _cy, _bg);
_oxs = espi.textWidth(s);
espi.drawRightString(s, _oxs, _dy - _cy, 0);
espi.setTextDatum(BR_DATUM);
espi.drawString(s, _dx, _dy);
#endif
}
@ -101,6 +102,6 @@ void TFTDisplay::drawPixel(unsigned x, unsigned y, colour_t col) {
utft.setColor(col);
utft.drawPixel(x, y);
#elif defined(USE_ESPI)
espi.drawPixel(_dx - x, y, col);
espi.drawPixel(x, y, col);
#endif
}