Browse Source

change VIM1 basic number

pull/68/head
frank 5 years ago
parent
commit
7e74b4dcac
2 changed files with 29 additions and 29 deletions
  1. +25
    -25
      wiringPi/khadas_vim1.c
  2. +4
    -4
      wiringPi/khadas_vim1.h

+ 25
- 25
wiringPi/khadas_vim1.c View File

@@ -29,22 +29,22 @@

static const int pinToGpio_rev[64] = {
//wiringPi number to native gpio number
-1,175, // 0 | 1 : | GPIODV_26
-1,475, // 0 | 1 : | GPIODV_26
-1, -1, // 2 | 3 :
122,123, // 4 | 5 : | GPIOH_7
125, -1, // 6 | 7 : GPIOH_9 |
422,423, // 4 | 5 : | GPIOH_7
425, -1, // 6 | 7 : GPIOH_9 |
-1, -1, // 8 | 9 :
124,136, // 10 | 11 : GPIOH_8 | GPIOAO_6
424,436, // 10 | 11 : GPIOH_8 | GPIOAO_6
-1, -1, // 12 | 13 :
-1,174, // 14 | 15 :
176, -1, // 16 | 17 : GPIODV_27 |
-1,474, // 14 | 15 :
476, -1, // 16 | 17 : GPIODV_27 |
-1, -1, // 18 | 19 :
-1,135, // 20 | 21 : | GPIOAO_5
134, -1, // 22 | 23 : GPIOAO_4 |
121,132, // 24 | 25 : GPIOAO_1 | GPIOAO_2
-1,435, // 20 | 21 : | GPIOAO_5
434, -1, // 22 | 23 : GPIOAO_4 |
421,432, // 24 | 25 : GPIOAO_1 | GPIOAO_2
-1, -1, // 26 | 27 :
-1,173, // 28 | 29 :
-1,121, // 30 | 31 :
-1,473, // 28 | 29 :
-1,421, // 30 | 31 :
// Padding:
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //32to47
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //48to63
@@ -55,24 +55,24 @@
//physical header pin number to native gpio number
-1, // 0
-1, -1, // 1 | 21 : 5v | GND
-1,174, // 2 | 22 : 5V | I2C_SCK_A(GPIODV_25)
-1,173, // 3 | 23 : HUB_DM1 | I2C_SDA_A(GPIODV_24)
-1,474, // 2 | 22 : 5V | I2C_SCK_A(GPIODV_25)
-1,473, // 3 | 23 : HUB_DM1 | I2C_SDA_A(GPIODV_24)
-1, -1, // 4 | 24 : HUB_DP1 | GND
-1,176, // 5 | 25 : GND | I2C_SCK_B(GPIODV_27)
-1,175, // 6 | 26 : 5V | I2C_SDA_B(GPIODV_26)
-1,476, // 5 | 25 : GND | I2C_SCK_B(GPIODV_27)
-1,475, // 6 | 26 : 5V | I2C_SDA_B(GPIODV_26)
-1, -1, // 7 | 27 : HUB_DM2 | 3.3V
-1, -1, // 8 | 28 : HUB_DP2 | GND
-1,123, // 9 | 29 : GND | GPIOH_7
-1,122, // 10 | 30 : ADC_CH0 | GPIOH_6
-1,125, // 11 | 31 : GND | GPIOH_9
-1,124, // 12 | 32 : ADC_CH2 | GPIOH_8
-1,136, // 13 | 33 : SPDIF | GPIOAO_6
-1,423, // 9 | 29 : GND | GPIOH_7
-1,422, // 10 | 30 : ADC_CH0 | GPIOH_6
-1,425, // 11 | 31 : GND | GPIOH_9
-1,424, // 12 | 32 : ADC_CH2 | GPIOH_8
-1,436, // 13 | 33 : SPDIF | GPIOAO_6
-1, -1, // 14 | 34 : GND | GND
135, -1, // 15 | 35 : (GPIOAO_5)UART_RX_AO_B | PWM_AO_A(GPIOAO_3)
134, -1, // 16 | 36 : (GPIOAO_4)UART_TX_AO_B | RTC_CLK
-1,121, // 17 | 37 : GND | GPIOH_5
121, -1, // 18 | 38 : (GPIOAO_1)Linux_RX | PWR_EN
122, -1, // 19 | 39 : (GPIOAO_2)Linux_Tx | PWM_F
435, -1, // 15 | 35 : (GPIOAO_5)UART_RX_AO_B | PWM_AO_A(GPIOAO_3)
434, -1, // 16 | 36 : (GPIOAO_4)UART_TX_AO_B | RTC_CLK
-1,421, // 17 | 37 : GND | GPIOH_5
421, -1, // 18 | 38 : (GPIOAO_1)Linux_RX | PWR_EN
422, -1, // 19 | 39 : (GPIOAO_2)Linux_Tx | PWM_F
-1, -1, // 20 | 40 : 3.3V | GND
// Not used
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,


+ 4
- 4
wiringPi/khadas_vim1.h View File

@@ -14,13 +14,13 @@
#define VIM1_GPIO_BASE 0xc8834000
#define VIM1_GPIOAO_BASE 0xc8100000

#define VIM1_GPIO_PIN_BASE 100
#define VIM1_GPIO_PIN_BASE 400

#define VIM1_GPIODV_PIN_START (VIM1_GPIO_PIN_BASE + 49) //100+49=149
#define VIM1_GPIODV_PIN_START (VIM1_GPIO_PIN_BASE + 49) //400+49=449
#define VIM1_GPIODV_PIN_END (VIM1_GPIO_PIN_BASE + 78)
#define VIM1_GPIOH_PIN_START (VIM1_GPIO_PIN_BASE + 16) //100+16=116
#define VIM1_GPIOH_PIN_START (VIM1_GPIO_PIN_BASE + 16) //400+16=416
#define VIM1_GPIOH_PIN_END (VIM1_GPIO_PIN_BASE + 25)
#define VIM1_GPIOAO_PIN_START (VIM1_GPIO_PIN_BASE + 30) //100+30=130
#define VIM1_GPIOAO_PIN_START (VIM1_GPIO_PIN_BASE + 30) //400+30=430
#define VIM1_GPIOAO_PIN_END (VIM1_GPIO_PIN_BASE + 39)

#define VIM1_GPIODV_FSEL_REG_OFFSET 0x10C //[29:0]


Loading…
Cancel
Save