From: Tony Date: Sat, 8 Dec 2018 06:31:17 +0000 (-0500) Subject: Add pins supporting Tritium H3 boards X-Git-Tag: 1.0.2^2~1 X-Git-Url: https://git.ayoreis.com/Adafruit_Blinka-hackapet.git/commitdiff_plain/23a46d240e7015c8027ecf0128f3802710e07485 Add pins supporting Tritium H3 boards Consider removing port definitions from this file, unless being declared a port here does not impact the ability to use it as dumb I/O. Each board exposes a different organization of these ports, for instance Tritium has UART0,1,2,3 all available on headers, as well as SPI0 and 1. --- diff --git a/src/adafruit_blinka/microcontroller/allwinner_h3/pin.py b/src/adafruit_blinka/microcontroller/allwinner_h3/pin.py index 6961d48..137b10f 100644 --- a/src/adafruit_blinka/microcontroller/allwinner_h3/pin.py +++ b/src/adafruit_blinka/microcontroller/allwinner_h3/pin.py @@ -1,7 +1,9 @@ from adafruit_blinka.microcontroller.generic_linux.libgpiod_pin import Pin PA0 = Pin(0) +UART2_TX = PA0 PA1 = Pin(1) +UART2_RX = PA1 PA2 = Pin(2) PA3 = Pin(3) PA6 = Pin(6) @@ -17,6 +19,9 @@ PA13 = Pin(13) UART3_TX = PA13 PA14 = Pin(14) UART3_RX = PA14 +PA15 = Pin(15) +PA16 = Pin(16) +PA17 = Pin(17) PA18 = Pin(18) PA19 = Pin(19) PA20 = Pin(20) @@ -36,12 +41,20 @@ PC7 = Pin(71) PD14 = Pin(110) PG6 = Pin(198) +UART1_TX = PG6 PG7 = Pin(199) +UART1_RX = PG7 PG8 = Pin(200) PG9 = Pin(201) +PG10 = Pin(202) +PG11 = Pin(203) +PG12 = Pin(204) +PG13 = Pin(205) + i2cPorts = ( (0, TWI0_SCL, TWI0_SDA), ) # ordered as spiId, sckId, mosiId, misoId spiPorts = ( (0, SPI0_SCLK, SPI0_MOSI, SPI0_MISO), ) # ordered as uartId, txId, rxId -uartPorts = ( (3, UART3_TX, UART3_RX), ) +uartPorts = ( (1, UART1_TX, UART1_RX), + (3, UART3_TX, UART3_RX), )