forked from adafruit/Adafruit-ST7735-Library
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Adafruit_ST7789.h
50 lines (42 loc) · 1.85 KB
/
Adafruit_ST7789.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include "Adafruit_ST77xx.h"
/// Subclass of ST77XX type display for ST7789 TFT Driver
class Adafruit_ST7789 : public Adafruit_ST77xx {
public:
/**************************************************************************/
/*!
@brief Instantiate Adafruit ST7789 driver with software SPI
@param cs Chip select pin #
@param dc Data/Command pin #
@param mosi SPI MOSI pin #
@param sclk SPI Clock pin #
@param rst Reset pin # (optional, pass -1 if unused)
*/
/**************************************************************************/
Adafruit_ST7789(int8_t cs, int8_t dc, int8_t mosi, int8_t sclk, int8_t rst) :
Adafruit_ST77xx(cs, dc, mosi, sclk, rst) {}
/**************************************************************************/
/*!
@brief Instantiate Adafruit ST7789 driver with hardware SPI
@param cs Chip select pin #
@param dc Data/Command pin #
@param rst Reset pin # (optional, pass -1 if unused)
*/
/**************************************************************************/
Adafruit_ST7789(int8_t cs, int8_t dc, int8_t rst) :
Adafruit_ST77xx(cs, dc, rst) {}
/**************************************************************************/
/*!
@brief Instantiate Adafruit ST7789 driver with user selected hardware SPI
@param cs Chip select pin #
@param dc Data/Command pin #
@param spiClass A pointer to the SPIClass to use for HW SPI
@param rst Reset pin # (optional, pass -1 if unused)
*/
/**************************************************************************/
Adafruit_ST7789(int8_t cs, int8_t dc, SPIClass *spiClass, int8_t rst) :
Adafruit_ST77xx(cs, dc, spiClass, rst) {}
// the tab types are so weird we need to do this 'by hand'
void setRotation(uint8_t m);
void init(uint16_t width, uint16_t height);
private:
};