Opening /sys/devices/... for every GPIO read and write may be safe, but it's taking about 2ms to change the pin state on my Pi.
http://www.raspberrypi.org/phpBB3/viewtopic.php?t=9977&p=113677 suggests that we can get a 10x improvement (so that would be 200us) by keeping the file open between writes.
Opening /sys/devices/... for every GPIO read and write may be safe, but it's taking about 2ms to change the pin state on my Pi.
http://www.raspberrypi.org/phpBB3/viewtopic.php?t=9977&p=113677 suggests that we can get a 10x improvement (so that would be 200us) by keeping the file open between writes.