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

Adafruit driver for the ST7796S TFT display. More...

#include <Adafruit_ST7796S.h>

Inheritance diagram for Adafruit_ST7796S:
Adafruit_ST77xx

Public Member Functions

 Adafruit_ST7796S (int8_t CS, int8_t RS, int8_t MOSI, int8_t SCLK, int8_t RST=-1)
 Constructor with software SPI. More...
 
 Adafruit_ST7796S (int8_t CS, int8_t RS, int8_t RST=-1)
 Constructor with hardware SPI. More...
 
 Adafruit_ST7796S (SPIClass *spiClass, int8_t CS, int8_t RS, int8_t RST)
 Constructor with hardware SPI and custom SPI class. More...
 
void init (uint16_t width=ST7796S_TFTWIDTH, uint16_t height=ST7796S_TFTHEIGHT, uint8_t rowOffset=0, uint8_t colOffset=0, ST7796S_ColorOrder colorOrder=ST7796S_RGB)
 Initialize the display. More...
 
void setRotation (uint8_t r)
 Set the display rotation. 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

Adafruit driver for the ST7796S TFT display.

Constructor & Destructor Documentation

◆ Adafruit_ST7796S() [1/3]

Adafruit_ST7796S::Adafruit_ST7796S ( int8_t  CS,
int8_t  RS,
int8_t  MOSI,
int8_t  SCLK,
int8_t  RST = -1 
)

Constructor with software SPI.

Parameters
CSChip select pin.
RSData/command pin.
MOSISPI MOSI pin.
SCLKSPI clock pin.
RSTReset pin (optional).

◆ Adafruit_ST7796S() [2/3]

Adafruit_ST7796S::Adafruit_ST7796S ( int8_t  CS,
int8_t  RS,
int8_t  RST = -1 
)

Constructor with hardware SPI.

Parameters
CSChip select pin.
RSData/command pin.
RSTReset pin (optional).

◆ Adafruit_ST7796S() [3/3]

Adafruit_ST7796S::Adafruit_ST7796S ( SPIClass *  spiClass,
int8_t  CS,
int8_t  RS,
int8_t  RST 
)

Constructor with hardware SPI and custom SPI class.

Parameters
spiClassPointer to SPI class.
CSChip select pin.
RSData/command pin.
RSTReset pin (optional).

Member Function Documentation

◆ init()

void Adafruit_ST7796S::init ( uint16_t  width = ST7796S_TFTWIDTH,
uint16_t  height = ST7796S_TFTHEIGHT,
uint8_t  rowOffset = 0,
uint8_t  colOffset = 0,
ST7796S_ColorOrder  colorOrder = ST7796S_RGB 
)

Initialize the display.

Parameters
widthDisplay width in pixels.
heightDisplay height in pixels.
rowOffsetRow offset for display.
colOffsetColumn offset for display.
colorOrderColor order (RGB or BGR).

◆ setRotation()

void Adafruit_ST7796S::setRotation ( uint8_t  m)

Set the display rotation.

Parameters
mRotation value (0-3).

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