Skip to content

Commit 0307bd7

Browse files
author
Evan Steele
committed
bug fixes
1 parent 361fd19 commit 0307bd7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Adafruit_GPIO/GPIO.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ def get_platform_gpio(**keywords):
378378
import Adafruit_BBIO.GPIO
379379
return AdafruitBBIOAdapter(Adafruit_BBIO.GPIO, **keywords)
380380
elif plat == Platform.MINNOWBOARD:
381-
#probably don't need to import the mraa library again (did it in platform.py)
381+
import mraa
382382
return AdafruitMinnowAdapter(mraa, **keywords)
383383
elif plat == Platform.UNKNOWN:
384384
raise RuntimeError('Could not determine platform.')

Adafruit_GPIO/SPI.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def transfer(self, data):
9797
class SpiDevMraa(object):
9898
"""Hardware SPI implementation with the mraa library on Minnowboard"""
9999
def __init__(self, port, device, max_speed_hz=500000):
100-
self._device = mraa.Spi()
100+
self._device = mraa.Spi(0)
101101
self._device.mode(0)
102102

103103
def set_clock_hz(self, hz):
@@ -106,7 +106,7 @@ def set_clock_hz(self, hz):
106106
"""
107107
self._device.frequency(hz)
108108

109-
def set_mode(self,mode):
109+
def set_mode(self,mode):
110110
"""Set SPI mode which controls clock polarity and phase. Should be a
111111
numeric value 0, 1, 2, or 3. See wikipedia page for details on meaning:
112112
http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus

0 commit comments

Comments
 (0)