diff options
author | Erich Eckner <git@eckner.net> | 2018-10-31 20:57:32 +0000 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-10-31 20:57:32 +0000 |
commit | 6f97b4133be6acda57e7b5b5a69a3ea41f8d925a (patch) | |
tree | 28e3bbb2dadb6a8a33a50c5a6740b9d12d68a962 /multiplexer.c | |
parent | e3e7618f6dfc0ae997042cb22d9eee1dd8e19678 (diff) | |
download | anzeige-6f97b4133be6acda57e7b5b5a69a3ea41f8d925a.tar.xz |
multiplexer.c: use stored values for usleep
Diffstat (limited to 'multiplexer.c')
-rw-r--r-- | multiplexer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/multiplexer.c b/multiplexer.c index 136bfa2..5f333e5 100644 --- a/multiplexer.c +++ b/multiplexer.c @@ -110,7 +110,7 @@ void *put_on_display(void *param) // wait until start_time + 1ms int wait = (start_time.tv_sec - stop_time.tv_sec) * 1000000 + (start_time.tv_nsec - stop_time.tv_nsec) / 1000 + 1000; if (wait > 0) - usleep((start_time.tv_sec - stop_time.tv_sec) * 1000000 + (start_time.tv_nsec - stop_time.tv_nsec) / 1000 + 1000); + usleep(wait); GPIO_SET = 1<<GATE_PIN; // Licht aus GPIO_CLR = 1<<PAR_CLK_PIN; GPIO_SET = 1<<PAR_CLK_PIN; @@ -178,7 +178,7 @@ void *scroll_it(void *param) // wait until start_time + 50ms int wait = (start_time.tv_sec - stop_time.tv_sec) * 1000000 + (start_time.tv_nsec - stop_time.tv_nsec) / 1000 + 50000; if (wait > 0) - usleep((start_time.tv_sec - stop_time.tv_sec) * 1000000 + (start_time.tv_nsec - stop_time.tv_nsec) / 1000 + 50000); + usleep(wait); display_data . should_buf = (display_data . should_buf + 1) % 3; } display_data . keep_running = 0; |