(cd include;install -m 644 comedilib.h ${INSTALLDIR}/include)
(cd include;install -m 644 comedi.h ${INSTALLDIR}/include)
install lib/libcomedi.so.${version} ${INSTALLDIR_LIB}
- (cd $(INSTALLDIR_LIB);ln -s libcomedi.so.${version} libcomedi.so.${MAJOR})
- (cd $(INSTALLDIR_LIB);ln -s libcomedi.so.${version} libcomedi.so)
+ (cd $(INSTALLDIR_LIB);ln -sf libcomedi.so.${version} libcomedi.so.${MAJOR})
+ (cd $(INSTALLDIR_LIB);ln -sf libcomedi.so.${version} libcomedi.so)
install -m 644 lib/libcomedi.a ${INSTALLDIR_LIB}
#/sbin/ldconfig -n ${INSTALLDIR}/lib
install -d ${INSTALLDIR_DOC}
LDFLAGS=-L../lib/ -lcomedi -lm
-BINS=mode4 mode3 mode2 ao_waveform tut2 cmd tut1
+BINS=mode4 mode3 mode2 ao_waveform tut2 cmd tut1 antialias
MBINS=inp inpn sv eeprom_dump info outp
all: $(patsubst %,_mbins_%,$(MBINS)) $(patsubst %,_bins_%,$(BINS))
/* update rate for the DAC, typically much higher than
the frequency of the sine wave. */
-double update_frequency = 200000.0;
+double update_frequency = 50000.0;
/* peak-to-peak amplitude, in DAC units (i.e., 0-4095) */
double amplitude = 4000;
cmd.start_src = TRIG_NOW;
cmd.start_arg = 0;
- cmd.scan_begin_src = TRIG_TIMER;
+ cmd.scan_begin_src = TRIG_FOLLOW;
cmd.scan_begin_arg = 1; /* in ns */
cmd.convert_src = TRIG_TIMER;
int main(int argc,char *argv[])
{
- int i;
+ int i,j;
int n_subdevices,type;
+ int chan,n_chans;
+ int n_ranges;
+ comedi_range *rng;
parse_options(argc,argv);
printf("subdevice %d:\n",i);
type=comedi_get_subdevice_type(it,i);
printf(" type: %d (%s)\n",type,subdevice_types[type]);
- printf(" number of channels: %d\n",comedi_get_n_channels(it,i));
+ n_chans=comedi_get_n_channels(it,i);
+ printf(" number of channels: %d\n",n_chans);
printf(" max data value: %d\n",comedi_get_maxdata(it,i,0));
+ n_ranges=comedi_get_n_ranges(it,i,0);
+ printf(" number of ranges: %d\n",n_ranges);
+ printf(" ranges:\n");
+ for(chan=0;chan<n_chans;chan++){
+ printf(" chan%d:",chan);
+ //printf(" (0x%08x)",comedi_get_rangetype(it,i,chan));
+ for(j=0;j<n_ranges;j++){
+ rng=comedi_get_range(it,i,chan,j);
+ //printf(" %p",rng);
+ printf(" [%g,%g]",rng->min,rng->max);
+ }
+ printf("\n");
+ }
}
return 0;
{
comedi_krange *kr;
comedi_range *r;
+ int ret;
int i;
kr=malloc(sizeof(comedi_krange)*RANGE_LENGTH(range_type));
r=malloc(sizeof(comedi_range)*RANGE_LENGTH(range_type));
- ioctl_rangeinfo(fd,range_type,kr);
+ ret=ioctl_rangeinfo(fd,range_type,kr);
+ if(ret<0){
+ fprintf(stderr,"ioctl_rangeinfo(%d,0x%08x,%p)\n",fd,range_type,kr);
+ }
for(i=0;i<RANGE_LENGTH(range_type);i++){
r[i].min=kr[i].min*1e-6;
#!/bin/sh
-PERL_DL_NONLAZY=1 /usr/local/bin/perl -I./blib/arch -I./blib/lib -I/usr/lib/perl5/i386-linux/5.00404 -I/usr/lib/perl5 "$@"
+PERL_DL_NONLAZY=1 /usr/bin/perl -I./blib/arch -I./blib/lib -I/usr/lib/perl5/i386-linux/5.00404 -I/usr/lib/perl5 "$@"