Skip to content
Commit 0c0eadad authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: dmm32at: introduce dmm32_ai_get_sample()



Introduce a helper function to read the two's complement analog input
sample from the hardware and munge it to the offset binary (unsigned)
format that comedi expects. Use the comedi_offset_munge() helper to
munge the data.

Use the new helper in the analog input (*insn_read) and in the interrupt
handler for the async command.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 933fca13
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment