Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jan 2023 15:43:52 +0000
From:      "Dr. Rolf Jansen" <freebsd-rj@cyclaero.com>
To:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: GPIO inputs on Pis?
Message-ID:  <01070185e4732fd8-c0bede0b-d9df-4557-a174-cb237fa4bfaf-000000@eu-central-1.amazonses.com>
In-Reply-To: <a9b00748-1a11-3806-1103-ac2e6ad6bf43@denninger.net>
References:  <0b235f83-7cb3-1d14-7c64-aee7c1c0c23d@denninger.net> <01070185e46b1a6e-ee34b885-1215-45c7-ac18-83320c02cac2-000000@eu-central-1.amazonses.com> <a9b00748-1a11-3806-1103-ac2e6ad6bf43@denninger.net>

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

--Apple-Mail=_C69401B8-1DDE-4319-AE6A-B62FC4FF9828
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

I sent an old ink to the thread on the mailing list, which does not work =
anymore. Here ist the new link:

=
https://lists.freebsd.org/pipermail/freebsd-arm/2020-November/022738.html =
<https://lists.freebsd.org/pipermail/freebsd-arm/2020-November/022738.html=
>

> Am 24.01.2023 um 12:35 schrieb Karl Denninger <karl@denninger.net =
<mailto:karl@denninger.net>>:
>=20
> Thank you -- will check it out.
>=20
> On 1/24/2023 10:35, Dr. Rolf Jansen wrote:
>>> Am 23.01.2023 um 11:41 schrieb Karl Denninger <karl@denninger.net =
<mailto: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
>>=20
>> =
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>
>>=20
>> And the messages in that thread that follow the one linked above.
>>=20
>> There is a respective thread on this mailing list as well:
>>=20
>> Porting FreeBSD to ARM processors: User Space GPIO Interrupt =
programming - GSoC-2018 =
<https://lists.freebsd.org/archives/freebsd-arm/2020-November/022740.html>=
--=20
> Karl Denninger
> karl@denninger.net <mailto:karl@denninger.net>
> The Market Ticker
> [S/MIME encrypted email preferred]


--Apple-Mail=_C69401B8-1DDE-4319-AE6A-B62FC4FF9828
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=""><meta http-equiv="Content-Type" content="text/html; charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I sent an old ink to the thread on the mailing list, which does not work anymore. Here ist the new link:<div class=""><br class=""></div><div class=""><a href="https://lists.freebsd.org/pipermail/freebsd-arm/2020-November/022738.html" class="">https://lists.freebsd.org/pipermail/freebsd-arm/2020-November/022738.html</a></div><div class=""><br class=""></div><div class=""><div class=""><blockquote type="cite" class=""><div class="">Am 24.01.2023 um 12:35 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="">Thank you -- will check it out.<br class="">
    </p>
    <div class="moz-cite-prefix">On 1/24/2023 10:35, Dr. Rolf Jansen
      wrote:<br class="">
    </div>
    <blockquote type="cite" cite="mid:01070185e46b1a6e-ee34b885-1215-45c7-ac18-83320c02cac2-000000@eu-central-1.amazonses.com" class="">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
      <div class="">
        <blockquote type="cite" class="">
          <div class="">Am 23.01.2023 um 11:41 schrieb Karl Denninger
            &lt;<a href="mailto:karl@denninger.net" class="moz-txt-link-freetext" moz-do-not-send="true">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" moz-do-not-send="true">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="moz-txt-link-freetext" moz-do-not-send="true">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="" moz-do-not-send="true">Porting FreeBSD to ARM
          processors: User Space GPIO Interrupt programming - GSoC-2018</a></div>
    </blockquote>
    <div class="moz-signature">-- <br class="">
      Karl Denninger<br class="">
      <a href="mailto:karl@denninger.net" class="moz-txt-link-freetext">karl@denninger.net</a><br class="">
      <i class="">The Market Ticker</i><br class="">
      <font size="-2" class=""><i class="">[S/MIME encrypted email preferred]</i></font></div>
  </div>

</div></blockquote></div><br class=""></div></div></body></html>
--Apple-Mail=_C69401B8-1DDE-4319-AE6A-B62FC4FF9828--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?01070185e4732fd8-c0bede0b-d9df-4557-a174-cb237fa4bfaf-000000>