summaryrefslogtreecommitdiff
path: root/bus.c
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2012-09-19 11:01:31 -0400
committerMichael J. Chudobiak <mjc@avtechpulse.com>2012-09-19 11:01:31 -0400
commit8dd603c8036f4eafd440ac14234d42d6c5eaefab (patch)
tree40a2f46f4725354d2ebe0c0c5113b26532fc07fc /bus.c
parent7a9dfe8a49b21c82742e13c43670a92de2380871 (diff)
add gpio bit read function
Diffstat (limited to 'bus.c')
-rw-r--r--bus.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/bus.c b/bus.c
index 38298d0..0683113 100644
--- a/bus.c
+++ b/bus.c
@@ -358,6 +358,16 @@ void bus_init()
}
}
+
+int bus_getpin(int pin)
+{
+ if (isbb) {
+ return gpio_readvalue(gpio_pins[pin]);
+ } else {
+ return 0;
+ }
+}
+
void bus_setpin(int pin, int value)
{
if (isbb) {