workaround to build with idf 4.4.2
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* Console IO functions.
|
||||
*
|
||||
* This header is included internally by console.h
|
||||
*
|
||||
*
|
||||
* Created on 2020/04/09.
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
/**
|
||||
* Write to console context.
|
||||
*
|
||||
* In command context, the more convenient "console_write", "console_print", "console_println"
|
||||
* In command context, the more convenient "vconsole_write", "console_print", "console_println"
|
||||
* and "console_printf" functions can be used instead.
|
||||
*
|
||||
* This function is a Linenoise write callback.
|
||||
@@ -32,7 +32,7 @@ extern int console_write_ctx(console_ctx_t *ctx, const char *text, size_t len);
|
||||
/**
|
||||
* Read from console context's input stream.
|
||||
*
|
||||
* In command context, the more convenient "console_read" function and the
|
||||
* In command context, the more convenient "vconsole_read" function and the
|
||||
* "console_can_read" and "console_have_stdin" helper functions can be used instead.
|
||||
*
|
||||
* This is also a Linenoise read callback.
|
||||
@@ -105,7 +105,7 @@ ssize_t console_vprintf_ctx(console_ctx_t *ctx, console_color_t color, const cha
|
||||
* @param len - text length
|
||||
* @return number of characters written, or -1 on error
|
||||
*/
|
||||
ssize_t console_write(const char *text, size_t len);
|
||||
ssize_t vconsole_write(const char *text, size_t len);
|
||||
|
||||
|
||||
// -------------------- Convenience functions -------------------------
|
||||
@@ -159,7 +159,7 @@ bool console_have_stdin(void);
|
||||
* @param count - how many characters to read
|
||||
* @return number of characters read, or -1 on error
|
||||
*/
|
||||
ssize_t console_read(char *dest, size_t count);
|
||||
ssize_t vconsole_read(char *dest, size_t count);
|
||||
|
||||
/**
|
||||
* Check if console input stream has bytes ready.
|
||||
|
||||
@@ -1440,11 +1440,11 @@ static console_err_t do_list_commands(console_ctx_t *ctx, const char *filter_gro
|
||||
}
|
||||
|
||||
for (int i = 0; i < rows; i++) {
|
||||
console_write(buffers + i * LINELEN, LINELEN);
|
||||
console_write("\n", 1);
|
||||
vconsole_write(buffers + i * LINELEN, LINELEN);
|
||||
vconsole_write("\n", 1);
|
||||
}
|
||||
console_free(buffers);
|
||||
console_write("\n", 1);
|
||||
vconsole_write("\n", 1);
|
||||
|
||||
EXPENDABLE_CODE({
|
||||
if (any_groups_shown) {
|
||||
|
||||
@@ -173,7 +173,7 @@ int console_can_read(void) {
|
||||
*
|
||||
* Return number of characters read, -1 on error
|
||||
*/
|
||||
ssize_t console_read(char *dest, size_t count) {
|
||||
ssize_t vconsole_read(char *dest, size_t count) {
|
||||
if (!console_have_stdin()) return -1;
|
||||
return console_read_ctx(console_active_ctx, dest, count);
|
||||
}
|
||||
@@ -183,7 +183,7 @@ ssize_t console_read(char *dest, size_t count) {
|
||||
*
|
||||
* Return number of characters written, -1 on error.
|
||||
*/
|
||||
ssize_t console_write(const char *text, size_t len) {
|
||||
ssize_t vconsole_write(const char *text, size_t len) {
|
||||
if (!console_context_available()) return -1;
|
||||
return console_write_ctx(console_active_ctx, text, len);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user