summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-04-11 18:54:17 +0200
committerDaniel Friesel <derf@finalrewind.org>2021-04-11 18:54:17 +0200
commit040109e17b511253b2e3d8d92c67698a3d45ac18 (patch)
treec96fe1a64f46acea9b3c63a7b2e6abe90f5cf364 /include
parentf7e8fcede382407ffc616f18ffaffb81235e7d26 (diff)
ssd1306: Add setContrast and setInvert methods
Diffstat (limited to 'include')
-rw-r--r--include/driver/ssd1306.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/driver/ssd1306.h b/include/driver/ssd1306.h
index 4a2cf01..2afcb86 100644
--- a/include/driver/ssd1306.h
+++ b/include/driver/ssd1306.h
@@ -56,7 +56,7 @@ class SSD1306 {
SSD1306_SET_DISP_CLK_DIV, 0x80,
SSD1306_SET_PRECHARGE, 0xf1,
SSD1306_SET_VCOM_DESEL, 0x30,
- SSD1306_SET_CONTRAST, 0xff,
+ SSD1306_SET_CONTRAST, 0x7f,
SSD1306_SET_ENTIRE_ON,
SSD1306_SET_NORM_INV,
SSD1306_SET_CHARGE_PUMP, 0x14,
@@ -70,6 +70,8 @@ class SSD1306 {
SSD1306() {}
void init();
+ void setContrast(unsigned char contrast);
+ void setInvert(bool invert);
void showImage(unsigned char* data, uint16_t length);
};