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

Port and Driver separation #5

Closed
amirgon opened this issue Feb 1, 2019 · 2 comments
Closed

Port and Driver separation #5

amirgon opened this issue Feb 1, 2019 · 2 comments
Assignees

Comments

@amirgon
Copy link
Collaborator

amirgon commented Feb 1, 2019

lv_binding_micropython provides the script for generating a Micropython module for accessing lvgl, but does not yet handle:

  • How lvgl Micropython module is registered and initialized on a Micropython Port (port in the sense of architecture such as "unix" or "esp32")
  • How display and input drivers are registered to lvgl.

Currently the lv_micropython repo contains an example of using lv_binding_micropython on the unix port. The unix port itself registers the binding, initializes it and registers display and input drivers.
Problems are:

  • It's difficult to scale lv_micropython to support other architectures other than unix
  • It's harder to add lvgl support to other Micropython forks.
  • No generic way to let the Micropython user select which driver he would like to use for display and input.

So I plan to:

  • Change the directory structure of lv_binding_micropython: add drivers and ports directories that would contain port-specific and driver specific code
  • Allow the user to register the display and input drivers in Micropython. Theoretically these drivers could be "pure python" but I don't think it's a good idea due to performance aspects.
    I would like, however, to let the user select and register a driver on the python script.

Related: lvgl/lvgl#557

@amirgon amirgon self-assigned this Feb 1, 2019
@kisvegabor
Copy link
Member

kisvegabor commented Feb 1, 2019

I can't say anything than all sound great! :)

@amirgon
Copy link
Collaborator Author

amirgon commented Feb 5, 2019

Display and input drivers are now registered in the Micropython script.

  • Added SDL micropython module to be used when registering SDL drivers
  • Removed lv_mp_init function as all initialization are done on the script
  • Added example of how to register drivers in advanced_demo.py
  • Changed directory structure. Added port and drv directrories
  • Updated lv_micropython

Closing.

@amirgon amirgon closed this as completed Feb 5, 2019
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

No branches or pull requests

2 participants