mirror of
https://github.com/periph/host.git
synced 2026-10-24 17:19:18 +03:00
main
Expose fix, verify, test, and help through consistent Make targets, with locked uv tools, EditorConfig, versioned hooks, shared binary checks, and generated agent file indexes. Apply safe lint fixes and formatting quietly while preserving diagnostics and failure exit codes. Require Go 1.26 and read CI toolchains from go.mod. Track lint and license tools in the root module; run pinned actionlint separately because of YAML dependency conflicts. Run vet through golangci-lint and retain distinct compile/link and module-tidiness checks. Refresh Actions and share setup where applicable. Ignore Codecov and coverage artifacts on Unix and Windows while keeping plain Git status checks for tracked changes and unexpected output. Run historical benchmark comparisons and their tool setup only on Ubuntu. Preserve platform and architecture coverage and downstream devices/cmd consumer gates while sharing runtime and static-check setup. Validation: make fix and make verify pass. Applicable test, generation, race, cross-build, and consumer checks passed during implementation. Formatter diagnostic fixtures, ignore-rule fixtures, index checks, and staged hooks pass. Native hosted OS and physical hardware execution remain outside local validation. Squashing preserves the validated file tree exactly.
periph - Peripherals I/O in Go
Documentation is at https://periph.io
Join us for a chat on gophers.slack.com/messages/periph, get an invite here.
Example
Blink a LED:
package main
import (
"time"
"periph.io/x/conn/v3/gpio"
"periph.io/x/host/v3"
"periph.io/x/host/v3/rpi"
)
func main() {
host.Init()
t := time.NewTicker(500 * time.Millisecond)
for l := gpio.Low; ; l = !l {
rpi.P1_33.Out(l)
<-t.C
}
}
Curious? Look at supported devices for more examples!
Authors
periph was initiated with ❤️️ and passion by Marc-Antoine
Ruel. The full list of contributors is in
AUTHORS and
CONTRIBUTORS.
Description
Languages
Go
97.2%
Python
1.9%
Shell
0.7%
Makefile
0.2%
