read/write gpio in c example?
#1
Can someone please point me to where theres a simple GPIO example in C?

Is the GPIO memory mapped somewhere?  I need to read/write the pins at very high speed, so I'd like access as close to the hardware as possible.
Thanks
#2
(07-23-2017, 05:46 AM)ealbers Wrote: Can someone please point me to where theres a simple GPIO example in C?

Is the GPIO memory mapped somewhere?  I need to read/write the pins at very high speed, so I'd like access as close to the hardware as possible.
Thanks

see this link for C++ library

see this link for python gpio control

Both links are useful for C.  The Python module is a wrapper;  the underlying C code is useful.  The C++ library is a good start too.  Yes, the gpio(s) are mapped in /dev/mem

Please see the A64 datasheet, and the A64 user manual also.
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )


Possibly Related Threads…
Thread Author Replies Views Last Post
  Using GPIO with OS MikeA23 1 1,290 06-07-2019, 01:22 AM
Last Post: tllim
  gpio voltages ealbers 6 4,328 07-30-2017, 01:55 AM
Last Post: pfeerick
  Tool chain to write Pine 64 linux apps on a Windows Dev machine SvdSinner 2 1,820 07-17-2017, 11:37 PM
Last Post: tllim
  RemixOS SD read-only? (OS X) jimmyadaro 7 3,167 03-28-2017, 11:54 AM
Last Post: jimmyadaro
  Can't write to SD card w/ Adapter apple4ever 2 1,729 07-23-2016, 03:16 PM
Last Post: apple4ever
  GPIO and OS Choice fsa317 3 1,929 05-02-2016, 04:30 PM
Last Post: rahlquist

Forum Jump:


Users browsing this thread: 1 Guest(s)