Skip to content

Conversation

@pdgendt
Copy link
Contributor

@pdgendt pdgendt commented Sep 9, 2022

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 extend samples/subsys/display/lvgl with example usage?

@pdgendt pdgendt requested a review from vanwinkeljan September 9, 2022 10:04
@pdgendt pdgendt force-pushed the drivers-gpio-sdl branch 2 times, most recently from 72f7253 to 9e4fa3d Compare September 9, 2022 13:42
@pdgendt pdgendt marked this pull request as ready for review September 9, 2022 13:42
@pdgendt pdgendt requested review from galak and mnkp as code owners September 9, 2022 13:42
Copy link
Member

@cfriedt cfriedt left a 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?

@pdgendt
Copy link
Contributor Author

pdgendt commented Sep 13, 2022

It's quite possible that you could wrap around the existing gpio_emul driver for this and provide only the callbacks.

Thanks @cfriedt for the suggestion, I've modified the driver as suggested.

@pdgendt pdgendt force-pushed the drivers-gpio-sdl branch 2 times, most recently from c80f565 to 02fc1b0 Compare September 13, 2022 13:03
Copy link
Contributor

@mbolivar-nordic mbolivar-nordic left a 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.

@petejohanson
Copy link
Contributor

@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?

@pdgendt
Copy link
Contributor Author

pdgendt commented Sep 14, 2022

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 native_posix board support page.

Also, I don't know why the CI fails, the sample fails to build for bl5340_dvk_cpuapp with undefined reference to '__device_dts_ord_14' which is caused by DT_ALIAS(sw0).

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]>
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]>
@fabiobaltieri fabiobaltieri added this to the v3.3.0 milestone Sep 16, 2022
@carlescufi carlescufi merged commit fd81163 into zephyrproject-rtos:main Oct 3, 2022
@pdgendt pdgendt deleted the drivers-gpio-sdl branch October 5, 2022 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants