1
0
mirror of https://github.com/jscrane/r65emu.git synced 2024-07-17 08:28:59 +00:00

display orientation

This commit is contained in:
Stephen Crane 2014-11-30 21:17:08 +00:00
parent c8d22f487c
commit f47148382b
3 changed files with 6 additions and 4 deletions

View File

@ -20,7 +20,6 @@ bool hardware_reset() {
extern SPIClass SPIRAM_DEV;
SPIRAM_DEV.begin();
SPIRAM_DEV.setModule(SPIRAM_SPI);
// SPIRAM_DEV.setClockDivider(SPI_CLOCK_DIV2);
SPIRAM_DEV.setClockDivider(1);
SPIRAM_DEV.setDataMode(SPI_MODE0);
@ -30,7 +29,6 @@ bool hardware_reset() {
#if defined(TFT_BACKLIGHT)
digitalWrite(TFT_BACKLIGHT, HIGH);
#endif
utft.InitLCD();
_cpu->reset();
return sd;

View File

@ -6,9 +6,10 @@
extern UTFT utft;
void UTFTDisplay::begin(unsigned bg, unsigned fg) {
void UTFTDisplay::begin(unsigned bg, unsigned fg, int orient) {
_bg = bg;
_fg = fg;
utft.InitLCD(orient);
_dx = utft.getDisplayXSize();
_dy = utft.getDisplayYSize();

View File

@ -1,9 +1,12 @@
#ifndef __UTFT_DISPLAY_H__
#define __UTFT_DISPLAY_H__
#define PORTRAIT 0
#define LANDSCAPE 1
class UTFTDisplay {
public:
void begin(unsigned bg, unsigned fg);
void begin(unsigned bg, unsigned fg, int orient = LANDSCAPE);
void clear();
void error(char *);
void status(const char *);