Sujet : Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;)
De : antispam (at) *nospam* fricas.org (Waldek Hebisch)
Groupes : comp.lang.forthDate : 26. Oct 2024, 22:01:13
Autres entêtes
Organisation : To protect and to server
Message-ID : <vfjlan$3vq70$1@paganini.bofh.team>
References : 1 2 3 4 5
User-Agent : tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.1.0-9-amd64 (x86_64))
albert@spenarnc.xs4all.nl wrote:
In article <vfhgqc$3sajh$1@paganini.bofh.team>,
Waldek Hebisch <antispam@fricas.org> wrote:
>
which outputs bits to data register. To get actual output one
need to set direction register and associate PIN with GPIO function.
I defined set-function by ( fun# gpio#)
and redefine fun# that I always 0 for input , -1 for output.
This make a 1602 driver almost portable except for defining
the port numbers/
One pin may have several functions, not only GPIO. Do you mean
that you change numbering of functions so that 0 is GPIO input,
-1 is GPIO output and other functions get other numbers?
-- Waldek Hebisch