aboutsummaryrefslogtreecommitdiff
path: root/drivers/painter/sh1107/qp_sh1107_opcodes.h
diff options
context:
space:
mode:
authorSteve Storck <steve973@gmail.com>2025-02-16 16:41:07 -0500
committerGitHub <noreply@github.com>2025-02-17 08:41:07 +1100
commitc00b0c5bc96b4cd5d096d3c8701e86be9aba4982 (patch)
treea9f1adbbf6c350ee9e602b6035d5baadc8205be8 /drivers/painter/sh1107/qp_sh1107_opcodes.h
parent164b7331c3b98165e49d38127bee366f9c545513 (diff)
Created SH1107 driver for quantum painter (#24724)
Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
Diffstat (limited to 'drivers/painter/sh1107/qp_sh1107_opcodes.h')
-rw-r--r--drivers/painter/sh1107/qp_sh1107_opcodes.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/painter/sh1107/qp_sh1107_opcodes.h b/drivers/painter/sh1107/qp_sh1107_opcodes.h
new file mode 100644
index 0000000000..818bf40928
--- /dev/null
+++ b/drivers/painter/sh1107/qp_sh1107_opcodes.h
@@ -0,0 +1,25 @@
+// Copyright 2024 Steve Branam (@smbranam)
+// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
+#define SH1107_DISPLAY_ON 0xAF
+#define SH1107_DISPLAY_OFF 0xAE
+#define SH1107_SET_OSC_DIVFREQ 0xD5
+#define SH1107_SET_MUX_RATIO 0xA8
+#define SH1107_DISPLAY_OFFSET 0xD3
+#define SH1107_SET_START_LINE 0xDC // Key/sole difference from SH1106 (which uses 0x40)
+#define SH1107_SET_CHARGE_PUMP 0x8D
+#define SH1107_SET_SEGMENT_REMAP_NORMAL 0xA0
+#define SH1107_SET_SEGMENT_REMAP_INV 0xA1
+#define SH1107_COM_SCAN_DIR_INC 0xC0
+#define SH1107_COM_SCAN_DIR_DEC 0xC8
+#define SH1107_COM_PADS_HW_CFG 0xDA
+#define SH1107_SET_CONTRAST 0x81
+#define SH1107_SET_PRECHARGE_PERIOD 0xD9
+#define SH1107_VCOM_DESELECT_LEVEL 0xDB
+#define SH1107_ALL_ON_RESUME 0xA4
+#define SH1107_NON_INVERTING_DISPLAY 0xA6
+#define SH1107_DEACTIVATE_SCROLL 0x2E
+#define SH1107_SETCOLUMN_LSB 0x00
+#define SH1107_SETCOLUMN_MSB 0x10
+#define SH1107_PAGE_ADDR 0xB0