aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gdisp/SSD1306/SSD1306.h
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2013-08-26 00:50:47 +0200
committerJoel Bodenmann <joel@unormal.org>2013-08-26 00:50:47 +0200
commitfa5962eef0094d1b174c8763e456b2c8127a4341 (patch)
treeb7909ee51817e42096cde13643a14b5c4ae001bc /drivers/gdisp/SSD1306/SSD1306.h
parent273d747b01c707decca7c4a5b50300434db99f87 (diff)
downloaduGFX-fa5962eef0094d1b174c8763e456b2c8127a4341.tar.gz
uGFX-fa5962eef0094d1b174c8763e456b2c8127a4341.tar.bz2
uGFX-fa5962eef0094d1b174c8763e456b2c8127a4341.zip
Added SSD1306 driver by user goeck
Diffstat (limited to 'drivers/gdisp/SSD1306/SSD1306.h')
-rw-r--r--drivers/gdisp/SSD1306/SSD1306.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/drivers/gdisp/SSD1306/SSD1306.h b/drivers/gdisp/SSD1306/SSD1306.h
new file mode 100644
index 00000000..38507d48
--- /dev/null
+++ b/drivers/gdisp/SSD1306/SSD1306.h
@@ -0,0 +1,60 @@
+/*
+ * This file is subject to the terms of the GFX License. If a copy of
+ * the license was not distributed with this file, you can obtain one at:
+ *
+ * http://chibios-gfx.com/license.html
+ */
+
+#ifndef _SSD1306_H
+#define _SSD1306_H
+
+#define SSD1306_BLACK 0
+#define SSD1306_WHITE 1
+
+#define SSD1306_SETCONTRAST 0x81
+#define SSD1306_DISPLAYALLON_RESUME 0xA4
+#define SSD1306_DISPLAYALLON 0xA5
+#define SSD1306_NORMALDISPLAY 0xA6
+#define SSD1306_INVERTDISPLAY 0xA7
+#define SSD1306_DISPLAYOFF 0xAE
+#define SSD1306_DISPLAYON 0xAF
+
+#define SSD1306_SETDISPLAYOFFSET 0xD3
+#define SSD1306_SETCOMPINS 0xDA
+
+#define SSD1306_SETVCOMDETECT 0xDB
+
+#define SSD1306_SETDISPLAYCLOCKDIV 0xD5
+#define SSD1306_SETPRECHARGE 0xD9
+#define SSD1306_ENABLE_CHARGE_PUMP 0x8D
+
+#define SSD1306_SETMULTIPLEX 0xA8
+#define SSD1306_SETSTARTLINE 0x40
+
+#define SSD1306_MEMORYMODE 0x20
+#define SSD1306_HV_COLUMN_ADDRESS 0x21
+#define SSD1306_HV_PAGE_ADDRESS 0x22
+#define SSD1306_PAM_PAGE_START 0xB0
+
+#define SSD1306_COMSCANINC 0xC0
+#define SSD1306_COMSCANDEC 0xC8
+
+#define SSD1306_SEGREMAP 0xA0
+
+#define SSD1306_CHARGEPUMP 0x8D
+
+#define SSD1306_EXTERNALVCC 0x1
+#define SSD1306_SWITCHCAPVCC 0x2
+
+// Scrolling #defines
+#define SSD1306_SCROLL_ACTIVATE 0x2F
+#define SSD1306_SCROLL_DEACTIVATE 0x2E
+#define SSD1306_SCROLL_SET_VERTICAL_SCROLL_AREA 0xA3
+#define SSD1306_SCROLL_HORIZONTAL_RIGHT 0x26
+#define SSD1306_SCROLL_HORIZONTAL_LEFT 0x27
+#define SSD1306_SCROLL_VERTICAL_AND_HORIZONTAL_RIGHT 0x29
+#define SSD1306_SCROLL_VERTICAL_AND_HORIZONTAL_LEFT 0x2A
+
+#endif /* _SSD1306_H */
+/** @} */
+