-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
drv: ft8xx: support multiple instances #83851
base: main
Are you sure you want to change the base?
drv: ft8xx: support multiple instances #83851
Conversation
67f6fa0
to
0e794d0
Compare
@kartben, what should I do to receive any feedback on this PR? |
I would recommend trying to raise awareness in the |
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.
some comments
Also, you should add a note in doc/releases/migration-guide-4.1.rst about the changes you've been making to the API, i.e. indicate that all driver functions now take a device pointer since support for multiple instances has been added AND indicate that there is now also a new user_data parameter added to ft8xx_register_int
and to the callback signature ft8xx_int_callback
{ | ||
(void)dev; | ||
(void)user_data; | ||
|
||
process_touch = true; | ||
} | ||
|
||
int main(void) | ||
{ |
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.
unrelated to your changes but this code should first perform an if device_is_ready(...)
check
*/ | ||
typedef void (*ft8xx_int_callback)(void); | ||
typedef void (*ft8xx_int_callback)(const struct device *dev, void *user_data); |
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.
adding support for user data seems to be unrelated to adding support for multiple instances. It would be better to split the changes in different commits
0e794d0
to
a1467bd
Compare
I've split the pull request into two commits and added notes to the migration guide. |
Improve the FT8xx display driver to support multiple driver instances. The ft8xx_reference_api.h still follows the FT8xx programming guides, limiting the usage of the driver to one instance. Signed-off-by: Hubert Miś <hubert.mis@gmail.com>
The user of the ft8xx driver can register a callback function called on a touch detection interrupt event. This function is extended to include a user-defined pointer. The user-defined pointer helps to share a callback with multiple driver instances. Signed-off-by: Hubert Miś <hubert.mis@gmail.com>
a1467bd
to
ca56e61
Compare
Improve the FT8xx display driver to support multiple driver instances.
The ft8xx_reference_api.h still follows the FT8xx programming guides, limiting the usage of the driver to one instance.