File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -378,7 +378,7 @@ def get_platform_gpio(**keywords):
378
378
import Adafruit_BBIO .GPIO
379
379
return AdafruitBBIOAdapter (Adafruit_BBIO .GPIO , ** keywords )
380
380
elif plat == Platform .MINNOWBOARD :
381
- #probably don't need to import the mraa library again (did it in platform.py)
381
+ import mraa
382
382
return AdafruitMinnowAdapter (mraa , ** keywords )
383
383
elif plat == Platform .UNKNOWN :
384
384
raise RuntimeError ('Could not determine platform.' )
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ def transfer(self, data):
97
97
class SpiDevMraa (object ):
98
98
"""Hardware SPI implementation with the mraa library on Minnowboard"""
99
99
def __init__ (self , port , device , max_speed_hz = 500000 ):
100
- self ._device = mraa .Spi ()
100
+ self ._device = mraa .Spi (0 )
101
101
self ._device .mode (0 )
102
102
103
103
def set_clock_hz (self , hz ):
@@ -106,7 +106,7 @@ def set_clock_hz(self, hz):
106
106
"""
107
107
self ._device .frequency (hz )
108
108
109
- def set_mode (self ,mode ):
109
+ def set_mode (self ,mode ):
110
110
"""Set SPI mode which controls clock polarity and phase. Should be a
111
111
numeric value 0, 1, 2, or 3. See wikipedia page for details on meaning:
112
112
http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus
You can’t perform that action at this time.
0 commit comments