From: Melissa LeBlanc-Williams Date: Fri, 6 Sep 2019 17:20:51 +0000 (-0700) Subject: Merge branch 'orangepizero' of https://github.com/hansoostendorp/Adafruit_Blinka X-Git-Tag: 2.4.1^2~2 X-Git-Url: https://git.ayoreis.com/Adafruit_Blinka-hackapet.git/commitdiff_plain/05efa3b9e3be8760ca42bf2e030edf7436a4ebad?hp=2852c836b86213d0beb1f6595f2e7d86602a5616 Merge branch 'orangepizero' of https://github.com/hansoostendorp/Adafruit_Blinka --- diff --git a/src/adafruit_blinka/board/orangepizero.py b/src/adafruit_blinka/board/orangepizero.py new file mode 100644 index 0000000..bb425aa --- /dev/null +++ b/src/adafruit_blinka/board/orangepizero.py @@ -0,0 +1,36 @@ +"""Pin definitions for the Orange Pi Zero.""" + +# The Orange Pi Zero uses the AllWinner H2 SoC, but pins +# are the same as the AllWinner H3 SoC, so we import those +from adafruit_blinka.microcontroller.allwinner_h3 import pin + +PA12 = pin.PA12 +SDA = pin.PA12 +PA11 = pin.PA11 +SCL = pin.PA11 +PA6 = pin.PA6 +PWM1 = pin.PA6 +PA1 = pin.PA1 +UART2_RX = pin.PA1 +PA0 = pin.PA0 +UART2_TX = pin.PA0 +PA3 = pin.PA3 +UART2_CTS = pin.PA3 +PA10 = pin.PA10 + +PA13 = pin.PA13 +SPI1_CS = pin.PA13 +PA14 = pin.PA14 +SPI1_CLK = pin.PA14 +PA2 = pin.PA2 +UART2_RTS = pin.PA2 +PA18 = pin.PA18 +TWI1_SCK = pin.PA18 +PG6 = pin.PG6 +UART1_TX = pin.PG6 +PG7 = pin.PG7 +UART1_RX = pin.PG7 + +SCLK = pin.PA14 +MOSI = pin.PA15 +MISO = pin.PA16 diff --git a/src/board.py b/src/board.py index 5065b2f..1e83381 100755 --- a/src/board.py +++ b/src/board.py @@ -67,6 +67,9 @@ elif board_id == ap_board.ORANGE_PI_PC: elif board_id == ap_board.ORANGE_PI_R1: from adafruit_blinka.board.orangepir1 import * +elif board_id == ap_board.ORANGE_PI_ZERO: + from adafruit_blinka.board.orangepizero import * + elif board_id == ap_board.GIANT_BOARD: from adafruit_blinka.board.giantboard import * diff --git a/src/busio.py b/src/busio.py index 0f4b15b..0ddf7dc 100755 --- a/src/busio.py +++ b/src/busio.py @@ -96,7 +96,7 @@ class SPI(Lockable): elif detector.board.any_beaglebone: from adafruit_blinka.microcontroller.am335x.pin import Pin from adafruit_blinka.microcontroller.generic_linux.spi import SPI as _SPI - elif board_id == ap_board.ORANGE_PI_PC or board_id == ap_board.ORANGE_PI_R1: + elif board_id == ap_board.ORANGE_PI_PC or board_id == ap_board.ORANGE_PI_R1 or board_id == ap_board.ORANGE_PI_ZERO: 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: