Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/adafruit/Adafruit_Blinka in…
Browse files Browse the repository at this point in the history
…to vivid-unit2
  • Loading branch information
makermelissa committed Jun 20, 2024
2 parents c15604e + a1329a8 commit 9a21096
Show file tree
Hide file tree
Showing 11 changed files with 133 additions and 173 deletions.
19 changes: 9 additions & 10 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
Adafruit-PlatformDetect>=3.62.0
Adafruit-PureIO>=1.1.7
Jetson.GPIO; platform_machine=='aarch64'
RPi.GPIO; platform_machine=='armv7l' or platform_machine=='armv6l' or platform_machine=='aarch64'
rpi_ws281x>=4.0.0; platform_machine=='armv7l' or platform_machine=='armv6l' or platform_machine=='aarch64'
sysv_ipc>=1.1.0; sys_platform == 'linux' and platform_machine!='mips'
pyftdi>=0.40.0
binho-host-adapter>=0.1.6
numpy>=1.21.5
adafruit-circuitpython-typing
# requirements.txt
#
# installs dependencies from ./setup.py, and the package itself,
# in editable mode
# -e .

# (the -e above is optional). you could also just install the package
# normally with just the line below (after uncommenting)
.
17 changes: 13 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

import io
import os
import sys
import platform

from setuptools import setup, find_packages

Expand All @@ -21,6 +23,7 @@
long_description = "\n" + f.read()

board_reqs = []
platform_reqs = []
if os.path.exists("/proc/device-tree/compatible"):
with open("/proc/device-tree/compatible", "rb") as f:
compat = f.read()
Expand All @@ -34,15 +37,18 @@
or b"brcm,bcm2838" in compat
or b"brcm,bcm2711" in compat
):
board_reqs = ["RPi.GPIO", "rpi_ws281x>=4.0.0", "sysv_ipc>=1.1.0"]
board_reqs = ["RPi.GPIO", "rpi_ws281x>=4.0.0"]
# Pi 5
if b"brcm,bcm2712" in compat:
board_reqs = ["rpi_ws281x>=4.0.0", "sysv_ipc>=1.1.0", "rpi-lgpio"]
board_reqs = ["rpi_ws281x>=4.0.0", "rpi-lgpio"]
if (
b"ti,am335x" in compat
): # BeagleBone Black, Green, PocketBeagle, BeagleBone AI, etc.
board_reqs = ["Adafruit_BBIO"]

if sys.platform == "linux" and platform.machine != "mips":
platform_reqs = ["sysv_ipc>=1.1.0"]

setup(
name="Adafruit-Blinka",
use_scm_version={
Expand Down Expand Up @@ -89,12 +95,15 @@
},
include_package_data=True,
install_requires=[
"Adafruit-PlatformDetect>=3.62.0",
"Adafruit-PlatformDetect>=3.70.1",
"Adafruit-PureIO>=1.1.7",
"binho-host-adapter>=0.1.6",
"pyftdi>=0.40.0",
"numpy>=1.21.5",
"adafruit-circuitpython-typing",
]
+ board_reqs,
+ board_reqs
+ platform_reqs,
license="MIT",
classifiers=[
# Trove classifiers
Expand Down
77 changes: 77 additions & 0 deletions src/adafruit_blinka/board/lubancat/lubancat5.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# SPDX-FileCopyrightText: 2024 mmontol
#
# SPDX-License-Identifier: MIT
"""Pin definitions for the LubanCat-5."""

from adafruit_blinka.microcontroller.rockchip.rk3588 import pin
from adafruit_blinka.microcontroller.generic_linux.libgpiod_pin import Pin

# GPIO1 = +3.3V
# GPIO2 = +5V
GPIO3 = pin.GPIO1_C0
# GPIO4 = +5V
GPIO5 = pin.GPIO1_C1
# GPIO6 = GND
GPIO7 = Pin((6, 0))
GPIO8 = pin.GPIO1_B6
# GPIO9 = GND
GPIO10 = pin.GPIO1_B7
GPIO11 = Pin((6, 1))
GPIO12 = Pin((6, 4))
GPIO13 = Pin((6, 2))
# GPIO14 = GND
GPIO15 = Pin((6, 3))
GPIO16 = Pin((6, 5))
# GPIO17 = +3.3V
GPIO18 = Pin((6, 6))
GPIO19 = pin.GPIO4_A1
# GPIO20 = GND
GPIO21 = pin.GPIO4_A0
GPIO22 = Pin((6, 7))
GPIO23 = pin.GPIO4_A2
GPIO24 = pin.GPIO4_B2
# GPIO25 = GND
GPIO26 = Pin((7, 5))
GPIO27 = pin.GPIO1_A2
GPIO28 = pin.GPIO1_A3
GPIO29 = pin.GPIO2_C3
# GPIO30 = GND
GPIO31 = Pin((7, 0))
GPIO32 = pin.GPIO4_B6
GPIO33 = pin.GPIO1_D6
# GPIO34 = GND
GPIO35 = pin.GPIO1_D7
GPIO36 = Pin((7, 4))
GPIO37 = Pin((7, 1))
GPIO38 = Pin((7, 3))
# GPIO39 = GND
GPIO40 = Pin((7, 2))

# I2C
I2C3_SCL = pin.I2C3_SCL_M0
I2C3_SDA = pin.I2C3_SDA_M0
I2C4_SCL = pin.I2C4_SCL_M3
I2C4_SDA = pin.I2C4_SDA_M3
I2C8_SCL = pin.I2C8_SCL_M2
I2C8_SDA = pin.I2C8_SDA_M2

# UART
UART1_TX = pin.UART1_TX_M1
UART1_RX = pin.UART1_RX_M1
UART3_TX = pin.UART3_TX_M0
UART3_RX = pin.UART3_RX_M0

# Default SPI
MOSI = pin.SPI0_MOSI_M1
MISO = pin.SPI0_MISO_M1
SCLK = pin.SPI0_SCLK_M1
CS0 = pin.SPI0_CS0_M1

# PWM
PWM0 = pin.PWM0_M2
PWM1 = pin.PWM1_M2
PWM13_M1 = pin.PWM13_M1
PWM13_M2 = pin.PWM13_M2
PWM14_M1 = pin.PWM14_M1
PWM14_M2 = pin.PWM14_M2
PWM15 = pin.PWM15_IR_M3
58 changes: 0 additions & 58 deletions src/adafruit_blinka/board/raspberrypi/raspi_5b.py

This file was deleted.

Empty file.
95 changes: 0 additions & 95 deletions src/adafruit_blinka/microcontroller/bcm2712/pin.py

This file was deleted.

Loading

0 comments on commit 9a21096

Please sign in to comment.