Skip to content

Commit

Permalink
enable console component and generate bindings for its header files
Browse files Browse the repository at this point in the history
To enable use of the ESP-IDF "console" component (https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/console.html) in a Rust application, such as a Rust port of the console example apps (https://github.com/espressif/esp-idf/tree/4dc74c9/examples/system/console), this branch enables the component and generates bindings for its esp_console.h, linenoise.h, and argtable3.h header files.
  • Loading branch information
mykmelez authored and ivmarkov committed Apr 25, 2022
1 parent b33f721 commit 64b7fc9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions build/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const TOOLS_WORKSPACE_INSTALL_DIR: &str = ".embuild";
const ALL_COMPONENTS: &[&str] = &[
// TODO: Put all IDF components here
"comp_app_update_enabled",
"comp_console_enabled",
"comp_esp_adc_cal_enabled",
"comp_esp_eth_enabled",
"comp_esp_event_enabled",
Expand Down
6 changes: 6 additions & 0 deletions src/include/esp-idf/bindings.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
#include "esp_interface.h"
#include "esp_ipc.h"

#ifdef ESP_IDF_COMP_CONSOLE_ENABLED
#include "esp_console.h"
#include "linenoise/linenoise.h"
#include "argtable3/argtable3.h"
#endif

#ifdef ESP_IDF_COMP_ESP_PM_ENABLED
#include "esp_pm.h"
#endif
Expand Down

0 comments on commit 64b7fc9

Please sign in to comment.