1
0
mirror of https://github.com/periph/cmd.git synced 2026-10-23 05:28:53 +03:00
Marc-Antoine Ruel 0cb65f351d Standardize development checks and CI tooling
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.

Reject malformed web API JSON before hardware calls and protect session
cookies and tokens. Track upstream minify/v2 as a module tool, regenerate
embedded assets, and index the upstream DS18B20 example.

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.
The rebased cmd tree also passes make fix, make verify, and make test.

Squashing preserves the validated file tree exactly.
2026-10-18 21:04:33 -04:00
2021-05-29 07:41:16 -04:00
2022-06-20 13:36:03 -04:00
2021-05-29 07:41:16 -04:00
2021-05-29 07:41:16 -04:00
2025-05-04 20:48:45 -04:00
2022-06-20 13:36:03 -04:00
2025-03-19 18:15:59 -06:00
2022-06-20 13:36:03 -04:00
2021-05-29 07:41:16 -04:00
2022-10-27 13:42:01 -04:00
2022-06-20 13:36:03 -04:00
2022-10-27 13:42:01 -04:00
2024-08-09 13:54:11 -04:00
2017-03-27 10:02:48 -04:00
2016-10-13 13:26:58 -04:00

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.

mascot

PkgGoDev

cmd - ready-to-use executables

This directory contains directly usable tools installable via:

go install periph.io/x/cmd/...@latest

Push

If you prefer to build on your workstation and push the binaries to the micro computer, install push from periph.io/x/bootstrap to cross compile and efficiently push via rsync:

go install periph.io/x/bootstrap/cmd/push@latest
push -host pi@raspberrypi periph.io/x/cmd/...

Try first periph-info. It will print out if any driver failed to run, for example if you have to run as root to access certain drivers.

Then run headers-list to list all the headers on your board and confirm that you get the expected output. If your board is missing, you can contribute it.

Devices

  • apa102: Writes to a LED strip of APA-102 (sometimes called Dotstar). Can show an image animating on the Y axis.
  • bmxx80: Reads the temperature, pressure and humidity off a bmp180/bme280/bmp280. Humidity sensing is only supported on bme280.
  • cap1xxx: Reads the capacitive sensor family.
  • ir: Reads codes (button presses) on an InfraRed remote sensor.
  • led: Reads the state of on-board LEDs.
  • ssd1306: Writes text, an image or an animated GIF to an OLED display.
  • tm1637: Writes to a segment digits display.

Buses

  • gpio-list: Looking for the GPIO pins per functionality? Prints the state of each GPIO pin.
  • gpio-read: Read the input value of a GPIO pin and change input resistor.
  • gpio-write: Change the output value of a GPIO pin.
  • headers-list: Pinrts the location of the pin on the header to connect your GPIO. This is the perfect tool to know where to connect the wires.
  • i2c-io: Reads and/or writes to an I²C device.
  • i2c-list: Lists which I²C buses are enabled and where the pins are.
  • spi-io: Reads and/or writes to an SPI device.
  • spi-list: Lists which SPI ports are enabled and where the pins are.

Other

  • periph-info: Lists which periph drivers loaded and which failed.
  • periph-smoketest: Runs one of the smoke test for the drivers. The smoke test differs from unit tests as they require real hardware to confirm that the driver being tested works.
  • videosink: Demonstrates how to provide display contents to HTTP clients.

Troubleshooting

Having trouble getting the tools to run? File an issue or better visit the Slack channel. You can get an invite here.

Authors

periph was initiated with ❤️️ and passion by Marc-Antoine Ruel. The full list of contributors is in AUTHORS and CONTRIBUTORS.

Description
Ввод-вывод периферийных устройств в Go
https://periph.io/ Readme Apache-2.0 754 KiB
Languages
Go 78.5%
HTML 11.2%
Python 6.9%
Shell 2.6%
Makefile 0.8%