{"id":29350669,"url":"https://github.com/jjl772/devgpiogeneric","last_synced_at":"2026-01-27T21:30:55.858Z","repository":{"id":302929583,"uuid":"1006928414","full_name":"JJL772/devGpioGeneric","owner":"JJL772","description":"Generic Linux GPIO device support for EPICS","archived":false,"fork":false,"pushed_at":"2025-07-04T20:20:31.000Z","size":21,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-04T20:38:11.732Z","etag":null,"topics":["epics","epics-modules"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JJL772.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-23T07:53:35.000Z","updated_at":"2025-07-04T20:20:34.000Z","dependencies_parsed_at":"2025-07-04T20:38:13.566Z","dependency_job_id":null,"html_url":"https://github.com/JJL772/devGpioGeneric","commit_stats":null,"previous_names":["jjl772/devgpiogeneric"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JJL772/devGpioGeneric","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JJL772%2FdevGpioGeneric","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JJL772%2FdevGpioGeneric/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JJL772%2FdevGpioGeneric/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JJL772%2FdevGpioGeneric/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JJL772","download_url":"https://codeload.github.com/JJL772/devGpioGeneric/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JJL772%2FdevGpioGeneric/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264363793,"owners_count":23596507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["epics","epics-modules"],"created_at":"2025-07-08T23:08:07.971Z","updated_at":"2026-01-27T21:30:55.852Z","avatar_url":"https://github.com/JJL772.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# devGpioGeneric\n\nEPICS device support for generic GPIO devices on Linux using the [chardev interface](https://docs.kernel.org/userspace-api/gpio/chardev.html).\n\n## Supported Devices\n\n* Raspberry Pi 5\n* TI Aquila AM69 SoM\n\nOther devices supporting the Linux GPIO driver will work, but need DB templates written for them.\n\n## Records\n\nEach pin has the following associated records, where `$(P)` is provided by the IOC and `$(N)` is substituted with the pin number.\n| Record Name | Type | Description |\n|---|---|---|\n| `$(P)GPIO$(N)_OUT` | bo | Output value, used when the pin is configured as an output |\n| `$(P)GPIO$(N)_IN` | bi | Input value, used when the pin is configured as an input |\n| `$(P)GPIO$(N)_POLARITY` | mbbo | Polarity for outputs. Default is \"active high\" |\n| `$(P)GPIO$(N)_TYPE` | mbbo | Pin type. Default is Input |\n| `$(P)GPIO$(N)_DRIVE` | mbbo | Drive type for outputs. Default is \"Push/Pull\" | \n| `$(P)GPIO$(N)_BIAS` | mbbo | Bias for inputs. Default is \"None\" |\n| `$(P)GPIO$(N)_RESET` | bo | Resets the value when the pin is configured as a latched input |\n| `$(P)GPIO$(N)_DEBOUNCE` | longin | Debounce sampling period in microseconds. Only relevant for input pins |\n\n## Outputs\n\nWhen `$(P)GPIO$(N)_TYPE` is set to `Output`, the pin is configured as an output. The pin can be driven high or low by writing to \n`$(P)GPIO$(N)_OUT`.\n\nWrties to `$(P)GPIO$(N)_OUT` will be rejected when the pin is not configured as an output.\n\n## Inputs\n\nWhen `$(P)GPIO$(N)_TYPE` is set to `Input`, the pin is configured as an input. The value of the pin is available through the record `$(P)GPIO$(N)_IN`.\n\nReads on `$(P)GPIO$(N)_IN` are no-ops when the pin is configured as an output.\n\nInputs have two operating modes: an event driven mode and a direct sampling mode.\n\n### Direct Sampling Mode\n\nSetting `$(P)GPIO$(N)_IN.SCAN` to a fixed scan rate enables the direct sampling mode, which directly samples the pin's value every time the record is processed.\nSince scan rates are slow, it's recommended to use the event driven mode to avoid missing edge events on the pin.\n\n### Event Mode\n\nIf `$(P)GPIO$(N)_IN.SCAN` is set to `I/O Intr` (the default), the input operates in event mode. In event mode, edges are detected by the kernel driver, usually via interrupts,\nand are forwarded to the device support module where the values are cached. Edge events trigger record processing where the cached values are read by the device support.\n\n## Latched Inputs\n\nWhen `$(P)GPIO$(N)_TYPE` is set to `InputLatched`, the pin operates in a special latched input mode.\n\nIn latched mode, the input stays high when a rising edge (or falling edge, depending on the polarity setting) is detected.\nThe value can be reset by writing '1' to `$(P)GPIO$(N)_RESET`\n\nUnlike the `Input` type, the pin always operates in the event mode regardless of `SCAN` setting.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjl772%2Fdevgpiogeneric","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjjl772%2Fdevgpiogeneric","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjl772%2Fdevgpiogeneric/lists"}