Files
esp-idf/examples/system/console/advanced/main/console_settings.h
Peter Marcisovsky 82a4c12817 refactor(console/advanced): Merge console advanced and advanced_usb_cdc examples
- removed examples/system/console/advanced_usb_cdc
    - refactor resulting console/advanced example
    - enabled advanced console for all peripherals (UART, USB_OTG, USB_JTAG)
    - added pytest to check UART console output
    - update docs
2024-09-02 09:14:42 +02:00

40 lines
1.0 KiB
C

/*
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @brief Initialize console peripheral type
*
* Console peripheral is based on sdkconfig settings
*
* UART CONFIG_ESP_CONSOLE_UART_DEFAULT
* USB_OTG CONFIG_ESP_CONSOLE_USB_CDC
* USB_SERIAL_JTAG CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG
*/
void initialize_console_peripheral(void);
/**
* @brief Initialize linenoise and esp console
*
* This function initialize linenoise library and esp_console component,
* also checks if the terminal supports escape sequences
*
* @param history_path Path to store command history
*/
void initialize_console_library(const char *history_path);
/**
* @brief Initialize console prompt
*
* This function adds color code to the prompt (if the console supports escape sequences)
*
* @param prompt_str Prompt in form of string eg esp32s3>
*
* @return
* - pointer to initialized prompt
*/
char *setup_prompt(const char *prompt_str);