Browse Source

Add spidf gpio

pull/68/head
frank 5 years ago
parent
commit
03970fd31a
3 changed files with 6 additions and 6 deletions
  1. +3
    -3
      gpio/readall.c
  2. +2
    -2
      wiringPi/khadas_vim3.c
  3. +1
    -1
      wiringPi/khadas_vim3.h

+ 3
- 3
gpio/readall.c View File

@@ -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,


+ 2
- 2
wiringPi/khadas_vim3.c View File

@@ -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


+ 1
- 1
wiringPi/khadas_vim3.h View File

@@ -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


Loading…
Cancel
Save