adafruit / Adafruit-ST7735-Library

This is a library for the Adafruit 1.8" SPI display http://www.adafruit.com/products/358 and http://www.adafruit.com/products/618
https://learn.adafruit.com/1-8-tft-display
565 stars 305 forks source link

sleep method added #128

Closed lucadentella closed 4 years ago

lucadentella commented 4 years ago

Hi!

ST77xx chip supports a "sleep mode" (the datasheet describes it as "the minimum power consumption mode"). The required opcodes are already present in Adafruit_ST77xx.h:

#define ST77XX_SLPIN 0x10 #define ST77XX_SLPOUT 0x11

but the sendCommand() method is not public so the only way to use them is to create dedicated methods in the library.

I tried to use the same approach of already existing methods (enableDisplay, enableTearing).

This commit also Closes #74

ladyada commented 4 years ago

nice thanks~