-
Notifications
You must be signed in to change notification settings - Fork 735
drivers: sensor: qdec_nrfx: use standard instantiation #3418
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_nrfx: use standard instantiation #3418
Conversation
bd6ddcc to
eefc0d6
Compare
| } | ||
| } | ||
|
|
||
| char const *nrfx_new_error_string_get(int code) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SPIM PR has been merged. Please rebase.
eefc0d6 to
9a10af7
Compare
Removed Kconfig symbols for each QDEC instance which are no longer needed. Upstream PR #: 98002 Signed-off-by: Karol Lasończyk <[email protected]>
Used API for standard instantiation and replaced nrfx_err_t error values with errno. Upstream PR #: 98002 Signed-off-by: Karol Lasończyk <[email protected]>
9a10af7 to
ca49bd2
Compare
| nerr = nrfx_qdec_init(&dev_data->qdec, &config->config, qdec_nrfx_event_handler, | ||
| (void *)dev); | ||
| if (nerr != 0) { | ||
| return -EALREADY; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: you can just return nerr in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is an idea. @masz-nordic Can I follow this idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a follow up PR
6b9db37
into
nrfconnect:collab-nrfx-4.0
Used API for standard instantiation and replaced nrfx_err_t error values with errno.
Removed Kconfig symbols for each QDEC instance which are no longer needed.