From 8dd603c8036f4eafd440ac14234d42d6c5eaefab Mon Sep 17 00:00:00 2001 From: "Michael J. Chudobiak" Date: Wed, 19 Sep 2012 11:01:31 -0400 Subject: add gpio bit read function --- bus.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'bus.c') 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) { -- cgit