diff --git a/README.md b/README.md index 4f5ad8f..5cb20a8 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,42 @@ +## How to download wiringOP + +``` +root@orangepi:~# git clone https://github.com/orangepi-xunlong/wiringOP.git +``` + +## How to build wiringOP + +``` +root@orangepi:~# cd wiringOP +root@orangepi:~/wiringOP# ./build clean +root@orangepi:~/wiringOP# ./build +All available boards: + 0. OrangePi_R1 + 1. OrangePi_ZERO + 2. OrangePi_PC + 3. OrangePi_PLUS + 4. OrangePi_PCPLUS + 5. OrangePi_PLUS2E + 6. OrangePi_ONE_H3 + 7. OrangePi_LITE_H3 + 8. OrangePi_ZEROPLUS2_H3 + 9. OrangePi_PC2 + 10. OrangePi_PRIME + 11. OrangePi_ZEROPLUS + 12. OrangePi_ZEROPLUS2_H5 + 13. OrangePi_WIN + 14. OrangePi_WINPLUS + 15. OrangePi_3 + 16. OrangePi_LITE2 + 17. OrangePi_ONEPLUS + 18. OrangePi_4 + 19. OrangePi_RK3399 +Choice: 12 //Select the number of the board +``` + +--- +## The output of the gpio readall command + ## Allwinner H2+ ### Orange Pi Zero/R1 @@ -192,3 +231,150 @@ | GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO | +------+-----+----------+------+---+ PRIME +---+------+----------+-----+------+ ``` + +## Allwinner A64 + +### Orange Pi Win/Winplus + +``` + +------+-----+----------+------+---+ OPi Win +---+------+----------+-----+------+ + | GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO | + +------+-----+----------+------+---+----++----+---+------+----------+-----+------+ + | | | 3.3V | | | 1 || 2 | | | 5V | | | + | 227 | 0 | SDA.1 | ALT2 | 0 | 3 || 4 | | | 5V | | | + | 226 | 1 | SCL.1 | ALT2 | 0 | 5 || 6 | | | GND | | | + | 362 | 2 | PL10 | OFF | 0 | 7 || 8 | 0 | ALT2 | PL02 | 3 | 354 | + | | | GND | | | 9 || 10 | 0 | ALT2 | PL03 | 4 | 355 | + | 229 | 5 | RXD.3 | OFF | 0 | 11 || 12 | 0 | OFF | PD04 | 6 | 100 | + | 228 | 7 | TXD.3 | OFF | 0 | 13 || 14 | | | GND | | | + | 231 | 8 | CTS.3 | OUT | 0 | 15 || 16 | 0 | OFF | PL09 | 9 | 361 | + | | | 3.3V | | | 17 || 18 | 0 | OFF | PC04 | 10 | 68 | + | 98 | 11 | MOSI.1 | OFF | 0 | 19 || 20 | | | GND | | | + | 99 | 12 | MISO.1 | OFF | 0 | 21 || 22 | 0 | OFF | RTS.3 | 13 | 230 | + | 97 | 14 | SCLK.1 | OFF | 0 | 23 || 24 | 0 | OFF | CE.1 | 15 | 96 | + | | | GND | | | 25 || 26 | 0 | OFF | PD06 | 16 | 102 | + | 143 | 17 | SDA.2 | ALT3 | 0 | 27 || 28 | 0 | ALT3 | SCL.2 | 18 | 142 | + | 36 | 19 | PB04 | OFF | 0 | 29 || 30 | | | GND | | | + | 37 | 20 | PB05 | OFF | 0 | 31 || 32 | 0 | ALT2 | RTS.2 | 21 | 34 | + | 38 | 22 | PB06 | OFF | 0 | 33 || 34 | | | GND | | | + | 39 | 23 | PB07 | OFF | 0 | 35 || 36 | 0 | ALT2 | CTS.2 | 24 | 35 | + | 101 | 25 | PD05 | OFF | 0 | 37 || 38 | 0 | ALT2 | TXD.2 | 26 | 32 | + | | | GND | | | 39 || 40 | 0 | ALT2 | RXD.2 | 27 | 33 | + +------+-----+----------+------+---+----++----+---+------+----------+-----+------+ + | GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO | + +------+-----+----------+------+---+ OPi Win +---+------+----------+-----+------+ +``` + +## Allwinner H6 + +### Orange Pi 3 + +``` + +------+-----+----------+------+---+ OPi 3 +---+------+----------+-----+------+ + | GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO | + +------+-----+----------+------+---+----++----+---+------+----------+-----+------+ + | | | 3.3V | | | 1 || 2 | | | 5V | | | + | 122 | 0 | SDA.0 | OFF | 0 | 3 || 4 | | | 5V | | | + | 121 | 1 | SCL.0 | OFF | 0 | 5 || 6 | | | GND | | | + | 118 | 2 | PWM.0 | OFF | 0 | 7 || 8 | 0 | OFF | PL02 | 3 | 354 | + | | | GND | | | 9 || 10 | 0 | OFF | PL03 | 4 | 355 | + | 120 | 5 | RXD.3 | ALT4 | 0 | 11 || 12 | 0 | OFF | PD18 | 6 | 114 | + | 119 | 7 | TXD.3 | ALT4 | 0 | 13 || 14 | | | GND | | | + | 362 | 8 | PL10 | OFF | 0 | 15 || 16 | 0 | OFF | PD15 | 9 | 111 | + | | | 3.3V | | | 17 || 18 | 0 | OFF | PD16 | 10 | 112 | + | 229 | 11 | MOSI.1 | ALT2 | 0 | 19 || 20 | | | GND | | | + | 230 | 12 | MISO.1 | ALT2 | 0 | 21 || 22 | 0 | OFF | PD21 | 13 | 117 | + | 228 | 14 | SCLK.1 | ALT2 | 0 | 23 || 24 | 0 | ALT2 | CE.1 | 15 | 227 | + | | | GND | | | 25 || 26 | 0 | OFF | PL08 | 16 | 360 | + +------+-----+----------+------+---+----++----+---+------+----------+-----+------+ + | GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO | + +------+-----+----------+------+---+ OPi 3 +---+------+----------+-----+------+ +``` + +### Orange Pi Lite2/Oneplus + +``` + +------+-----+----------+------+---+ OPi H6 +---+------+----------+-----+------+ + | GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO | + +------+-----+----------+------+---+----++----+---+------+----------+-----+------+ + | | | 3.3V | | | 1 || 2 | | | 5V | | | + | 230 | 0 | SDA.1 | OFF | 0 | 3 || 4 | | | 5V | | | + | 229 | 1 | SCL.1 | OFF | 0 | 5 || 6 | | | GND | | | + | 228 | 2 | PWM1 | OFF | 0 | 7 || 8 | 0 | OFF | PD21 | 3 | 117 | + | | | GND | | | 9 || 10 | 0 | OFF | PD22 | 4 | 118 | + | 120 | 5 | RXD.3 | ALT4 | 0 | 11 || 12 | 0 | OFF | PC09 | 6 | 73 | + | 119 | 7 | TXD.3 | ALT4 | 0 | 13 || 14 | | | GND | | | + | 122 | 8 | CTS.3 | OFF | 0 | 15 || 16 | 0 | OFF | PC08 | 9 | 72 | + | | | 3.3V | | | 17 || 18 | 0 | OFF | PC07 | 10 | 71 | + | 66 | 11 | MOSI.0 | ALT4 | 0 | 19 || 20 | | | GND | | | + | 67 | 12 | MISO.0 | ALT4 | 0 | 21 || 22 | 0 | OFF | RTS.3 | 13 | 121 | + | 64 | 14 | SCLK.0 | ALT4 | 0 | 23 || 24 | 0 | ALT4 | CE.0 | 15 | 69 | + | | | GND | | | 25 || 26 | 0 | OFF | PH03 | 16 | 227 | + +------+-----+----------+------+---+----++----+---+------+----------+-----+------+ + | GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO | + +------+-----+----------+------+---+ OPi H6 +---+------+----------+-----+------+ +``` + +## RockChip RK3399 + +### Orange Pi RK3399 + +``` + +------+-----+----------+------+---+OPi RK3399+---+------+----------+-----+------+ + | GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO | + +------+-----+----------+------+---+----++----+---+------+----------+-----+------+ + | | | 3.3V | | | 1 || 2 | | | 5V | | | + | 43 | 0 | SDA.0 | ALT2 | 1 | 3 || 4 | | | 5V | | | + | 44 | 1 | SCL.0 | ALT2 | 1 | 5 || 6 | | | GND | | | + | 64 | 2 | GPIO4 | ALT3 | 0 | 7 || 8 | 0 | ALT2 | Tx | 3 | 148 | + | | | GND | | | 9 || 10 | 1 | ALT2 | Rx | 4 | 147 | + | 80 | 5 | GPIO17 | ALT2 | 0 | 11 || 12 | 0 | ALT3 | GPIO18 | 6 | 65 | + | 81 | 7 | GPIO27 | ALT2 | 0 | 13 || 14 | | | GND | | | + | 82 | 8 | GPIO22 | ALT2 | 0 | 15 || 16 | 0 | IN | GPIO23 | 9 | 66 | + | | | 3.3V | | | 17 || 18 | 0 | IN | GPIO24 | 10 | 67 | + | 39 | 11 | MOSI | ALT2 | 1 | 19 || 20 | | | GND | | | + | 40 | 12 | MISO | ALT2 | 1 | 21 || 22 | 0 | ALT2 | GPIO25 | 13 | 83 | + | 41 | 14 | SCLK | ALT3 | 1 | 23 || 24 | 1 | ALT3 | CS0 | 15 | 42 | + | | | GND | | | 25 || 26 | 0 | ALT2 | CS1 | 16 | 133 | + | 154 | 17 | DNP1 | IN | 0 | 27 || 28 | 1 | IN | DNP2 | 18 | 50 | + | 68 | 19 | GPIO5 | OUT | 1 | 29 || 30 | | | GND | | | + | 69 | 20 | GPIO6 | OUT | 1 | 31 || 32 | 1 | OUT | GPIO12 | 21 | 76 | + | 70 | 22 | GPIO13 | OUT | 1 | 33 || 34 | | | GND | | | + | 71 | 23 | GPIO19 | OUT | 1 | 35 || 36 | 1 | OUT | GPIO16 | 24 | 73 | + | 72 | 25 | GPIO26 | OUT | 1 | 37 || 38 | 0 | IN | GPIO20 | 26 | 74 | + | | | GND | | | 39 || 40 | 0 | ALT4 | GPIO21 | 27 | 75 | + +------+-----+----------+------+---+----++----+---+------+----------+-----+------+ + | GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO | + +------+-----+----------+------+---+OPi RK3399+---+------+----------+-----+------+ + ``` + + ### Orange Pi 4/4b + + ``` + +------+-----+----------+------+---+OrangePi 4+---+---+--+----------+-----+------+ + | GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO | + +------+-----+----------+------+---+----++----+---+------+----------+-----+------+ + | | | 3.3V | | | 1 || 2 | | | 5V | | | + | 64 | 0 | I2C2_SDA | ALT3 | 0 | 3 || 4 | | | 5V | | | + | 65 | 1 | I2C2_SCL | ALT3 | 0 | 5 || 6 | | | GND | | | + | 150 | 2 | PWM1 | IN | 0 | 7 || 8 | 1 | ALT2 | I2C3_SCL | 3 | 145 | + | | | GND | | | 9 || 10 | 1 | ALT2 | I2C3_SDA | 4 | 144 | + | 33 | 5 | GPIO1_A1 | IN | 0 | 11 || 12 | 1 | IN | GPIO1_C2 | 6 | 50 | + | 35 | 7 | GPIO1_A3 | OUT | 0 | 13 || 14 | | | GND | | | + | 92 | 8 | GPIO2_D4 | OUT | 1 | 15 || 16 | 0 | IN | GPIO1_C6 | 9 | 54 | + | | | 3.3V | | | 17 || 18 | 0 | IN | GPIO1_C7 | 10 | 55 | + | 40 | 11 | SPI1_TXD | ALT2 | 1 | 19 || 20 | | | GND | | | + | 39 | 12 | SPI1_RXD | ALT2 | 1 | 21 || 22 | 0 | IN | GPIO1_D0 | 13 | 56 | + | 41 | 14 | SPI1_CLK | ALT3 | 1 | 23 || 24 | 1 | ALT3 | SPI1_CS | 15 | 42 | + | | | GND | | | 25 || 26 | 0 | IN | GPIO4_C5 | 16 | 149 | + | 64 | 17 | I2C2_SDA | ALT3 | 0 | 27 || 28 | 0 | ALT3 | I2C2_SCL | 18 | 65 | + | | | I2S0_RX | | | 29 || 30 | | | GND | | | + | | | I2S0_TX | | | 31 || 32 | | | I2S_CLK | | | + | | | I2S0_SCK | | | 33 || 34 | | | GND | | | + | | | I2S0_SI0 | | | 35 || 36 | | | I2S0_SO0 | | | + | | | I2S0_SI1 | | | 37 || 38 | | | I2S0_SI2 | | | + | | | GND | | | 39 || 40 | | | I2S0_SI3 | | | + +------+-----+----------+------+---+----++----+---+------+----------+-----+------+ + | GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO | + +------+-----+----------+------+---+OrangePi 4+---+---+--+----------+-----+------+ +```