summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--multiplexer.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/multiplexer.c b/multiplexer.c
index 641e2ce..e4b2e11 100644
--- a/multiplexer.c
+++ b/multiplexer.c
@@ -66,7 +66,7 @@ void *put_on_display(void *param)
while (display_data -> keep_running) {
#ifdef SKIP_GPIO
- usleep(100000);
+ usleep(10000);
printf("=\n");
#endif
display_data -> is_buf = display_data -> should_buf;
@@ -82,26 +82,25 @@ void *put_on_display(void *param)
for (column=0; column<8; column++) {
GPIO_CLR = 1<<SER_CLK_PIN;
GPIO_ALTER(column == line) = 1<<SER_DAT_PIN;
- usleep(25);
+ usleep(5);
GPIO_SET = 1<<SER_CLK_PIN;
- usleep(25);
+ usleep(5);
}
for (column=39; column>=0; column--) {
GPIO_CLR = 1<<SER_CLK_PIN;
GPIO_ALTER(display_data -> buf[display_data -> is_buf][column] & (0x01 << line)) = 1<<SER_DAT_PIN;
usleep(5);
GPIO_SET = 1<<SER_CLK_PIN;
- usleep(250);
+ usleep(5);
#endif
}
#ifdef SKIP_GPIO
- usleep(1000);
printf("\n");
#else
GPIO_SET = 1<<GATE_PIN; // Licht aus
- usleep(250);
+ usleep(5);
GPIO_CLR = 1<<PAR_CLK_PIN;
- usleep(250);
+ usleep(5);
GPIO_SET = 1<<PAR_CLK_PIN;
#endif
}
@@ -149,7 +148,7 @@ void *scroll_it(void *param)
if (buf[is_buf] . len > 0)
while (column >= buf[is_buf] . start + buf[is_buf] . len)
column -= buf[is_buf] . len;
- usleep(100000);
+ usleep(50000);
}
display_data . keep_running = 0;
pthread_join(display_data . thread_id, NULL);