1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include "ndelay.h" #include "open.h" #include "triggerpull.h" void triggerpull() { int fd; fd = open_write("lock/trigger"); if (fd >= 0) { ndelay_on(fd); write(fd,"",1); /* if it fails, bummer */ close(fd); } }