- From: Ian Abbott <abbotti_at_mev.co.uk>
- Date: Thu, 13 Jul 2006 13:59:12 +0100
On 12/07/06 18:51, David MacMahon wrote: > The attached patch adds the subdevices' flags to board_info's output. > Here is a sample of the new output... > > overall info: > version code: 0x000746 > driver name: ni_pcimio > board name: pxi-6031e > number of subdevices: 11 > subdevice 0: > type: 1 (analog input) > flags: 0x01f11000 <--- This is the new info! > number of channels: 64 > max data value: 65535 > [etc.] Thanks. I've applied this patch. I'm thinking of also expanding the flags into a list of matching identifiers, something like: flags: 0x01f11000 (SDF_CMD SDF_READABLE SDF_GROUND SDF_COMMON SDF_DIFF SDF_OTHER SDF_DITHER) But maybe it will look too ugly due to terminal line wraparound. Could save a little space by omitting the "SDF_" part though. Would people find that useful? > The patch also modifies the docs for comedi_get_subdevice_flags() to > display the hex values in the table using 8 hex digits with leading > zeros if needed. This makes it much easier (IMHO) to tell which bits > correspond to which flags. Compare... > > SDF_READABLE 0x10000 > SDF_GROUND 0x100000 > > ....to... > > SDF_READABLE 0x00010000 > SDF_GROUND 0x00100000 > > ....when looking at flags like > > flags: 0x02121000 > > Just my opinion. I suppose getting the table to right align the hex > values would help, but always using eight gets the values both right and > left aligned. Applied, thanks. > Finally, this patch also cause board_info to display a more detailed > error message if it can't open the device (useful for determining if > it's an existence problem or a permissions problem). Applied with a slight modification. I used "cannot open %s: %s\n" instead of "cannot open %s (%s)\n". -- -=( Ian Abbott _at_ MEV Ltd. E-mail: <abbotti_at_mev.co.uk> )=- -=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
Received on 2006-07-13Z11:59:12