]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Merge pull request #29 from ladyada/master 0.2.3
authorDan Halbert <halbert@halwitz.org>
Wed, 22 Aug 2018 15:37:04 +0000 (11:37 -0400)
committerGitHub <noreply@github.com>
Wed, 22 Aug 2018 15:37:04 +0000 (11:37 -0400)
add support for second SPI - tested!

src/adafruit_blinka/microcontroller/raspi_23/spi.py

index a4e1158a6f79bce68c55131cd04dddb9c70d9b64..b90587316536e105499e17d317a2073079b7fb18 100755 (executable)
@@ -19,9 +19,9 @@ class SPI:
                   firstbit=MSB, sck=None, mosi=None, miso=None):
         mode = 0
         if polarity:
-            mode |= CPOL
+            mode |= self.CPOL
         if phase:
-            mode |= CPHA
+            mode |= self.CPHA
 
         self.clock_pin = sck
         self.mosi_pin = mosi