Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmesh-sd committed Nov 14, 2024
2 parents 09f844f + 189d647 commit 2b2be69
Show file tree
Hide file tree
Showing 18 changed files with 809 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/adafruit_blinka/board/ameridroid/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SPDX-FileCopyrightText: 2024 Rippanda12
#
# SPDX-License-Identifier: MIT
"""Boards definition from ameriDroid"""
134 changes: 134 additions & 0 deletions src/adafruit_blinka/board/ameridroid/indiedroid_nova.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# SPDX-FileCopyrightText: 2024 Rippanda12
#
# SPDX-License-Identifier: MIT

"""Pin definitions for the Indiedroid Nova"""

from adafruit_blinka.microcontroller.rockchip.rk3588s import pin


# D1 = +3.3V
# D2 = +5V
D3 = pin.GPIO1_D7
# D4 = +5V
D5 = pin.GPIO1_D6
# D6 = GND
D7 = pin.GPIO1_A6
D8 = pin.GPIO4_A3
# D9 = GND
D10 = pin.GPIO4_A4
D11 = pin.GPIO1_B4
D12 = pin.GPIO0_D0
D13 = pin.GPIO1_B5
# D14 = GND
D15 = pin.GPIO3_C4
D16 = pin.GPIO3_B0
# D17 = +3.3V
D18 = pin.GPIO3_B1
D19 = pin.GPIO3_B7
# D20 = GND
D21 = pin.GPIO3_C0
D22 = pin.GPIO3_C5
D23 = pin.GPIO3_C1
D24 = pin.GPIO0_D3
# D25 = GND
D26 = pin.GPIO3_C3
D27 = pin.GPIO1_A0
D28 = pin.GPIO1_C1
D29 = pin.GPIO1_A4
# D30 = GND
D31 = pin.GPIO1_B1
D32 = pin.GPIO4_A6
D33 = pin.GPIO1_B2
# D34 = GND
D35 = pin.GPIO4_A7
D36 = pin.GPIO4_B5
D37 = pin.GPIO4_A2
D38 = pin.GPIO4_B4
# D39 = GND
D40 = pin.GPIO4_B3


# UART
# UART2_M0
UART2_TX = pin.GPIO1_B5
UART2_RX = pin.GPIO1_B6
# UART0_M2
UART0_TX = pin.GPIO4_A3
UART0_RX = pin.GPIO4_A4
# UART5_M1
UART5_TX = pin.GPIO3_C4
UART5_RX = pin.GPIO3_C5
# UART7_M1
UART7_TX = pin.GPIO3_C0
UART7_RX = pin.GPIO3_C1

# Default UART -> UART2_M0

TX = UART2_TX
RX = UART2_RX
TXD = UART2_TX
RXD = UART2_RX

# I2C

# I2C3_M1
I2C3_SCL = pin.GPIO3_B7
I2C3_SDA = pin.GPIO3_C0
# I2C5_M2
I2C5_SCL = pin.GPIO4_A6
I2C5_SDA = pin.GPIO4_A7
# I2C7_M3
I2C7_SCL = pin.GPIO4_B2
I2C7_SDA = pin.GPIO4_B3
# I2C8_M2
I2C8_SCL = pin.GPIO1_D6
I2C8_SDA = pin.GPIO1_D7

# Default I2C -> I2C8_M2
SCL = I2C8_SCL
SDA = I2C8_SDA

# SPI
# SPI0_M2
SPI0_SCLK = pin.GPIO4_A2
SPI0_MISO = pin.GPIO1_B1
SPI0_MOSI = pin.GPIO1_B2
SPI0_CS0 = pin.GPIO1_B4
# SPI1_M1
SPI1_CLK = pin.GPIO3_C1
SPI1_MISO = pin.GPIO3_C0
SPI1_MOSI = pin.GPIO3_B7
SPI1_CS1 = pin.GPIO3_C3
# SPI4_M2
SPI4_SCLK = pin.GPIO1_D6
SPI4_MISO = pin.GPIO1_D7
SPI4_MOSI = pin.GPIO1_D6
SPI4_CS0 = pin.GPIO1_D7
# SPI5_M1
SPI5_SCLK = pin.GPIO3_B1
SPI5_MISO = pin.GPIO3_B0
SPI5_MOSI = pin.GPIO3_B7
SPI5_CS1 = pin.GPIO3_C3

# Default SPI -> SPI4_M2
MOSI = SPI4_MOSI
MISO = SPI4_MISO
SCLK = SPI4_SCLK
CS = SPI4_CS0

# PWM
# PWM2_M1
PWM2 = pin.GPIO3_B1
# PWM7_M0
PWM7 = pin.GPIO0_D0
# PWM9_M0
PWM9 = pin.GPIO3_B0
# PWM11_M1
PWM11 = pin.GPIO4_B4
# PWM12_M1
PWM12 = pin.GPIO4_B5
# PWM14_M2
PWM14 = pin.GPIO1_D6
# PWM15_M0
PWM15 = pin.GPIO3_C3
56 changes: 56 additions & 0 deletions src/adafruit_blinka/board/bananapi/bpif3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# SPDX-FileCopyrightText: 2021 Melissa LeBlanc-Williams for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""Pin definitions for the Banana Pi F3."""

from adafruit_blinka.microcontroller.spacemit.k1 import pin

# I2C
I2C4_SCL = pin.I2C4_SCL
I2C4_SDA = pin.I2C4_SDA

# Default I2C
SCL = I2C4_SCL
SDA = I2C4_SDA

# UART
UART0_TX = pin.UART0_TX
UART0_RX = pin.UART0_RX

# Default UART
TX = UART0_TX
RX = UART0_RX
TXD = UART0_TX
RXD = UART0_RX

# SPI
SPI3_MOSI = pin.SPI3_MOSI
SPI3_MISO = pin.SPI3_MISO
SPI3_SCLK = pin.SPI3_SCLK
SPI3_CS0 = pin.SPI3_CS0

# Default SPI
MOSI = SPI3_MOSI
MISO = SPI3_MISO
SCLK = SPI3_SCLK
CS = SPI3_CS0

# Pinout reference:
# https://wiki.banana-pi.org/Banana_Pi_BPI-M4_Berry#BPI-M4_Berry_40-pin_header
D3 = pin.GPIO_52
D5 = pin.GPIO_51
D7 = pin.GPIO_70
D8 = pin.GPIO_47
D10 = pin.GPIO_48
D11 = pin.GPIO_71
D12 = pin.GPIO_74
D13 = pin.GPIO_72
D15 = pin.GPIO_73
D16 = pin.GPIO_91
D18 = pin.GPIO_92
D19 = pin.GPIO_77
D21 = pin.GPIO_78
D22 = pin.GPIO_49
D23 = pin.GPIO_75
D24 = pin.GPIO_76
D26 = pin.GPIO_50
71 changes: 71 additions & 0 deletions src/adafruit_blinka/board/bananapi/bpim4berry.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# SPDX-FileCopyrightText: 2021 Melissa LeBlanc-Williams for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""Pin definitions for the Banana Pi M4 Berry."""

from adafruit_blinka.microcontroller.allwinner.h618 import pin

# I2C
I2C3_SCL = pin.TWI3_SCL
I2C3_SDA = pin.TWI3_SDA
I2C4_SCL = pin.TWI4_SCL
I2C4_SDA = pin.TWI4_SDA

# Default I2C
SCL = I2C4_SCL
SDA = I2C4_SDA

# UART
UART1_TX = pin.UART1_TX
UART1_RX = pin.UART1_RX
UART5_TX = pin.UART5_TX
UART5_RX = pin.UART5_RX

# Default UART
TX = UART1_TX
RX = UART1_RX
TXD = UART1_TX
RXD = UART1_RX

# SPI
SPI1_MOSI = pin.SPI1_MOSI
SPI1_MISO = pin.SPI1_MISO
SPI1_SCLK = pin.SPI1_SCLK
SPI1_CS0 = pin.SPI1_CS0

# Default SPI
MOSI = SPI1_MOSI
MISO = SPI1_MISO
SCLK = SPI1_SCLK
CS = SPI1_CS0

# Pinout reference:
# https://wiki.banana-pi.org/Banana_Pi_BPI-M4_Berry#BPI-M4_Berry_40-pin_header
D3 = pin.PG16
D5 = pin.PG15
D7 = pin.PG19
D8 = pin.PG6
D10 = pin.PG7
D11 = pin.PH2
D12 = pin.PG11
D13 = pin.PH3
D15 = pin.PG2
D16 = pin.PG8
D18 = pin.PG9
D19 = pin.PH7
D21 = pin.PH8
D22 = pin.PG1
D23 = pin.PH6
D24 = pin.PH5
D26 = pin.PH9
D27 = pin.PG18
D28 = pin.PG17
D29 = pin.PG3
D31 = pin.PG4
D32 = pin.PG0
D33 = pin.PG5
D35 = pin.PG12
D36 = pin.PH4
D37 = pin.PG10
D38 = pin.PG14
D40 = pin.PG13
71 changes: 71 additions & 0 deletions src/adafruit_blinka/board/bananapi/bpim4zero.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# SPDX-FileCopyrightText: 2021 Melissa LeBlanc-Williams for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""Pin definitions for the Banana Pi M4 Zero."""

from adafruit_blinka.microcontroller.allwinner.h618 import pin

# I2C
I2C0_SCL = pin.TWI0_SCL
I2C0_SDA = pin.TWI0_SDA
I2C1_SCL = pin.TWI1_SCL
I2C1_SDA = pin.TWI1_SDA

# Default I2C
SCL = I2C0_SCL
SDA = I2C0_SDA

# UART
UART4_TX = pin.UART4_TX
UART4_RX = pin.UART4_RX
UART5_TX = pin.UART5_TX
UART5_RX = pin.UART5_RX

# Default UART
TX = UART4_TX
RX = UART4_RX
TXD = UART4_TX
RXD = UART4_RX

# SPI
SPI1_MOSI = pin.SPI1_MOSI
SPI1_MISO = pin.SPI1_MISO
SPI1_SCLK = pin.SPI1_SCLK
SPI1_CS0 = pin.SPI1_CS0

# Default SPI
MOSI = SPI1_MOSI
MISO = SPI1_MISO
SCLK = SPI1_SCLK
CS = SPI1_CS0

# Pinout reference:
# https://wiki.banana-pi.org/Banana_Pi_BPI-M4_Zero#BPI-M4_Zero_40-pin_header
D3 = pin.PI6
D5 = pin.PI5
D7 = pin.PI12
D8 = pin.PI13
D10 = pin.PI14
D11 = pin.PH2
D12 = pin.PI1
D13 = pin.PH3
D15 = pin.PI11
D16 = pin.PI15
D18 = pin.PI16
D19 = pin.PH7
D21 = pin.PH8
D22 = pin.PC2
D23 = pin.PH6
D24 = pin.PH5
D26 = pin.PH9
D27 = pin.PI8
D28 = pin.PI7
D29 = pin.PI10
D31 = pin.PI9
D32 = pin.PH4
D33 = pin.PH10
D35 = pin.PI2
D36 = pin.PC7
D37 = pin.PI0
D38 = pin.PI4
D40 = pin.PI3
Loading

0 comments on commit 2b2be69

Please sign in to comment.