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
  GPIO performance sgjava 0 1,786 10-08-2021, 08:31 AM
Last Post: sgjava
  Using GPIO with OS MikeA23 1 3,656 06-07-2019, 01:22 AM
Last Post: tllim
  gpio voltages ealbers 6 11,553 07-30-2017, 01:55 AM
Last Post: pfeerick
  Tool chain to write Pine 64 linux apps on a Windows Dev machine SvdSinner 2 5,018 07-17-2017, 11:37 PM
Last Post: tllim
  RemixOS SD read-only? (OS X) jimmyadaro 7 10,622 03-28-2017, 11:54 AM
Last Post: jimmyadaro
  Can't write to SD card w/ Adapter apple4ever 2 4,849 07-23-2016, 03:16 PM
Last Post: apple4ever
  GPIO and OS Choice fsa317 3 5,490 05-02-2016, 04:30 PM
Last Post: rahlquist

Forum Jump:


Users browsing this thread: 1 Guest(s)