shell: fix double new line print for RTT backend

In case terminal sends `\r\n` on the Enter button
shell will go to the new line twice and it will print
prompt twice. This patch fixes it.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This commit is contained in:
Jakub Rzeszutko 2018-11-29 09:08:20 +01:00 committed by Carles Cufí
commit 9643ed6d27
2 changed files with 29 additions and 8 deletions

View file

@ -349,6 +349,7 @@ struct shell_flags {
u32_t tx_rdy :1;
u32_t mode_delete :1; /*!< Operation mode of backspace key */
u32_t history_exit:1; /*!< Request to exit history mode */
u32_t last_nl :8; /*!< Last received new line character */
};
BUILD_ASSERT_MSG((sizeof(struct shell_flags) == sizeof(u32_t)),