esp_idf_sys

Function esp_console_cmd_register

Source
pub unsafe extern "C" fn esp_console_cmd_register(
    cmd: *const esp_console_cmd_t,
) -> esp_err_t
Expand description

@brief Register console command @param cmd pointer to the command description; can point to a temporary value

@note If the member \c func_w_context of cmd is set instead of func, then the member \c context is passed to the function pointed to by \c func_w_context.

@return - ESP_OK on success - ESP_ERR_NO_MEM if out of memory - ESP_ERR_INVALID_ARG if command description includes invalid arguments - ESP_ERR_INVALID_ARG if both func and func_w_context members of cmd are non-NULL - ESP_ERR_INVALID_ARG if both func and func_w_context members of cmd are NULL