Adafruit ST77XX Display Library
Public Member Functions | List of all members
Adafruit_ST7735 Class Reference

Subclass of ST77XX for ST7735B and ST7735R TFT Drivers: More...

#include <Adafruit_ST7735.h>

Inheritance diagram for Adafruit_ST7735:
Adafruit_ST77xx

Public Member Functions

 Adafruit_ST7735 (int8_t cs, int8_t dc, int8_t mosi, int8_t sclk, int8_t rst)
 Instantiate Adafruit ST7735 driver with software SPI. More...
 
 Adafruit_ST7735 (int8_t cs, int8_t dc, int8_t rst)
 Instantiate Adafruit ST7735 driver with default hardware SPI. More...
 
 Adafruit_ST7735 (SPIClass *spiClass, int8_t cs, int8_t dc, int8_t rst)
 Instantiate Adafruit ST7735 driver with selectable hardware SPI. More...
 
void initB (void)
 Initialization code common to all ST7735B displays.
 
void initR (uint8_t options=INITR_GREENTAB)
 Initialization code common to all ST7735R displays. More...
 
void setRotation (uint8_t m)
 Set origin of (0,0) and orientation of TFT display. More...
 
- Public Member Functions inherited from 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=-1, int8_t _MISO=-1)
 Instantiate Adafruit ST77XX driver with software SPI. More...
 
 Adafruit_ST77xx (uint16_t w, uint16_t h, int8_t CS, int8_t RS, int8_t RST=-1)
 Instantiate Adafruit ST77XX driver with hardware SPI. More...
 
 Adafruit_ST77xx (uint16_t w, uint16_t h, SPIClass *spiClass, int8_t CS, int8_t RS, int8_t RST=-1)
 Instantiate Adafruit ST77XX driver with selectable hardware SPI. More...
 
void setAddrWindow (uint16_t x, uint16_t y, uint16_t w, uint16_t h)
 SPI displays set an address window rectangle for blitting pixels. More...
 
void setRotation (uint8_t r)
 Set origin of (0,0) and orientation of TFT display. More...
 
void enableDisplay (boolean enable)
 Change whether display is on or off. More...
 
void enableTearing (boolean enable)
 Change whether TE pin output is on or off. More...
 
void enableSleep (boolean enable)
 Change whether sleep mode is on or off. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Adafruit_ST77xx
void begin (uint32_t freq=0)
 Initialize ST77xx chip. Connects to the ST77XX over SPI and sends initialization procedure commands. More...
 
void commonInit (const uint8_t *cmdList)
 Initialization code common to all ST77XX displays. More...
 
void displayInit (const uint8_t *addr)
 Companion code to the initiliazation tables. Reads and issues a series of LCD commands stored in PROGMEM byte array. More...
 
void setColRowStart (int8_t col, int8_t row)
 Set origin of (0,0) of display with offsets. More...
 
- Protected Attributes inherited from Adafruit_ST77xx
uint8_t _colstart = 0
 Some displays need this changed to offset.
 
uint8_t _rowstart = 0
 Some displays need this changed to offset.
 
uint8_t spiMode = SPI_MODE0
 Certain display needs MODE3 instead.
 

Detailed Description

Subclass of ST77XX for ST7735B and ST7735R TFT Drivers:

Constructor & Destructor Documentation

◆ Adafruit_ST7735() [1/3]

Adafruit_ST7735::Adafruit_ST7735 ( int8_t  cs,
int8_t  dc,
int8_t  mosi,
int8_t  sclk,
int8_t  rst 
)

Instantiate Adafruit ST7735 driver with software SPI.

Parameters
csChip select pin #
dcData/Command pin #
mosiSPI MOSI pin #
sclkSPI Clock pin #
rstReset pin # (optional, pass -1 if unused)

◆ Adafruit_ST7735() [2/3]

Adafruit_ST7735::Adafruit_ST7735 ( int8_t  cs,
int8_t  dc,
int8_t  rst 
)

Instantiate Adafruit ST7735 driver with default hardware SPI.

Parameters
csChip select pin #
dcData/Command pin #
rstReset pin # (optional, pass -1 if unused)

◆ Adafruit_ST7735() [3/3]

Adafruit_ST7735::Adafruit_ST7735 ( SPIClass *  spiClass,
int8_t  cs,
int8_t  dc,
int8_t  rst 
)

Instantiate Adafruit ST7735 driver with selectable hardware SPI.

Parameters
spiClassPointer to an SPI device to use (e.g. &SPI1)
csChip select pin #
dcData/Command pin #
rstReset pin # (optional, pass -1 if unused)

Member Function Documentation

◆ initR()

void Adafruit_ST7735::initR ( uint8_t  options = INITR_GREENTAB)

Initialization code common to all ST7735R displays.

Parameters
optionsTab color from adafruit purchase

◆ setRotation()

void Adafruit_ST7735::setRotation ( uint8_t  m)

Set origin of (0,0) and orientation of TFT display.

Parameters
mThe index for rotation, from 0-3 inclusive

The documentation for this class was generated from the following files: