diff --git a/Adafruit_ST7735.cpp b/Adafruit_ST7735.cpp index bfab90a..ea40120 100644 --- a/Adafruit_ST7735.cpp +++ b/Adafruit_ST7735.cpp @@ -11,8 +11,8 @@ @param sclk SPI Clock pin # @param rst Reset pin # (optional, pass -1 if unused) */ -Adafruit_ST7735::Adafruit_ST7735(int8_t cs, int8_t dc, int8_t mosi, int8_t sclk, - int8_t rst) +Adafruit_ST7735::Adafruit_ST7735(int16_t cs, int16_t dc, int16_t mosi, int16_t sclk, + int16_t rst) : Adafruit_ST77xx(ST7735_TFTWIDTH_128, ST7735_TFTHEIGHT_160, cs, dc, mosi, sclk, rst) {} @@ -22,7 +22,7 @@ Adafruit_ST7735::Adafruit_ST7735(int8_t cs, int8_t dc, int8_t mosi, int8_t sclk, @param dc Data/Command pin # @param rst Reset pin # (optional, pass -1 if unused) */ -Adafruit_ST7735::Adafruit_ST7735(int8_t cs, int8_t dc, int8_t rst) +Adafruit_ST7735::Adafruit_ST7735(int16_t cs, int16_t dc, int16_t rst) : Adafruit_ST77xx(ST7735_TFTWIDTH_128, ST7735_TFTHEIGHT_160, cs, dc, rst) {} #if !defined(ESP8266) @@ -33,8 +33,8 @@ Adafruit_ST7735::Adafruit_ST7735(int8_t cs, int8_t dc, int8_t rst) @param dc Data/Command pin # @param rst Reset pin # (optional, pass -1 if unused) */ -Adafruit_ST7735::Adafruit_ST7735(SPIClass *spiClass, int8_t cs, int8_t dc, - int8_t rst) +Adafruit_ST7735::Adafruit_ST7735(SPIClass *spiClass, int16_t cs, int16_t dc, + int16_t rst) : Adafruit_ST77xx(ST7735_TFTWIDTH_128, ST7735_TFTHEIGHT_160, spiClass, cs, dc, rst) {} #endif // end !ESP8266 diff --git a/Adafruit_ST7735.h b/Adafruit_ST7735.h old mode 100755 new mode 100644 index da1320a..e8a2fd3 --- a/Adafruit_ST7735.h +++ b/Adafruit_ST7735.h @@ -50,10 +50,10 @@ /// Subclass of ST77XX for ST7735B and ST7735R TFT Drivers: class Adafruit_ST7735 : public Adafruit_ST77xx { public: - Adafruit_ST7735(int8_t cs, int8_t dc, int8_t mosi, int8_t sclk, int8_t rst); - Adafruit_ST7735(int8_t cs, int8_t dc, int8_t rst); + Adafruit_ST7735(int16_t cs, int16_t dc, int16_t mosi, int16_t sclk, int16_t rst); + Adafruit_ST7735(int16_t cs, int16_t dc, int16_t rst); #if !defined(ESP8266) - Adafruit_ST7735(SPIClass *spiClass, int8_t cs, int8_t dc, int8_t rst); + Adafruit_ST7735(SPIClass *spiClass, int16_t cs, int16_t dc, int16_t rst); #endif // end !ESP8266 // Differences between displays (usu. identified by colored tab on diff --git a/Adafruit_ST77xx.cpp b/Adafruit_ST77xx.cpp index dc671b2..19c9d72 100644 --- a/Adafruit_ST77xx.cpp +++ b/Adafruit_ST77xx.cpp @@ -45,9 +45,9 @@ @param miso SPI MISO pin # (optional, pass -1 if unused) */ /**************************************************************************/ -Adafruit_ST77xx::Adafruit_ST77xx(uint16_t w, uint16_t h, int8_t cs, int8_t dc, - int8_t mosi, int8_t sclk, int8_t rst, - int8_t miso) +Adafruit_ST77xx::Adafruit_ST77xx(uint16_t w, uint16_t h, int16_t cs, int16_t dc, + int16_t mosi, int16_t sclk, int16_t rst, + int16_t miso) : Adafruit_SPITFT(w, h, cs, dc, mosi, sclk, rst, miso) {} /**************************************************************************/ @@ -60,8 +60,8 @@ Adafruit_ST77xx::Adafruit_ST77xx(uint16_t w, uint16_t h, int8_t cs, int8_t dc, @param rst Reset pin # (optional, pass -1 if unused) */ /**************************************************************************/ -Adafruit_ST77xx::Adafruit_ST77xx(uint16_t w, uint16_t h, int8_t cs, int8_t dc, - int8_t rst) +Adafruit_ST77xx::Adafruit_ST77xx(uint16_t w, uint16_t h, int16_t cs, int16_t dc, + int16_t rst) : Adafruit_SPITFT(w, h, cs, dc, rst) {} #if !defined(ESP8266) @@ -77,7 +77,7 @@ Adafruit_ST77xx::Adafruit_ST77xx(uint16_t w, uint16_t h, int8_t cs, int8_t dc, */ /**************************************************************************/ Adafruit_ST77xx::Adafruit_ST77xx(uint16_t w, uint16_t h, SPIClass *spiClass, - int8_t cs, int8_t dc, int8_t rst) + int16_t cs, int16_t dc, int16_t rst) : Adafruit_SPITFT(w, h, spiClass, cs, dc, rst) {} #endif // end !ESP8266 diff --git a/Adafruit_ST77xx.h b/Adafruit_ST77xx.h index 599b299..c6f823a 100644 --- a/Adafruit_ST77xx.h +++ b/Adafruit_ST77xx.h @@ -88,13 +88,13 @@ /// Subclass of SPITFT for ST77xx displays (lots in common!) class Adafruit_ST77xx : public Adafruit_SPITFT { public: - Adafruit_ST77xx(uint16_t w, uint16_t h, int8_t _CS, int8_t _DC, int8_t _MOSI, - int8_t _SCLK, int8_t _RST = -1, int8_t _MISO = -1); - Adafruit_ST77xx(uint16_t w, uint16_t h, int8_t CS, int8_t RS, - int8_t RST = -1); + Adafruit_ST77xx(uint16_t w, uint16_t h, int16_t _CS, int16_t _DC, int16_t _MOSI, + int16_t _SCLK, int16_t _RST = -1, int16_t _MISO = -1); + Adafruit_ST77xx(uint16_t w, uint16_t h, int16_t CS, int16_t RS, + int16_t RST = -1); #if !defined(ESP8266) - Adafruit_ST77xx(uint16_t w, uint16_t h, SPIClass *spiClass, int8_t CS, - int8_t RS, int8_t RST = -1); + Adafruit_ST77xx(uint16_t w, uint16_t h, SPIClass *spiClass, int16_t CS, + int16_t RS, int16_t RST = -1); #endif // end !ESP8266 void setAddrWindow(uint16_t x, uint16_t y, uint16_t w, uint16_t h);