The PanGu development board has multiple GPIO groups. To view GPIO group information, you can use the gpiodetect command.
# gpiodetectgpiochip0 [GPIOA] (16 lines)gpiochip1 [GPIOB] (16 lines)gpiochip10 [GPIOK] (16 lines)gpiochip11 [GPIOZ] (16 lines)gpiochip2 [GPIOC] (16 lines)gpiochip3 [GPIOD] (16 lines)gpiochip4 [GPIOE] (16 lines)gpiochip5 [GPIOF] (16 lines)gpiochip6 [GPIOG] (16 lines)gpiochip7 [GPIOH] (16 lines)gpiochip8 [GPIOI] (16 lines)gpiochip9 [GPIOJ] (16 lines) |
If you need to query the GPIO information in the specified group, use the gpioinfo command to query the GPIOZ group as an example.
| |
|:--|
|`# gpioinfo gpiochip11`<br>`gpiochip11 - 16 lines:`<br>` ``line 0: unnamed unused input active-high`<br>` ``line 1: unnamed unused input active-high`<br>` ``line 2: unnamed unused input active-high`<br>` ``line 3: unnamed unused input active-high`<br>` ``line 4: unnamed unused input active-high`<br>` ``line 5: unnamed unused input active-high`<br>` ``line 6: unnamed unused input active-high`<br>` ``line 7: unnamed unused input active-high`<br>` ``line 8: unnamed unused input active-high`<br>` ``line 9: unnamed unused input active-high`<br>` ``line 10: unnamed unused input active-high`<br>` ``line 11: unnamed unused input active-high`<br>` ``line 12: unnamed unused input active-high`<br>` ``line 13: unnamed unused input active-high`<br>` ``line 14: unnamed unused input active-high`<br>` ``line 15: unnamed unused input active-high` |
# gpioget gpiochip11 00 |
Set PZ0 to high:
# gpioset gpiochip11 0=1 |
Read PZ0 level status:
# gpioget gpiochip11 01 |