How to read/write all RasPi4 GPIO from basic?
Alan Williams (2601) 88 posts |
I have a pico wired to a pi4 and I set out to start looking at ways to implement a byte wide communication channel between them for the eventual aim of adapting Andrew Gordon’s https://github.com/arg08/picoeco code to function as an Econet interface for the pi. I am going to have to deal with this in assembler in the pi eventually but for a start I was just going to do it in basic so I could concentrate more on the pico side of the code initially. I was sure I had done this before and after a bit of head scratching I think I have come to understand that on a pi 1 or 2 I have used a GPIO module from http://www.tankstage.co.uk/Software/ (version 0.6) or packman version 0.5, but this is not the GPIO module present in RISC OS which appears to have the same swi names but only about a quarter of the functionally. The tankstage one does not appear to know what a Pi4 is. So no joy there. Does anybody know an example of some minimal basic assembler to assess the GPIO peripheral directly? |
Tank (53) 375 posts |
I have written a module to add back some of the other functions of the original GPIO module. |
Alan Williams (2601) 88 posts |
Tank, |
Tank (53) 375 posts |
The GPIOX module does not access the hardware directly, but uses the new HAL interface to talk to the hardware. |