Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

The moon may be smaller than Earth, but it's further away.


devel / comp.lang.python / Re: Finding good documentation for gpiod

SubjectAuthor
* Finding good documentation for gpiodChris Green
`- Re: Finding good documentation for gpiodBarry

1
Finding good documentation for gpiod

<rav9sj-7epr.ln1@esprimo.zbmc.eu>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=23947&group=comp.lang.python#23947

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: cl...@isbd.net (Chris Green)
Newsgroups: comp.lang.python
Subject: Finding good documentation for gpiod
Date: Fri, 1 Sep 2023 21:48:59 +0100
Lines: 68
Message-ID: <rav9sj-7epr.ln1@esprimo.zbmc.eu>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net cd1pmQIVsFL8GrSpXt4JywQB/0mRtsYz2/taM8Gb7LHrAbxmg=
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:dPNtP4Cl+Bje5NhtDaF+oM92XM8= sha256:If7VdgyZDoSTyI9gIuZgGauQaiHmHBVzybL0hhtx3L4=
User-Agent: tin/2.6.2-20220130 ("Convalmore") (Linux/5.15.0-79-generic (x86_64))
 by: Chris Green - Fri, 1 Sep 2023 20:48 UTC

I am using the gpiod package for manipulating GPIO inputs/outputs on a
Beaglebone Black SBC (like a Raspberry Pi but with more flexible I/O).

Mostly I am managing to get things to work as I want but better
documentation of gpiod would be a great help.

For example, when one has found an I/O pin (a 'line' in GPIO parlance)
that one wants to use one has to 'request' it using the Line.request()
method.

The help for this is as follows:-

Help on method_descriptor:

request(...)
request(consumer[, type[, flags[, default_val]]]) -> None

Request this GPIO line.

consumer
Name of the consumer.
type
Type of the request.
flags
Other configuration flags.
default_val
Default value of this line.
Note: default_vals argument (sequence of default values passed down to
LineBulk.request()) is still supported for backward compatibility but is
now deprecated when requesting single lines.

Which is pretty good **except** that I can't find a proper description
of the parameters anywhere, i.e. there's nowhere that even tells me
what types of values/objects the parameters are. At the end of the
gpiod.Line section of the help there is this:-

| ACTIVE_HIGH = 1
|
| ACTIVE_LOW = 2
|
| BIAS_AS_IS = 1
|
| BIAS_DISABLE = 2
|
| BIAS_PULL_DOWN = 4
|
| BIAS_PULL_UP = 3
|
| DIRECTION_INPUT = 1
|
| DIRECTION_OUTPUT = 2

Which **might** be appropriate values for 'type' or 'flags' but there
doesn't seem to be any way of knowing.

Am I missing something very obvious somewhere? Is there a 'standard'
way of finding out parameter information?

It may well be that I'm simply banging up against the limit of what
documentation is available, I have managed to get code working OK.
It's just that I'd be happier if I really know what I was doing! :-)

--
Chris Green
ยท

Re: Finding good documentation for gpiod

<mailman.278.1693804950.23016.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=23959&group=comp.lang.python#23959

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!not-for-mail
From: bar...@barrys-emacs.org (Barry)
Newsgroups: comp.lang.python
Subject: Re: Finding good documentation for gpiod
Date: Mon, 4 Sep 2023 06:22:11 +0100
Lines: 13
Message-ID: <mailman.278.1693804950.23016.python-list@python.org>
References: <rav9sj-7epr.ln1@esprimo.zbmc.eu>
<8FDE2607-A899-4BE2-B509-B947D119D499@barrys-emacs.org>
Mime-Version: 1.0 (1.0)
Content-Type: text/plain;
charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Trace: news.uni-berlin.de xnUW/3n57sYOR8CE2B/NNgjGaKn6aCc4wtge2DN8sM5A==
Cancel-Lock: sha1:VQIzzqG5LSDsmv8JeVfN1hQoQPY= sha256:qyBUWbBmNP6D3l/sr1+yzvTO76rC452EgwfI6iLa+cQ=
Return-Path: <barry@barrys-emacs.org>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.004
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'url-ip:140.82/16': 0.03;
'cc:addr:python-list': 0.09; 'from:addr:barry': 0.09;
'received:217.70': 0.09; 'received:gandi.net': 0.09;
'received:mail.gandi.net': 0.09; 'cc:no real name:2**0': 0.14;
'url:github': 0.14; 'url-ip:140/8': 0.15; 'barry': 0.16;
'from:addr:barrys-emacs.org': 0.16; 'message-id:@barrys-
emacs.org': 0.16; 'wrote:': 0.16; 'cc:addr:python.org': 0.20;
'maybe': 0.22; 'code': 0.23; 'help.': 0.25; 'cc:2**0': 0.25;
'chris': 0.28; 'mostly': 0.28; 'email addr:python.org&gt;': 0.28;
'python-list': 0.32; 'sep': 0.32; 'but': 0.32; 'subject:for':
0.33; 'header:In-Reply-To:1': 0.34; 'subject:skip:d 10': 0.35;
'source': 0.36; 'read': 0.38; 'want': 0.40; 'great': 0.63;
'received:217': 0.67; 'subject:good': 0.76; 'email name:&lt
;python-list': 0.84; 'green': 0.96
In-Reply-To: <rav9sj-7epr.ln1@esprimo.zbmc.eu>
X-Mailer: iPad Mail (20G75)
X-GND-Sasl: barry@barrys-emacs.org
X-Content-Filtered-By: Mailman/MimeDel 2.1.39
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <8FDE2607-A899-4BE2-B509-B947D119D499@barrys-emacs.org>
X-Mailman-Original-References: <rav9sj-7epr.ln1@esprimo.zbmc.eu>
 by: Barry - Mon, 4 Sep 2023 05:22 UTC

E

> On 3 Sep 2023, at 22:49, Chris Green via Python-list <python-list@python.org> wrote:
>
> Mostly I am managing to get things to work as I want but better
> documentation of gpiod would be a great help.

Ask the author? https://github.com/aswild/python-gpiod

Maybe read the source code for hints?

Barry

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor