/Zephyr-latest/subsys/shell/ |
D | shell_ops.c | 11 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 size_t line_length = sh->ctx->cmd_buff_len + z_shell_strlen(sh->ctx->prompt); in full_line_cmd() 52 return (line_length % sh->ctx->vt100_ctx.cons.terminal_wid == 0U); in full_line_cmd() 56 bool z_shell_cursor_in_empty_line(const struct shell *sh) in z_shell_cursor_in_empty_line() argument 58 return (((sh->ctx->cmd_buff_pos * sh->ctx->cfg.flags.echo) + in z_shell_cursor_in_empty_line() 59 z_shell_strlen(sh->ctx->prompt)) % in z_shell_cursor_in_empty_line() [all …]
|
D | shell.c | 44 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 …]
|
D | shell_ops.h | 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() [all …]
|
D | shell_cmds.c | 73 static int cursor_position_get(const struct shell *sh, uint16_t *x, uint16_t *y) in cursor_position_get() argument 82 memset(sh->ctx->temp_buff, 0, sizeof(sh->ctx->temp_buff)); in cursor_position_get() 87 z_shell_raw_fprintf(sh->fprintf_ctx, cmd_get_terminal_size); in cursor_position_get() 92 z_transport_buffer_flush(sh); in cursor_position_get() 97 (void)sh->iface->api->read(sh->iface, &c, in cursor_position_get() 104 (sh->ctx->temp_buff[0] != in cursor_position_get() 110 sh->ctx->temp_buff[buff_idx] = '\0'; in cursor_position_get() 111 if (sh->ctx->temp_buff[1] != '[') { in cursor_position_get() 112 sh->ctx->temp_buff[0] = 0; in cursor_position_get() 121 while (sh->ctx->temp_buff[buff_idx] != ';') { in cursor_position_get() [all …]
|
D | shell_log_backend.c | 12 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 …]
|
/Zephyr-latest/tests/bsim/bluetooth/audio/test_scripts/ |
D | _cap.sh | 11 $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.sh | 11 $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-latest/ |
D | .ruff-excludes.toml | 8 "I001", # https://docs.astral.sh/ruff/rules/unsorted-imports 9 "UP031", # https://docs.astral.sh/ruff/rules/printf-string-formatting 12 "I001", # https://docs.astral.sh/ruff/rules/unsorted-imports 13 "UP030", # https://docs.astral.sh/ruff/rules/format-literals 14 "UP031", # https://docs.astral.sh/ruff/rules/printf-string-formatting 17 "I001", # https://docs.astral.sh/ruff/rules/unsorted-imports 18 "UP031", # https://docs.astral.sh/ruff/rules/printf-string-formatting 19 "UP034", # https://docs.astral.sh/ruff/rules/extraneous-parentheses 20 "UP039", # https://docs.astral.sh/ruff/rules/unnecessary-class-parentheses 23 "E501", # https://docs.astral.sh/ruff/rules/line-too-long [all …]
|
/Zephyr-latest/lib/acpi/ |
D | acpi_shell.c | 15 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-latest/subsys/usb/host/ |
D | usbh_shell.c | 28 static void print_dev_desc(const struct shell *sh, in print_dev_desc() argument 31 shell_print(sh, "bLength\t\t\t%u", desc->bLength); in print_dev_desc() 32 shell_print(sh, "bDescriptorType\t\t%u", desc->bDescriptorType); in print_dev_desc() 33 shell_print(sh, "bcdUSB\t\t\t%x", desc->bcdUSB); in print_dev_desc() 34 shell_print(sh, "bDeviceClass\t\t%u", desc->bDeviceClass); in print_dev_desc() 35 shell_print(sh, "bDeviceSubClass\t\t%u", desc->bDeviceSubClass); in print_dev_desc() 36 shell_print(sh, "bDeviceProtocol\t\t%u", desc->bDeviceProtocol); in print_dev_desc() 37 shell_print(sh, "bMaxPacketSize0\t\t%u", desc->bMaxPacketSize0); in print_dev_desc() 38 shell_print(sh, "idVendor\t\t%x", desc->idVendor); in print_dev_desc() 39 shell_print(sh, "idProduct\t\t%x", desc->idProduct); in print_dev_desc() [all …]
|
/Zephyr-latest/subsys/net/lib/zperf/ |
D | zperf_shell.c | 84 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() 109 static void print_number_64(const struct shell *sh, uint64_t value, in print_number_64() argument 128 shell_fprintf(sh, SHELL_NORMAL, "%llu.%s%u %s", radix, in print_number_64() 131 shell_fprintf(sh, SHELL_NORMAL, "%llu %s", value, *unit); in print_number_64() 155 static int parse_ipv6_addr(const struct shell *sh, char *host, char *port, in parse_ipv6_addr() argument 171 shell_fprintf(sh, SHELL_WARNING, in parse_ipv6_addr() 179 static int parse_ipv4_addr(const struct shell *sh, char *host, char *port, in parse_ipv4_addr() argument 195 shell_fprintf(sh, SHELL_WARNING, in parse_ipv4_addr() [all …]
|
/Zephyr-latest/subsys/logging/ |
D | log_cmds.c | 17 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 && in shell_state_precheck() 62 (sh->log_backend->control_block->state == SHELL_LOG_BACKEND_UNINIT)) { 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 [all …]
|
/Zephyr-latest/drivers/edac/ |
D | shell.c | 38 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-latest/drivers/lora/ |
D | shell.c | 34 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-latest/subsys/mgmt/hawkbit/ |
D | shell.c | 20 static void cmd_run(const struct shell *sh, size_t argc, char **argv) in cmd_run() argument 25 LOG_INF("Run started from %s", sh->name); in cmd_run() 26 shell_info(sh, "Starting hawkBit run..."); in cmd_run() 32 shell_error(sh, "Image is unconfirmed." in cmd_run() 37 shell_info(sh, "No update found"); in cmd_run() 41 shell_info(sh, "Update installed"); in cmd_run() 45 shell_error(sh, "Download error"); in cmd_run() 49 shell_error(sh, "Networking error"); in cmd_run() 53 shell_error(sh, "Metadata error"); in cmd_run() 57 shell_error(sh, "hawkBit not initialized"); in cmd_run() [all …]
|
/Zephyr-latest/tests/drivers/stepper/shell/src/ |
D | main.c | 32 const struct shell *sh = shell_backend_dummy_get_ptr(); in stepper_shell_setup() local 35 WAIT_FOR(shell_ready(sh), 20000, k_msleep(1)); in stepper_shell_setup() 36 zassert_true(shell_ready(sh), "timed out waiting for dummy shell backend"); in stepper_shell_setup() 45 const struct shell *sh = shell_backend_dummy_get_ptr(); in ZTEST() local 46 int err = shell_execute_cmd(sh, "stepper enable " FAKE_STEPPER_NAME " on"); in ZTEST() 53 err = shell_execute_cmd(sh, "stepper enable " FAKE_STEPPER_NAME " off"); in ZTEST() 60 const struct shell *sh = shell_backend_dummy_get_ptr(); in ZTEST() local 61 int err = shell_execute_cmd(sh, "stepper move_by " FAKE_STEPPER_NAME " 1000"); in ZTEST() 69 const struct shell *sh = shell_backend_dummy_get_ptr(); in ZTEST() local 70 int err = shell_execute_cmd(sh, "stepper set_max_velocity " FAKE_STEPPER_NAME " 200"); in ZTEST() [all …]
|
/Zephyr-latest/subsys/sip_svc/ |
D | sip_svc_shell.c | 19 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 …]
|
D | sip_svc_agilex_mailbox_shell.c | 22 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-latest/subsys/bluetooth/mesh/shell/ |
D | cfg.c | 21 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 …]
|
/Zephyr-latest/drivers/hwinfo/ |
D | hwinfo_shell.c | 13 static int cmd_get_device_id(const struct shell *sh, size_t argc, char **argv) in cmd_get_device_id() argument 22 shell_error(sh, "Not supported by hardware"); in cmd_get_device_id() 25 shell_error(sh, "Error: %zd", length); in cmd_get_device_id() 29 shell_fprintf(sh, SHELL_NORMAL, "Length: %zd\n", length); in cmd_get_device_id() 30 shell_fprintf(sh, SHELL_NORMAL, "ID: 0x"); in cmd_get_device_id() 33 shell_fprintf(sh, SHELL_NORMAL, "%02x", dev_id[i]); in cmd_get_device_id() 36 shell_fprintf(sh, SHELL_NORMAL, "\n"); in cmd_get_device_id() 41 static int cmd_get_device_eui64(const struct shell *sh, size_t argc, char **argv) in cmd_get_device_eui64() argument 50 shell_error(sh, "Not supported by hardware"); in cmd_get_device_eui64() 53 shell_error(sh, "Error: %d", ret); in cmd_get_device_eui64() [all …]
|
/Zephyr-latest/subsys/net/l2/ethernet/ |
D | bridge_shell.c | 14 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() 28 static int cmd_bridge_addif(const struct shell *sh, size_t argc, char *argv[]) in cmd_bridge_addif() argument 34 br_idx = get_idx(sh, argv[1]); in cmd_bridge_addif() 41 shell_warn(sh, "Bridge %d not found\n", br_idx); in cmd_bridge_addif() 46 if_idx = get_idx(sh, argv[i]); in cmd_bridge_addif() 53 shell_warn(sh, "Interface %d not found\n", if_idx); in cmd_bridge_addif() 58 shell_warn(sh, "Interface %d is not Ethernet\n", if_idx); in cmd_bridge_addif() 63 shell_warn(sh, "Interface %d cannot do promiscuous mode\n", if_idx); in cmd_bridge_addif() 69 shell_error(sh, "error: bridge iface add (%d)\n", ret); in cmd_bridge_addif() [all …]
|
/Zephyr-latest/drivers/fpga/ |
D | fpga_shell.c | 13 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-latest/drivers/led/ |
D | led_shell.c | 24 static int parse_common_args(const struct shell *sh, char **argv, in parse_common_args() argument 31 shell_error(sh, in parse_common_args() 38 shell_error(sh, "Invalid LED number parameter %s", in parse_common_args() 46 static int cmd_off(const struct shell *sh, size_t argc, char **argv) in cmd_off() argument 52 err = parse_common_args(sh, argv, &dev, &led); in cmd_off() 57 shell_print(sh, "%s: turning off LED %d", dev->name, led); in cmd_off() 61 shell_error(sh, "Error: %d", err); in cmd_off() 67 static int cmd_on(const struct shell *sh, size_t argc, char **argv) in cmd_on() argument 73 err = parse_common_args(sh, argv, &dev, &led); in cmd_on() 78 shell_print(sh, "%s: turning on LED %d", dev->name, led); in cmd_on() [all …]
|
/Zephyr-latest/samples/subsys/shell/shell_module/src/ |
D | main.c | 36 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-latest/drivers/flash/ |
D | flash_shell.c | 47 static int parse_helper(const struct shell *sh, size_t *argc, in parse_helper() argument 59 shell_error(sh, "Given flash device was not found"); in parse_helper() 65 shell_error(sh, "Default flash driver not ready"); in parse_helper() 71 shell_error(sh, "No flash device specified (required)"); in parse_helper() 79 shell_error(sh, "Missing address."); in parse_helper() 88 static int cmd_erase(const struct shell *sh, size_t argc, char *argv[]) in cmd_erase() argument 97 result = parse_helper(sh, &argc, &argv, &flash_dev, &page_addr); in cmd_erase() 110 shell_error(sh, "Could not determine page size, " in cmd_erase() 121 shell_error(sh, "Erase Failed, code %d.", result); in cmd_erase() 123 shell_print(sh, "Erase success."); in cmd_erase() [all …]
|