Home
last modified time | relevance | path

Searched full:sh (Results 1 – 25 of 546) sorted by relevance

12345678910>>...22

/Zephyr-Core-3.6.0/subsys/shell/
Dshell_ops.c11 void z_shell_op_cursor_vert_move(const struct shell *sh, int32_t delta) in z_shell_op_cursor_vert_move() argument
23 Z_SHELL_VT100_CMD(sh, "\e[%d%c", delta, dir); in z_shell_op_cursor_vert_move()
26 void z_shell_op_cursor_horiz_move(const struct shell *sh, int32_t delta) in z_shell_op_cursor_horiz_move() argument
38 Z_SHELL_VT100_CMD(sh, "\e[%d%c", delta, dir); in z_shell_op_cursor_horiz_move()
44 static inline bool full_line_cmd(const struct shell *sh) in full_line_cmd() argument
46 return ((sh->ctx->cmd_buff_len + z_shell_strlen(sh->ctx->prompt)) in full_line_cmd()
47 % sh->ctx->vt100_ctx.cons.terminal_wid == 0U); in full_line_cmd()
51 bool z_shell_cursor_in_empty_line(const struct shell *sh) in z_shell_cursor_in_empty_line() argument
53 return (((sh->ctx->cmd_buff_pos * sh->ctx->cfg.flags.echo) + in z_shell_cursor_in_empty_line()
54 z_shell_strlen(sh->ctx->prompt)) % in z_shell_cursor_in_empty_line()
[all …]
Dshell.c44 static inline void receive_state_change(const struct shell *sh, in receive_state_change() argument
47 sh->ctx->receive_state = state; in receive_state_change()
50 static void cmd_buffer_clear(const struct shell *sh) in cmd_buffer_clear() argument
52 sh->ctx->cmd_buff[0] = '\0'; /* clear command buffer */ in cmd_buffer_clear()
53 sh->ctx->cmd_buff_pos = 0; in cmd_buffer_clear()
54 sh->ctx->cmd_buff_len = 0; in cmd_buffer_clear()
57 static void shell_internal_help_print(const struct shell *sh) in shell_internal_help_print() argument
63 z_shell_help_cmd_print(sh, &sh->ctx->active_cmd); in shell_internal_help_print()
64 z_shell_help_subcmd_print(sh, &sh->ctx->active_cmd, in shell_internal_help_print()
78 static int cmd_precheck(const struct shell *sh, in cmd_precheck() argument
[all …]
Dshell_ops.h53 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()
[all …]
Dshell_cmds.c76 static int cursor_position_get(const struct shell *sh, uint16_t *x, uint16_t *y) in cursor_position_get() argument
85 memset(sh->ctx->temp_buff, 0, sizeof(sh->ctx->temp_buff)); in cursor_position_get()
90 z_shell_raw_fprintf(sh->fprintf_ctx, cmd_get_terminal_size); in cursor_position_get()
95 z_transport_buffer_flush(sh); in cursor_position_get()
100 (void)sh->iface->api->read(sh->iface, &c, in cursor_position_get()
107 (sh->ctx->temp_buff[0] != in cursor_position_get()
113 sh->ctx->temp_buff[buff_idx] = '\0'; in cursor_position_get()
114 if (sh->ctx->temp_buff[1] != '[') { in cursor_position_get()
115 sh->ctx->temp_buff[0] = 0; in cursor_position_get()
124 while (sh->ctx->temp_buff[buff_idx] != ';') { in cursor_position_get()
[all …]
Dshell_log_backend.c12 static bool process_msg_from_buffer(const struct shell *sh);
32 const struct shell *sh; in z_shell_log_backend_enable() local
34 sh = (const struct shell *)ctx; in z_shell_log_backend_enable()
36 z_flag_sync_mode_set(sh, true); in z_shell_log_backend_enable()
38 err = sh->iface->api->enable(sh->iface, true); in z_shell_log_backend_enable()
58 const struct shell *sh = in z_shell_log_backend_process() local
62 z_flag_use_colors_get(sh); in z_shell_log_backend_process()
69 z_shell_vt100_colors_store(sh, &col); in z_shell_log_backend_process()
70 z_shell_vt100_color_set(sh, SHELL_VT100_COLOR_RED); in z_shell_log_backend_process()
76 z_shell_vt100_colors_restore(sh, &col); in z_shell_log_backend_process()
[all …]
Dshell_help.c19 static void formatted_text_print(const struct shell *sh, const char *str, in formatted_text_print() argument
30 z_shell_op_cursor_horiz_move(sh, terminal_offset); in formatted_text_print()
45 sh->ctx->vt100_ctx.cons.terminal_wid - terminal_offset) { in formatted_text_print()
48 z_transport_buffer_flush(sh); in formatted_text_print()
49 z_shell_write(sh, str + offset, idx); in formatted_text_print()
51 z_cursor_next_line_move(sh); in formatted_text_print()
52 z_shell_op_cursor_horiz_move(sh, in formatted_text_print()
59 z_shell_raw_fprintf(sh->fprintf_ctx, str + offset); in formatted_text_print()
67 length = sh->ctx->vt100_ctx.cons.terminal_wid in formatted_text_print()
80 sh->ctx->vt100_ctx.cons.terminal_wid) { in formatted_text_print()
[all …]
/Zephyr-Core-3.6.0/tests/bsim/bluetooth/audio/test_scripts/
D_cap.sh11 $dir_path/cap_unicast_inval.sh
13 $dir_path/cap_unicast.sh
15 $dir_path/cap_broadcast.sh
16 $dir_path/cap_broadcast_ac_12.sh
17 $dir_path/cap_broadcast_ac_13.sh
18 $dir_path/cap_broadcast_ac_14.sh
20 $dir_path/cap_unicast_ac_1.sh
21 $dir_path/cap_unicast_ac_2.sh
22 $dir_path/cap_unicast_ac_3.sh
23 $dir_path/cap_unicast_ac_4.sh
[all …]
D_gmap.sh11 $dir_path/gmap_unicast_ac_1.sh
12 $dir_path/gmap_unicast_ac_2.sh
13 $dir_path/gmap_unicast_ac_3.sh
14 $dir_path/gmap_unicast_ac_4.sh
15 $dir_path/gmap_unicast_ac_5.sh
16 $dir_path/gmap_unicast_ac_6_i.sh
17 $dir_path/gmap_unicast_ac_6_ii.sh
18 $dir_path/gmap_unicast_ac_7_ii.sh
19 $dir_path/gmap_unicast_ac_8_i.sh
20 $dir_path/gmap_unicast_ac_8_ii.sh
[all …]
/Zephyr-Core-3.6.0/lib/acpi/
Dacpi_shell.c15 static void dump_dev_res(const struct shell *sh, ACPI_RESOURCE *res_lst) in dump_dev_res() argument
19 shell_print(sh, "**** ACPI Device Resource Info ****"); in dump_dev_res()
24 shell_error(sh, "Error: zero length found!"); in dump_dev_res()
30 shell_print(sh, "ACPI_RESOURCE_TYPE_IRQ"); in dump_dev_res()
33 shell_print(sh, "\tDescriptorLength: %x", irq_res->DescriptorLength); in dump_dev_res()
34 shell_print(sh, "\tTriggering: %x", irq_res->Triggering); in dump_dev_res()
35 shell_print(sh, "\tPolarity: %x", irq_res->Polarity); in dump_dev_res()
36 shell_print(sh, "\tShareable: %x", irq_res->Shareable); in dump_dev_res()
37 shell_print(sh, "\tInterruptCount: %d", irq_res->InterruptCount); in dump_dev_res()
38 shell_print(sh, "\tInterrupts[0]: %x", irq_res->Interrupts[0]); in dump_dev_res()
[all …]
/Zephyr-Core-3.6.0/subsys/usb/host/
Dusbh_shell.c29 static void print_dev_desc(const struct shell *sh, in print_dev_desc() argument
32 shell_print(sh, "bLength\t\t\t%u", desc->bLength); in print_dev_desc()
33 shell_print(sh, "bDescriptorType\t\t%u", desc->bDescriptorType); in print_dev_desc()
34 shell_print(sh, "bcdUSB\t\t\t%x", desc->bcdUSB); in print_dev_desc()
35 shell_print(sh, "bDeviceClass\t\t%u", desc->bDeviceClass); in print_dev_desc()
36 shell_print(sh, "bDeviceSubClass\t\t%u", desc->bDeviceSubClass); in print_dev_desc()
37 shell_print(sh, "bDeviceProtocol\t\t%u", desc->bDeviceProtocol); in print_dev_desc()
38 shell_print(sh, "bMaxPacketSize0\t\t%u", desc->bMaxPacketSize0); in print_dev_desc()
39 shell_print(sh, "idVendor\t\t%x", desc->idVendor); in print_dev_desc()
40 shell_print(sh, "idProduct\t\t%x", desc->idProduct); in print_dev_desc()
[all …]
/Zephyr-Core-3.6.0/drivers/edac/
Dshell.c38 static void decode_ecc_error(const struct shell *sh, uint64_t ecc_error) in decode_ecc_error() argument
43 shell_fprintf(sh, SHELL_NORMAL, in decode_ecc_error()
45 shell_fprintf(sh, SHELL_NORMAL, in decode_ecc_error()
49 shell_fprintf(sh, SHELL_NORMAL, in decode_ecc_error()
54 shell_fprintf(sh, SHELL_NORMAL, in decode_ecc_error()
59 static int ecc_error_show(const struct shell *sh, const struct device *dev) in ecc_error_show() argument
66 shell_error(sh, "Error getting error log (err %d)", err); in ecc_error_show()
70 shell_fprintf(sh, SHELL_NORMAL, "ECC Error: 0x%llx\n", error); in ecc_error_show()
73 decode_ecc_error(sh, error); in ecc_error_show()
79 static int parity_error_show(const struct shell *sh, const struct device *dev) in parity_error_show() argument
[all …]
/Zephyr-Core-3.6.0/subsys/fb/
Dcfb_shell.c31 static int cmd_clear(const struct shell *sh, size_t argc, char *argv[]) in cmd_clear() argument
39 shell_error(sh, HELP_INIT); in cmd_clear()
45 shell_error(sh, "Framebuffer clear error=%d", err); in cmd_clear()
51 shell_error(sh, "Framebuffer finalize error=%d", err); in cmd_clear()
55 shell_print(sh, "Display Cleared"); in cmd_clear()
60 static int cmd_cfb_print(const struct shell *sh, int col, int row, char *str) in cmd_cfb_print() argument
66 shell_error(sh, HELP_INIT); in cmd_cfb_print()
74 shell_error(sh, "Framebuffer clear failed error=%d", err); in cmd_cfb_print()
80 shell_error(sh, "Failed to print the string %s error=%d", in cmd_cfb_print()
87 shell_error(sh, in cmd_cfb_print()
[all …]
/Zephyr-Core-3.6.0/samples/subsys/shell/shell_module/src/
Dmain.c36 static int cmd_log_test_start(const struct shell *sh, size_t argc, in cmd_log_test_start() argument
42 shell_print(sh, "Log test started\n"); in cmd_log_test_start()
47 static int cmd_log_test_start_demo(const struct shell *sh, size_t argc, in cmd_log_test_start_demo() argument
50 return cmd_log_test_start(sh, argc, argv, 200); in cmd_log_test_start_demo()
53 static int cmd_log_test_start_flood(const struct shell *sh, size_t argc, in cmd_log_test_start_flood() argument
56 return cmd_log_test_start(sh, argc, argv, 10); in cmd_log_test_start_flood()
59 static int cmd_log_test_stop(const struct shell *sh, size_t argc, in cmd_log_test_stop() argument
66 shell_print(sh, "Log test stopped"); in cmd_log_test_stop()
88 static int cmd_demo_ping(const struct shell *sh, size_t argc, char **argv) in cmd_demo_ping() argument
93 shell_print(sh, "pong"); in cmd_demo_ping()
[all …]
/Zephyr-Core-3.6.0/subsys/net/lib/zperf/
Dzperf_shell.c84 static void print_number(const struct shell *sh, uint32_t value, in print_number() argument
102 shell_fprintf(sh, SHELL_NORMAL, "%u.%s%u %s", radix, in print_number()
105 shell_fprintf(sh, SHELL_NORMAL, "%u %s", value, *unit); in print_number()
129 static int parse_ipv6_addr(const struct shell *sh, char *host, char *port, in parse_ipv6_addr() argument
140 shell_fprintf(sh, SHELL_WARNING, in parse_ipv6_addr()
147 shell_fprintf(sh, SHELL_WARNING, in parse_ipv6_addr()
155 static int parse_ipv4_addr(const struct shell *sh, char *host, char *port, in parse_ipv4_addr() argument
166 shell_fprintf(sh, SHELL_WARNING, in parse_ipv4_addr()
173 shell_fprintf(sh, SHELL_WARNING, in parse_ipv4_addr()
181 static int zperf_bind_host(const struct shell *sh, in zperf_bind_host() argument
[all …]
/Zephyr-Core-3.6.0/drivers/lora/
Dshell.c34 static int parse_long(long *out, const struct shell *sh, const char *arg) in parse_long() argument
41 shell_error(sh, "'%s' is not an integer", arg); in parse_long()
49 static int parse_long_range(long *out, const struct shell *sh, in parse_long_range() argument
55 ret = parse_long(out, sh, arg); in parse_long_range()
61 shell_error(sh, "Parameter '%s' is out of range. " in parse_long_range()
70 static int parse_freq(uint32_t *out, const struct shell *sh, const char *arg) in parse_freq() argument
77 shell_error(sh, "Invalid frequency, '%s' is not an integer", in parse_freq()
83 shell_error(sh, "Frequency %s out of range", arg); in parse_freq()
91 static const struct device *get_modem(const struct shell *sh) in get_modem() argument
98 shell_error(sh, "LORA Radio device not ready"); in get_modem()
[all …]
/Zephyr-Core-3.6.0/subsys/sip_svc/
Dsip_svc_shell.c19 const struct shell *sh; member
22 static int parse_common_args(const struct shell *sh, char **argv, void **ctrl) in parse_common_args() argument
27 shell_error(sh, "service %s not found", argv[1]); in parse_common_args()
34 shell_error(sh, "ARM SiP services method %s not initialized", argv[1]); in parse_common_args()
40 static int cmd_reg(const struct shell *sh, size_t argc, char **argv) in cmd_reg() argument
46 err = parse_common_args(sh, argv, (void **)&ctrl); in cmd_reg()
53 shell_error(sh, "%s: register fail", ctrl->method); in cmd_reg()
56 shell_print(sh, "%s: register success: client token %08x\n", ctrl->method, c_token); in cmd_reg()
63 static int cmd_unreg(const struct shell *sh, size_t argc, char **argv) in cmd_unreg() argument
70 err = parse_common_args(sh, argv, (void **)&ctrl); in cmd_unreg()
[all …]
Dsip_svc_agilex_mailbox_shell.c22 const struct shell *sh; member
28 static int cmd_reg(const struct shell *sh, size_t argc, char **argv) in cmd_reg() argument
33 shell_print(sh, "Mailbox client already registered"); in cmd_reg()
39 shell_error(sh, "Arm SiP service %s not found", argv[1]); in cmd_reg()
46 shell_error(sh, "Mailbox client register fail"); in cmd_reg()
49 shell_print(sh, "Mailbox client register success (token %08x)", mb_c_token); in cmd_reg()
56 static int cmd_unreg(const struct shell *sh, size_t argc, char **argv) in cmd_unreg() argument
61 shell_print(sh, "Mailbox client is not registered"); in cmd_unreg()
67 shell_error(sh, "Mailbox client unregister fail (%d)", err); in cmd_unreg()
69 shell_print(sh, "Mailbox client unregister success"); in cmd_unreg()
[all …]
/Zephyr-Core-3.6.0/subsys/logging/
Dlog_cmds.c17 typedef int (*log_backend_cmd_t)(const struct shell *sh,
59 static bool shell_state_precheck(const struct shell *sh) in shell_state_precheck() argument
61 if (sh->log_backend->control_block->state in shell_state_precheck()
63 shell_error(sh, "Shell log backend not initialized."); in shell_state_precheck()
73 static int shell_backend_cmd_execute(const struct shell *sh, in shell_backend_cmd_execute() argument
86 func(sh, NULL, argc, argv); in shell_backend_cmd_execute()
93 func(sh, backend, argc, argv); in shell_backend_cmd_execute()
95 shell_error(sh, "Invalid backend: %s", name); in shell_backend_cmd_execute()
103 static int log_status(const struct shell *sh, in log_status() argument
112 shell_warn(sh, "Logs are halted!"); in log_status()
[all …]
/Zephyr-Core-3.6.0/drivers/led/
Dled_shell.c23 static int parse_common_args(const struct shell *sh, char **argv, in parse_common_args() argument
30 shell_error(sh, in parse_common_args()
37 shell_error(sh, "Invalid LED number parameter %s", in parse_common_args()
45 static int cmd_off(const struct shell *sh, size_t argc, char **argv) in cmd_off() argument
51 err = parse_common_args(sh, argv, &dev, &led); in cmd_off()
56 shell_print(sh, "%s: turning off LED %d", dev->name, led); in cmd_off()
60 shell_error(sh, "Error: %d", err); in cmd_off()
66 static int cmd_on(const struct shell *sh, size_t argc, char **argv) in cmd_on() argument
72 err = parse_common_args(sh, argv, &dev, &led); in cmd_on()
77 shell_print(sh, "%s: turning on LED %d", dev->name, led); in cmd_on()
[all …]
/Zephyr-Core-3.6.0/subsys/bluetooth/mesh/shell/
Dcfg.c21 static int cmd_reset(const struct shell *sh, size_t argc, char *argv[]) in cmd_reset() argument
29 shell_error(sh, "Unable to send Remote Node Reset (err %d)", err); in cmd_reset()
41 shell_print(sh, "Remote node reset complete"); in cmd_reset()
46 static int cmd_timeout(const struct shell *sh, size_t argc, char *argv[]) in cmd_timeout() argument
55 shell_warn(sh, "Unable to parse input string argument"); in cmd_timeout()
70 shell_print(sh, "Message timeout: forever"); in cmd_timeout()
72 shell_print(sh, "Message timeout: %u seconds", timeout_ms / 1000); in cmd_timeout()
78 static int cmd_get_comp(const struct shell *sh, size_t argc, char *argv[]) in cmd_get_comp() argument
89 shell_warn(sh, "Unable to parse input string argument"); in cmd_get_comp()
97 shell_error(sh, "Getting composition failed (err %d)", err); in cmd_get_comp()
[all …]
Dhealth.c18 static void show_faults(const struct shell *sh, uint8_t test_id, uint16_t cid, uint8_t *faults, in show_faults() argument
24 shell_print(sh, "Health Test ID 0x%02x Company ID 0x%04x: no faults\n", test_id, in show_faults()
29 shell_print(sh, "Health Test ID 0x%02x Company ID 0x%04x Fault Count %zu:\n", test_id, cid, in show_faults()
33 shell_print(sh, "\t0x%02x\n", faults[i]); in show_faults()
37 static int cmd_fault_get(const struct shell *sh, size_t argc, char *argv[]) in cmd_fault_get() argument
54 shell_warn(sh, "Unable to parse input string argument"); in cmd_fault_get()
63 shell_error(sh, "Failed to send Health Fault Get (err %d)", err); in cmd_fault_get()
65 show_faults(sh, test_id, cid, faults, fault_count); in cmd_fault_get()
71 static int fault_clear(const struct shell *sh, size_t argc, char *argv[], bool acked) in fault_clear() argument
86 shell_warn(sh, "Unable to parse input string argument"); in fault_clear()
[all …]
/Zephyr-Core-3.6.0/subsys/bluetooth/audio/shell/
Dtbs.c39 static int cmd_tbs_authorize(const struct shell *sh, size_t argc, char *argv[]) in cmd_tbs_authorize() argument
48 shell_print(sh, "Connection with addr %s authorized", addr); in cmd_tbs_authorize()
63 static int cmd_tbs_accept(const struct shell *sh, size_t argc, char *argv[]) in cmd_tbs_accept() argument
70 shell_error(sh, "Could not parse call_index: %d", result); in cmd_tbs_accept()
76 shell_error(sh, "Invalid call_index: %lu", call_index); in cmd_tbs_accept()
83 shell_print(sh, "TBS failed: %d", result); in cmd_tbs_accept()
85 shell_print(sh, "TBS succeeded for call_index: %ld", in cmd_tbs_accept()
92 static int cmd_tbs_terminate(const struct shell *sh, size_t argc, in cmd_tbs_terminate() argument
100 shell_error(sh, "Could not parse call_index: %d", result); in cmd_tbs_terminate()
106 shell_error(sh, "Invalid call_index: %lu", call_index); in cmd_tbs_terminate()
[all …]
/Zephyr-Core-3.6.0/drivers/fpga/
Dfpga_shell.c13 static int parse_common_args(const struct shell *sh, char **argv, in parse_common_args() argument
18 shell_error(sh, "FPGA device %s not found", argv[1]); in parse_common_args()
24 static int cmd_on(const struct shell *sh, size_t argc, char **argv) in cmd_on() argument
29 err = parse_common_args(sh, argv, &dev); in cmd_on()
34 shell_print(sh, "%s: turning on", dev->name); in cmd_on()
38 shell_error(sh, "Error: %d", err); in cmd_on()
44 static int cmd_off(const struct shell *sh, size_t argc, char **argv) in cmd_off() argument
49 err = parse_common_args(sh, argv, &dev); in cmd_off()
54 shell_print(sh, "%s: turning off", dev->name); in cmd_off()
58 shell_error(sh, "Error: %d", err); in cmd_off()
[all …]
/Zephyr-Core-3.6.0/subsys/net/l2/ethernet/
Dbridge_shell.c14 static int get_idx(const struct shell *sh, char *index_str) in get_idx() argument
21 shell_warn(sh, "Invalid index %s\n", index_str); in get_idx()
27 static int cmd_bridge_addif(const struct shell *sh, size_t argc, char *argv[]) in cmd_bridge_addif() argument
33 br_idx = get_idx(sh, argv[1]); in cmd_bridge_addif()
37 if_idx = get_idx(sh, argv[2]); in cmd_bridge_addif()
43 shell_warn(sh, "Bridge %d not found\n", br_idx); in cmd_bridge_addif()
48 shell_warn(sh, "Interface %d not found\n", if_idx); in cmd_bridge_addif()
52 shell_warn(sh, "Interface %d is not Ethernet\n", if_idx); in cmd_bridge_addif()
56 shell_warn(sh, "Interface %d cannot do promiscuous mode\n", if_idx); in cmd_bridge_addif()
63 shell_error(sh, "error: eth_bridge_iface_add() returned %d\n", ret); in cmd_bridge_addif()
[all …]
/Zephyr-Core-3.6.0/drivers/flash/
Dflash_shell.c33 static int parse_helper(const struct shell *sh, size_t *argc, in parse_helper() argument
45 shell_error(sh, "Given flash device was not found"); in parse_helper()
51 shell_error(sh, "Default flash driver not ready"); in parse_helper()
57 shell_error(sh, "No flash device specified (required)"); in parse_helper()
65 shell_error(sh, "Missing address."); in parse_helper()
74 static int cmd_erase(const struct shell *sh, size_t argc, char *argv[]) in cmd_erase() argument
81 result = parse_helper(sh, &argc, &argv, &flash_dev, &page_addr); in cmd_erase()
94 shell_error(sh, "Could not determine page size, " in cmd_erase()
105 shell_error(sh, "Erase Failed, code %d.", result); in cmd_erase()
107 shell_print(sh, "Erase success."); in cmd_erase()
[all …]

12345678910>>...22