Skip to content

Commit

Permalink
Update for Orange Pi 5 Max
Browse files Browse the repository at this point in the history
  • Loading branch information
baiywt committed Mar 28, 2024
1 parent c2ce450 commit 7f53a53
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
16 changes: 8 additions & 8 deletions gpio/readall.c
Original file line number Diff line number Diff line change
Expand Up @@ -1016,22 +1016,22 @@ static char * physNames_5MAX[64] =
" 3.3V", "5V ",
" SDA.2", "5V ",
" SCL.2", "GND ",
" PWM3", "GPIO0_B5",
" GND", "GPIO0_B6",
"GPIO1_A0", "GPIO4_B3",
"GPIO1_A1", "GND ",
" PWM3", "TXD.2 ",
" GND", "RXD.2 ",
" RXD.6", "GPIO4_A6",
" TXD.6", "GND ",
"GPIO1_A2", "GPIO1_A3",
" 3.3V", "GPIO1_A4",
"SPI0_TXD", "GND ",
"SPI0_RXD", "GPIO1_B0",
"SPI0_CLK", "SPI0_CS0",
" GND", "SPI0_CS1",
"GPIO1_B7", "GPIO1_B6",
" RXD.1", "TXD.1 ",
"GPIO3_C1", "GND ",
"GPIO3_B5", "GPIO1_D6",
"GPIO3_B6", "GND ",
" CAN1_RX", "PWM14 ",
" CAN1_TX", "GND ",
"GPIO3_C2", "GPIO3_D7",
"GPIO3_D3", "GPIO3_C0",
"GPIO4_A7", "GPIO3_C0",
" GND", "GPIO3_B7",
};

Expand Down
13 changes: 7 additions & 6 deletions wiringPi/wiringPi.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,8 @@ static int ORANGEPI_PIN_MASK_5MAX[5][32] = //[BANK] [INDEX]
{-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1, 5, 6, 7, 0,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,},//GPIO0
{ 0, 1, 2, 3, 4,-1,-1, 7, 0, 1, 2, 3, 4, 5, 6, 7, -1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1, 6, 7,},//GPIO1
{-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,},//GPIO2
{-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1, 5, 6, 7, 0, 1, 2,-1,-1,-1,-1,-1, -1,-1,-1, 3,-1,-1,-1,-1,},//GPIO3
{-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1, 3,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,},//GPIO4
{-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1, 5, 6, 7, 0, 1, 2,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,},//GPIO3
{-1,-1,-1,-1,-1,-1, 6, 7, -1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,},//GPIO4
};

static int ORANGEPI_PIN_MASK_5PLUS[5][32] = //[BANK] [INDEX]
Expand Down Expand Up @@ -974,7 +974,7 @@ int pinToGpio_5MAX[64] =
16, 15, // 0, 1
39, 13, // 2, 3
14, 32, // 4 5
139, 33, // 6, 7
134, 33, // 6, 7
34, 35, // 8, 9
36, 42, //10,11
41, 40, //12,13
Expand All @@ -983,7 +983,7 @@ int pinToGpio_5MAX[64] =
46, 113, //18,19
109, 62, //20,21
110,114, //22,23
63,123, //24,25
63,135, //24,25
112,111, //26,27
-1, -1, //28,29
-1, -1, //30,31
Expand Down Expand Up @@ -1626,7 +1626,7 @@ int physToGpio_5MAX[64] =
15, -1, // 5, 6
39, 13, // 7, 8
-1, 14, // 9, 10
32, 139, // 11, 12
32, 134, // 11, 12
33, -1, // 13, 14
34, 35, // 15, 16
-1, 36, // 17, 18
Expand All @@ -1639,7 +1639,7 @@ int physToGpio_5MAX[64] =
109, 62, // 31, 32
110, -1, // 33, 34
114, 63, // 35, 36
123,112, // 37, 38
135,112, // 37, 38
-1, 111, // 39, 40

//Padding:
Expand Down Expand Up @@ -5636,6 +5636,7 @@ int OrangePi_set_gpio_mode(int pin, int mode)
{
case PI_MODEL_5: case PI_MODEL_5B:
case PI_MODEL_5_PRO:
case PI_MODEL_5_MAX:
case PI_MODEL_5_PLUS:
case PI_MODEL_900:

Expand Down

0 comments on commit 7f53a53

Please sign in to comment.