From 040109e17b511253b2e3d8d92c67698a3d45ac18 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 11 Apr 2021 18:54:17 +0200 Subject: ssd1306: Add setContrast and setInvert methods --- include/driver/ssd1306.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/driver') 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); }; -- cgit v1.2.3