Skip to content

Commit 4d8fcfa

Browse files
committed
Document activelow, bias and chip in gpio
See also evcc commit 2ea1b71d476a ("GPIO: Add support for active low"). Signed-off-by: Wojciech Porczyk <wojciech.porczyk@connectpoint.pl>
1 parent 3face09 commit 4d8fcfa

File tree

1 file changed

+12
-7
lines changed
  • i18n/en/docusaurus-plugin-content-docs/current/devices

1 file changed

+12
-7
lines changed

i18n/en/docusaurus-plugin-content-docs/current/devices/plugins.mdx

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -378,15 +378,20 @@ It is particularly suitable for Raspberry Pi and similar single-board computers.
378378

379379
**Parameters**:
380380

381-
| Parameter | Type | Required | Description |
382-
| --------- | ------ | -------- | ---------------------------------------- |
383-
| function | string | yes | Mode: `read` (input) or `write` (output) |
384-
| pin | int | yes | Pin number (BCM numbering, e.g. GPIO 17) |
381+
| Parameter | Type | Required | Description |
382+
| --------- | ------ | -------- | ------------------------------------------------------------------ |
383+
| function | string | yes | Mode: `read` (input) or `write` (output) |
384+
| pin | int | yes | Pin number (BCM numbering, e.g. GPIO 17) |
385+
| activelow | bool | no | If `true`, pin will be `true` when at 0&nbsp;V and `false` at VCC. |
386+
| bias | string | no | `as-is` (default), `disabled`, `pull-up`, `pull-down` |
387+
| chip | string | no | GPIO device (default: `gpiochip0`) |
385388

386389
**How it works**:
387390

388-
- **Reading** (`function: read`): Reads the state of a GPIO pin as a boolean value (`true` = HIGH, `false` = LOW)
389-
- **Writing** (`function: write`): Sets a GPIO pin to HIGH (`true`) or LOW (`false`)
391+
- **Reading** (`function: read`): Reads the state of a GPIO pin as a boolean
392+
value (`true` = HIGH, `false` = LOW, and the other way around if `activelow` is set)
393+
- **Writing** (`function: write`): Sets a GPIO pin to HIGH (`true`) or LOW
394+
(`false`), and vice-versa if `activelow`
390395

391396
Pin numbering follows the BCM scheme (Broadcom numbers, not the physical pin position).
392397
For a Raspberry Pi pinout, see e.g. [pinout.xyz](https://pinout.xyz/).
@@ -408,7 +413,7 @@ pin: 27 # BCM pin number
408413
```
409414

410415
:::note
411-
This plugin only works on Linux systems with access to `/dev/gpiomem`.
416+
This plugin only works on Linux systems with access to `/dev/gpiochip0`.
412417
:::
413418

414419
### Go <Tag label="read" category="read" /> <Tag label="write" category="write" /> {#go}

0 commit comments

Comments
 (0)