-
Notifications
You must be signed in to change notification settings - Fork 8.2k
drivers: gpio: Add SDL simulated GPIO support #50080
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
Conversation
fbc002a to
b718cc0
Compare
72f7253 to
9e4fa3d
Compare
cfriedt
left a comment
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's quite possible that you could wrap around the existing gpio_emul driver for this and provide only the callbacks.
Did you already attempt that?
9e4fa3d to
da4e4be
Compare
Thanks @cfriedt for the suggestion, I've modified the driver as suggested. |
c80f565 to
02fc1b0
Compare
mbolivar-nordic
left a comment
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.
@petejohanson not sure if this is relevant to you but FYI.
Binding looks fine.
Interesting! Perhaps, yes. We right now do have the ability to run as a posix process for some testing we do, this might make that a tad simpler. No issues w/ the PR, other than maybe a request for some docs for posterity? |
Where would it make sense to add documentation? SDL is currently only mentioned in the
|
02fc1b0 to
5cacd79
Compare
Select I2C instead of depending on it, following upstream policy. Signed-off-by: Pieter De Gendt <[email protected]>
This commit adds a driver to simulate GPIO state and interrupts using the keyboard when using SDL. Signed-off-by: Pieter De Gendt <[email protected]>
5cacd79 to
0d5f477
Compare
Connect the sw0 alias to reset the counter. Signed-off-by: Pieter De Gendt <[email protected]>
Enable SDL keyboard events using the zephyr,gpio-emul-sdl driver and alias key to sw0. Pressing 'r' on the keyboard resets the counter. Signed-off-by: Pieter De Gendt <[email protected]>
0d5f477 to
380bfc0
Compare
This commit adds a driver to simulate GPIO state and interrupts from the keyboard when using SDL.
I still need to make it build in CI. Would it make sense to extendsamples/subsys/display/lvglwith example usage?