{"repo":"warthog618/go-gpiocdev","free":true,"listed":false,"github":"https://github.com/warthog618/go-gpiocdev","clone":"git clone https://github.com/warthog618/go-gpiocdev.git","description":"A native Go library for accessing GPIO lines on Linux platforms using the GPIO character device","language":"Go","stars":515,"topics":["golang","libgpiod","gpio-library","linux","pin","gpio","linux-gpio","gpio-character-device","go"],"license":"MIT","category":"dev-tools","readme_excerpt":"gpiocdev A native Go library for Linux GPIO. gpiocdev is a library for accessing GPIO pins/lines on Linux platforms using the GPIO character device. The goal of this library is to provide the Go equivalent of the C libgpiod library. The intent is not to mirror the libgpiod API but to provide the equivalent functionality. Features Supports the following functionality per line and for collections of lines: - direction (input/output) 1 - write (active/inactive) - read (active/inactive) - active high/low (defaults to high) - output mode (push-pull/open-drain/open-source) - pull up/down 2 - watches and edge detection (rising/falling/both) - chip and line labels - debouncing input lines 3 - different configurations for lines within a collection 3 1 Dynamically changing line direction without releasing the line requires Linux 5.5 or later. 2 Requires Linux 5.5 or later. 3 Requires Linux 5.10 or later. All library functions are safe to call from different goroutines. Quick Start A simple piece of wire example that reads the value of an input line (pin 2) and writes its value to an output line (pin 3): Error handling and releasing of resources omitted for brevity. Usage Error handling is omitted from the following examples for brevity. Line Requests To read or alter the value of a line it must first be requested using gpiocdev.RequestLine : or from the Chip object using Chip.RequestLine : The offset parameter identifies the line on the chip, and is specific to the GPIO chip. To improv","default_branch":null,"files":null,"tree":[],"storefront":"/r/warthog618","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/warthog618/go-gpiocdev/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}