]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
change SPI index for BeagleBone/PocketBeagle #106
authorDrew Fustini <drew@pdp7.com>
Sun, 14 Apr 2019 10:17:47 +0000 (12:17 +0200)
committerGitHub <noreply@github.com>
Sun, 14 Apr 2019 10:17:47 +0000 (12:17 +0200)
Change SPI port index because SPI0 is /dev/spidev1.x and SPI1 is /dev/spidev2.x on both:
* the current recommended BeagleBoard.org Debian image: Debian 9.5 (Stretch) from 2018-10-07
* the newest Debian 9.8 (Strecth) snapshot from 2019-04-07

This change is to fix issue #106: inconsistent spidev index on AM335x-based boards like BeagleBone Black and PocketBeagle.

src/adafruit_blinka/microcontroller/am335x/pin.py

index f8c1649b115c08fe1dc767e6acd3fdefd42c0d78..e73457d6d529fff5f10484a1251eef5c6b90b52e 100644 (file)
@@ -325,8 +325,8 @@ UART5_CTSn = Pin('UART5_CTSn')
 
 # ordered as spiId, sckId, mosiId, misoId
 spiPorts = (
-    (0, SPI0_SCLK, SPI0_D1, SPI0_D0),
-    (1, SPI1_SCLK, SPI1_D1, SPI1_D0),
+    (1, SPI0_SCLK, SPI0_D1, SPI0_D0),
+    (2, SPI1_SCLK, SPI1_D1, SPI1_D0),
 )
 
 # ordered as uartId, txId, rxId