diff --git a/fbsd_gpio/__init__.py b/fbsd_gpio/__init__.py index d789f60..6a5f5f4 100644 --- a/fbsd_gpio/__init__.py +++ b/fbsd_gpio/__init__.py @@ -272,9 +272,11 @@ def __call__(self, value=None): """Set or get the value of the pin :param value: If set, set the value of the pin """ - if value: + if value is None: + return self._controller.pin_get(self._num) + else: self._controller.pin_set(self._num, value) - return self._controller.pin_get(self._num) + @property def name(self):