Skip to content

Commit

Permalink
Get I2C and SPI working
Browse files Browse the repository at this point in the history
  • Loading branch information
makermelissa committed Jan 20, 2021
1 parent 5b7c6d6 commit cf7aecd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/adafruit_blinka/board/nanopi/neoair.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Pin definitions for the NanoPi NEO Air."""
# Enable UART1 and SPI by adding the following lines to /boot/armbianEnv.txt
# overlays=usbhost2 usbhost3 spi-spidev uart1
# Enable I2C0, UART1, and SPI by adding the following lines to /boot/armbianEnv.txt
# overlays=usbhost2 usbhost3 spi-spidev uart1 i2c0
# param_spidev_spi_bus=0

from adafruit_blinka.microcontroller.allwinner.h3 import pin
Expand Down
3 changes: 3 additions & 0 deletions src/busio.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ def configure(self, baudrate=100000, polarity=0, phase=0, bits=8):
elif detector.board.any_orange_pi and detector.chip.id == ap_chip.SUN8I:
from adafruit_blinka.microcontroller.allwinner.h3.pin import Pin
from adafruit_blinka.microcontroller.generic_linux.spi import SPI as _SPI
elif detector.board.any_nanopi and detector.chip.id == ap_chip.SUN8I:
from adafruit_blinka.microcontroller.allwinner.h3.pin import Pin
from adafruit_blinka.microcontroller.generic_linux.spi import SPI as _SPI
elif board_id == ap_board.GIANT_BOARD:
from adafruit_blinka.microcontroller.sama5.pin import Pin
from adafruit_blinka.microcontroller.generic_linux.spi import SPI as _SPI
Expand Down

0 comments on commit cf7aecd

Please sign in to comment.