summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2015-06-05 18:30:34 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-06-12 17:06:42 -0700
commit34cce4628b8509dc894735cdc5de8b10db21873a (patch)
treeee417940929e15198ae0bcd69828156c8175f170 /tools/perf/scripts/python
parent3919c3d5891b079b5d03c03b4df4e3fca9572eca (diff)
staging: comedi: das08: clarify sign-magnitude conversion
For DAS08/JR/16 and DAS08/JR/AO-16 boards, the 16-bit analog input readings are assumed to be in a sign-magnitude format and need converting to the COMEDI unsigned sample format. The expressions to do the conversion look a little messy. Use a local variable `magnitude` to make it easier to follow. Also, there seems to be some discrepancy between the manual for these boards and the COMEDI code. The manual implies that 0 is full-scale negative and 65535 is full-scale positive. However, the COMEDI code has used the sign-magnitude conversion for these boards since these two boards were initially supported by a patch from an external contributor to the COMEDI project back in 2001. Assume the code is correct for now, but add a comment to mention the discrepancy. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions