summaryrefslogtreecommitdiff
path: root/multiplexer.c
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-10-29 09:31:52 +0100
committerErich Eckner <git@eckner.net>2018-10-29 09:31:52 +0100
commitaedfcb2e289c8a21ad0dd78dbd2b0fe1e87e5daf (patch)
treec0c6bd319b3635b619ffaf6e3e4ec2bc9b20b700 /multiplexer.c
parent63d1c14e7f05855b62257def0e601a6c5ef1efaa (diff)
downloadanzeige-aedfcb2e289c8a21ad0dd78dbd2b0fe1e87e5daf.tar.xz
multiplexer.c: faster scrolling & output
Diffstat (limited to 'multiplexer.c')
-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);