|
@@ -85,9 +85,9 @@ class GPIOWrapper(object):
|
|
|
lgpio.debug("no gpio module")
|
|
|
lgpio.debug("gpio module: {}".format(self.gpio))
|
|
|
|
|
|
- def read(self,pin,*args):
|
|
|
+ def input(self,pin,*args):
|
|
|
if self.gpio:
|
|
|
- state = self.gpio.read(pin)
|
|
|
+ state = self.gpio.input(pin)
|
|
|
else:
|
|
|
state = -1
|
|
|
lgpio.debug("reading pin {:0>2}: {}".format(
|
|
@@ -116,8 +116,8 @@ class PinBase(object):
|
|
|
self.value = value
|
|
|
_gpio.output(self.pin_number,value)
|
|
|
|
|
|
- def read(self):
|
|
|
- value = _gpio.read(self.pin_number,value)
|
|
|
+ def input(self):
|
|
|
+ value = _gpio.input(self.pin_number,value)
|
|
|
return value
|
|
|
|
|
|
class DigitalPin(PinBase):
|
|
@@ -320,14 +320,15 @@ class DebugPinController(PinControllerBase):
|
|
|
pins = digilib.misc.parse_to_int_list(args[0])
|
|
|
[state] = digilib.misc.parse_to_int_list(args[1])
|
|
|
_gpio.output(pins,state)
|
|
|
- def read(self,args=[],command=None,respond=None):
|
|
|
+
|
|
|
+ def input(self,args=[],command=None,respond=None):
|
|
|
if len(args) != 2:
|
|
|
respond(ERROR_TAKES_ARGUMENTS.format(
|
|
|
command, "two", "positional", "<name>"))
|
|
|
return False
|
|
|
pins = digilib.misc.parse_to_int_list(args[0])
|
|
|
[state] = digilib.misc.parse_to_int_list(args[1])
|
|
|
- return _gpio.read(pins,state)
|
|
|
+ return _gpio.input(pins,state)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
pass
|