shell: fix resize command

Resize command requires shell to be working on UART interrupt
driven API. This will be now enabled by default when shell serial
backend is selected. Recently this feature was accidentally turned
off in PR #11556.

k_sleep(1) has been replaced with k_busy_wait(1000) to avoid
hanging in command handler.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This commit is contained in:
Jakub Rzeszutko 2018-11-28 11:30:25 +01:00 committed by Anas Nashif
commit 10aeb0e8ab
2 changed files with 3 additions and 2 deletions

View file

@ -27,8 +27,9 @@ if SHELL_BACKEND_SERIAL
# Internal config to enable UART interrupts if supported.
config SHELL_BACKEND_SERIAL_INTERRUPT_DRIVEN
bool "Interrupt driven"
default y if UART_INTERRUPT_DRIVEN
default y
depends on SERIAL_SUPPORT_INTERRUPT
select UART_INTERRUPT_DRIVEN
config SHELL_BACKEND_SERIAL_TX_RING_BUFFER_SIZE
int "Set TX ring buffer size"

View file

@ -77,7 +77,7 @@ static int cursor_position_get(const struct shell *shell, u16_t *x, u16_t *y)
(void)shell->iface->api->read(shell->iface, &c,
sizeof(c), &cnt);
if (cnt == 0) {
k_sleep(1);
k_busy_wait(1000);
break;
}
if ((c != SHELL_VT100_ASCII_ESC) &&