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
|
* Created: 12/05/2019 14:25:06
|
||||||
* Author: David Prentice
|
* Author: David Prentice
|
||||||
*
|
*
|
||||||
* Might just as well ALWAYS use FreeFonts.
|
* 1. replace "UTFT.h" with "UTFTGLUE.h"
|
||||||
* knows FreeSmallFont, FreeBigFont and FreeSevenSegNumFont
|
* 2. replace UTFT constructor with UTFTGLUE(model_ID, 0,0,0,0,0)
|
||||||
* any other Fonts just need to #include "FreeOtherXXX.h"
|
* 3. remove smallFont, BigFont, SeveSegNumFont declarations
|
||||||
* and #define OtherXXX &FreeOtherXXX
|
* 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> @@@@@@@@@@@@@@@@@@@@@@@@@@
|
#warning @@@@@@@@@@@@@@@@@@@@@@@@@ <UTFTGLUE.h> @@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
@@ -38,8 +42,8 @@ class UTFTGLUE : public MCUFRIEND_kbv
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// UTFTGLUE() : MCUFRIEND_kbv() {}
|
// UTFTGLUE() : MCUFRIEND_kbv() {}
|
||||||
UTFTGLUE(byte model, int RS, int WR,int CS, int RST, int RD = A0)
|
UTFTGLUE(int model_ID, int RS, int WR,int CS, int RST, int RD = A0)
|
||||||
: MCUFRIEND_kbv(CS, RS, WR, RD, RST) {}
|
: MCUFRIEND_kbv(CS, RS, WR, RD, RST) { _model_ID = model_ID; }
|
||||||
void InitLCD(byte orientation=LANDSCAPE) {
|
void InitLCD(byte orientation=LANDSCAPE) {
|
||||||
MCUFRIEND_kbv::reset();
|
MCUFRIEND_kbv::reset();
|
||||||
uint16_t ID = MCUFRIEND_kbv::readID();
|
uint16_t ID = MCUFRIEND_kbv::readID();
|
||||||
@@ -143,6 +147,7 @@ class UTFTGLUE : public MCUFRIEND_kbv
|
|||||||
// void LCD_Write_DATA(char VH,char VL);
|
// void LCD_Write_DATA(char VH,char VL);
|
||||||
// void dispBitmap(File inFile);
|
// void dispBitmap(File inFile);
|
||||||
uint8_t _ascend, _descend, _dig_wid;
|
uint8_t _ascend, _descend, _dig_wid;
|
||||||
|
uint16_t _model_ID;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
uint16_t _fcolor;
|
uint16_t _fcolor;
|
||||||
|
|||||||
Reference in New Issue
Block a user