Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #5837

Using GPIO

Subject Using GPIO
Newsgroups comp.sys.acorn.programmer
From Alan Adams <alan@adamshome.org.uk>
Date 2019-09-27 12:49 +0100
Message-ID <570d0efa57.Alan.Adams@ArmX6.adamshome.org.uk> (permalink)
Organization Orpheus Internet Services

Show all headers | View raw


Hi

Does anyone here understand the documentation for the GPIO module? I'm 
completely confused. There was a module (pre 2017 it seems) with a host of 
SWIs which were more or less descriptive. The replacement seems to only 
have about ten SWIs and I can't make out from the only documentation (a 
StrongHelp file) which ones would do what I need.

On an rpi, I need to enable two pins as inputs, causing an interrupt. 
(Using a change of state event will not be fast enough, as that has to be 
polled for).

I need to create a small module which will react to the interrupt, decide 
which pin it was, and store the current clock time, then change a 
pollword.  (I'm assuming here that servicing an interrupt requires a 
module.)

I have the hardware manual, so I know the hardware is capable of this. 
What I can't see is how the GPIO module helps. Maybe it doesn't... Ideally 
it would already be capable of handling the interrupt for me, but I have 
doubts about that.

This is likely to be a learning experience for me, as I've never written 
any C. At the monment I'm thinking it would be easier for me to write it 
in assembler, especially as I have a module to use as an example - the 
Socketwatch module is also in assembler. I have in the past written 
assembler for VAX, Z80 and 6502. The Z80 was a language ROM providing a 
complete terminal emulator, including enlarged buffers hooked into the 
vectors, so not exactly trivial.

-- 
Alan Adams, from Northamptonshire
alan@adamshome.org.uk
http://www.nckc.org.uk/

Back to comp.sys.acorn.programmer | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Using GPIO Alan Adams <alan@adamshome.org.uk> - 2019-09-27 12:49 +0100
  Re: Using GPIO sales@elesar.co.uk - 2019-10-02 13:17 -0700
    Re: Using GPIO Alan Adams <alan@adamshome.org.uk> - 2019-10-02 21:40 +0100
    Re: Using GPIO Alan Adams <alan@adamshome.org.uk> - 2019-10-05 16:19 +0100
      Re: Using GPIO sales@elesar.co.uk - 2019-10-12 13:15 -0700

csiph-web