shell: shell_ops internal api update

Add prefix z_ to internal functions provided by the shell_ops module.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This commit is contained in:
Jakub Rzeszutko 2020-12-07 13:22:35 +01:00 committed by Carles Cufí
commit 0eea85bf08
6 changed files with 273 additions and 281 deletions

View file

@ -157,14 +157,14 @@ bool z_shell_log_backend_process(const struct shell_log_backend *backend)
struct shell_vt100_colors col;
if (colors) {
shell_vt100_colors_store(shell, &col);
shell_vt100_color_set(shell, SHELL_VT100_COLOR_RED);
z_shell_vt100_colors_store(shell, &col);
z_shell_vt100_color_set(shell, SHELL_VT100_COLOR_RED);
}
log_output_dropped_process(backend->log_output, dropped);
if (colors) {
shell_vt100_colors_restore(shell, &col);
z_shell_vt100_colors_restore(shell, &col);
}
}
@ -193,7 +193,7 @@ static void put(const struct log_backend *const backend, struct log_msg *msg)
break;
case SHELL_LOG_BACKEND_PANIC:
shell_cmd_line_erase(shell);
z_shell_cmd_line_erase(shell);
msg_process(shell->log_backend->log_output, msg, colors);
break;
@ -221,13 +221,13 @@ static void put_sync_string(const struct log_backend *const backend,
}
key = irq_lock();
if (!flag_cmd_ctx_get(shell)) {
shell_cmd_line_erase(shell);
if (!z_flag_cmd_ctx_get(shell)) {
z_shell_cmd_line_erase(shell);
}
log_output_string(shell->log_backend->log_output, src_level, timestamp,
fmt, ap, flags);
if (!flag_cmd_ctx_get(shell)) {
shell_print_prompt_and_cmd(shell);
if (!z_flag_cmd_ctx_get(shell)) {
z_shell_print_prompt_and_cmd(shell);
}
irq_unlock(key);
}
@ -247,13 +247,13 @@ static void put_sync_hexdump(const struct log_backend *const backend,
}
key = irq_lock();
if (!flag_cmd_ctx_get(shell)) {
shell_cmd_line_erase(shell);
if (!z_flag_cmd_ctx_get(shell)) {
z_shell_cmd_line_erase(shell);
}
log_output_hexdump(shell->log_backend->log_output, src_level, timestamp,
metadata, data, length, flags);
if (!flag_cmd_ctx_get(shell)) {
shell_print_prompt_and_cmd(shell);
if (!z_flag_cmd_ctx_get(shell)) {
z_shell_print_prompt_and_cmd(shell);
}
irq_unlock(key);
}
@ -277,8 +277,8 @@ static void panic(const struct log_backend *const backend)
shell_multiline_data_calc(&shell->ctx->vt100_ctx.cons,
shell->ctx->cmd_buff_pos,
shell->ctx->cmd_buff_len);
shell_op_cursor_vert_move(shell, -1);
shell_op_cursor_horiz_move(shell,
z_shell_op_cursor_vert_move(shell, -1);
z_shell_op_cursor_horiz_move(shell,
-shell->ctx->vt100_ctx.cons.cur_x);
while (z_shell_log_backend_process(shell->log_backend)) {