Lines Matching full:sh
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()
64 static int cmd_reset(const struct shell *sh, size_t argc, char **argv) in cmd_reset() argument
69 err = parse_common_args(sh, argv, &dev); in cmd_reset()
74 shell_print(sh, "%s: resetting FPGA", dev->name); in cmd_reset()
78 shell_error(sh, "Error: %d", err); in cmd_reset()
84 static int cmd_load(const struct shell *sh, size_t argc, char **argv) in cmd_load() argument
89 err = parse_common_args(sh, argv, &dev); in cmd_load()
94 shell_print(sh, "%s: loading bitstream", dev->name); in cmd_load()
99 shell_error(sh, "Error: %d", err); in cmd_load()
105 static int cmd_get_status(const struct shell *sh, size_t argc, char **argv) in cmd_get_status() argument
110 err = parse_common_args(sh, argv, &dev); in cmd_get_status()
115 shell_print(sh, "%s status: %d", dev->name, fpga_get_status(dev)); in cmd_get_status()
120 static int cmd_get_info(const struct shell *sh, size_t argc, char **argv) in cmd_get_info() argument
125 err = parse_common_args(sh, argv, &dev); in cmd_get_info()
130 shell_print(sh, "%s", fpga_get_info(dev)); in cmd_get_info()