4 use constant N_SAMPLES => 64;
6 use Comedi qw( :Functions :Constants :Ioctls ) ;
8 # allocate a data buffer
10 # create a channel list
11 $ch = pack('L*', CR_PACK(0, 0, AREF_GROUND));
13 # create a data buffer
14 $buf = pack('S' . N_SAMPLES);
16 # create a trigger object
18 $it = pack('L4 p2 L5 L3',
33 sysopen(FILE, $fn, O_RDWR) || die "Can't open '$fn': $!";
35 ioctl(FILE, COMEDI_TRIG, $it) || die "ioctl failed: $!";
37 foreach (unpack('S*', $buf)) {