From 5d67929e77ce7e9107c791f4d37f36cb1139fb92 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 19 Oct 2018 11:36:04 +0200 Subject: use thread --- anzeige.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'anzeige.c') diff --git a/anzeige.c b/anzeige.c index 24d6011..73b7041 100644 --- a/anzeige.c +++ b/anzeige.c @@ -19,6 +19,7 @@ #include #include #include +#include #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; -- cgit v1.2.3-70-g09d2