zephyr/drivers/console
Jakub Michalski 56bb73d7c7 console: fix '\r' and '\n' handling in uart_console_isr()
Receiving uart messages like: "\r*\n*\n" ('*' is a wildcard here) resulted
in invalid echo and invalid console_getline() output.
For example after receiving "\rabc\nd\n" uart_console_isr() echoes
"\r\nabcd\r\n" (note that "\r\n" before 'd' is missing) and after calling
console_getline() twice we received "" and "abcd".

uart_console_isr() changes single occurences of '\n' and '\r' to "\r\n" and
to avoid outputting "\r\n\r\n" after receiving "\r\n" it keeps track of the
last character. But it was tracking only the control characters not all
characters so in case of inputs like "\r*\n" the '\n' was omitted because
the last tracked character was '\r'.

Its fixed by tracking last character no matter of its type

Signed-off-by: Jakub Michalski <jmichalski@internships.antmicro.com>
Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2023-11-29 17:16:35 -05:00
..
CMakeLists.txt drivers: syscalls: use zephyr_syscall_header 2023-06-17 07:57:45 -04:00
efi_console.c init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
gsm_mux.c all: logging: Remove log_strdup function 2022-06-23 13:42:23 +02:00
gsm_mux.h all: Fix "#if IS_ENABLED(CONFIG_FOO)" occurrences 2022-12-21 10:09:23 +01:00
ipm_console_receiver.c drivers: migrate includes to <zephyr/...> 2022-05-06 19:58:21 +02:00
ipm_console_sender.c drivers: migrate includes to <zephyr/...> 2022-05-06 19:58:21 +02:00
ipm_console.c init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
jailhouse_debug_console.c init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
Kconfig drivers: console: deprecate uart_mux and gsm_mux 2023-09-19 15:25:47 +01:00
Kconfig.gsm_mux drivers: console: deprecate uart_mux and gsm_mux 2023-09-19 15:25:47 +01:00
posix_arch_console.c drivers: Console: Move all posix arch boards to same driver 2023-05-26 12:57:41 +02:00
ram_console.c init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
rtt_console.c init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
semihost_console.c init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
uart_console.c console: fix '\r' and '\n' handling in uart_console_isr() 2023-11-29 17:16:35 -05:00
uart_mcumgr.c drivers: console: uart_mcumgr: Skip reading FIFO during setup 2023-11-27 09:12:36 +00:00
uart_mux_internal.h drivers: uart_mux: Fix documentation of uart_mux_recv() 2023-01-19 08:44:34 -06:00
uart_mux.c kernel: move syscall_handler.h to internal include directory 2023-11-03 11:46:52 +01:00
winstream_console.c intel_adsp: move memory window setup to PRE_KERNEL_1 2023-09-20 15:17:14 +02:00
xtensa_sim_console.c drivers/console: xtensa_sim_console: implement arch_printk_char_out() 2023-11-21 15:49:48 +01:00