else:
return GPIO.input(self.id)
+
+# PocketBeagle
+P1_2 = Pin('P1_2')
+P1_3 = Pin('P1_3')
+P1_4 = Pin('P1_4')
+
+P1_6 = Pin('P1_6')
+
+P1_8 = Pin('P1_8')
+
+P1_10 = Pin('P1_10')
+
+P1_12 = Pin('P1_12')
+
+P1_19 = Pin('P1_19')
+P1_20 = Pin('P1_20')
+P1_21 = Pin('P1_21')
+
+P1_23 = Pin('P1_23')
+
+P1_25 = Pin('P1_25')
+P1_26 = Pin('P1_26')
+P1_27 = Pin('P1_27')
+P1_28 = Pin('P1_28')
+P1_29 = Pin('P1_29')
+P1_30 = Pin('P1_30')
+P1_31 = Pin('P1_31')
+P1_32 = Pin('P1_32')
+P1_33 = Pin('P1_33')
+P1_34 = Pin('P1_34')
+P1_35 = Pin('P1_35')
+P1_36 = Pin('P1_36')
+
+
+P2_1 = Pin('P2_1')
+P2_2 = Pin('P2_2')
+P2_3 = Pin('P2_3')
+P2_4 = Pin('P2_4')
+P2_5 = Pin('P2_5')
+P2_6 = Pin('P2_6')
+P2_7 = Pin('P2_7')
+P2_8 = Pin('P2_8')
+P2_9 = Pin('P2_9')
+P2_10 = Pin('P2_10')
+P2_11 = Pin('P2_11')
+
+P2_17 = Pin('P2_17')
+P2_18 = Pin('P2_18')
+P2_19 = Pin('P2_19')
+P2_20 = Pin('P2_20')
+
+P2_22 = Pin('P2_22')
+
+P2_24 = Pin('P2_24')
+
+P2_26 = Pin('P2_26')
+P2_27 = Pin('P2_27')
+P2_28 = Pin('P2_28')
+P2_29 = Pin('P2_29')
+P2_30 = Pin('P2_30')
+P2_31 = Pin('P2_31')
+P2_32 = Pin('P2_32')
+P2_33 = Pin('P2_33')
+P2_34 = Pin('P2_34')
+P2_35 = Pin('P2_35')
+P2_36 = Pin('P2_36')
+
+
+# BeagleBone Black
P8_3 = Pin('P8_3')
P8_4 = Pin('P8_4')
P8_5 = Pin('P8_5')
P9_41 = Pin('P9_41')
P9_42 = Pin('P9_42')
+# common to all beagles
USR0 = Pin('USR0')
USR1 = Pin('USR1')
USR2 = Pin('USR2')
USR3 = Pin('USR3')
-
- SCL = Pin('P9_19')
- SDA = Pin('P9_20')
-
- # Refer to header default pin modes
- # http://beagleboard.org/static/images/cape-headers.png
- #
- # P9_17 (SPI0_CSO => CE0) enables peripheral device
- # P9_18 (SPI0_D1 => MOSI) outputs data to peripheral device
- # P9_21 (SPIO_DO => MISO) receives data from peripheral device
- # P9_22 (SPI0_SCLK => SCLK) outputs clock signal
- #
- # Use config-pin to set pin mode for SPI pins
- # https://github.com/beagleboard/bb.org-overlays/tree/master/tools/beaglebone-universal-io
- # config-pin p9.17 spi_cs
- # config-pin p9.18 spi
- # config-pin p9.21 spi
- # config-pin p9.22 spi_sclk
- #
- CE0 = Pin('P9_17')
- MOSI = Pin('P9_18')
- MISO = Pin('P9_21')
- SCLK = Pin('P9_22')
- #CircuitPython naming convention for SPI Clock
- SCK = Pin('P9_22')
-
- # Pins for SPI1
- # refer to:
- # http://beagleboard.org/static/images/cape-headers-spi.png
- #
- # CE1 P9.28 SPI1_CS0
- # MISO_1 P9.29 SPI1_D0
- # MOSI_1 P9.30 SPI1_D1
- # SCLK_1 P9.31 SPI_SCLK
+ # all special functions (SPI / I2C) are moved to
+ # src/adafruit_blinka/board/beaglebone_black.py
+
+ # # ordered as spiId, sckId, mosiId, misoId
+ # spiPorts = (
+ # (0, SCLK, MOSI, MISO),
+ # (1, SCLK_1, MOSI_1, MISO_1)
+ # )
#
- # SPI1 conflicts with HDMI Audio (McASP)
+ # # ordered as uartId, txId, rxId
+ # uartPorts = (
+ # (),
+ # )
#
- # Refer to:
- # https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays
- #
- # To Disable HDMI AUDIO, uncomment this line in /boot/uEnv.txt:
- # disable_uboot_overlay_audio=1
- #
- # Set pin modes for SPI1 with:
- #
- # config-pin p9.28 spi1_cs
- # config-pin p9.29 spi1
- # config-pin p9.30 spi1
- # config-pin p9.31 spi_sclk
- CE1 = Pin('P9_28')
- MOSI_1 = Pin('P9_29')
- MISO_1 = Pin('P9_30')
- SCLK_1 = Pin('P9_31')
- #CircuitPython naming convention for SPI Clock
- SCK_1 = Pin('P9_31')
-
- # ordered as spiId, sckId, mosiId, misoId
- spiPorts = ((0, SCLK, MOSI, MISO), (1, SCLK_1, MOSI_1, MISO_1))
-
- # ordered as uartId, txId, rxId
- uartPorts = (
- (),
- )
-
- i2cPorts = (
- (2, SCL, SDA),
- )
+ # i2cPorts = (
+ # (2, SCL, SDA),
+ # )