Lines Matching +full:block +full:- +full:count

5  * SPDX-License-Identifier: Apache-2.0
42 * https://manpages.debian.org/buster/i2c-tools/i2cdetect.8.en.html
54 return -ENODEV; in cmd_smbus_scan()
71 shell_fprintf(sh, SHELL_NORMAL, "-- "); in cmd_smbus_scan()
93 return -ENODEV; in cmd_smbus_quick()
117 return -ENODEV; in cmd_smbus_byte_read()
126 return -EIO; in cmd_smbus_byte_read()
146 return -ENODEV; in cmd_smbus_byte_write()
157 return -EIO; in cmd_smbus_byte_write()
175 return -ENODEV; in cmd_smbus_byte_data_read()
185 return -EIO; in cmd_smbus_byte_data_read()
205 return -ENODEV; in cmd_smbus_byte_data_write()
216 return -EIO; in cmd_smbus_byte_data_write()
234 return -ENODEV; in cmd_smbus_word_data_read()
244 return -EIO; in cmd_smbus_word_data_read()
264 return -ENODEV; in cmd_smbus_word_data_write()
275 return -EIO; in cmd_smbus_word_data_write()
287 uint8_t count = argc - 4; in cmd_smbus_block_write() local
289 uint8_t buf[32]; /* max block count */ in cmd_smbus_block_write()
292 if (count == 0 || count > sizeof(buf)) { in cmd_smbus_block_write()
293 return -EINVAL; in cmd_smbus_block_write()
299 return -ENODEV; in cmd_smbus_block_write()
305 for (int i = 0; i < count; i++) { in cmd_smbus_block_write()
309 LOG_HEXDUMP_DBG(buf, count, "Constructed block buffer"); in cmd_smbus_block_write()
311 ret = smbus_block_write(dev, addr, command, count, buf); in cmd_smbus_block_write()
313 shell_error(sh, "Failed block write to periph: 0x%02x", in cmd_smbus_block_write()
327 uint8_t buf[32]; /* max block count */ in cmd_smbus_block_read()
328 uint8_t count; in cmd_smbus_block_read() local
334 return -ENODEV; in cmd_smbus_block_read()
340 ret = smbus_block_read(dev, addr, command, &count, buf); in cmd_smbus_block_read()
342 shell_error(sh, "Failed block read from periph: 0x%02x", in cmd_smbus_block_read()
347 if (count == 0 || count > sizeof(buf)) { in cmd_smbus_block_read()
348 shell_error(sh, "Returned count %u", count); in cmd_smbus_block_read()
349 return -ENODATA; in cmd_smbus_block_read()
352 shell_hexdump(sh, buf, count); in cmd_smbus_block_read()
362 entry->syntax = (dev != NULL) ? dev->name : NULL; in device_name_get()
363 entry->handler = NULL; in device_name_get()
364 entry->help = NULL; in device_name_get()
365 entry->subcmd = NULL; in device_name_get()
404 "SMBus: Block Write command\n"
408 "SMBus: Block Read command\n"