summaryrefslogtreecommitdiff
path: root/bus.h
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2012-08-21 14:23:11 -0400
committerMichael J. Chudobiak <mjc@avtechpulse.com>2012-08-21 14:23:11 -0400
commit88767f0cf7836304029af02d8d2877a7d6db3e62 (patch)
treec5c8f3994c83f39c23c478acb0e6112fec9d38c9 /bus.h
parent5dded60be2dfa7284d3760f1fe48eb4bf04b94e4 (diff)
first addition of bus.c - untested
Diffstat (limited to 'bus.h')
-rw-r--r--bus.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/bus.h b/bus.h
new file mode 100644
index 0000000..d9ec330
--- /dev/null
+++ b/bus.h
@@ -0,0 +1,35 @@
+/*
+ * bus.h
+ *
+ * Created on: 9 Aug 2012
+ * Author: daniel
+ */
+
+#ifndef BUS_H_
+#define BUS_H_
+
+#include <stdint.h>
+
+#define GPIOPIN0BASE 0
+#define GPIOPIN1BASE 0
+#define GPIOPIN2BASE 0
+#define GPIOPIN3BASE 32
+#define GPIOPIN4BASE 32
+#define GPIOPIN5BASE 0
+
+#define GPIOPIN0PIN 22
+#define GPIOPIN1PIN 23
+#define GPIOPIN2PIN 26
+#define GPIOPIN3PIN 15
+#define GPIOPIN4PIN 14
+#define GPIOPIN5PIN 27
+
+#define GPMCACCESSTIME 0x07
+
+void bus_init(void); // call this before doing anything
+void bus_setpin(int pin, int value); // set the value of a pin
+void bus_writebyte(uint8_t address, uint8_t data); // write a byte to the bus
+uint8_t bus_readbyte(uint8_t address); // read a pin from the bus
+void bus_shutdown(void); // shutdown the bus
+
+#endif /* BUS_H_ */