Skip to content
Commit 81cd7cac authored by Martin Jäger's avatar Martin Jäger Committed by Benjamin Cabé
Browse files

drivers: input: input_adc_keys: add debouncing to avoid false events



The previous implementation already reported a key-press event after
reading an ADC value close to the threshold for the first time.

This may lead to false events if the ADC takes a reading just during
the transition from one button state to another (especially if a
somewhat large capacitor is used to avoid noise).

A key-press state must be same for at least two samples in order to
avoid such issues, which is what this commit implements.

Signed-off-by: default avatarMartin Jäger <martin@libre.solar>
parent 07e1de38
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment