Add support for more Orange Pi Devices (#10942)

Use only one 'pin_mode' per device instead of groups. This way it will be future proof if the library changes something for just one device instead of a group.

This is backwards compatible as the 'Lite', 'One' and 'PC' are internally handled the same way. 'Prime' is now handled slightly different due to changes in the library, so users of the Orange Pi Prime are advised to change their configuration to this new value.

Also fixes a link anchor.
This commit is contained in:
Pascal Roeleven 2019-10-22 19:32:38 +02:00 committed by Franck Nijhof
parent 2938f65192
commit dcd4d410dc

View File

@ -30,7 +30,7 @@ binary_sensor:
{% configuration %}
pin_mode:
description: Type of pin mode to use. This depends on which device you are actually using ([PIN_MODE](/integrations/orangepi_gpio#pin_mode)).
description: Type of pin mode to use. This depends on which device you are actually using ([Pin modes](#pin-modes)).
required: true
type: string
ports:
@ -51,13 +51,25 @@ invert_logic:
Compared to the [Raspberry Pi GPIO](/integrations/rpi_gpio/) component, this integration does not support pull-up resistors or port debouncing. Use external pull-ups and external port-debouncing.
## Pin_mode
## Pin modes
As this platform supports different types of GPIO pinouts for difference Orange Pi or Nano Pi devices, we use the `pin_mode` value to specify which one to use. Enabled values are:
| Value | Description |
| ----- | ----------- |
| `pc` | Supports the Orange Pi Lite, One, PC and Prime |
| `lite` | Supports the Orange Pi Lite |
| `lite2` | Supports the Orange Pi Lite 2 |
| `one` | Supports the Orange Pi One |
| `oneplus` | Supports the Orange Pi One Plus |
| `pc` | Supports the Orange Pi PC |
| `pc2` | Supports the Orange Pi PC 2 |
| `pcplus` | Supports the Orange Pi PC Plus |
| `pi3` | Supports the Orange Pi 3 |
| `plus2e` | Supports the Orange Pi Plus 2E |
| `prime` | Supports the Orange Pi Prime |
| `r1` | Supports the Orange Pi R1 |
| `winplus` | Supports the Orange Pi WinPlus |
| `zero` | Supports the Orange Pi Zero |
| `zeroplus` | Supports the Orange Pi Zero Plus |
| `zeroplus2` | Supports the Orange Pi Zero Plus 2 |
| `duo` | Supports the NanoPi Duo |