diff options
author | Erich Eckner <git@eckner.net> | 2018-11-01 10:31:05 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-11-01 10:31:05 +0100 |
commit | bb38fc49c776ded2847778befc7ffb63d24b7f9f (patch) | |
tree | aa2996228de087c91ef2240ab7f4dec192990967 /multiplexer.c | |
parent | 98f209d3395b8ea0470c8d7b3531020741208b86 (diff) | |
download | anzeige-bb38fc49c776ded2847778befc7ffb63d24b7f9f.tar.xz |
turn off display before exiting
Diffstat (limited to 'multiplexer.c')
-rw-r--r-- | multiplexer.c | 14 |
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 |