Benjamin Cabé

Zephyr Weekly Update – Feeling a disturbance in the Force

Zephyr Weekly Update - Aug. 9, 2024

Zephyr Weekly Update - Aug. 9, 2024

We are just a few days away from hitting 100,000 (!) commits on the main Zephyr repository, and things are not really slowing down despite the summer holidays 🙂 Let’s dive right in!

New Haptics driver class

It is common for interactive devices to provide haptic feedback to the user. For example, pressing widgets on a touch screen may trigger gentle vibrations while a stronger vibration may indicate that the action was not successful. Well, as of this week, Zephyr supports haptic feedback devices through a new haptics driver class!

An IC providing haptic feedback functionality is typically hooked up to a tiny motor that will vibrate when a signal is sent to it. The actual vibration pattern can be controlled in several ways: directly feeding the IC with a PWM or analogue signal, using built-in “melodies” available from the chip’s ROM (ex. “strong click”, “short double click”, etc.), etc.

The new haptics driver class provides a common API for starting/stopping vibrations, and for now most of the actual configuration is done through hardware-specific API. (PR #76343)

Texas Instruments DRV2605 is the only driver implementing this API for now, but let’s hope we’ll get more in the near future.

I’ll try to prepare a short demo of this new feature for the next blog post, but you may check out this code sample in the meantime.

A practical State Machine Framework example

I have mentioned Zephyr’s State Machine Framework quite a bit in the past, and I am happy to see that more and more subsystems are either transitioning to it, or considering doing so. State machines are something you definitely don’t want to get wrong, and using a proven framework can really help with making your code easier to read, test, and maintain over time.

We have a new very cool code sample that implements a calculator with a fancy LVGL GUI and whose logic is implemented using the State Machine Framework.

It is really nice to see how to turn a pretty complex state machine into something that can actually be executed and hooked up to a UI. I hope this will inspire folks to look at SMF whenever they’re just about to get lost in switch/case madness 🙂

(PR #76465)

SoCs, Boards & Shields

Support has been added for the following SoCs:

New boards and shields:

Drivers

Miscellaneous


A big thank you to the 16 individuals who had their first pull request accepted this week, 💙 🙌: @alexstanoev-nordic, @nngt88, @pyadvichuk, @duynguyenxa, @juliaazziz, @LeoBRIANDSmile, @aa889788, @yiding, @konrad1s, @unsanded, @thales-nascimento, @pblxptr, @LiLongNXP, @Robibobo1, @asingh-GiN, and @00thirdeye00.

As always, I very much welcome your thoughts and feedback in the comments below!

If you enjoyed this article, don’t forget to subscribe to this blog to be notified of upcoming publications! And of course, you can also always find me on Twitter and Mastodon.

Catch up on all previous issues of the Zephyr Weekly Update:

Exit mobile version