dont setup read pin if not using TFT_RD
This commit is contained in:
parent
ee081b0dc3
commit
5228d2f4d1
|
|
@ -193,6 +193,7 @@ uint8_t TFT_eSPI::readByte(void)
|
|||
{
|
||||
uint8_t b = 0;
|
||||
|
||||
#ifdef TFT_RD
|
||||
RD_L;
|
||||
#ifdef STM_PORTA_DATA_BUS
|
||||
b = GPIOA->IDR;
|
||||
|
|
@ -211,7 +212,7 @@ uint8_t TFT_eSPI::readByte(void)
|
|||
b |= RD_TFT_D4 | RD_TFT_D5 | RD_TFT_D6 | RD_TFT_D7;
|
||||
#endif
|
||||
RD_H;
|
||||
|
||||
#endif // TFT_RD
|
||||
return b;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -156,10 +156,11 @@ TFT_eSPI::TFT_eSPI(int16_t w, int16_t h)
|
|||
|
||||
#if defined (TFT_PARALLEL_8_BIT)
|
||||
|
||||
#ifdef TFT_RD
|
||||
// Make sure read is high before we set the bus to output
|
||||
pinMode(TFT_RD, OUTPUT);
|
||||
digitalWrite(TFT_RD, HIGH);
|
||||
|
||||
#endif
|
||||
// Set TFT data bus lines to output
|
||||
pinMode(TFT_D0, OUTPUT); digitalWrite(TFT_D0, HIGH);
|
||||
pinMode(TFT_D1, OUTPUT); digitalWrite(TFT_D1, HIGH);
|
||||
|
|
|
|||
Loading…
Reference in New Issue