Skip to content

Commit 76735db

Browse files
committed
Merge branch 'matthw-master'
2 parents 9a9de94 + bcb5cef commit 76735db

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

Adafruit_GPIO/FT232H.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,9 @@ def setup_pins(self, pins, values={}, write=True):
346346
pins can be provided in the values dict (with pin name to pin value).
347347
"""
348348
# General implementation that can be improved by subclasses.
349-
for pin, mode in pins.iteritems():
349+
for pin, mode in iter(pins.items()):
350350
self._setup_pin(pin, mode)
351-
for pin, value in values.iteritems():
351+
for pin, value in iter(values.items()):
352352
self._output_pin(pin, value)
353353
if write:
354354
self.mpsse_write_gpio()
@@ -372,7 +372,7 @@ def output_pins(self, pins, write=True):
372372
name to pin value (HIGH/True for 1, LOW/False for 0). All provided pins
373373
will be set to the given values.
374374
"""
375-
for pin, value in pins.iteritems():
375+
for pin, value in iter(pins.items()):
376376
self._output_pin(pin, value)
377377
if write:
378378
self.mpsse_write_gpio()

Adafruit_GPIO/GPIO.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ def output_pins(self, pins):
8080
# manually. This is not optimized, but subclasses can choose to implement
8181
# a more optimal batch output implementation. See the MCP230xx class for
8282
# example of optimized implementation.
83-
for pin, value in pins.iteritems():
83+
for pin, value in iter(pins.items()):
8484
self.output(pin, value)
8585

8686
def setup_pins(self, pins):
8787
"""Setup multiple pins as inputs or outputs at once. Pins should be a
8888
dict of pin name to pin type (IN or OUT).
8989
"""
9090
# General implementation that can be improved by subclasses.
91-
for pin, value in pins.iteritems():
91+
for pin, value in iter(pins.items()):
9292
self.setup(pin, value)
9393

9494
def add_event_detect(self, pin, edge):

Adafruit_GPIO/MCP230xx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def output_pins(self, pins):
8888
will be set to the given values.
8989
"""
9090
# Set each changed pin's bit.
91-
for pin, value in pins.iteritems():
91+
for pin, value in iter(pins.items()):
9292
if value:
9393
self.gpio[int(pin/8)] |= 1 << (int(pin%8))
9494
else:

Adafruit_GPIO/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
from GPIO import *
1+
from __future__ import absolute_import
2+
3+
from Adafruit_GPIO.GPIO import *

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
requires.append('spidev')
1212

1313
setup(name = 'Adafruit_GPIO',
14-
version = '0.9.1',
14+
version = '0.9.2',
1515
author = 'Tony DiCola',
1616
author_email = 'tdicola@adafruit.com',
1717
description = 'Library to provide a cross-platform GPIO interface on the Raspberry Pi and Beaglebone Black using the RPi.GPIO and Adafruit_BBIO libraries.',

0 commit comments

Comments
 (0)