From 0681576f5b14c68dd06ee2c0eee2de5c85efb2da Mon Sep 17 00:00:00 2001 From: Kent Gibson Date: Mon, 22 Jul 2024 16:09:01 +0800 Subject: [PATCH] add documentation on line values --- gpiocdev.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gpiocdev.go b/gpiocdev.go index d6cef47..7db9d05 100644 --- a/gpiocdev.go +++ b/gpiocdev.go @@ -928,6 +928,8 @@ func (l *Line) Info() (info LineInfo, err error) { } // Value returns the current value (active state) of the line. +// +// Values are 0 for inactive and 1 for active. func (l *Line) Value() (int, error) { l.mu.Lock() defer l.mu.Unlock() @@ -947,6 +949,8 @@ func (l *Line) Value() (int, error) { // SetValue sets the current value (active state) of the line. // // Only valid for output lines. +// +// Values are 0 for inactive and 1 for active. func (l *Line) SetValue(value int) error { l.mu.Lock() defer l.mu.Unlock() @@ -1015,6 +1019,8 @@ func (l *Lines) Info() ([]*LineInfo, error) { // Values returns the current values (active state) of the collection of lines. // +// Values are 0 for inactive and 1 for active. +// // Gets as many values from the set, in order, as can be fit in values, up to // the full set. func (l *Lines) Values(values []int) error { @@ -1053,6 +1059,8 @@ func (l *Lines) Values(values []int) error { // // Only valid for output lines. // +// Values are 0 for inactive and 1 for active. +// // All lines in the set are set at once. If insufficient values are provided // then the remaining lines are set to inactive. If too many values are provided // then the surplus values are ignored.