summaryrefslogtreecommitdiff
path: root/multiplexer.c
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-11-01 10:31:05 +0100
committerErich Eckner <git@eckner.net>2018-11-01 10:31:05 +0100
commitbb38fc49c776ded2847778befc7ffb63d24b7f9f (patch)
treeaa2996228de087c91ef2240ab7f4dec192990967 /multiplexer.c
parent98f209d3395b8ea0470c8d7b3531020741208b86 (diff)
downloadanzeige-bb38fc49c776ded2847778befc7ffb63d24b7f9f.tar.xz
turn off display before exiting
Diffstat (limited to 'multiplexer.c')
-rw-r--r--multiplexer.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/multiplexer.c b/multiplexer.c
index f224710..b260891 100644
--- a/multiplexer.c
+++ b/multiplexer.c
@@ -216,3 +216,17 @@ void multiplexer_setup_scroll(t_scroll_data *scroll_data)
pthread_create(&scroll_data -> thread_id, NULL, scroll_it, scroll_data);
return;
} // multiplexer_setup_scroll
+
+void turn_off_display()
+{
+#ifndef SKIP_GPIO
+ GPIO_SET = 1<<GATE_PIN; // Licht aus
+ GPIO_CLR = 1<<SER_DAT_PIN;
+ for (int i=0; i<48; i++) {
+ GPIO_CLR = 1<<SER_CLK_PIN;
+ GPIO_SET = 1<<SER_CLK_PIN;
+ }
+ GPIO_CLR = 1<<PAR_CLK_PIN;
+ GPIO_SET = 1<<PAR_CLK_PIN;
+#endif
+} // turn_off_display