diff options
author | Erich Eckner <git@eckner.net> | 2018-10-19 11:36:04 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-10-19 11:36:04 +0200 |
commit | 5d67929e77ce7e9107c791f4d37f36cb1139fb92 (patch) | |
tree | 59478c017274167216d351d62d0b8fe0bd945bb3 /anzeige.c | |
parent | bfc1c28b216cc2f4965c44b5241efc016098ac1a (diff) | |
download | anzeige-5d67929e77ce7e9107c791f4d37f36cb1139fb92.tar.xz |
use thread
Diffstat (limited to 'anzeige.c')
-rw-r--r-- | anzeige.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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; |