[PATCH 12/21] staging: comedi: c6xdigio: introduce c6xdigio_get_encoder_bits()
Ian Abbott
abbotti at mev.co.uk
Tue Mar 11 15:05:32 UTC 2014
On 2014-03-10 21:07, H Hartley Sweeten wrote:
> The 24-bit encoder value is read using 3-bits in the status register. The
> data register is banged between each read of the status register to advance
> the bits.
>
> Introduce a helper function to handle this and remove the union encvaluetype
> and struct encbitsbyte.
>
> Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
> Cc: Ian Abbott <abbotti at mev.co.uk>
> Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
This is more portable than the union as well!
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti at mev.co.uk> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
More information about the devel
mailing list