mirror of
https://github.com/YuzuZensai/MCUFRIEND_kbv.git
synced 2026-01-31 14:57:48 +00:00
set ID from constructor on write-only displays
This commit is contained in:
17
UTFTGLUE.h
17
UTFTGLUE.h
@@ -4,10 +4,14 @@
|
||||
* Created: 12/05/2019 14:25:06
|
||||
* Author: David Prentice
|
||||
*
|
||||
* Might just as well ALWAYS use FreeFonts.
|
||||
* knows FreeSmallFont, FreeBigFont and FreeSevenSegNumFont
|
||||
* any other Fonts just need to #include "FreeOtherXXX.h"
|
||||
* and #define OtherXXX &FreeOtherXXX
|
||||
* 1. replace "UTFT.h" with "UTFTGLUE.h"
|
||||
* 2. replace UTFT constructor with UTFTGLUE(model_ID, 0,0,0,0,0)
|
||||
* 3. remove smallFont, BigFont, SeveSegNumFont declarations
|
||||
* 4. UTFTGLUE uses FreeFonts or NULL (System 5x7)
|
||||
*
|
||||
* 5. knows FreeSmallFont, FreeBigFont and FreeSevenSegNumFont
|
||||
* 6. any other Fonts just need to #include "FreeOtherXXX.h"
|
||||
* 7. #define OtherXXX &FreeOtherXXX
|
||||
*/
|
||||
|
||||
#warning @@@@@@@@@@@@@@@@@@@@@@@@@ <UTFTGLUE.h> @@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
@@ -38,8 +42,8 @@ class UTFTGLUE : public MCUFRIEND_kbv
|
||||
{
|
||||
public:
|
||||
// UTFTGLUE() : MCUFRIEND_kbv() {}
|
||||
UTFTGLUE(byte model, int RS, int WR,int CS, int RST, int RD = A0)
|
||||
: MCUFRIEND_kbv(CS, RS, WR, RD, RST) {}
|
||||
UTFTGLUE(int model_ID, int RS, int WR,int CS, int RST, int RD = A0)
|
||||
: MCUFRIEND_kbv(CS, RS, WR, RD, RST) { _model_ID = model_ID; }
|
||||
void InitLCD(byte orientation=LANDSCAPE) {
|
||||
MCUFRIEND_kbv::reset();
|
||||
uint16_t ID = MCUFRIEND_kbv::readID();
|
||||
@@ -143,6 +147,7 @@ class UTFTGLUE : public MCUFRIEND_kbv
|
||||
// void LCD_Write_DATA(char VH,char VL);
|
||||
// void dispBitmap(File inFile);
|
||||
uint8_t _ascend, _descend, _dig_wid;
|
||||
uint16_t _model_ID;
|
||||
|
||||
protected:
|
||||
uint16_t _fcolor;
|
||||
|
||||
Reference in New Issue
Block a user