]> Repositories - hackapet/Adafruit_Blinka_Displayio.git/commitdiff
make chip_select pin optional in SPI four wire
authorJan Volckaert <janvolck@gmail.com>
Sun, 15 Oct 2023 18:08:46 +0000 (20:08 +0200)
committerJan Volckaert <janvolck@gmail.com>
Sun, 31 Dec 2023 12:07:00 +0000 (13:07 +0100)
on Odroid C4 the chip_select is controller by the spi_meson_spicc driver, in case the SPI_CS0 is used as chip_select pin in the FourWire class Resource Busy exceptions are thrown.

displayio/_fourwire.py

index 65b7654d4f3b32238d735d2ccdd3ebb25c57c9fa..1cf1682a2fe8dba60b61bd7ceead0572a3705044 100644 (file)
@@ -158,14 +158,9 @@ class FourWire:
         self._spi.configure(
             baudrate=self._frequency, polarity=self._polarity, phase=self._phase
         )
         self._spi.configure(
             baudrate=self._frequency, polarity=self._polarity, phase=self._phase
         )
-<<<<<<< HEAD
-        self._chip_select.value = False
-        return True
-=======
 
         if self._chip_select is not None:
             self._chip_select.value = False
 
         if self._chip_select is not None:
             self._chip_select.value = False
->>>>>>> 87a1bde (make chip_select pin optional in SPI four wire)
 
     def _end_transaction(self) -> None:
         """End the SPI transaction by unlocking and setting Chip Select"""
 
     def _end_transaction(self) -> None:
         """End the SPI transaction by unlocking and setting Chip Select"""