summaryrefslogtreecommitdiff
path: root/tmk_core/common
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2021-06-10 17:16:09 +1000
committerGitHub <noreply@github.com>2021-06-10 17:16:09 +1000
commitb2fdd4874434ef6921a436fc82d9f24909c726f8 (patch)
tree0348596d5938326e95c09270d209556bbe60ba72 /tmk_core/common
parentcfc7ee61c5cb9822a1195028681b928bbeac2fd3 (diff)
downloadqmk_firmware-b2fdd4874434ef6921a436fc82d9f24909c726f8.tar.gz
qmk_firmware-b2fdd4874434ef6921a436fc82d9f24909c726f8.zip
Add ST7565 LCD driver (#13089)
Co-authored-by: Joakim Tufvegren <jocke@barbanet.com>
Diffstat (limited to 'tmk_core/common')
-rw-r--r--tmk_core/common/keyboard.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c
index 3d6092e71c..249da85bd2 100644
--- a/tmk_core/common/keyboard.c
+++ b/tmk_core/common/keyboard.c
@@ -85,6 +85,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef OLED_DRIVER_ENABLE
# include "oled_driver.h"
#endif
+#ifdef ST7565_ENABLE
+# include "st7565.h"
+#endif
#ifdef VELOCIKEY_ENABLE
# include "velocikey.h"
#endif
@@ -306,6 +309,9 @@ void keyboard_init(void) {
#ifdef OLED_DRIVER_ENABLE
oled_init(OLED_ROTATION_0);
#endif
+#ifdef ST7565_ENABLE
+ st7565_init(DISPLAY_ROTATION_0);
+#endif
#ifdef PS2_MOUSE_ENABLE
ps2_mouse_init();
#endif
@@ -470,6 +476,18 @@ MATRIX_LOOP_END:
# endif
#endif
+#ifdef ST7565_ENABLE
+ st7565_task();
+# ifndef ST7565_DISABLE_TIMEOUT
+ // Wake up display if user is using those fabulous keys or spinning those encoders!
+# ifdef ENCODER_ENABLE
+ if (matrix_changed || encoders_changed) st7565_on();
+# else
+ if (matrix_changed) st7565_on();
+# endif
+# endif
+#endif
+
#ifdef MOUSEKEY_ENABLE
// mousekey repeat & acceleration
mousekey_task();