1
0
mirror of https://github.com/jscrane/r65emu.git synced 2025-03-12 03:34:22 +00:00

enum for orientation

This commit is contained in:
Stephen Crane 2014-12-01 08:42:24 +00:00
parent f47148382b
commit 101701f7b3
2 changed files with 5 additions and 4 deletions

View File

@ -6,7 +6,7 @@
extern UTFT utft; extern UTFT utft;
void UTFTDisplay::begin(unsigned bg, unsigned fg, int orient) { void UTFTDisplay::begin(unsigned bg, unsigned fg, orientation_t orient) {
_bg = bg; _bg = bg;
_fg = fg; _fg = fg;
utft.InitLCD(orient); utft.InitLCD(orient);

View File

@ -1,12 +1,13 @@
#ifndef __UTFT_DISPLAY_H__ #ifndef __UTFT_DISPLAY_H__
#define __UTFT_DISPLAY_H__ #define __UTFT_DISPLAY_H__
#define PORTRAIT 0 typedef enum {
#define LANDSCAPE 1 portrait, landscape
} orientation_t;
class UTFTDisplay { class UTFTDisplay {
public: public:
void begin(unsigned bg, unsigned fg, int orient = LANDSCAPE); void begin(unsigned bg, unsigned fg, orientation_t o = landscape);
void clear(); void clear();
void error(char *); void error(char *);
void status(const char *); void status(const char *);