You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `esp_repl` component provides a **Runtime Evaluation Loop (REPL)** mechanism for ESP-IDF-based applications.
4
+
It allows developers to build interactive command-line interfaces (CLI) that support user-defined commands, history management, and customizable callbacks for command execution.
5
+
6
+
This component integrates with [`esp_linenoise`](../esp_linenoise) for line editing and input handling, and with [`esp_commands`](../esp_commands) for command parsing and execution.
7
+
8
+
---
9
+
10
+
## Features
11
+
12
+
- Modular REPL management with explicit `start` and `stop` control
13
+
- Integration with [`esp_linenoise`](../esp_linenoise) for input and history
14
+
- Support for command sets through [`esp_commands`](../esp_commands)
15
+
- Configurable callbacks for:
16
+
- Pre-execution processing
17
+
- Post-execution handling
18
+
- On-stop and on-exit events
19
+
- Thread-safe operation using FreeRTOS semaphores
20
+
- Optional command history persistence to filesystem
21
+
22
+
---
23
+
24
+
## Usage
25
+
26
+
A typical use case involves:
27
+
28
+
1. Initializing `esp_linenoise` and `esp_commands`
29
+
2. Creating the REPL instance with `esp_repl_create()`
30
+
3. Running `esp_repl()` in a task
31
+
4. Starting and stopping the REPL using `esp_repl_start()` and `esp_repl_stop()`
32
+
5. Destroying the instance with `esp_repl_destroy()` when done
0 commit comments