diff --git a/sysfs/gpio.py b/sysfs/gpio.py index 80b2cce..74fde6f 100755 --- a/sysfs/gpio.py +++ b/sysfs/gpio.py @@ -91,14 +91,14 @@ def __init__(self, number, direction, callback=None, edge=None, active_low=0): @type edge: int @param edge: The edge transition that triggers callback, enumerated by C{Edge} - @type active_low: int + @type active_low: int|bool @param active_low: Indicator of whether this pin uses inverted logic for HIGH-LOW transitions. """ self._number = number self._direction = direction self._callback = callback - self._active_low = active_low + self._active_low = int(active_low) self._fd = open(self._sysfs_gpio_value_path(), 'r+')