Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: sensor: qdec: fix QDEC overflow handling #75754

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Oct 4, 2024

  1. drivers: sensor: qdec: fix QDEC overflow handling

    QDEC sensor driver fails to inform user of the overflow in the
    ACC register, which makes the most recently fetched data invalid.
    An error code return has been added to nrfx_qdec_sample_fetch(),
    that indicates that an overflow has occured, based on oveflow flag.
    Also, raw_acc field was added in the qdec_nrfx_data structure, to
    adjust QDEC to sensor API rules - two subsequent sensor_channel_get()
    calls should will yield the same values.
    
    Signed-off-by: Michał Stasiak <[email protected]>
    mstasiaknordic committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    4f84e0d View commit details
    Browse the repository at this point in the history
  2. tests: boards: nrf: qdec: modify QDEC tests to match new api

    Overflow errorcode is now correctly detected when expected.
    Subsequent sensor_channel_get() yield the same values, so
    the check can be no longer ignored.
    Added a sensor_sample_fetch() where missing for correct
    sensor_channel_get() calls.
    
    Signed-off-by: Michał Stasiak <[email protected]>
    mstasiaknordic committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    d4d834c View commit details
    Browse the repository at this point in the history