mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-16 03:52:13 +02:00
feat(console): Added runtime component registration support in console_simple_init
This commit is contained in:
@ -13,28 +13,46 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* This stucture describes the plugin to the rest of the application */
|
||||
typedef struct {
|
||||
/* A pointer to the name of the command */
|
||||
const char *name;
|
||||
|
||||
/* A function which performs auto-registration of console commands */
|
||||
esp_err_t (*plugin_regd_fn)(void);
|
||||
} console_cmd_plugin_desc_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Initializes the esp console
|
||||
* @return
|
||||
* - esp_err_t
|
||||
* @return ESP_OK on success
|
||||
*/
|
||||
esp_err_t console_cmd_init(void);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Initialize Ethernet driver based on Espressif IoT Development Framework Configuration
|
||||
* @brief Register a user supplied command
|
||||
*
|
||||
* @param[in] cmd string that is the user defined command
|
||||
* @param[in] do_user_cmd Function pointer for a user-defined command callback function
|
||||
*
|
||||
* @return
|
||||
* - esp_err_t
|
||||
* @return ESP_OK on success
|
||||
*/
|
||||
esp_err_t console_cmd_user_register(char *user_cmd, esp_console_cmd_func_t do_user_cmd);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Register all the console commands in .console_cmd_desc section
|
||||
*
|
||||
* @return ESP_OK on success
|
||||
*/
|
||||
esp_err_t console_cmd_all_register(void);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Starts the esp console
|
||||
* @return
|
||||
* - esp_err_t
|
||||
* @return ESP_OK on success
|
||||
*/
|
||||
esp_err_t console_cmd_start(void);
|
||||
|
||||
|
Reference in New Issue
Block a user