wiringPi for Orange Pi
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

932 lines
21 KiB

6 years ago
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "OrangePi.h"
#include <wiringPi.h>
#ifdef CONFIG_ORANGEPI_PC2
int physToWpi[64] =
{
-1, // 0
-1, -1, // 1, 2
0, -1, //3, 4
1, -1, //5, 6
2, 3, //7, 8
-1, 4, //9,10
5, 6, //11,12
7, -1, //13,14
8, 9, //15,16
-1, 10, //17,18
11, -1, //19,20
12, 13, //21,22
14, 15, //23, 24
-1, 16, // 25, 26
17, 18, //27, 28
19, -1, //29, 30
20, 21, //31, 32
22, -1, //33, 34
23, 24, //35, 36
25, 26, //37, 38
-1, 27, //39, 40
6 years ago
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //41-> 55
-1, -1, -1, -1, -1, -1, -1, -1 // 56-> 63
};
char *physNames[64] =
{
NULL,
" 3.3V", "5V ",
" SDA.0", "5V ",
" SCL.0", "GND ",
" PWM.1", "PC05 ",
" GND", "PC06 ",
" RXD.2", "PD14 ",
" TXD.2", "GND ",
" CTS.2", "PC04 ",
" 3.3V", "PC07 ",
" MOSI.1", "GND ",
" MISO.1", "RTS.2 ",
" SCLK.1", "CE.1 ",
" GND", "PA21 ",
6 years ago
" SDA.1", "SCL.1 ",
" PA07", "GND ",
" PA08", "RTS.1 ",
" PA09", "GND ",
" PA10", "CTS.1 ",
" PD11", "TXD.1 ",
" GND", "RXD.1 ",
6 years ago
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
6 years ago
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
};
#endif /* PC2 */
#ifdef CONFIG_ORANGEPI_PRIME
int physToWpi[64] =
{
-1, // 0
-1, -1, // 1, 2
0, -1, //3, 4
1, -1, //5, 6
2, 3, //7, 8
-1, 4, //9,10
5, 6, //11,12
7, -1, //13,14
8, 9, //15,16
-1, 10, //17,18
11, -1, //19,20
12, 13, //21,22
14, 15, //23, 24
-1, 16, // 25, 26
17, 18, //27, 28
19, -1, //29, 30
20, 21, //31, 32
22, -1, //33, 34
23, 24, //35, 36
25, 26, //37, 38
-1, 27, //39, 40
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //41-> 55
-1, -1, -1, -1, -1, -1, -1, -1 // 56-> 63
};
char *physNames[64] =
{
NULL,
" 3.3V", "5V ",
" SDA.0", "5V ",
" SCL.0", "GND ",
" PWM.1", "PC05 ",
" GND", "PC06 ",
" RXD.2", "PD14 ",
" TXD.2", "GND ",
" CTS.2", "PC04 ",
" 3.3V", "PC07 ",
" MOSI.1", "GND ",
" MISO.1", "RTS.2 ",
" SCLK.1", "CE.1 ",
" GND", "PC08 ",
" SDA.1", "SCL.1 ",
" PA07", "GND ",
" PA08", "PC09 ",
" PA09", "GND ",
" PA10", "PC10 ",
" PD11", "PC11 ",
" GND", "PC12 ",
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
};
#endif /* PRIME */
#ifdef CONFIG_ORANGEPI_ZEROPLUS
int physToWpi [64] = //return wiringPI pin
{
-1, // 0
-1, -1, // 1, 2
0, -1, //3, 4
1, -1, //5, 6
2, 3, //7, 8
-1, 4, //9,10
5, 6, //11,12
7, -1, //13,14
8, 9, //15,16
-1, 10, //17,18
11, -1, //19,20
12, 13, //21,22
14, 15, //23, 24
-1, 16, // 25, 26
-1, -1, //27, 28
-1, -1, //29, 30
-1, -1, //31, 32
-1, -1, //33, 34
-1, -1, //35, 36
-1, -1, //37, 38
-1, -1, //39, 40
-1, -1, //41, 42
// Padding:
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // ... 56
-1, -1, -1, -1, -1, -1, -1, // ... 63
};
char *physNames[64] =
{
NULL,
" 3.3V", "5V ",
" SDA.0", "5V ",
" SCL.0", "GND ",
" PA6", "TXD.1 ",
" GND", "RXD.1 ",
" RXD.2", "PA07 ",
" TXD.2", "GND ",
" CTS.2", "SDA.1 ",
" 3.3V", "SCL.1 ",
" MOSI.1", "GND ",
" MISO.1", "RTS.2 ",
" SCLK.1", "CE.1 ",
" GND", "PA10 ",
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL,
};
#endif /* ZEROPLUS */
6 years ago
#ifdef CONFIG_ORANGEPI_2G_IOT
char *physNames[64] =
{
NULL,
" 3.3V", "5V ",
6 years ago
" SDA.0", "5V ",
" SCL.0", "GND ",
" GPIO.7", "TXD.2 ",
" GND", "RXD.2 ",
" RXD.1", "GPIO.1 ",
" TXD.1", "GND ",
" CTS.1", "GPIO.4 ",
" 3.3V", "GPIO.5 ",
" SDI.2", "GND ",
" SDIO.2", "RTS1 ",
" SCLK.2", "CE.0 ",
" GND", "CE.1 ",
6 years ago
" SDA.1", "SCL.1 ",
" GPIO.21", "GND ",
" GPIO.22", "RTS.2 ",
" GPIO.23", "GND ",
" GPIO.24", "CTS.2 ",
6 years ago
" GPIO.25", "SCL.2 ",
" GND", "SDA.2 ",
6 years ago
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
};
int physToWpi[64] =
{
-1, // 0
-1, -1, // 1, 2
8, -1, // 3, 4
9, -1, // 5, 6
7, 15, // 7, 8
-1, 16, // 9, 10
0, 1, //11, 12
2, -1, //13, 14
3, 4, //15, 16
-1, 5, //17, 18
12, -1, //19, 20
13, 6, //21, 22
14, 10, //23, 24
-1, 11, //25, 26
30, 31, //27, 28
21, -1, //29, 30
22, 26, //31, 32
23, -1, //33, 34
24, 27, //35, 36
25, 28, //37, 38
-1, 29, //39, 40
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //41-> 55
-1, -1, -1, -1, -1, -1, -1, -1 // 56-> 63
};
#endif
#ifdef CONFIG_ORANGEPI_A64
char *physNames [64] =
{
NULL,
" 3.3V", "5V ",
6 years ago
" SDA.1", "5V ",
" SCL.1", "GND ",
6 years ago
" GPIO.7", "S_TX ",
" GND", "S_RX ",
" RXD3", "GPIO.1 ",
" TXD3", "GND ",
6 years ago
" CTS3", "GPIO.4 ",
" 3.3V", "GPIO.5 ",
" MOSI", "GND ",
6 years ago
" MISO", "RTS3 ",
" SCLK", "CE0 ",
" GND", "GPIO.11 ",
6 years ago
" SDA.2", "SCL.2 ",
" GPIO.21", "GND ",
6 years ago
" GPIO.22", "RTS2 ",
" GPIO.23", "GND ",
6 years ago
" GPIO.24", "CTS2 ",
" GPIO.25", "TXD2 ",
" GND", "RXD2 ",
6 years ago
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
"GPIO.17", "GPIO.18",
"GPIO.19", "GPIO.20",
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
};
int physToWpi [64] =
{
-1, // 0
-1, -1, // 1, 2
8, -1, // 3, 4
9, -1, // 5, 6
7, 15, // 7, 8
-1, 16, // 9, 10
0, 1, //11, 12
2, -1, //13, 14
3, 4, //15, 16
-1, 5, //17, 18
12, -1, //19, 20
13, 6, //21, 22
14, 10, //23, 24
-1, 11, //25, 26
30, 31, //27, 28
21, -1, //29, 30
22, 26, //31, 32
23, -1, //33, 34
24, 27, //35, 36
25, 28, //37, 38
-1, 29, //39, 40
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //41-> 55
-1, -1, -1, -1, -1, -1, -1, -1 // 56-> 63
};
#endif
#ifdef CONFIG_ORANGEPI_H3
int physToWpi[64] =
{
-1, //0
-1, -1, // 1, 2
0, -1, // 3, 4
1, -1, // 5, 6
2, 3, // 7, 8
-1, 4, // 9, 10
5, 6, //11, 12
7, -1, //13, 14
8, 9, //15, 16
-1, 10, //17, 18
11, -1, //19, 20
12, 13, //21, 22
6 years ago
14, 15, //23, 24
-1, 16, //25, 26
17, 18, //27, 28
19, -1, //29, 30
20, 21, //31, 32
6 years ago
22, -1, //33, 34
23, 24, //35, 36
25, 26, //37, 38
-1, 27, //39, 40
28, 29, //41, 42
6 years ago
// Padding:
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // ... 56
-1, -1, -1, -1, -1, -1, -1, // ... 63
6 years ago
};
char *physNames[64] =
{
NULL,
6 years ago
" 3.3V", "5V ",
6 years ago
" SDA.0", "5V ",
" SCL.0", "GND ",
" PA6", "TXD.3 ",
" GND", "RXD.3 ",
" RXD.2", "PD14 ",
" TXD.2", "GND ",
" CTS.2", "PC04 ",
" 3.3V", "PC07 ",
" MOSI.0", "GND ",
" MISO.0", "RTS.2 ",
" SCLK.0", "CE.0 ",
" GND", "PA21 ",
6 years ago
" SDA.1", "SCL.1 ",
" PA07", "GND ",
" PA08", "RTS.1 ",
" PA09", "GND ",
" PA10", "CTS.1 ",
" PA20", "TXD.1 ",
" GND", "RXD.1 ",
6 years ago
" PA04", "PA05 ",
6 years ago
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
6 years ago
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL,
6 years ago
};
#endif /* H3 */
6 years ago
#if CONFIG_ORANGEPI_ZEROPLUS2_H3 || CONFIG_ORANGEPI_ZEROPLUS2_H5
6 years ago
int physToWpi [64] = //return wiringPI pin
{
-1, // 0
-1, -1, // 1, 2
0, -1, //3, 4
1, -1, //5, 6
2, 3, //7, 8
-1, 4, //9,10
5, 6, //11,12
7, -1, //13,14
8, 9, //15,16
-1, 10, //17,18
11, -1, //19,20
12, 13, //21,22
14, 15, //23, 24
-1, 16, // 25, 26
-1, -1, //27, 28
-1, -1, //29, 30
-1, -1, //31, 32
-1, -1, //33, 34
-1, -1, //35, 36
-1, -1, //37, 38
-1, -1, //39, 40
-1, -1, //41, 42
// Padding:
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // ... 56
-1, -1, -1, -1, -1, -1, -1, // ... 63
};
char *physNames[64] =
{
NULL,
" 3.3V", "5V ",
" SDA.0", "5V ",
" SCL.0", "GND ",
" PA6", "TXD.2 ",
" GND", "RXD.2 ",
" S-SCL", "PD11 ",
" S-SDA", "GND ",
" CTS.2", "SDA.1 ",
" 3.3V", "SCL.1 ",
" MOSI.1", "GND ",
" MISO.1", "RTS.2 ",
" SCLK.1", "CE.1 ",
" GND", "PD14 ",
6 years ago
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL,
};
#endif /* ZERO_PLUS2 */
6 years ago
#ifdef CONFIG_ORANGEPI_ZERO
int physToWpi [64] =
{
-1, // 0
-1, -1, // 1, 2
0, -1, // 3, 4
1, -1, // 5, 6
2, 3, // 7, 8
-1, 4, // 9, 10
5, 6, //11, 12
7, -1, //13, 14
8, 9, //15, 16
-1, 10, //17, 18
11, -1, //19, 20
12, 13, //21, 22
14, 15, //23, 24
-1, 16, //25, 26
6 years ago
-1, -1, //27, 28
-1, -1, //29, 30
-1, -1, //31, 32
-1, -1, //33, 34
-1, -1, //35, 36
-1, -1, //37, 38
-1, -1, //39, 40
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //41-> 55
-1, -1, -1, -1, -1, -1, -1, -1 // 56-> 63
6 years ago
};
char *physNames[64] =
{
NULL,
" 3.3V", "5V ",
6 years ago
" SDA.0", "5V ",
" SCL.0", "GND ",
" PWM.1", "TXD.1 ",
" GND", "RXD.1 ",
" RXD.2", "PA07 ",
" TXD.2", "GND ",
" CTS.2", "SDA.1 ",
" 3.3V", "SCK.1 ",
" MOSI.1", "GND ",
" MISO.1", "RTS.2 ",
" SCLK.1", "CS.1 ",
" GND", "PA10 ",
6 years ago
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
6 years ago
NULL,
};
#endif
#ifdef CONFIG_ORANGEPI_LITE2
int physToWpi [64] =
{
-1, // 0
-1, -1, // 1, 2
0, -1,
1, -1,
2, 3, //7, 8
-1, 4,
5, 6, //11, 12
7, -1,
8, 9, //15, 16
-1, 10,
11, -1, //19, 20
12, 13,
14, 15, //23, 24
-1, 16, // 25, 26
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // ... 56
-1, -1, -1, -1, -1, -1, -1, // ... 63
};
char *physNames [64] =
{
NULL,
" 3.3V", "5V ",
6 years ago
" SDA.1", "5V ",
" SCL.1", "GND ",
6 years ago
" PWM1", "PD21 ",
" GND", "PD22 ",
" RXD3", "PC09 ",
" TXD3", "GND ",
6 years ago
" CTS3", "PC08 ",
" 3.3V", "PC07 ",
" MOSI.0", "GND ",
6 years ago
" MISO.0", "RTS3 ",
" SCLK.0", "CE.0 ",
" GND", "PH03 ",
6 years ago
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL,
};
#endif
#ifdef CONFIG_ORANGEPI_3
int physToWpi [64] =
{
-1, // 0
-1, -1, // 1, 2
0, -1,
1, -1,
2, 3, //7, 8
-1, 4,
5, 6, //11, 12
7, -1,
8, 9, //15, 16
-1, 10,
11, -1, //19, 20
12, 13,
14, 15, //23, 24
-1, 16, // 25, 26
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // ... 56
-1, -1, -1, -1, -1, -1, -1, // ... 63
};
char *physNames [64] =
{
NULL,
" 3.3V", "5V ",
6 years ago
" SDA.0", "5V ",
" SCL.0", "GND ",
6 years ago
" PWM0", "PL02 ",
" GND", "PL03 ",
" RXD3", "PD18 ",
" TXD3", "GND ",
6 years ago
" PL10", "PD15 ",
" 3.3V", "PD16 ",
" MOSI.1", "GND ",
6 years ago
" MISO.1", "PD21 ",
" SCLK.1", "CE.1 ",
" GND", "PL08 ",
6 years ago
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL,
};
#endif
6 years ago
#ifdef CONFIG_ORANGEPI_RK3399
int pinToGpioOrangePi [64] =
{
43, 44, // 0, 1
64, 148, // 2, 3
147, 80, // 4 5
65, 81, // 6, 7
82, 66, // 8, 9
67, 39, //10,11
40, 83, //12,13
41, 42, //14,15
133, 154, //16,17
50, 68, //18,19
69, 76, //20,21
70, 71, //22,23
73, 72, //24,25
74, 75, //26,27
-1, -1, //28,29
-1, -1, //30,31
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // ... 47
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,// ... 63
};
int physToWpi[64] =
{
-1, // 0
-1, -1, // 1, 2
0, -1, //3, 4
1, -1, //5, 6
2, 3, //7, 8
-1, 4, //9,10
5, 6, //11,12
7, -1, //13,14
8, 9, //15,16
-1, 10, //17,18
11, -1, //19,20
12, 13, //21,22
14, 15, //23, 24
-1, 16, // 25, 26
17, 18, //27, 28
19, -1, //29, 30
20, 21, //31, 32
22, -1, //33, 34
23, 24, //35, 36
25, 26, //37, 38
-1, 27, //39, 40
// Padding:
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // ... 56
-1, -1, -1, -1, -1, -1, -1, // ... 63
};
char *physNames[64] =
{
NULL,
" 3.3V", "5V ",
6 years ago
" SDA.0", "5V ",
" SCL.0", "GND ",
6 years ago
" GPIO4", "Tx ",
" GND", "Rx ",
6 years ago
" GPIO17", "GPIO18 ",
" GPIO27", "GND ",
6 years ago
" GPIO22", "GPIO23 ",
" 3.3V", "GPIO24 ",
" MOSI", "GND ",
6 years ago
" MISO", "GPIO25 ",
" SCLK", "CS0 ",
" GND", "CS1 ",
6 years ago
" DNP1", "DNP2 ",
" GPIO5", "GND ",
6 years ago
" GPIO6", "GPIO12 ",
" GPIO13", "GND ",
6 years ago
" GPIO19", "GPIO16 ",
" GPIO26", "GPIO20 ",
" GND", "GPIO21 ",
6 years ago
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
};
#endif
#ifdef CONFIG_ORANGEPI_4
int pinToGpioOrangePi [64] =
{
64, 65, // 0, 1
150, 145, // 2, 3
144, 33, // 4 5
50, 35, // 6, 7
92, 54, // 8, 9
55, 40, //10,11
39, 56, //12,13
41, 42, //14,15
149, 64, //16,17
65, -1, //18,19
-1, -1, //20,21
-1, -1, //22,23
-1, -1, //24,25
-1, -1, //26,27
-1, -1, //28,29
-1, -1, //30,31
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // ... 47
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,// ... 63
};
int physToWpi[64] =
{
-1, // 0
-1, -1, // 1, 2
0, -1, //3, 4
1, -1, //5, 6
2, 3, //7, 8
-1, 4, //9,10
5, 6, //11,12
7, -1, //13,14
8, 9, //15,16
-1, 10, //17,18
11, -1, //19,20
12, 13, //21,22
14, 15, //23, 24
-1, 16, // 25, 26
17, 18, //27, 28
-1, -1, //29, 30
-1, -1, //31, 32
-1, -1, //33, 34
-1, -1, //35, 36
-1, -1, //37, 38
-1, -1, //39, 40
// Padding:
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // ... 56
-1, -1, -1, -1, -1, -1, -1, // ... 63
};
char *physNames[64] =
{
NULL,
" 3.3V", "5V ",
"I2C2_SDA", "5V ",
"I2C2_SCL", "GND ",
" PWM1", "I2C3_SCL",
" GND", "I2C3_SDA",
"GPIO1_A1", "GPIO1_C2",
"GPIO1_A3", "GND ",
"GPIO2_D4", "GPIO1_C6",
" 3.3V", "GPIO1_C7",
"SPI1_TXD", "GND ",
"SPI1_RXD", "GPIO1_D0",
"SPI1_CLK", "SPI1_CS ",
" GND", "GPIO4_C5",
"I2C2_SDA", "I2C2_SCL",
" I2S0_RX", "GND ",
" I2S0_TX", "I2S_CLK ",
"I2S0_SCK", "GND ",
"I2S0_SI0", "I2S0_SO0",
"I2S0_SI1", "I2S0_SI2",
" GND", "I2S0_SI3",
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
};
#endif
6 years ago
6 years ago
/*
* ReadAll
*/
void OrangePiReadAll(void)
{
int pin;
int tmp = wiringPiDebug;
wiringPiDebug = FALSE;
6 years ago
#ifdef CONFIG_ORANGEPI_PC2
5 years ago
printf (" +------+-----+----------+------+---+ OPi PC2 +---+------+----------+-----+------+\n");
#elif CONFIG_ORANGEPI_PRIME
printf (" +------+-----+----------+------+---+ PRIME +---+------+----------+-----+------+\n");
#elif CONFIG_ORANGEPI_ZEROPLUS
printf (" +------+-----+----------+------+---+ ZEROPLUS +---+------+----------+-----+------+\n");
#elif CONFIG_ORANGEPI_ZEROPLUS2_H5
printf (" +------+-----+----------+------+---+ZEROPLUS 2+---+------+----------+-----+------+\n");
6 years ago
#elif CONFIG_ORANGEPI_2G_IOT
printf (" +------+-----+----------+------+---+ 2G-IOT +---+------+----------+-----+------+\n");
#elif CONFIG_ORANGEPI_H3
6 years ago
printf (" +------+-----+----------+------+---+OrangePiH3+---+------+----------+-----+------+\n");
#elif CONFIG_ORANGEPI_ZEROPLUS2_H3
printf (" +------+-----+----------+------+---+ZEROPLUS 2+---+------+----------+-----+------+\n");
6 years ago
#elif CONFIG_ORANGEPI_ZERO
printf (" +------+-----+----------+------+---+ OPi Zero +---+------+----------+-----+------+\n");
6 years ago
#elif CONFIG_ORANGEPI_A64
printf (" +------+-----+----------+------+---+ OPi Win +---+------+----------+-----+------+\n");
6 years ago
#elif CONFIG_ORANGEPI_LITE2 || CONFIG_ORANGEPI_3
printf (" +------+-----+----------+------+---+OrangePiH6+---+------+----------+-----+------+\n");
6 years ago
#elif CONFIG_ORANGEPI_RK3399
printf (" +------+-----+----------+------+---+OPi RK3399+---+------+----------+-----+------+\n");
#elif CONFIG_ORANGEPI_4
printf (" +------+-----+----------+------+---+OrangePi 4+---+---+--+----------+-----+------+\n");
6 years ago
#endif
6 years ago
printf (" | GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO |\n");
printf (" +------+-----+----------+------+---+----++----+---+------+----------+-----+------+\n");
#if defined CONFIG_ORANGEPI_H3 || defined CONFIG_ORANGEPI_RK3399 || CONFIG_ORANGEPI_4 || CONFIG_ORANGEPI_PC2 || CONFIG_ORANGEPI_PRIME || CONFIG_ORANGEPI_A64
for (pin = 1 ; pin <= 40; pin += 2)
#elif CONFIG_ORANGEPI_LITE2 || CONFIG_ORANGEPI_ZEROPLUS2_H3 || CONFIG_ORANGEPI_3 || CONFIG_ORANGEPI_ZERO || CONFIG_ORANGEPI_ZEROPLUS || CONFIG_ORANGEPI_R1 || CONFIG_ORANGEPI_ZEROPLUS2_H5
for (pin = 1 ; pin <= 26; pin += 2)
6 years ago
#endif
readallPhys(pin);
printf (" +------+-----+----------+------+---+----++----+---+------+----------+-----+------+\n");
printf (" | GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO |\n");
6 years ago
#ifdef CONFIG_ORANGEPI_PC2
5 years ago
printf (" +------+-----+----------+------+---+ OPi PC2 +---+------+----------+-----+------+\n");
#elif CONFIG_ORANGEPI_PRIME
printf (" +------+-----+----------+------+---+ PRIME +---+------+----------+-----+------+\n");
#elif CONFIG_ORANGEPI_ZEROPLUS
printf (" +------+-----+----------+------+---+ ZEROPLUS +---+------+----------+-----+------+\n");
#elif CONFIG_ORANGEPI_ZEROPLUS2_H5
printf (" +------+-----+----------+------+---+ZEROPLUS 2+---+------+----------+-----+------+\n");
6 years ago
#elif CONFIG_ORANGEPI_2G_IOT
printf (" +------+-----+----------+------+---+ 2G-IOT +---+------+----------+-----+------+\n");
#elif CONFIG_ORANGEPI_H3
6 years ago
printf (" +------+-----+----------+------+---+OrangePiH3+---+------+----------+-----+------+\n");
#elif CONFIG_ORANGEPI_ZEROPLUS2_H3
printf (" +------+-----+----------+------+---+ZEROPLUS 2+---+------+----------+-----+------+\n");
6 years ago
#elif CONFIG_ORANGEPI_ZERO
printf (" +------+-----+----------+------+---+ OPi Zero +---+------+----------+-----+------+\n");
6 years ago
#elif CONFIG_ORANGEPI_A64
printf (" +------+-----+----------+------+---+ OPi Win +---+------+----------+-----+------+\n");
6 years ago
#elif CONFIG_ORANGEPI_LITE2 || CONFIG_ORANGEPI_3
printf (" +------+-----+----------+------+---+OrangePiH6+---+------+----------+-----+------+\n");
6 years ago
#elif CONFIG_ORANGEPI_RK3399
printf (" +------+-----+----------+------+---+OPi RK3399+---+------+----------+-----+------+\n");
#elif CONFIG_ORANGEPI_4
printf (" +------+-----+----------+------+---+OrangePi 4+---+---+--+----------+-----+------+\n");
6 years ago
#endif
6 years ago
wiringPiDebug = tmp;
}