staging: comedi: me4000: introduce me4000_ai_get_sample()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 5 Aug 2015 17:45:19 +0000 (10:45 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Aug 2015 22:03:31 +0000 (15:03 -0700)
commit7022781c460290687b374dab1c230c06091bba10
tree35da5f9bc4259dc8862bf76fbbc54efb2f4958ef
parent36d59d70babc9ad4275d0c7c5e63241a077f572c
staging: comedi: me4000: introduce me4000_ai_get_sample()

The hardware returns two's complement values for the analog input
samples. These need to be converted to the unsigned binary format
that the comedi core expects. Introduce a helper function to handle
this.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/me4000.c
This page took 0.025153 seconds and 5 git commands to generate.