turns out having two things named tft8 makes subclassing very :(

This commit is contained in:
ladyada 2019-04-27 16:49:15 -04:00
parent 35055667c4
commit 1b033808ab
2 changed files with 3 additions and 3 deletions

View File

@ -330,7 +330,7 @@ Adafruit_SPITFT::Adafruit_SPITFT(uint16_t w, uint16_t h, SPIClass *spiClass,
@param busWidth If tft16 (enumeration in header file), is a 16-bit @param busWidth If tft16 (enumeration in header file), is a 16-bit
parallel connection, else 8-bit. parallel connection, else 8-bit.
16-bit isn't fully implemented or tested yet so 16-bit isn't fully implemented or tested yet so
applications should pass "tft8" for now...needed to applications should pass "tft8bitbus" for now...needed to
stick a required enum argument in there to stick a required enum argument in there to
disambiguate this constructor from the soft-SPI case. disambiguate this constructor from the soft-SPI case.
Argument is ignored on 8-bit architectures (no 'wide' Argument is ignored on 8-bit architectures (no 'wide'
@ -361,7 +361,7 @@ Adafruit_SPITFT::Adafruit_SPITFT(uint16_t w, uint16_t h, tftBusWidth busWidth,
tft8._d0 = d0; tft8._d0 = d0;
tft8._wr = wr; tft8._wr = wr;
tft8._rd = rd; tft8._rd = rd;
tft8.wide = (busWidth == tft16); tft8.wide = (busWidth == tft16bitbus);
#if defined(USE_FAST_PINIO) #if defined(USE_FAST_PINIO)
#if defined(HAS_PORT_SET_CLR) #if defined(HAS_PORT_SET_CLR)
#if defined(CORE_TEENSY) #if defined(CORE_TEENSY)

View File

@ -94,7 +94,7 @@ typedef volatile PORT_t* PORTreg_t; ///< PORT register type
// an enumerated type as the first argument: tft8 (for 8-bit parallel) or // an enumerated type as the first argument: tft8 (for 8-bit parallel) or
// tft16 (for 16-bit)...even though 16-bit isn't fully implemented or tested // tft16 (for 16-bit)...even though 16-bit isn't fully implemented or tested
// and might never be, still needed that disambiguation from soft SPI. // and might never be, still needed that disambiguation from soft SPI.
enum tftBusWidth { tft8, tft16 }; ///< For first arg to parallel constructor enum tftBusWidth { tft8bitbus, tft16bitbus }; ///< For first arg to parallel constructor
// CLASS DEFINITION -------------------------------------------------------- // CLASS DEFINITION --------------------------------------------------------