Skip to content

Commit

Permalink
fixed for pi2 device tree
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Preston committed Feb 9, 2015
1 parent a319522 commit 63025bb
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
Change Log
==========

v4.1.1
------
- Fixed bug with new Device Tree (Pi2) by changing GPIO_INTERRUPT_DEVICE
from `/sys/devices/virtual/gpio/` to `/sys/class/gpio/` and changing udev
rule.


v4.1.0
------
- Added deregister to interrupts



v4.0.1
------
- Fixed SPI file descriptor bug when closing.
- Fixed issue #14.


v4.0.0
------
- Ignored "Interrupted system call" error in `watch_port_events`.
Expand Down
2 changes: 1 addition & 1 deletion pifacecommon/interrupts.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# IN_EVENT_DIR_BOTH = INPUT_DIRECTION_BOTH = None

GPIO_INTERRUPT_PIN = 25
GPIO_INTERRUPT_DEVICE = "/sys/devices/virtual/gpio/gpio%d" % GPIO_INTERRUPT_PIN
GPIO_INTERRUPT_DEVICE = "/sys/class/gpio/gpio%d" % GPIO_INTERRUPT_PIN
GPIO_INTERRUPT_DEVICE_EDGE = '%s/edge' % GPIO_INTERRUPT_DEVICE
GPIO_INTERRUPT_DEVICE_VALUE = '%s/value' % GPIO_INTERRUPT_DEVICE
GPIO_EXPORT_FILE = "/sys/class/gpio/export"
Expand Down
6 changes: 3 additions & 3 deletions pifacecommon/spi.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ def __init__(self, bus=0, chip_select=0, spi_callback=None):
spi_device = "%s%d.%d" % (SPIDEV, self.bus, self.chip_select)
self.open_fd(spi_device)

def __del__(self):
if self.fd is not None:
self.close_fd()
# def __del__(self):
# if self.fd is not None:
# self.close_fd()

def open_fd(self, spi_device):
try:
Expand Down
2 changes: 1 addition & 1 deletion pifacecommon/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '4.1.0'
__version__ = '4.1.1'

0 comments on commit 63025bb

Please sign in to comment.