Lines Matching +full:3 +full:- +full:wire
5 * SPDX-License-Identifier: Apache-2.0
17 #define W1DEV_X_NOT_FOUND "1-Wire device not found: \"%s\""
19 #define OPTION_HELP_RESET "-r Perform bus reset before executing cmd."
31 if (arg[0] != '-') { in read_io_options()
42 return -EINVAL; in read_io_options()
49 /* 1-Wire reset bus <device> */
58 return -EINVAL; in cmd_w1_reset_bus()
71 /* 1-Wire read_bit <device> */
80 return -EINVAL; in cmd_w1_read_bit()
95 /* 1-Wire read_byte <device> */
104 return -EINVAL; in cmd_w1_read_byte()
119 /* 1-Wire read_block <device> [num_bytes] */
130 return -EINVAL; in cmd_w1_read_block()
136 return -EINVAL; in cmd_w1_read_block()
140 return -EINVAL; in cmd_w1_read_block()
161 /* 1-Wire write_bit <device> <bit_value> */
171 return -EINVAL; in cmd_w1_write_bit()
175 return -EINVAL; in cmd_w1_write_bit()
188 /* 1-Wire write_byte <device> <byte_value> */
200 return -EINVAL; in cmd_w1_write_byte()
206 return -EINVAL; in cmd_w1_write_byte()
210 return -EINVAL; in cmd_w1_write_byte()
216 return -EINVAL; in cmd_w1_write_byte()
237 /* 1-Wire write_block <device> <byt1> [byte2, ...] */
249 return -EINVAL; in cmd_w1_write_block()
255 return -EINVAL; in cmd_w1_write_block()
259 return -EINVAL; in cmd_w1_write_block()
261 if ((argc - pos) > BUF_SIZE) { in cmd_w1_write_block()
263 return -EINVAL; in cmd_w1_write_block()
290 /* 1-Wire config <device> <type> <value> */
298 uint32_t value = strtoul(argv[3], NULL, 0); in cmd_w1_configure()
303 return -EINVAL; in cmd_w1_configure()
316 return -ENOTSUP; in cmd_w1_configure()
322 return -EINVAL; in cmd_w1_configure()
347 /* 1-Wire search <device> */
356 return -EINVAL; in cmd_w1_search()
373 "Reset 1-Wire bus.\n"
377 "Read 1-Wire bit.\n"
381 "Read 1-Wire byte.\n"
385 "Read 1-Wire block.\n"
387 cmd_w1_read_block, 3, 0),
389 "Write 1-Wire bit.\n"
391 cmd_w1_write_bit, 3, 0),
393 "Write 1-Wire byte.\n"
394 "Usage: <device> [-r] <byte>\n"
396 cmd_w1_write_byte, 3, 1),
398 "Write 1-Wire block.\n"
399 "Usage: <device> [-r] <byte1> [<byte2>, ...]\n"
401 cmd_w1_write_block, 3, BUF_SIZE),
403 "Configure 1-Wire host.\n"
408 "1-Wire devices.\n"
414 SHELL_CMD_ARG_REGISTER(w1, &sub_w1, "1-Wire commands", NULL, 2, 0);