Comedi use of standard types

Tobin C. Harding me at tobin.cc
Tue Feb 21 21:27:37 UTC 2017


Comedi drivers make heavy use of standard types i.e unsigned
short. According to Linux Device Drivers standard C data types are not
the same size of all architectures.

Should we be converting comedi/drivers to use kernel types u8, u16 etc

Follow up question. Some comedi/drivers also use unsigned long for
variables that are not memory addresses. If we are to convert standard
types to kernel types how does one know the intended size of these
variables. I see that the register values come from the manual

http://www.ni.com/pdf/manuals/340934b.pdf

Is the choice (size) of type in a struct (eg struct ni_private,
comedi/drivers/ni_stc.h) a kernel design issue or is it a hardware
issue and should I be reading the manual to find it.

thanks,
Tobin.


More information about the devel mailing list