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

refactor(kscan): Match direct GPIO driver to matrix driver #1288

Merged

Conversation

joelspadin
Copy link
Collaborator

Rewrote the direct GPIO kscan driver to match the improvements made to the matrix driver in 82cb762 and f946dc6. It now uses the same debouncing system as the matrix driver.

@petejohanson
Copy link
Contributor

Tested on my BDN9 rev2, with default debounce settings, as well as with:

                debounce-press-ms = <1>;
                debounce-release-ms = <5>;

applied, and it worked perfectly fine, no accidental duplicated presses, fast response time (subjectively).

Will peek at the code another time.

Copy link
Contributor

@petejohanson petejohanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few questions/comments. Thanks for working on this!

app/drivers/kscan/kscan_gpio_direct.c Outdated Show resolved Hide resolved
app/drivers/kscan/kscan_gpio_direct.c Outdated Show resolved Hide resolved
}; \
\
DEVICE_DT_INST_DEFINE(index, &kscan_direct_init, NULL, &kscan_direct_data_##index, \
&kscan_direct_config_##index, APPLICATION, \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason you moved this to APPLICATION instead of POST_KERNEL?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy/paste from the matrix driver, where it looks like it got switched from POST_KERNEL to APPLICATION in e448f2d. Do you remember why you did that there?

Rewrote the direct GPIO kscan driver to match the improvements made to
the matrix driver in 82cb762 and
f946dc6. It now uses the same
debouncing system as the matrix driver.
Copy link
Contributor

@petejohanson petejohanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants