aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2015-09-18 11:17:19 +1000
committerinmarket <andrewh@inmarket.com.au>2015-09-18 11:18:01 +1000
commit0ab22283645c819dc6228356ed1b608904a6ba9a (patch)
treeb6e8f3b91b96e1c23d47c18db0b0628bc198ac89 /drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c
parent4eb0dbb1e3b8be7eb85c8830ef350d4dae021f87 (diff)
downloaduGFX-0ab22283645c819dc6228356ed1b608904a6ba9a.tar.gz
uGFX-0ab22283645c819dc6228356ed1b608904a6ba9a.tar.bz2
uGFX-0ab22283645c819dc6228356ed1b608904a6ba9a.zip
Add support for SH1106 in the SSD1306 driver
Diffstat (limited to 'drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c')
-rw-r--r--drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c b/drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c
index 2313e765..5a950b0d 100644
--- a/drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c
+++ b/drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c
@@ -150,6 +150,12 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
write_cmd(g, SSD1306_SETSTARTLINE | 0);
while (pages--) {
+ #if SSD1306_SH1106
+ write_cmd(g, SSD1306_PAM_PAGE_START + (7 - pages));
+ write_cmd(g, SSD1306_SETLOWCOLUMN + 2);
+ write_cmd(g, SSD1306_SETHIGHCOLUMN);
+ #endif
+
write_data(g, ram, SSD1306_PAGE_WIDTH);
ram += SSD1306_PAGE_WIDTH;
}