This repository contains a port of the Zephyr Real-Time Operating System (RTOS) State Machine Framework to the ESP-IDF framework. The State Machine Framework provides a flexible and efficient way to implement state machines in your ESP-IDF projects.
- Easy integration with ESP-IDF projects as a Component.
- Utilizes the powerful Zephyr State Machine Framework for efficient state management.
- Apache 2.0 licensed for open-source use.
To use the ESP-IDF Zephyr State Machine Framework in your project, follow these steps:
-
Clone the repository:
git clone https://github.com/oldrev/esp-idf-smf.git
-
Add the component to your ESP-IDF project:
cd your-espidf-project mkdir components cp -r path/to/esp-idf-smf components/
Don't forget to add the
smf
requirement to your project'sCMakeLists.txt
file. -
Include the State Machine Framework header in your code:
#include "smf/smf.h"
-
Add the following line to your project's
sdkconfig
file to enable support for multi-level state machines:CONFIG_SMF_ANCESTOR_SUPPORT=y
-
Start using the State Machine Framework in your project.
To integrate the Zephyr State Machine Framework into your ESP-IDF project, you can refer to the official Zephyr RTOS documentation for the State Machine Framework: Zephyr SMF Documentation.
The integration process is similar to the standard Zephyr workflow, with the additional step of including this component in your ESP-IDF project. Once the component is added, you can follow the Zephyr documentation for creating and managing state machines.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
This project is built upon the Zephyr Real-Time Operating System and ESP-IDF.
Thanks to the open-source community for their contributions.