1 /* 2 * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #pragma once 8 9 #include "esp_err.h" 10 #include "esp_vfs.h" 11 #include "esp_vfs_common.h" 12 13 #ifdef __cplusplus 14 extern "C" { 15 #endif 16 17 /** 18 * @brief add /dev/cdcacm virtual filesystem driver 19 * 20 * This function is called from startup code to enable console output 21 */ 22 esp_err_t esp_vfs_dev_cdcacm_register(void); 23 24 /** 25 * @brief Set the line endings expected to be received 26 * 27 * This specifies the conversion between line endings received and 28 * newlines ('\n', LF) passed into stdin: 29 * 30 * - ESP_LINE_ENDINGS_CRLF: convert CRLF to LF 31 * - ESP_LINE_ENDINGS_CR: convert CR to LF 32 * - ESP_LINE_ENDINGS_LF: no modification 33 * 34 * @note this function is not thread safe w.r.t. reading 35 * 36 * @param mode line endings expected 37 */ 38 void esp_vfs_dev_cdcacm_set_rx_line_endings(esp_line_endings_t mode); 39 40 /** 41 * @brief Set the line endings to sent 42 * 43 * This specifies the conversion between newlines ('\n', LF) on stdout and line 44 * endings sent: 45 * 46 * - ESP_LINE_ENDINGS_CRLF: convert LF to CRLF 47 * - ESP_LINE_ENDINGS_CR: convert LF to CR 48 * - ESP_LINE_ENDINGS_LF: no modification 49 * 50 * @note this function is not thread safe w.r.t. writing 51 * 52 * @param mode line endings to send 53 */ 54 void esp_vfs_dev_cdcacm_set_tx_line_endings(esp_line_endings_t mode); 55 56 #ifdef __cplusplus 57 } 58 #endif 59