Skip to content
Commit 4adec7da authored by Benjamin Gaignard's avatar Benjamin Gaignard Committed by Jonathan Cameron
Browse files

iio: stm32 trigger: Add quadrature encoder device



One of the features of STM32 trigger hardware block is a quadrature
encoder that can counts up/down depending of the levels and edges
of the selected external pins.

This patch allow to read/write the counter, get it direction,
set/get quadrature modes and get scale factor.

When counting up preset value is the limit of the counter.
When counting down the counter start from preset value down to 0.
This preset value could be set/get by using
/sys/bus/iio/devices/iio:deviceX/in_count0_preset attribute.

Signed-off-by: default avatarBenjamin Gaignard <benjamin.gaignard@st.com>
Reviewed-by: default avatarWilliam Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 510c0106
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