]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Add pins supporting Tritium H3 boards
authorTony <tonymckahan@gmail.com>
Sat, 8 Dec 2018 06:31:17 +0000 (01:31 -0500)
committerGitHub <noreply@github.com>
Sat, 8 Dec 2018 06:31:17 +0000 (01:31 -0500)
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.

src/adafruit_blinka/microcontroller/allwinner_h3/pin.py

index 6961d48f4ffe51fd879599ff83658e7c23ee59df..137b10f73c51cca0af497c734b59bfdd97feff3b 100644 (file)
@@ -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), )