]> Repositories - Adafruit_Blinka-hackapet.git/blobdiff - src/adafruit_blinka/microcontroller/generic_linux/spi.py
Fix missing attribute exception on RPi
[Adafruit_Blinka-hackapet.git] / src / adafruit_blinka / microcontroller / generic_linux / spi.py
index 71f74c8b931577efb655c8ef42efd1f54ce5093b..322af935f29cfdc846e0219b91c2aa56adb550f9 100755 (executable)
@@ -35,12 +35,17 @@ class SPI:
     def set_no_cs(self):
         # Linux SPI driver for AM33XX chip in BeagleBone and PocketBeagle
         # does not support setting SPI_NO_CS mode bit (issue #104)
     def set_no_cs(self):
         # Linux SPI driver for AM33XX chip in BeagleBone and PocketBeagle
         # does not support setting SPI_NO_CS mode bit (issue #104)
-        if not self.chip.AM33XX and not self.chip.IMX8MX and not self.chip.SAMA5 \
-         and not self.chip.APQ8016:
-            try:
+        try:
+            if not self.chip.AM33XX and not self.chip.IMX8MX and not self.chip.SAMA5 \
+             and not self.chip.APQ8016 and not self.chip.T210 and not self.chip.T186 \
+             and not self.chip.T194 and not self.chip.SUN8I:
                 self._spi.no_cs = True  # this doesn't work but try anyways
                 self._spi.no_cs = True  # this doesn't work but try anyways
-            except AttributeError:
-                pass
+        except AttributeError:
+            pass
+
+    @property
+    def frequency(self):
+        return self.baudrate
 
     def write(self, buf, start=0, end=None):
         if not buf:
 
     def write(self, buf, start=0, end=None):
         if not buf: