summaryrefslogtreecommitdiff
path: root/drivers/painter/sh1106/qp_sh1106_opcodes.h
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2023-10-22 13:27:31 +1100
committerGitHub <noreply@github.com>2023-10-22 13:27:31 +1100
commit8e614250b4b44a14a6a8c93bea3a6d1fd02790cf (patch)
tree15c000b7765082911a3a6d84b1499b51c25f43d8 /drivers/painter/sh1106/qp_sh1106_opcodes.h
parent48d9140cfc197d6f4c54bf8022902d28fac37624 (diff)
[QP] Add support for OLED, variable framebuffer bpp (#19997)
Co-authored-by: Pablo Martínez <58857054+elpekenin@users.noreply.github.com> Co-authored-by: Dasky <32983009+daskygit@users.noreply.github.com> Fixup delta frame coordinates after #20296.
Diffstat (limited to 'drivers/painter/sh1106/qp_sh1106_opcodes.h')
-rw-r--r--drivers/painter/sh1106/qp_sh1106_opcodes.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/painter/sh1106/qp_sh1106_opcodes.h b/drivers/painter/sh1106/qp_sh1106_opcodes.h
new file mode 100644
index 0000000000..a2e100d770
--- /dev/null
+++ b/drivers/painter/sh1106/qp_sh1106_opcodes.h
@@ -0,0 +1,26 @@
+// Copyright 2023 Nick Brassel (@tzarc)
+// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
+#define SH1106_DISPLAY_ON 0xAF
+#define SH1106_DISPLAY_OFF 0xAE
+#define SH1106_SET_OSC_DIVFREQ 0xD5
+#define SH1106_SET_MUX_RATIO 0xA8
+#define SH1106_DISPLAY_OFFSET 0xD3
+#define SH1106_DISPLAY_START_LINE 0x40
+#define SH1106_SET_CHARGE_PUMP 0x8D
+#define SH1106_SET_SEGMENT_REMAP_NORMAL 0xA0
+#define SH1106_SET_SEGMENT_REMAP_INV 0xA1
+#define SH1106_COM_SCAN_DIR_INC 0xC0
+#define SH1106_COM_SCAN_DIR_DEC 0xC8
+#define SH1106_COM_PADS_HW_CFG 0xDA
+#define SH1106_SET_CONTRAST 0x81
+#define SH1106_SET_PRECHARGE_PERIOD 0xD9
+#define SH1106_VCOM_DETECT 0xDB
+#define SH1106_ALL_ON_RESUME 0xA4
+#define SH1106_NON_INVERTING_DISPLAY 0xA6
+#define SH1106_DEACTIVATE_SCROLL 0x2E
+
+#define SH1106_SETCOLUMN_LSB 0x00
+#define SH1106_SETCOLUMN_MSB 0x10
+#define SH1106_PAGE_ADDR 0xB0