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()
227 static inline void z_clear_eos(const struct shell *sh) in z_clear_eos() argument
229 Z_SHELL_VT100_CMD(sh, SHELL_VT100_CLEAREOS); in z_clear_eos()
233 static inline void z_cursor_save(const struct shell *sh) in z_cursor_save() argument
235 Z_SHELL_VT100_CMD(sh, SHELL_VT100_SAVECURSOR); in z_cursor_save()
239 static inline void z_cursor_restore(const struct shell *sh) in z_cursor_restore() argument
241 Z_SHELL_VT100_CMD(sh, SHELL_VT100_RESTORECURSOR); in z_cursor_restore()
247 static inline void z_cursor_next_line_move(const struct shell *sh) in z_cursor_next_line_move() argument
249 z_shell_raw_fprintf(sh->fprintf_ctx, "\n"); in z_cursor_next_line_move()
252 void z_shell_op_cursor_vert_move(const struct shell *sh, int32_t delta);
254 void z_shell_op_cursor_horiz_move(const struct shell *sh, int32_t delta);
256 void z_shell_op_cond_next_line(const struct shell *sh);
263 void z_shell_op_cursor_position_synchronize(const struct shell *sh);
265 void z_shell_op_cursor_move(const struct shell *sh, int16_t val);
267 void z_shell_op_left_arrow(const struct shell *sh);
269 void z_shell_op_right_arrow(const struct shell *sh);
272 void z_shell_op_cursor_word_move(const struct shell *sh, int16_t val);
280 void z_shell_op_word_remove(const struct shell *sh);
285 void z_shell_op_cursor_home_move(const struct shell *sh);
288 void z_shell_op_cursor_end_move(const struct shell *sh);
290 void z_shell_op_char_insert(const struct shell *sh, char data);
292 void z_shell_op_char_backspace(const struct shell *sh);
294 void z_shell_op_char_delete(const struct shell *sh);
296 void z_shell_op_delete_from_cursor(const struct shell *sh);
298 void z_shell_op_completion_insert(const struct shell *sh,
302 bool z_shell_cursor_in_empty_line(const struct shell *sh);
304 void z_shell_cmd_line_erase(const struct shell *sh);
309 * @param sh Shell instance.
311 void z_shell_print_cmd(const struct shell *sh);
316 * @param sh Shell instance.
318 void z_shell_print_prompt_and_cmd(const struct shell *sh);
328 void z_shell_write(const struct shell *sh, const void *data, size_t length);
341 void z_shell_vt100_color_set(const struct shell *sh,
344 static inline void z_shell_vt100_colors_store(const struct shell *sh, in z_shell_vt100_colors_store() argument
347 memcpy(color, &sh->ctx->vt100_ctx.col, sizeof(*color)); in z_shell_vt100_colors_store()
350 void z_shell_vt100_colors_restore(const struct shell *sh,
356 void z_shell_fprintf(const struct shell *sh, enum shell_vt100_color color,
359 void z_shell_vfprintf(const struct shell *sh, enum shell_vt100_color color,