Added the sleep and wakeUp methods for the ssd1306 oled driver
This commit is contained in:
parent
cfa7192f5f
commit
e013103fd1
@ -1075,6 +1075,21 @@ void Adafruit_SSD1306::invertDisplay(boolean i) {
|
|||||||
TRANSACTION_END
|
TRANSACTION_END
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Adafruit_SSD1306::sleep()
|
||||||
|
{
|
||||||
|
TRANSACTION_START
|
||||||
|
ssd1306_command1(SSD1306_DISPLAYOFF);
|
||||||
|
TRANSACTION_END
|
||||||
|
}
|
||||||
|
|
||||||
|
void Adafruit_SSD1306::wakeUp()
|
||||||
|
{
|
||||||
|
TRANSACTION_START
|
||||||
|
ssd1306_command1(SSD1306_DISPLAYON);
|
||||||
|
TRANSACTION_END
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@brief Dim the display.
|
@brief Dim the display.
|
||||||
@param dim
|
@param dim
|
||||||
|
@ -136,6 +136,8 @@ class Adafruit_SSD1306 : public Adafruit_GFX {
|
|||||||
void display(void);
|
void display(void);
|
||||||
void clearDisplay(void);
|
void clearDisplay(void);
|
||||||
void invertDisplay(boolean i);
|
void invertDisplay(boolean i);
|
||||||
|
void sleep();
|
||||||
|
void wakeUp();
|
||||||
void dim(boolean dim);
|
void dim(boolean dim);
|
||||||
void drawPixel(int16_t x, int16_t y, uint16_t color);
|
void drawPixel(int16_t x, int16_t y, uint16_t color);
|
||||||
virtual void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color);
|
virtual void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color);
|
||||||
|
Loading…
Reference in New Issue
Block a user