]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Update pin.py
authordnssoftware <34219854+dnssoftware@users.noreply.github.com>
Wed, 27 May 2020 16:43:40 +0000 (02:43 +1000)
committerGitHub <noreply@github.com>
Wed, 27 May 2020 16:43:40 +0000 (02:43 +1000)
On beaglebone black, the spi devices are spidev0.0, spidev0.1, spidev1.0, spidev1.1 and the existing code tries to open up spidev2.0 when using SPI1. Renumbering fixes this.

src/adafruit_blinka/microcontroller/am335x/pin.py

index dbc0143b6d5bb0d4ff8ceacf02923d656eb1a646..1553ff23fabb80174072941325a8148e5ec38a08 100644 (file)
@@ -330,8 +330,8 @@ UART5_CTSn = Pin("UART5_CTSn")
 
 # ordered as spiId, sckId, mosiId, misoId
 spiPorts = (
-    (1, SPI0_SCLK, SPI0_D1, SPI0_D0),
-    (2, SPI1_SCLK, SPI1_D1, SPI1_D0),
+    (0, SPI0_SCLK, SPI0_D1, SPI0_D0),
+    (1, SPI1_SCLK, SPI1_D1, SPI1_D0),
 )
 
 # ordered as uartId, txId, rxId