Categories
IoT Zephyr

Zephyr Weekly Update – Feeling a disturbance in the Force

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:

  • Several SoCs from Analog Devices’ DARWIN MAX326xx Series (MAX32662 , MAX32666, MAX32675). (PR #73578, #73560, #73576)
  • FLPR (Fast Lightweight Processor) RISC-V core on nRF54H20 is now supported. (PR #75451)
  • Wi-Fi driver for the NXP RW612 has been added. (PR #76289)

New boards and shields:

  • The nRF7002 EK is a versatile evaluation kit in the form of an Arduino shield that can be used in Nordic and non-Nordic host boards. (PR #75714)
  • 01space ESP32C3-0.42-OLED. (PR #74964)
  • STM32F405 Core. (PR #74378)

Drivers

  • New MBOX driver for ESP32. (PR #76301)
  • New DMA driver for MAX32xxx. (PR #76627)

Miscellaneous

  • Added support for Wi-Fi Device Provisioning Protocol (DPP) via hostap. DPP is a secure, simplified method for connecting devices to a Wi-Fi network without needing to share the network password directly. (PR #73707)
  • A new reset_stats() API has been introduced to allow resetting Wi-Fi usage statistics. (PR #75768)
  • New sample application demonstrating how to use the CoAP client. (PR #76069)
  • LittleFS module has been updated to 2.9.3. (PR #74001)
  • POSIX
    • Added support for _POSIX_THREAD_PRIO_PROTECT. (PR #74386)
    • Implemented readdir_r. (PR#74394)

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:

By Benjamin Cabé

Benjamin Cabé is a technology enthusiast with a passion for empowering developers to build innovative solutions. He has invented an award-winning open source and open hardware artificial nose that he likes to use as an educational platform for people interested in diving into the world of embedded development.
He is currently a Developer Advocate for the Zephyr Project at the Linux Foundation and lives near Toulouse, France, where he enjoys baking sourdough bread with the help of his artificial nose.

Leave a Reply

Your email address will not be published. Required fields are marked *