Lines Matching +full:block +full:- +full:count
4 * SPDX-License-Identifier: Apache-2.0
51 sys_slist_prepend(&peripherals, &peripheral->node); in emul_register_smbus_peripheral()
59 if (peripheral->addr == addr) { in emul_get_smbus_peripheral()
72 if (peripheral->smbalert && !peripheral->smbalert_handled) { in peripheral_handle_smbalert()
82 LOG_DBG("Return own address: 0x%02x", found->addr); in peripheral_handle_smbalert()
84 io_area[PCH_SMBUS_HD0] = found->addr; in peripheral_handle_smbalert()
85 found->smbalert_handled = true; in peripheral_handle_smbalert()
95 if (peripheral->host_notify) { in peripheral_handle_host_notify()
97 io_area[PCH_SMBUS_NDA] = peripheral->addr << 1; in peripheral_handle_host_notify()
113 peripheral->raw_data[reg] = value; in peripheral_write()
127 *value = peripheral->raw_data[reg]; in peripheral_read()
226 uint8_t count = io_area[PCH_SMBUS_HD0]; in emul_start_smbus_protocol() local
229 LOG_DBG("Block Write command"); in emul_start_smbus_protocol()
231 if (count > SMBUS_BLOCK_BYTES_MAX) { in emul_start_smbus_protocol()
235 for (int i = 0; i < count; i++) { in emul_start_smbus_protocol()
240 * count is set by peripheral device, just in emul_start_smbus_protocol()
241 * assume it to be maximum block count in emul_start_smbus_protocol()
243 uint8_t count = SMBUS_BLOCK_BYTES_MAX; in emul_start_smbus_protocol() local
246 LOG_DBG("Block Read command"); in emul_start_smbus_protocol()
248 for (int i = 0; i < count; i++) { in emul_start_smbus_protocol()
252 /* Set count */ in emul_start_smbus_protocol()
253 io_area[PCH_SMBUS_HD0] = count; in emul_start_smbus_protocol()
264 LOG_DBG("Block Process Call command"); in emul_start_smbus_protocol()
271 * Make Block Process Call swap block buffer bytes in emul_start_smbus_protocol()
272 * for testing purposes only, return the same "count" in emul_start_smbus_protocol()
285 peripheral_read(--reg, &e32.buf[i]); in emul_start_smbus_protocol()
288 /* Clear offset count */ in emul_start_smbus_protocol()
291 /* Set count */ in emul_start_smbus_protocol()
409 LOG_DBG("Enabled 32 bit buffer block mode"); in emul_out8()
438 /* Clear e32 block buffer offset */ in emul_in8()