diff --git a/gpio/readall.c b/gpio/readall.c index ea2d743..9c4308c 100755 --- a/gpio/readall.c +++ b/gpio/readall.c @@ -94,14 +94,14 @@ static int physToWpi [64] = 7, -1, -1, 16, 0, 1, - 2, -1, + -1, -1, 3, -1, -1, 5, 12, 4, 13, 6, 14, 10, - -1, 11, // 25, 26 - 30, -1, // Actually I2C, but not used + 2, 11, // 25, 26 + -1, -1, // Actually I2C, but not used 21, 30, 22, 26, 23, 31, diff --git a/wiringPi/khadas_vim3.c b/wiringPi/khadas_vim3.c index a165adb..be25de6 100755 --- a/wiringPi/khadas_vim3.c +++ b/wiringPi/khadas_vim3.c @@ -31,7 +31,7 @@ static const int pinToGpio_rev[64] = { //wiringPi number to native gpio number -1,353, // 0 | 1 : | GPIOAO_3 - -1, -1, // 2 | 3 : | + 360, -1, // 2 | 3 : GPIOAO_10 | 300,301, // 4 | 5 : GPIOA_0 | GPIOA_1 303, -1, // 6 | 7 : GPIOA_3 | -1, -1, // 8 | 9 : | @@ -67,7 +67,7 @@ static const int phyToGpio_rev[64] = { -1,300, // 10 | 30 : ADC0 | GPIOA_0 -1,303, // 11 | 31 : 1.8V | GPIOA_3 -1,302, // 12 | 32 : ADC1 | GPIOA_2 - -1,304, // 13 | 33 : SPDIF | GPIOA_4 + 360,304, // 13 | 33 : GPIOAO_10 | GPIOA_4 -1, -1, // 14 | 34 : GND | GND 326, -1, // 15 | 35 : (GPIOH_6)UART_RX_AO_B | PWM-F 327, -1, // 16 | 36 : (GPIOH_7)UART_TX_AO_B | RTC_CLK diff --git a/wiringPi/khadas_vim3.h b/wiringPi/khadas_vim3.h index 98efaa6..9927072 100755 --- a/wiringPi/khadas_vim3.h +++ b/wiringPi/khadas_vim3.h @@ -22,7 +22,7 @@ #define VIM3_GPIOZ_PIN_START (VIM3_GPIO_PIN_BASE + 30) //300+30=330 #define VIM3_GPIOZ_PIN_END (VIM3_GPIO_PIN_BASE + 45) #define VIM3_GPIOAO_PIN_START (VIM3_GPIO_PIN_BASE + 50) //300+50=350 -#define VIM3_GPIOAO_PIN_END (VIM3_GPIO_PIN_BASE + 59) +#define VIM3_GPIOAO_PIN_END (VIM3_GPIO_PIN_BASE + 69) #define VIM3_GPIOA_FSEL_REG_OFFSET 0x120 #define VIM3_GPIOA_OUTP_REG_OFFSET 0x121