summaryrefslogtreecommitdiff
path: root/anzeige.c
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-10-19 11:36:04 +0200
committerErich Eckner <git@eckner.net>2018-10-19 11:36:04 +0200
commit5d67929e77ce7e9107c791f4d37f36cb1139fb92 (patch)
tree59478c017274167216d351d62d0b8fe0bd945bb3 /anzeige.c
parentbfc1c28b216cc2f4965c44b5241efc016098ac1a (diff)
downloadanzeige-5d67929e77ce7e9107c791f4d37f36cb1139fb92.tar.xz
use thread
Diffstat (limited to 'anzeige.c')
-rw-r--r--anzeige.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/anzeige.c b/anzeige.c
index 24d6011..73b7041 100644
--- a/anzeige.c
+++ b/anzeige.c
@@ -19,6 +19,7 @@
#include <unistd.h>
#include <errno.h>
#include <string.h>
+#include <pthread.h>
#define PAGE_SIZE (4*1024)
#define BLOCK_SIZE (4*1024)
@@ -64,7 +65,8 @@ void printButton(int g)
int main(int argc, char **argv)
{
- int rep;
+ int thread_id;
+ char *content;
// Set up gpi pointer for direct register access
// setup_io();
@@ -90,7 +92,9 @@ int main(int argc, char **argv)
OUT_GPIO(PAR_CLK_PIN);
INP_GPIO(SENSE_PIN);
- put_on_display("0123456789abcdefghijklmnopqrstuvwxy");
+ content = "0123456789abcdefghijklmnopqrstuvwxy";
+ pthread_create(&thread_id, NULL, put_on_display, content);
+ pthread_join(thread_id, NULL);
return 0;