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:
parent
d232ef129c
commit
10aeb0e8ab
2 changed files with 3 additions and 2 deletions
|
@ -27,8 +27,9 @@ if SHELL_BACKEND_SERIAL
|
||||||
# Internal config to enable UART interrupts if supported.
|
# Internal config to enable UART interrupts if supported.
|
||||||
config SHELL_BACKEND_SERIAL_INTERRUPT_DRIVEN
|
config SHELL_BACKEND_SERIAL_INTERRUPT_DRIVEN
|
||||||
bool "Interrupt driven"
|
bool "Interrupt driven"
|
||||||
default y if UART_INTERRUPT_DRIVEN
|
default y
|
||||||
depends on SERIAL_SUPPORT_INTERRUPT
|
depends on SERIAL_SUPPORT_INTERRUPT
|
||||||
|
select UART_INTERRUPT_DRIVEN
|
||||||
|
|
||||||
config SHELL_BACKEND_SERIAL_TX_RING_BUFFER_SIZE
|
config SHELL_BACKEND_SERIAL_TX_RING_BUFFER_SIZE
|
||||||
int "Set TX ring buffer size"
|
int "Set TX ring buffer size"
|
||||||
|
|
|
@ -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,
|
(void)shell->iface->api->read(shell->iface, &c,
|
||||||
sizeof(c), &cnt);
|
sizeof(c), &cnt);
|
||||||
if (cnt == 0) {
|
if (cnt == 0) {
|
||||||
k_sleep(1);
|
k_busy_wait(1000);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ((c != SHELL_VT100_ASCII_ESC) &&
|
if ((c != SHELL_VT100_ASCII_ESC) &&
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue