summaryrefslogtreecommitdiff
path: root/drivers/oled/oled_driver.c
diff options
context:
space:
mode:
authorXScorpion2 <rcalt2vt@gmail.com>2019-06-07 19:02:05 -0500
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-06-07 17:02:05 -0700
commit09968ba035f3bfa4df5b1d142dddfa669aefb2d7 (patch)
treecfb29848ea7bfd0ca5f77cd51c5a5f568d3a88ba /drivers/oled/oled_driver.c
parent54ac80d4a5a34661283b413e14f88e955bedeeef (diff)
Fixing OLED Driver for 128x64 displays (#6085)
Diffstat (limited to 'drivers/oled/oled_driver.c')
-rw-r--r--drivers/oled/oled_driver.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c
index 96ea58ccb2..643e528946 100644
--- a/drivers/oled/oled_driver.c
+++ b/drivers/oled/oled_driver.c
@@ -63,6 +63,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define COM_SCAN_DEC 0xC8
#define DISPLAY_OFFSET 0xD3
#define COM_PINS 0xDA
+#define COM_PINS_SEQ 0x02
+#define COM_PINS_ALT 0x12
+#define COM_PINS_SEQ_LR 0x22
+#define COM_PINS_ALT_LR 0x32
// Timing & Driving Commands
#define DISPLAY_CLOCK 0xD5
@@ -182,7 +186,7 @@ bool oled_init(uint8_t rotation) {
static const uint8_t PROGMEM display_setup2[] = {
I2C_CMD,
- COM_PINS, 0x02,
+ COM_PINS, OLED_COM_PINS,
CONTRAST, 0x8F,
PRE_CHARGE_PERIOD, 0xF1,
VCOM_DETECT, 0x40,