Libreria Pantalla Arduino
Libreria Pantalla Arduino
SHIELD
// OR BREAKOUT BOARD USAGE. SEE RELEVANT COMMENTS IN
Adafruit_TFTLCD.h
#if defined(__SAM3X8E__)
#include <include/pio.h>
#define PROGMEM
#define pgm_read_byte(addr) (*(const unsigned char *)(addr))
#define pgm_read_word(addr) (*(const unsigned short *)(addr))
#endif
#ifdef __AVR__
#include <avr/pgmspace.h>
#endif
#include "pins_arduino.h"
#include "wiring_private.h"
#include "Adafruit_TFTLCD.h"
#include "pin_magic.h"
#define ID_7575
#define ID_9341
#define ID_HX8357D 3
#define ID_S6D0154 4
#define ID_ILI9327 5
#define ID_UNKNOWN 0xFF
#include "registers.h"
#ifndef USE_ADAFRUIT_SHIELD_PINOUT
// Convert pin numbers to registers and bitmasks
_reset
= reset;
#ifdef __AVR__
csPort
= portOutputRegister(digitalPinToPort(cs));
cdPort
= portOutputRegister(digitalPinToPort(cd));
wrPort
= portOutputRegister(digitalPinToPort(wr));
rdPort
= portOutputRegister(digitalPinToPort(rd));
#endif
#if defined(__SAM3X8E__)
csPort
= digitalPinToPort(cs);
cdPort
= digitalPinToPort(cd);
wrPort
= digitalPinToPort(wr);
rdPort
= digitalPinToPort(rd);
#endif
csPinSet = digitalPinToBitMask(cs);
cdPinSet = digitalPinToBitMask(cd);
wrPinSet = digitalPinToBitMask(wr);
rdPinSet = digitalPinToBitMask(rd);
csPinUnset = ~csPinSet;
cdPinUnset = ~cdPinSet;
wrPinUnset = ~wrPinSet;
rdPinUnset = ~rdPinSet;
#ifdef __AVR__
*csPort |= csPinSet; // Set all control bits to HIGH (idle)
*cdPort |= cdPinSet; // Signals are ACTIVE LOW
*wrPort |= wrPinSet;
*rdPort |= rdPinSet;
#endif
#if defined(__SAM3X8E__)
csPort->PIO_SODR |= csPinSet; // Set all control bits to HIGH (idle)
cdPort->PIO_SODR |= cdPinSet; // Signals are ACTIVE LOW
wrPort->PIO_SODR |= wrPinSet;
rdPort->PIO_SODR |= rdPinSet;
#endif
pinMode(cs, OUTPUT);
// Enable outputs
pinMode(cd, OUTPUT);
pinMode(wr, OUTPUT);
pinMode(rd, OUTPUT);
if(reset) {
digitalWrite(reset, HIGH);
pinMode(reset, OUTPUT);
}
#endif
init();
}
#ifdef USE_ADAFRUIT_SHIELD_PINOUT
CS_IDLE; // Set all control bits to idle state
WR_IDLE;
RD_IDLE;
CD_DATA;
digitalWrite(5, HIGH); // Reset line
pinMode(A3, OUTPUT); // Enable outputs
pinMode(A2, OUTPUT);
pinMode(A1, OUTPUT);
pinMode(A0, OUTPUT);
pinMode( 5, OUTPUT);
#endif
rotation = 0;
cursor_y = cursor_x = 0;
textsize = 1;
textcolor = 0xFFFF;
_width
= TFTWIDTH;
_height = TFTHEIGHT;
}
, 0x89,
0x29
, 0x8F,
0x2B
, 0x02,
0xE2
, 0x00,
0xE4
, 0x01,
0xE5
, 0x10,
0xE6
, 0x01,
0xE7
, 0x10,
0xE8
, 0x70,
0xF2
, 0x00,
0xEA
, 0x00,
0xEB
, 0x20,
0xEC
, 0x3C,
0xED
, 0xC8,
0xE9
, 0x38,
0xF1
, 0x01,
0x1B
, 0x1A,
0x1A
, 0x02,
0x24
, 0x61,
0x25
, 0x5C,
0x18
, 0x36,
0x19
, 0x01,
0x1F
, 0x88,
TFTLCD_DELAY , 5 , // delay 5 ms
0x1F
, 0x80,
TFTLCD_DELAY , 5 ,
0x1F
, 0x90,
TFTLCD_DELAY , 5 ,
0x1F
, 0xD4,
TFTLCD_DELAY , 5 ,
0x17
, 0x05,
0x36
, 0x09,
0x28
, 0x38,
TFTLCD_DELAY , 40 ,
0x28
, 0x3C,
0x02
, 0x00,
0x03
, 0x00,
0x04
, 0x00,
0x05
, 0xEF,
0x06
, 0x00,
0x07
, 0x00,
0x08
, 0x01,
0x09
, 0x3F
};
HX8357_SWRESET, 0,
HX8357D_SETC, 3, 0xFF, 0x83, 0x57,
TFTLCD_DELAY, 250,
HX8357_SETRGB, 4, 0x00, 0x00, 0x06, 0x06,
HX8357D_SETCOM, 1, 0x25, // -1.52V
HX8357_SETOSC, 1, 0x68, // Normal mode 70Hz, Idle mode 55 Hz
HX8357_SETPANEL, 1, 0x05, // BGR, Gate direction swapped
HX8357_SETPWR1, 6, 0x00, 0x15, 0x1C, 0x1C, 0x83, 0xAA,
HX8357D_SETSTBA, 6, 0x50, 0x50, 0x01, 0x3C, 0x1E, 0x08,
// MEME GAMMA HERE
HX8357D_SETCYC, 7, 0x02, 0x40, 0x00, 0x2A, 0x2A, 0x0D, 0x78,
HX8357_COLMOD, 1, 0x55,
HX8357_MADCTL, 1, 0xC0,
HX8357_TEON, 1, 0x00,
HX8357_TEARLINE, 2, 0x00, 0x02,
HX8357_SLPOUT, 0,
TFTLCD_DELAY, 150,
HX8357_DISPON, 0,
TFTLCD_DELAY, 50,
};
// 50 millisecond delay
ILI932X_DRIV_OUT_CTRL
, 0x0100,
ILI932X_DRIV_WAV_CTRL
, 0x0700,
ILI932X_ENTRY_MOD
, 0x1030,
ILI932X_RESIZE_CTRL
, 0x0000,
ILI932X_DISP_CTRL2
, 0x0202,
ILI932X_DISP_CTRL3
, 0x0000,
ILI932X_DISP_CTRL4
, 0x0000,
ILI932X_RGB_DISP_IF_CTRL1, 0x0,
ILI932X_FRM_MARKER_POS , 0x0,
ILI932X_RGB_DISP_IF_CTRL2, 0x0,
ILI932X_POW_CTRL1
, 0x0000,
ILI932X_POW_CTRL2
, 0x0007,
ILI932X_POW_CTRL3
, 0x0000,
ILI932X_POW_CTRL4
, 0x0000,
TFTLCD_DELAY
, 200,
ILI932X_POW_CTRL1
, 0x1690,
ILI932X_POW_CTRL2
, 0x0227,
TFTLCD_DELAY
, 50,
ILI932X_POW_CTRL3
TFTLCD_DELAY
, 0x001A,
, 50,
ILI932X_POW_CTRL4
, 0x1800,
ILI932X_POW_CTRL7
, 0x002A,
TFTLCD_DELAY
, 50,
ILI932X_GAMMA_CTRL1
, 0x0000,
ILI932X_GAMMA_CTRL2
, 0x0000,
ILI932X_GAMMA_CTRL3
, 0x0000,
ILI932X_GAMMA_CTRL4
, 0x0206,
ILI932X_GAMMA_CTRL5
, 0x0808,
ILI932X_GAMMA_CTRL6
, 0x0007,
ILI932X_GAMMA_CTRL7
, 0x0201,
ILI932X_GAMMA_CTRL8
, 0x0000,
ILI932X_GAMMA_CTRL9
, 0x0000,
ILI932X_GAMMA_CTRL10
, 0x0000,
ILI932X_GRAM_HOR_AD
, 0x0000,
ILI932X_GRAM_VER_AD
, 0x0000,
ILI932X_HOR_START_AD
, 0x0000,
ILI932X_HOR_END_AD
, 0x00EF,
ILI932X_VER_START_AD
, 0X0000,
ILI932X_VER_END_AD
, 0x013F,
};
0x29, 0,
0x2C, 0,
};
reset();
delay(200);
uint16_t a, d;
driver = ID_932X;
CS_ACTIVE;
while(i < sizeof(ILI932x_regValues) / sizeof(uint16_t)) {
a = pgm_read_word(&ILI932x_regValues[i++]);
d = pgm_read_word(&ILI932x_regValues[i++]);
if(a == TFTLCD_DELAY) delay(d);
else
writeRegister16(a, d);
}
setRotation(rotation);
setAddrWindow(0, 0, TFTWIDTH-1, TFTHEIGHT-1);
//ILI9341 adafruit
/*
uint16_t a, d;
driver = ID_9341;
CS_ACTIVE;
writeRegister8(ILI9341_SOFTRESET, 0);
delay(50);
writeRegister8(ILI9341_DISPLAYOFF, 0);
writeRegister8(ILI9341_POWERCONTROL1, 0x23);
writeRegister8(ILI9341_POWERCONTROL2, 0x10);
writeRegister16(ILI9341_VCOMCONTROL1, 0x2B2B);
writeRegister8(ILI9341_VCOMCONTROL2, 0xC0);
writeRegister8(ILI9341_MEMCONTROL, ILI9341_MADCTL_MY |
ILI9341_MADCTL_BGR);
writeRegister8(ILI9341_PIXELFORMAT, 0x55);
writeRegister16(ILI9341_FRAMECONTROL, 0x001B);
writeRegister8(ILI9341_ENTRYMODE, 0x07);
/* writeRegister32(ILI9341_DISPLAYFUNC, 0x0A822700);
writeRegister8(ILI9341_SLEEPOUT, 0);
delay(150);
writeRegister8(ILI9341_DISPLAYON, 0);
delay(500);
// ILI9341 mcufriend
driver = ID_9341;
CS_ACTIVE;
CS_ACTIVE;
CD_COMMAND;
write8(r);
CD_DATA;
for (uint8_t d=0; d<len; d++) {
uint8_t x = pgm_read_byte(&ILI9341_regValues[i+
+]);
write8(x);
}
CS_IDLE;
}
}
return;
uint8_t r = pgm_read_byte(&HX8357D_regValues[i++]);
uint8_t len = pgm_read_byte(&HX8357D_regValues[i++]);
if(r == TFTLCD_DELAY) {
delay(len);
} else {
//Serial.print("Register $"); Serial.print(r, HEX);
//Serial.print(" datalen "); Serial.println(len);
CS_ACTIVE;
CD_COMMAND;
write8(r);
CD_DATA;
for (uint8_t d=0; d<len; d++) {
uint8_t x = pgm_read_byte(&HX8357D_regValues[i++]);
write8(x);
}
CS_IDLE;
}
}
return;
uint8_t a, d;
driver = ID_7575;
CS_ACTIVE;
while(i < sizeof(HX8347G_regValues)) {
a = pgm_read_byte(&HX8347G_regValues[i++]);
d = pgm_read_byte(&HX8347G_regValues[i++]);
writeRegister8(a, d);
}
setRotation(rotation);
setLR(); // Lower-right corner of address window
writeRegister16(0x10,0x0800);
delay(10);
writeRegister16(0x11,0x011A);
delay(10);
writeRegister16(0x11,0x031A);
delay(10);
writeRegister16(0x11,0x071A);
delay(10);
writeRegister16(0x11,0x0F1A);
delay(20);
writeRegister16(0x11,0x0F3A);
delay(30);
writeRegister16(0x01,0x0128);
writeRegister16(0x02,0x0100);
writeRegister16(0x03,0x1030);
writeRegister16(0x07,0x1012);
writeRegister16(0x08,0x0303);
writeRegister16(0x0B,0x1100);
writeRegister16(0x0C,0x0000);
writeRegister16(0x0F,0x1801);
writeRegister16(0x15,0x0020);
/*
writeRegister16(0x50,0x0101);
writeRegister16(0x51,0x0603);
writeRegister16(0x52,0x0408);
writeRegister16(0x53,0x0000);
writeRegister16(0x54,0x0605);
writeRegister16(0x55,0x0406);
writeRegister16(0x56,0x0303);
writeRegister16(0x57,0x0303);
writeRegister16(0x58,0x0010);
writeRegister16(0x59,0x1000);
*/
writeRegister16(0x07,0x0012);
delay(40);
CS_ACTIVE;
CD_COMMAND;
write8(r);
CD_DATA;
for (uint8_t d=0; d<len; d++) {
uint8_t x = pgm_read_byte(&ILI9327_regValues[i+
+]);
write8(x);
}
CS_IDLE;
}
}
return;
} else {
driver = ID_UNKNOWN;
return;
}
}
void Adafruit_TFTLCD::reset(void) {
CS_IDLE;
// CD_DATA;
WR_IDLE;
RD_IDLE;
#ifdef USE_ADAFRUIT_SHIELD_PINOUT
digitalWrite(5, LOW);
delay(2);
digitalWrite(5, HIGH);
#else
if(_reset) {
digitalWrite(_reset, LOW);
delay(2);
digitalWrite(_reset, HIGH);
}
#endif
case 2:
t = x1;
x1 = TFTWIDTH - 1 - x2;
x2 = TFTWIDTH - 1 - t;
t = y1;
y1 = TFTHEIGHT - 1 - y2;
y2 = TFTHEIGHT - 1 - t;
x = x2;
y = y2;
break;
case 3:
t = x1;
x1 = y1;
y1 = TFTHEIGHT - 1 - x2;
x2 = y2;
y2 = TFTHEIGHT - 1 - t;
x = x1;
y = y2;
break;
}
if(driver == ID_S6D0154) {
writeRegister16(0x37, x1); //HorizontalStartAddress
writeRegister16(0x36, x2); //HorizontalEndAddress
writeRegister16(0x39, y1); //VerticalStartAddress
writeRegister16(0x38, y2); //VertocalEndAddress
writeRegister16(0x20, x); //GRAM Address Set
writeRegister16(0x21, y);
writeRegister8(0x22, 0);
} else {
writeRegisterPair(HX8347G_COLADDRSTART_HI,
HX8347G_COLADDRSTART_LO, x1);
writeRegisterPair(HX8347G_ROWADDRSTART_HI,
HX8347G_ROWADDRSTART_LO, y1);
writeRegisterPair(HX8347G_COLADDREND_HI , HX8347G_COLADDREND_LO
, x2);
writeRegisterPair(HX8347G_ROWADDREND_HI ,
HX8347G_ROWADDREND_LO , y2);
t = x1;
t <<= 16;
t |= x2;
writeRegister32(ILI9341_COLADDRSET, t); // HX8357D uses same registers!
t = y1;
t <<= 16;
t |= y2;
writeRegister32(ILI9341_PAGEADDRSET, t); // HX8357D uses same registers!
CS_IDLE;
}
// Unlike the 932X drivers that set the address window to the full screen
// by default (using the address counter for drawPixel operations), the
// 7575 needs the address window set on all graphics operations. In order
// to save a few register writes on each pixel drawn, the lower-right
// corner of the address window is reset after most fill operations, so
// that drawPixel only needs to change the upper left each time.
void Adafruit_TFTLCD::setLR(void) {
CS_ACTIVE;
writeRegisterPair(HX8347G_COLADDREND_HI, HX8347G_COLADDREND_LO,
_width - 1);
writeRegisterPair(HX8347G_ROWADDREND_HI, HX8347G_ROWADDREND_LO,
_height - 1);
CS_IDLE;
}
// Fast block fill operation for fillScreen, fillRect, H/V line, etc.
// Requires setAddrWindow() has previously been called to set the fill
// bounds. 'len' is inclusive, MUST be >= 1.
void Adafruit_TFTLCD::flood(uint16_t color, uint32_t len) {
uint16_t blocks;
uint8_t i, hi = color >> 8,
lo = color;
CS_ACTIVE;
CD_COMMAND;
if ((driver == ID_9341) || (driver == ID_ILI9327)) {
write8(0x2C);
} else if (driver == ID_932X) {
write8(0x00); // High byte of GRAM register...
write8(0x22); // Write data to GRAM
} else if (driver == ID_HX8357D) {
write8(HX8357_RAMWR);
} else if (driver == ID_S6D0154){
write8(0x22);
} else {
write8(0x22);
}
}
// Fill any remaining pixels (1 to 64)
for(i = (uint8_t)len & 63; i--; ) {
WR_STROBE;
WR_STROBE;
}
} else {
while(blocks--) {
i = 16; // 64 pixels/block / 4 pixels/pass
do {
write8(hi); write8(lo); write8(hi); write8(lo);
write8(hi); write8(lo); write8(hi); write8(lo);
} while(--i);
}
for(i = (uint8_t)len & 63; i--; ) {
write8(hi);
write8(lo);
}
}
CS_IDLE;
}
< 0
) ||
) || ( y
>= _height) ||
(x
if(x < 0) {
)) return;
// Clip left
length += x;
x
= 0;
}
if(x2 >= _width) { // Clip right
x2
= _width - 1;
length = x2 - x + 1;
}
setLR();
< 0
(y
if(y < 0) {
length += y;
y
}
) ||
= 0;
) || ( x
// Clip top
>= _width) ||
)) return;
= _height - 1;
length = y2 - y + 1;
}
setAddrWindow(x, y, x, y2);
flood(color, length);
if(driver == ID_932X) setAddrWindow(0, 0, _width - 1, _height - 1);
else
setLR();
<= 0
) || (h
w += x1;
x1 = 0;
}
if(y1 < 0) { // Clip top
h += y1;
y1 = 0;
}
if(x2 >= _width) { // Clip right
w = x2 - x1 + 1;
) ||
>= _height) ||
x2 = _width - 1;
<= 0
)) return;
}
if(y2 >= _height) { // Clip bottom
y2 = _height - 1;
h = y2 - y1 + 1;
}
setLR();
if(driver == ID_932X) {
;y=0
case 1 : x = TFTWIDTH - 1; y = 0
; break;
; break;
; y = TFTHEIGHT - 1; break;
}
CS_ACTIVE;
writeRegister16(0x0020, x);
writeRegister16(0x0021, y);
}
flood(color, (long)TFTWIDTH * (long)TFTHEIGHT);
}
// Clip
if((x < 0) || (y < 0) || (x >= _width) || (y >= _height)) return;
CS_ACTIVE;
if((driver == ID_932X) || (driver == ID_S6D0154)) {
int16_t t;
switch(rotation) {
case 1:
t = x;
x = TFTWIDTH - 1 - y;
y = t;
break;
case 2:
x = TFTWIDTH - 1 - x;
y = TFTHEIGHT - 1 - y;
break;
case 3:
t = x;
x = y;
y = TFTHEIGHT - 1 - t;
break;
}
writeRegister16(0x0020, x);
writeRegister16(0x0021, y);
writeRegister16(0x0022, color);
, lo);
CS_IDLE;
}
lo
= color;
write8(hi);
write8(lo);
}
CS_IDLE;
}
}
void Adafruit_TFTLCD::setRotation(uint8_t x) {
CS_ACTIVE;
if((driver == ID_932X) || (driver == ID_S6D0154)){
uint16_t t;
switch(rotation) {
default: t = 0x1030; break;
case 1 : t = 0x1028; break;
case 2 : t = 0x1000; break;
case 3 : t = 0x1018; break;
}
}
if(driver == ID_7575) {
uint8_t t;
switch(rotation) {
default: t = 0 ; break;
case 1 : t = 0x60; break;
case 2 : t = 0xc0; break;
case 3 : t = 0xa0; break;
}
writeRegister8(HX8347G_MEMACCESS, t);
// 7575 has to set the address window on most drawing operations.
// drawPixel() cheats by setting only the top left...by default,
// the lower right is always reset to the corner.
setLR(); // CS_IDLE happens here
}
if (driver == ID_9341) {
switch (rotation) {
case 2:
t = ILI9341_MADCTL_MX | ILI9341_MADCTL_BGR;
break;
case 3:
t = ILI9341_MADCTL_MV | ILI9341_MADCTL_BGR;
break;
case 0:
t = ILI9341_MADCTL_MY | ILI9341_MADCTL_BGR;
break;
case 1:
t = ILI9341_MADCTL_MX | ILI9341_MADCTL_MY | ILI9341_MADCTL_MV |
ILI9341_MADCTL_BGR;
break;
}
writeRegister8(ILI9341_MADCTL, t); // MADCTL
// For 9341, init default full-screen address window:
setAddrWindow(0, 0, _width - 1, _height - 1); // CS_IDLE happens here
}
if (driver == ID_HX8357D) {
// MEME, HX8357D uses same registers as 9341 but different values
uint16_t t;
switch (rotation) {
case 2:
t = HX8357B_MADCTL_RGB;
break;
case 3:
t = HX8357B_MADCTL_MX | HX8357B_MADCTL_MV |
HX8357B_MADCTL_RGB;
break;
case 0:
t = HX8357B_MADCTL_MX | HX8357B_MADCTL_MY |
HX8357B_MADCTL_RGB;
break;
case 1:
t = HX8357B_MADCTL_MY | HX8357B_MADCTL_MV |
HX8357B_MADCTL_RGB;
break;
}
writeRegister8(ILI9341_MADCTL, t ); // MADCTL
// For 8357, init default full-screen address window:
setAddrWindow(0, 0, _width - 1, _height - 1); // CS_IDLE happens here
}
if (driver ==ID_ILI9327) {
// MEME, HX8357D uses same registers as 9341 but different values
uint16_t t;
switch (rotation) {
case 2:
t = ILI9341_MADCTL_BGR | 0x80;
break;
case 3:
t = ILI9341_MADCTL_BGR | 0xE0;
break;
case 0:
t = ILI9341_MADCTL_BGR | 0x02;
break;
case 1:
t = ILI9341_MADCTL_BGR | 0x20;
break;
}
writeRegister8(ILI9341_MADCTL, t); // MADCTL
// For 9341, init default full-screen address window:
setAddrWindow(0, 0, _width - 1, _height - 1); // CS_IDLE happens here
}
}
#ifdef read8isFunctionalized
#define read8(x) x=read8fn()
#endif
CS_ACTIVE;
if((driver == ID_932X) || (driver ==ID_S6D0154) || (driver == ID_ILI9327)) {
case 1:
t = x;
x = TFTWIDTH - 1 - y;
y = t;
break;
case 2:
x = TFTWIDTH - 1 - x;
y = TFTHEIGHT - 1 - y;
break;
case 3:
t = x;
x = y;
y = TFTHEIGHT - 1 - t;
break;
}
if (driver == ID_ILI9327){
writeRegister16(0x002A, x);
writeRegister16(0x002B, y);
} else {
writeRegister16(0x0020, x);
writeRegister16(0x0021, y);
}
// Inexplicable thing: sometimes pixel read has high/low bytes
// reversed. A second read fixes this. Unsure of reason. Have
// tried adjusting timing in read8() etc. to no avail.
for(uint8_t pass=0; pass<2; pass++) {
if (driver == ID_ILI9327){
CD_COMMAND; write8(0x2E); // Read data from GRAM
}else{
read8(hi);
read8(hi);
read8(lo);
setWriteDir(); // Restore LCD data port(s) to WRITE configuration
}
CS_IDLE;
return ((uint16_t)hi << 8) | lo;
uint8_t r, g, b;
writeRegisterPair(HX8347G_COLADDRSTART_HI,
HX8347G_COLADDRSTART_LO, x);
writeRegisterPair(HX8347G_ROWADDRSTART_HI,
HX8347G_ROWADDRSTART_LO, y);
CD_COMMAND; write8(0x22); // Read data from GRAM
setReadDir(); // Set up LCD data port(s) for READ operations
CD_DATA;
read8(r);
read8(r);
read8(g);
read8(b);
setWriteDir(); // Restore LCD data port(s) to WRITE configuration
CS_IDLE;
return (((uint16_t)r & B11111000) << 8) |
>> 3);
} else return 0;
}
/*
for (uint8_t i=0; i<128; i++) {
Serial.print("$"); Serial.print(i, HEX);
Serial.print(" = 0x"); Serial.println(readReg(i), HEX);
}
*/
return 0x8357;
}
}
uint16_t id = readReg(0xD3);
if (id == 0x9341) {
return 0x9341;
}
id = readReg(0xEF);
if (id == 0x9327) {
return 0x9327;
}
CS_ACTIVE;
CD_COMMAND;
write8(0x00);
WR_STROBE;
uint32_t Adafruit_TFTLCD::readReg(uint8_t r) {
uint32_t id;
uint8_t x;
read8(x);
id = x;
id <<= 8;
read8(x);
id |= x;
id <<= 8;
read8(x);
id |= x;
id <<= 8;
read8(x);
id |= x;
if (r == 0xEF){
id <<= 8;
read8(x);
id |= x;
}
CS_IDLE;
#ifndef write8
void Adafruit_TFTLCD::write8(uint8_t value) {
write8inline(value);
}
#endif
#ifdef read8isFunctionalized
uint8_t Adafruit_TFTLCD::read8fn(void) {
uint8_t result;
read8inline(result);
return result;
}
#endif
#ifndef setWriteDir
void Adafruit_TFTLCD::setWriteDir(void) {
setWriteDirInline();
}
#endif
#ifndef setReadDir
void Adafruit_TFTLCD::setReadDir(void) {
setReadDirInline();
}
#endif
#ifndef writeRegister8
void Adafruit_TFTLCD::writeRegister8(uint8_t a, uint8_t d) {
writeRegister8inline(a, d);
}
#endif
#ifndef writeRegister16
void Adafruit_TFTLCD::writeRegister16(uint16_t a, uint16_t d) {
writeRegister16inline(a, d);
}
#endif
#ifndef writeRegisterPair
void Adafruit_TFTLCD::writeRegisterPair(uint8_t aH, uint8_t aL, uint16_t d) {
writeRegisterPairInline(aH, aL, d);
}
#endif