print max data value as unsigned value instead of signed, so 32 bit
authorFrank Mori Hess <fmhess@speakeasy.net>
Fri, 5 Jan 2007 19:35:14 +0000 (19:35 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Fri, 5 Jan 2007 19:35:14 +0000 (19:35 +0000)
counters show proper max value (instead of -1).

demo/info.c

index dd717fe5dc1de37356746099a522c25848381f25..bffc71c50ae87fc2cc5f30df297b9a50f537417d 100644 (file)
@@ -77,12 +77,12 @@ int main(int argc,char *argv[])
                n_chans=comedi_get_n_channels(it,i);
                printf("  number of channels: %d\n",n_chans);
                if(!comedi_maxdata_is_chan_specific(it,i)){
-                       printf("  max data value: %d\n",comedi_get_maxdata(it,i,0));
+                       printf("  max data value: %lu\n", (unsigned long)comedi_get_maxdata(it,i,0));
                }else{
                        printf("  max data value: (channel specific)\n");
                        for(chan=0;chan<n_chans;chan++){
-                               printf("    chan%d: %d\n",chan,
-                                       comedi_get_maxdata(it,i,chan));
+                               printf("    chan%d: %lu\n",chan,
+                                       (unsigned long)comedi_get_maxdata(it,i,chan));
                        }
                }
                printf("  ranges:\n");