Skip to content

Latest commit

 

History

History
62 lines (46 loc) · 2.29 KB

README.md

File metadata and controls

62 lines (46 loc) · 2.29 KB

gpiocdev-cli

Build Status PkgGoDev Go Report Card License: MIT

A command line utility to allow manual or scripted manipulation of GPIO lines on Linux using the GPIO character device (/dev/gpiochipN).

This utility combines the Go equivalent of all the libgpiod command line tools into a single tool.

Note

This is a WIP.

The existing version is split off from my gpiod library (now renamed gpiocdev) and mirrors the libgpiod v1 tools, as at the time there was no libgpiod v2 and so no tools using the latest kernel uAPI.

The plan is to update these tools to mirror the libgpiod v2 tools, but that isn't urgent given those tools now exist.

The purpose of the split was to reduce the dependencies in gpiocdev, and to decouple updates to the cli from the core library.

Installation

On Linux:

go install github.com/warthog618/go-gpiocdev-cli

Usage

gpiocdev is a utility to control GPIO lines on Linux GPIO character devices

Usage:
  gpiocdev [flags]
  gpiocdev [command]

Available Commands:
  chip        Detect available GPIO chips
  edges       Monitor the state of a line or lines
  get         Get the state of a line or lines
  help        Help about any command
  line        Info about chip lines
  platform    Provide info about the platform iGPIO uAPI support.
  set         Set the state of a line or lines
  version     Display the version
  watch       Watch lines for changes to the line info

Flags:
  -h, --help   help for gpiocdev

Use "gpiocdev [command] --help" for more information about a command.