]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Merge pull request #531 from CesarChavezRico/main
authorMelissa LeBlanc-Williams <melissa@adafruit.com>
Tue, 4 Jan 2022 16:39:57 +0000 (08:39 -0800)
committerGitHub <noreply@github.com>
Tue, 4 Jan 2022 16:39:57 +0000 (08:39 -0800)
Feat: Adding H3 NanoPi Neo

src/adafruit_blinka/board/orangepi/orangepi3.py [new file with mode: 0644]
src/adafruit_blinka/microcontroller/allwinner/h6/pin.py
src/board.py
src/microcontroller/__init__.py

diff --git a/src/adafruit_blinka/board/orangepi/orangepi3.py b/src/adafruit_blinka/board/orangepi/orangepi3.py
new file mode 100644 (file)
index 0000000..73c6e36
--- /dev/null
@@ -0,0 +1,31 @@
+"""Pin definitions for the Orange Pi 3."""
+
+from adafruit_blinka.microcontroller.allwinner.h6 import pin
+
+PD26 = pin.PD26
+SDA = pin.PD26
+PD25 = pin.PD25
+SCL = pin.PD25
+PD22 = pin.PD22
+PL02 = pin.PL2
+PL03 = pin.PL3
+PD24 = pin.PD24
+UART3_RX = pin.PD24
+PD18 = pin.PD18
+PD23 = pin.PD23
+UART3_TX = pin.PD23
+PL10 = pin.PL10
+PD15 = pin.PD15
+PD16 = pin.PD16
+PH05 = pin.PH5
+PH06 = pin.PH6
+PD21 = pin.PD21
+PH04 = pin.PH4
+SPI1_CLK = pin.PH4
+PH03 = pin.PH3
+SPI1_CS = pin.PH3
+PL08 = pin.PL8
+
+SCLK = pin.PH4
+MOSI = pin.PH5
+MISO = pin.PH6
index 53c469f4e2609d2a6b7569c8f1d77ddaeede1ffb..63759382a3c0ce30cf6e477aff4f8543479c4a4c 100644 (file)
@@ -39,8 +39,11 @@ SPI1_MISO = PH6
 PH8 = Pin((1, 230))
 PH9 = Pin((1, 231))
 
+PL2 = Pin((0, 2))
+PL3 = Pin((0, 3))
 PL8 = Pin((0, 8))
 PL9 = Pin((0, 9))
+PL10 = Pin((0, 10))
 
 i2cPorts = ((0, TWI0_SCL, TWI0_SDA),)
 spiPorts = ((1, SPI1_SCLK, SPI1_MOSI, SPI1_MISO),)
index d4f37ef54b250df15787541c4f74b953abb26bfd..69bd3a7d6232f8a92e8a47e4706310f77710bc05 100755 (executable)
@@ -136,6 +136,9 @@ elif board_id == ap_board.ORANGE_PI_ZERO_PLUS:
 elif board_id == ap_board.ORANGE_PI_ZERO_2:
     from adafruit_blinka.board.orangepi.orangepizero2 import *
 
+elif board_id == ap_board.ORANGE_PI_3:
+    from adafruit_blinka.board.orangepi.orangepi3 import *
+
 elif board_id == ap_board.BANANA_PI_M2_ZERO:
     from adafruit_blinka.board.bananapi.bpim2zero import *
 
index 886064ed6bec6f47588492ff9a6ceef99afb0d49..74ccd63f0944f0baf697a19cc4fb3d31680764a4 100755 (executable)
@@ -137,6 +137,8 @@ elif chip_id == ap_chip.MT8167:
     from adafruit_blinka.microcontroller.mt8167.pin import *
 elif chip_id == ap_chip.RP2040_U2IF:
     from adafruit_blinka.microcontroller.rp2040_u2if.pin import *
+elif chip_id == ap_chip.GENERIC_X86:
+    print("WARNING: GENERIC_X86 is not fully supported. Some features may not work.")
 elif "sphinx" in sys.modules:
     pass
 else: