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

Convert zaphod-config to a module. #17

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

amacleod
Copy link

@amacleod amacleod commented Aug 4, 2024

Adds a zephyr/module.yml file to zaphod-config so that other zmk-config repos can reference it as a Zephyr module.

Much like a hitchhiker and their towel, a module with boards or
shields in it needs to know where its board_root is.
Merge Zaphod config module-ification to `main` on this fork.
@amacleod
Copy link
Author

amacleod commented Aug 4, 2024

If the README is extraneous, feel free to drop it

Copy link
Owner

@petejohanson petejohanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Just one nitpick comment.

zephyr/module.yml Outdated Show resolved Hide resolved
amacleod and others added 2 commits August 3, 2024 22:50
I definitely meant for it to be zaphod-config in the first place.

Co-authored-by: Pete Johanson <[email protected]>
… a module. (#2)

* Copying ZAPHOD_BONGO_CAT config declaration into Kconfig.shield, duplicating what is in plain Kconfig.

* Updating include directories for Zephyr stuff: kernel.h and logging/log.h

* Trying to build things up one step at a time.

* Fix module name.

* Selecting LV_USE_IMG when ZMK_DISPLAY is enabled on zaphod_lite.

* In newer versions of Zephyr, the logging header is under a zephyr directory.

* Change LVGL to LV in config selections.

* Update Bongo Cat widget for LVGL 8.3

- there is no longer a `lv_anim_value_t` typedef, but `int32_t` works
  for indexing images in animator functions.
- `lv_image_create` only takes one parameter now: the parent object.
- `lv_img_set_auto_size` no longer exists.

* Minor whitespace cleanup.

* Setting width and height to LV_SIZE_CONTENT for auto-sizing.

I think the object might already be auto-sized by default, but it
can't hurt to be explicit about it.

* Removing LV_USE_IMG from defconfig since it is in the main Kconfig

Images and animation are only needed by this shield if the Bongo Cat
WPM widget is enabled. That selection is handled in
boards/shields/zaphod_lite/Kconfig itself.

* Reverting Kconfig.shield changes.

The configurations in plain Kconfig ought to be sufficient.

* Revert "Reverting Kconfig.shield changes."

This reverts commit 9c7761d.

* Repeating LVGL -> LV correction in Kconfig.shield
@amacleod
Copy link
Author

Thanks for the PR! Just one nitpick comment.

Thanks! I fixed the module name, and also made some code modifications to get things compiling with Zephyr 3.5.0 and LVGL 8.3. If it would be better to split "module stuff" and "widget compatibility stuff" into separate PRs, let me know. I think it shouldn't be too hard to tease the two apart if needed.

@petejohanson
Copy link
Owner

Can we fix up the GHA build file to use the standard one while we are at it?

@amacleod
Copy link
Author

Can we fix up the GHA build file to use the standard one while we are at it?

I will take a look! It should just use the same one from zmkfirmware/zmk like you get when you make a new personal config, right?

@amacleod
Copy link
Author

One thing I do not fully understand is why copying the ZAPHOD_BONGO_CAT stuff from Kconfig to Kconfig.shield helped. I have the vague notion that one of them is used when building directly and the other is used when included as a module. What are the rules for which Kconfig is used in what circumstances?

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

Successfully merging this pull request may close these issues.

2 participants