Lines Matching full:sh
53 static inline bool z_flag_insert_mode_get(const struct shell *sh) in z_flag_insert_mode_get() argument
55 return sh->ctx->cfg.flags.insert_mode == 1; in z_flag_insert_mode_get()
58 static inline bool z_flag_insert_mode_set(const struct shell *sh, bool val) in z_flag_insert_mode_set() argument
62 Z_SHELL_SET_FLAG_ATOMIC(sh, cfg, insert_mode, val, ret); in z_flag_insert_mode_set()
66 static inline bool z_flag_use_colors_get(const struct shell *sh) in z_flag_use_colors_get() argument
68 return sh->ctx->cfg.flags.use_colors == 1; in z_flag_use_colors_get()
71 static inline bool z_flag_use_colors_set(const struct shell *sh, bool val) in z_flag_use_colors_set() argument
75 Z_SHELL_SET_FLAG_ATOMIC(sh, cfg, use_colors, val, ret); in z_flag_use_colors_set()
79 static inline bool z_flag_use_vt100_get(const struct shell *sh) in z_flag_use_vt100_get() argument
81 return sh->ctx->cfg.flags.use_vt100 == 1; in z_flag_use_vt100_get()
84 static inline bool z_flag_use_vt100_set(const struct shell *sh, bool val) in z_flag_use_vt100_set() argument
88 Z_SHELL_SET_FLAG_ATOMIC(sh, cfg, use_vt100, val, ret); in z_flag_use_vt100_set()
92 static inline bool z_flag_echo_get(const struct shell *sh) in z_flag_echo_get() argument
94 return sh->ctx->cfg.flags.echo == 1; in z_flag_echo_get()
97 static inline bool z_flag_echo_set(const struct shell *sh, bool val) in z_flag_echo_set() argument
101 Z_SHELL_SET_FLAG_ATOMIC(sh, cfg, echo, val, ret); in z_flag_echo_set()
105 static inline bool z_flag_obscure_get(const struct shell *sh) in z_flag_obscure_get() argument
107 return sh->ctx->cfg.flags.obscure == 1; in z_flag_obscure_get()
110 static inline bool z_flag_obscure_set(const struct shell *sh, bool val) in z_flag_obscure_set() argument
114 Z_SHELL_SET_FLAG_ATOMIC(sh, cfg, obscure, val, ret); in z_flag_obscure_set()
118 static inline bool z_flag_processing_get(const struct shell *sh) in z_flag_processing_get() argument
120 return sh->ctx->ctx.flags.processing == 1; in z_flag_processing_get()
123 static inline bool z_flag_processing_set(const struct shell *sh, bool val) in z_flag_processing_set() argument
127 Z_SHELL_SET_FLAG_ATOMIC(sh, ctx, processing, val, ret); in z_flag_processing_set()
131 static inline bool z_flag_tx_rdy_get(const struct shell *sh) in z_flag_tx_rdy_get() argument
133 return sh->ctx->ctx.flags.tx_rdy == 1; in z_flag_tx_rdy_get()
136 static inline bool z_flag_tx_rdy_set(const struct shell *sh, bool val) in z_flag_tx_rdy_set() argument
140 Z_SHELL_SET_FLAG_ATOMIC(sh, ctx, tx_rdy, val, ret); in z_flag_tx_rdy_set()
144 static inline bool z_flag_mode_delete_get(const struct shell *sh) in z_flag_mode_delete_get() argument
146 return sh->ctx->cfg.flags.mode_delete == 1; in z_flag_mode_delete_get()
149 static inline bool z_flag_mode_delete_set(const struct shell *sh, bool val) in z_flag_mode_delete_set() argument
153 Z_SHELL_SET_FLAG_ATOMIC(sh, cfg, mode_delete, val, ret); in z_flag_mode_delete_set()
157 static inline bool z_flag_history_exit_get(const struct shell *sh) in z_flag_history_exit_get() argument
159 return sh->ctx->ctx.flags.history_exit == 1; in z_flag_history_exit_get()
162 static inline bool z_flag_history_exit_set(const struct shell *sh, bool val) in z_flag_history_exit_set() argument
166 Z_SHELL_SET_FLAG_ATOMIC(sh, ctx, history_exit, val, ret); in z_flag_history_exit_set()
170 static inline bool z_flag_cmd_ctx_get(const struct shell *sh) in z_flag_cmd_ctx_get() argument
172 return sh->ctx->ctx.flags.cmd_ctx == 1; in z_flag_cmd_ctx_get()
175 static inline bool z_flag_cmd_ctx_set(const struct shell *sh, bool val) in z_flag_cmd_ctx_set() argument
179 Z_SHELL_SET_FLAG_ATOMIC(sh, ctx, cmd_ctx, val, ret); in z_flag_cmd_ctx_set()
183 static inline uint8_t z_flag_last_nl_get(const struct shell *sh) in z_flag_last_nl_get() argument
185 return sh->ctx->ctx.flags.last_nl; in z_flag_last_nl_get()
188 static inline int z_shell_get_return_value(const struct shell *sh) in z_shell_get_return_value() argument
190 return sh->ctx->ret_val; in z_shell_get_return_value()
193 static inline void z_flag_last_nl_set(const struct shell *sh, uint8_t val) in z_flag_last_nl_set() argument
195 sh->ctx->ctx.flags.last_nl = val; in z_flag_last_nl_set()
198 static inline bool z_flag_print_noinit_get(const struct shell *sh) in z_flag_print_noinit_get() argument
200 return sh->ctx->ctx.flags.print_noinit == 1; in z_flag_print_noinit_get()
203 static inline bool z_flag_print_noinit_set(const struct shell *sh, bool val) in z_flag_print_noinit_set() argument
207 Z_SHELL_SET_FLAG_ATOMIC(sh, ctx, print_noinit, val, ret); in z_flag_print_noinit_set()
211 static inline bool z_flag_sync_mode_get(const struct shell *sh) in z_flag_sync_mode_get() argument
213 return sh->ctx->ctx.flags.sync_mode == 1; in z_flag_sync_mode_get()
216 static inline bool z_flag_sync_mode_set(const struct shell *sh, bool val) in z_flag_sync_mode_set() argument
220 Z_SHELL_SET_FLAG_ATOMIC(sh, ctx, sync_mode, val, ret); in z_flag_sync_mode_set()
224 static inline bool z_flag_handle_log_get(const struct shell *sh) in z_flag_handle_log_get() argument
226 return sh->ctx->ctx.flags.handle_log == 1; in z_flag_handle_log_get()
229 static inline bool z_flag_handle_log_set(const struct shell *sh, bool val) in z_flag_handle_log_set() argument
233 Z_SHELL_SET_FLAG_ATOMIC(sh, ctx, handle_log, val, ret); in z_flag_handle_log_set()
240 static inline void z_clear_eos(const struct shell *sh) in z_clear_eos() argument
242 Z_SHELL_VT100_CMD(sh, SHELL_VT100_CLEAREOS); in z_clear_eos()
246 static inline void z_cursor_save(const struct shell *sh) in z_cursor_save() argument
248 Z_SHELL_VT100_CMD(sh, SHELL_VT100_SAVECURSOR); in z_cursor_save()
252 static inline void z_cursor_restore(const struct shell *sh) in z_cursor_restore() argument
254 Z_SHELL_VT100_CMD(sh, SHELL_VT100_RESTORECURSOR); in z_cursor_restore()
260 static inline void z_cursor_next_line_move(const struct shell *sh) in z_cursor_next_line_move() argument
262 z_shell_raw_fprintf(sh->fprintf_ctx, "\n"); in z_cursor_next_line_move()
265 void z_shell_op_cursor_vert_move(const struct shell *sh, int32_t delta);
267 void z_shell_op_cursor_horiz_move(const struct shell *sh, int32_t delta);
269 void z_shell_op_cond_next_line(const struct shell *sh);
276 void z_shell_op_cursor_position_synchronize(const struct shell *sh);
278 void z_shell_op_cursor_move(const struct shell *sh, int16_t val);
280 void z_shell_op_left_arrow(const struct shell *sh);
282 void z_shell_op_right_arrow(const struct shell *sh);
285 void z_shell_op_cursor_word_move(const struct shell *sh, int16_t val);
293 void z_shell_op_word_remove(const struct shell *sh);
298 void z_shell_op_cursor_home_move(const struct shell *sh);
301 void z_shell_op_cursor_end_move(const struct shell *sh);
303 void z_shell_op_char_insert(const struct shell *sh, char data);
305 void z_shell_op_char_backspace(const struct shell *sh);
307 void z_shell_op_char_delete(const struct shell *sh);
309 void z_shell_op_delete_from_cursor(const struct shell *sh);
311 void z_shell_op_completion_insert(const struct shell *sh,
315 bool z_shell_cursor_in_empty_line(const struct shell *sh);
317 void z_shell_cmd_line_erase(const struct shell *sh);
322 * @param sh Shell instance.
324 void z_shell_print_cmd(const struct shell *sh);
329 * @param sh Shell instance.
331 void z_shell_print_prompt_and_cmd(const struct shell *sh);
341 void z_shell_write(const struct shell *sh, const void *data, size_t length);
354 void z_shell_vt100_color_set(const struct shell *sh,
357 static inline void z_shell_vt100_colors_store(const struct shell *sh, in z_shell_vt100_colors_store() argument
360 memcpy(color, &sh->ctx->vt100_ctx.col, sizeof(*color)); in z_shell_vt100_colors_store()
363 void z_shell_vt100_colors_restore(const struct shell *sh,
369 void z_shell_fprintf(const struct shell *sh, enum shell_vt100_color color,
372 void z_shell_vfprintf(const struct shell *sh, enum shell_vt100_color color,
382 void z_shell_backend_rx_buffer_flush(const struct shell *sh);