Function esp_idf_hal::sys::esp_console_new_repl_uart
source ยท pub unsafe extern "C" fn esp_console_new_repl_uart(
dev_config: *const esp_console_dev_uart_config_t,
repl_config: *const esp_console_repl_config_t,
ret_repl: *mut *mut esp_console_repl_s,
) -> i32
Expand description
@brief Establish a console REPL environment over UART driver
@param[in] dev_config UART device configuration @param[in] repl_config REPL configuration @param[out] ret_repl return REPL handle after initialization succeed, return NULL otherwise
@note This is an all-in-one function to establish the environment needed for REPL, includes: - Install the UART driver on the console UART (8n1, 115200, REF_TICK clock source) - Configures the stdin/stdout to go through the UART driver - Initializes linenoise - Spawn new thread to run REPL in the background
@attention This function is meant to be used in the examples to make the code more compact. Applications which use console functionality should be based on the underlying linenoise and esp_console functions.
@return - ESP_OK on success - ESP_FAIL Parameter error