* Adafruit_GC9106_kbv class inherits from Adafruit_GFX, Adafruit_SPITFT class and the Arduino Print class.
* Adafruit_GC9106_kbv written by David Prentice
*
* Any use of Adafruit_GC9106_kbv class and examples is dependent on Adafruit and Arduino licenses
* The license texts are in the accompanying license.txt file
*/
* @file Adafruit_GC9106_kbv.h
*
* These displays use SPI to communicate, 4 or 5 pins are required
* to interface (RST is optional IF YOU ADD A PULLUP RESISTOR).
*
* Adafruit invests time and resources providing this open source code,
* please support Adafruit and open-source hardware by purchasing
* products from Adafruit!
*
*
* This library depends on <a href="https://github.com/adafruit/Adafruit_GFX">
* Adafruit_GFX</a> being present on your system. Please make sure you have
* installed the latest version before using this library.
*
* Adafruit_GFX, Adafruit_SPITFT written by Limor "ladyada" Fried for Adafruit Industries.
*
* BSD license, all text here must be included in any redistribution.
*
*/
#ifndef _ADAFRUIT_GC9106_EX_H_
#define _ADAFRUIT_GC9106_EX_H_
#include "Adafruit_GFX.h"
#include "Arduino.h"
#include "Print.h"
#include <Adafruit_SPITFT.h>
#include <Adafruit_SPITFT_Macros.h>
#include <SPI.h>
#define GC9106_TFTWIDTH 80
#define GC9106_TFTHEIGHT 160
#define GC9106_NOP 0x00
#define GC9106_SWRESET 0x01
#define GC9106_RDDID 0x04
#define GC9106_RDDST 0x09
#define GC9106_SLPIN 0x10
#define GC9106_SLPOUT 0x11
#define GC9106_PTLON 0x12
#define GC9106_NORON 0x13
#define GC9106_RDMODE 0x0A
#define GC9106_RDMADCTL 0x0B
#define GC9106_RDPIXFMT 0x0C
#define GC9106_RDIMGFMT 0x0D
#define GC9106_RDSELFDIAG 0x0F
#define GC9106_INVOFF 0x20
#define GC9106_INVON 0x21
#define GC9106_GAMMASET 0x26
#define GC9106_DISPOFF 0x28
#define GC9106_DISPON 0x29
#define GC9106_CASET 0x2A
#define GC9106_PASET 0x2B
#define GC9106_RAMWR 0x2C
#define GC9106_RAMRD 0x2E
#define GC9106_PTLAR 0x30
#define GC9106_VSCRDEF 0x33
#define GC9106_MADCTL 0x36
#define GC9106_VSCRSADD 0x37
#define GC9106_PIXFMT 0x3A
#define TFT_BLACK 0x0000
#define TFT_NAVY 0x000F
#define TFT_DARKGREEN 0x03E0
#define TFT_DARKCYAN 0x03EF
#define TFT_MAROON 0x7800
#define TFT_PURPLE 0x780F
#define TFT_OLIVE 0x7BE0
#define TFT_LIGHTGREY 0xC618
#define TFT_DARKGREY 0x7BEF
#define TFT_BLUE 0x001F
#define TFT_GREEN 0x07E0
#define TFT_CYAN 0x07FF
#define TFT_RED 0xF800
#define TFT_MAGENTA 0xF81F
#define TFT_YELLOW 0xFFE0
#define TFT_WHITE 0xFFFF
#define TFT_ORANGE 0xFD20
#define TFT_GREENYELLOW 0xAFE5
#define TFT_PINK 0xFC18
@brief Class to manage hardware interface with GC9106 chipset
*/
class Adafruit_GC9106Ex : public Adafruit_SPITFT {
public:
Adafruit_GC9106Ex(int8_t _CS, int8_t _DC, int8_t _MOSI, int8_t _SCLK,
int8_t _RST = -1, int8_t _MISO = -1);
Adafruit_GC9106Ex(int8_t _CS, int8_t _DC, int8_t _RST = -1);
#if !defined(ESP8266)
Adafruit_GC9106Ex(SPIClass *spiClass, int8_t dc, int8_t cs = -1,
int8_t rst = -1);
#endif
Adafruit_GC9106Ex(tftBusWidth busWidth, int8_t d0, int8_t wr, int8_t dc,
int8_t cs = -1, int8_t rst = -1, int8_t rd = -1);
void begin(uint32_t freq = 0);
void setRotation(uint8_t r);
void invertDisplay(bool i);
void scrollTo(uint16_t y);
void setScrollMargins(uint16_t top, uint16_t bottom);
void setAddrWindow(uint16_t x, uint16_t y, uint16_t w, uint16_t h);
protected:
uint8_t _colstart = 0,
_rowstart = 0;
};
#endif