Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for stm32duino #156

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Adafruit_ST7735.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}

Expand All @@ -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)
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions Adafruit_ST7735.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions Adafruit_ST77xx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}

/**************************************************************************/
Expand All @@ -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)
Expand All @@ -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

Expand Down
12 changes: 6 additions & 6 deletions Adafruit_ST77xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down