summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--multiplexer.c4
-rw-r--r--multiplexer.h6
2 files changed, 7 insertions, 3 deletions
diff --git a/multiplexer.c b/multiplexer.c
index d0ae7c7..c893ca3 100644
--- a/multiplexer.c
+++ b/multiplexer.c
@@ -11,6 +11,10 @@
#include "multiplexer.h"
+int mem_fd;
+void *gpio_map;
+volatile unsigned *gpio;
+
//
// Set up a memory regions to access GPIO
//
diff --git a/multiplexer.h b/multiplexer.h
index 3fb1f87..00c1113 100644
--- a/multiplexer.h
+++ b/multiplexer.h
@@ -52,8 +52,8 @@ static uint8_t gpioToPUDCLK [] =
static int tpic_settle_time_iterator = 1000;
#define wait_tpic_settle_time for (int i=0; i<tpic_settle_time_iterator; i++) { asm volatile("" : : "r" (i)); }
-int mem_fd;
-void *gpio_map;
+extern int mem_fd;
+extern void *gpio_map;
typedef struct {
char buf[3][40];
@@ -75,7 +75,7 @@ typedef struct {
} t_scroll_data;
// I/O access
-volatile unsigned *gpio;
+extern volatile unsigned *gpio;
// GPIO setup macros. Always use INP_GPIO(x) before using OUT_GPIO(x) or SET_GPIO_ALT(x,y)
#define INP_GPIO(g) *(gpio+((g)/10)) &= ~(7<<(((g)%10)*3))