Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jan 2023 15:35:02 +0000
From:      "Dr. Rolf Jansen" <freebsd-rj@cyclaero.com>
To:        "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>
Cc:        Karl Denninger <karl@denninger.net>
Subject:   Re: GPIO inputs on Pis?
Message-ID:  <01070185e46b1a6e-ee34b885-1215-45c7-ac18-83320c02cac2-000000@eu-central-1.amazonses.com>
In-Reply-To: <0b235f83-7cb3-1d14-7c64-aee7c1c0c23d@denninger.net>
References:  <0b235f83-7cb3-1d14-7c64-aee7c1c0c23d@denninger.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_A3A27D85-289A-4F7A-9B78-6572DD14D844
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

> Am 23.01.2023 um 11:41 schrieb Karl Denninger <karl@denninger.net>:
>=20
> Is there support somewhere in the 13.x for other than "read current =
state" / "set current state"?
>=20
> Specifically, there is evidence in the sys/gpio.h header file that I =
can open up a file descriptor and then use select()/read() to grab the =
contents of a ring buffer of some size (presumably interrupt-posted) of =
events since last look, and determine if there's anything in there.  =
Provided you're reasonably fast this might be enough to, for example, =
read an optical encoder that has a modest pulse rate.
>=20
> I see apparent review code at https://reviews.freebsd.org/D27398 =
<https://reviews.freebsd.org/D27398>; from late 2020, but nothing else I =
can find digging around; an example (assuming it is actually implemented =
and works) would be helpful
>=20
See

=
https://forums.freebsd.org/threads/gpio-api-general-orange-pi-h3.83950/pos=
t-556728 =
<https://forums.freebsd.org/threads/gpio-api-general-orange-pi-h3.83950/po=
st-556728>

And the messages in that thread that follow the one linked above.

There is a respective thread on this mailing list as well:

Porting FreeBSD to ARM processors: User Space GPIO Interrupt programming =
- GSoC-2018 =
<https://lists.freebsd.org/archives/freebsd-arm/2020-November/022740.html>=

--Apple-Mail=_A3A27D85-289A-4F7A-9B78-6572DD14D844
Content-Transfer-Encoding: 7bit
Content-Type: text/html;
	charset=us-ascii

<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">Am 23.01.2023 um 11:41 schrieb Karl Denninger &lt;<a href="mailto:karl@denninger.net" class="">karl@denninger.net</a>&gt;:</div><br class="Apple-interchange-newline"><div class="">
  

    <meta http-equiv="content-type" content="text/html; charset=UTF-8" class="">
  
  <div class=""><p class="">Is there support somewhere in the 13.x for other than "read
      current state" / "set current state"?</p><p class="">Specifically, there is evidence in the sys/gpio.h header file
      that I can open up a file descriptor and then use select()/read()
      to grab the contents of a ring buffer of some size (presumably
      interrupt-posted) of events since last look, and determine if
      there's anything in there.&nbsp; Provided you're reasonably fast this
      might be enough to, for example, read an optical encoder that has
      a modest pulse rate.</p><p class="">I see apparent review code at <a class="moz-txt-link-freetext" href="https://reviews.freebsd.org/D27398">https://reviews.freebsd.org/D27398</a>;
      from late 2020, but nothing else I can find digging around; an
      example (assuming it is actually implemented and works) would be
      helpful</p></div></div></blockquote></div>See<div class=""><br class=""></div><div class=""><a href="https://forums.freebsd.org/threads/gpio-api-general-orange-pi-h3.83950/post-556728" class="">https://forums.freebsd.org/threads/gpio-api-general-orange-pi-h3.83950/post-556728</a></div><div class=""><br class=""></div><div class="">And the messages in that thread that follow the one linked above.</div><div class=""><br class=""></div><div class="">There is a respective thread on this mailing list as well:</div><div class=""><br class=""></div><div class=""><a href="https://lists.freebsd.org/archives/freebsd-arm/2020-November/022740.html" class="">Porting FreeBSD to ARM processors: User Space GPIO Interrupt programming - GSoC-2018</a></div></body></html>
--Apple-Mail=_A3A27D85-289A-4F7A-9B78-6572DD14D844--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?01070185e46b1a6e-ee34b885-1215-45c7-ac18-83320c02cac2-000000>