/Zephyr-Core-3.7.0/drivers/i2c/ |
D | i2c_handlers.c | 31 uint8_t num_msgs, in copy_msgs_and_transfer() argument 34 struct i2c_msg copy[num_msgs]; in copy_msgs_and_transfer() 38 memcpy(copy, msgs, num_msgs * sizeof(*msgs)); in copy_msgs_and_transfer() 43 for (i = 0U; i < num_msgs; i++) { in copy_msgs_and_transfer() 48 return z_impl_i2c_transfer(dev, copy, num_msgs, addr); in copy_msgs_and_transfer() 52 struct i2c_msg *msgs, uint8_t num_msgs, in z_vrfy_i2c_transfer() argument 62 K_OOPS(K_SYSCALL_VERIFY(num_msgs >= 1 && num_msgs < 32)); in z_vrfy_i2c_transfer() 65 K_OOPS(K_SYSCALL_MEMORY_ARRAY_READ(msgs, num_msgs, in z_vrfy_i2c_transfer() 70 (uint8_t)num_msgs, (uint16_t)addr); in z_vrfy_i2c_transfer()
|
D | i2c_smartbond.c | 34 uint8_t num_msgs; member 236 static inline int i2c_smartbond_set_msg_flags(struct i2c_msg *msgs, uint8_t num_msgs) in i2c_smartbond_set_msg_flags() argument 241 for (uint8_t i = 1; i <= num_msgs; i++) { in i2c_smartbond_set_msg_flags() 242 if (i < num_msgs) { in i2c_smartbond_set_msg_flags() 260 uint8_t num_msgs, uint16_t addr) in i2c_smartbond_prep_transfer() argument 266 ret = i2c_smartbond_set_msg_flags(msgs, num_msgs); in i2c_smartbond_prep_transfer() 274 data->num_msgs = num_msgs; in i2c_smartbond_prep_transfer() 344 static int i2c_smartbond_transfer(const struct device *dev, struct i2c_msg *msgs, uint8_t num_msgs, in i2c_smartbond_transfer() argument 354 ret = i2c_smartbond_prep_transfer(dev, msgs, num_msgs, addr); in i2c_smartbond_transfer() 359 for (; data->num_msgs > 0; data->num_msgs--, data->msgs++) { in i2c_smartbond_transfer() [all …]
|
D | i2c_mcux.c | 45 uint32_t num_msgs; member 114 } else if (data->msg == data->num_msgs - 1) { in i2c_mcux_master_transfer_callback() 145 uint8_t num_msgs, uint16_t addr) in i2c_mcux_transfer() argument 156 for (int i = 0; i < num_msgs; i++) { in i2c_mcux_transfer() 223 data->num_msgs = 0; in i2c_mcux_async_done() 276 static int i2c_mcux_transfer_cb(const struct device *dev, struct i2c_msg *msgs, uint8_t num_msgs, in i2c_mcux_transfer_cb() argument 289 data->num_msgs = num_msgs; in i2c_mcux_transfer_cb()
|
D | i2c_rtio.c | 22 uint8_t num_msgs) in i2c_rtio_copy() argument 24 __ASSERT(num_msgs > 0, "Expecting at least one message to copy"); in i2c_rtio_copy() 28 for (uint8_t i = 0; i < num_msgs; i++) { in i2c_rtio_copy() 124 int i2c_rtio_transfer(struct i2c_rtio *ctx, struct i2c_msg *msgs, uint8_t num_msgs, uint16_t addr) in i2c_rtio_transfer() argument 136 sqe = i2c_rtio_copy(r, iodev, msgs, num_msgs); in i2c_rtio_transfer()
|
D | i2c_gecko.c | 83 static int i2c_gecko_transfer(const struct device *dev, struct i2c_msg *msgs, uint8_t num_msgs, in i2c_gecko_transfer() argument 92 if (!num_msgs) { in i2c_gecko_transfer() 106 if (num_msgs > 1) { in i2c_gecko_transfer() 109 num_msgs--; in i2c_gecko_transfer() 136 num_msgs--; in i2c_gecko_transfer() 137 } while (num_msgs); in i2c_gecko_transfer()
|
D | i2c_emul.c | 77 static int i2c_emul_transfer(const struct device *dev, struct i2c_msg *msgs, uint8_t num_msgs, in i2c_emul_transfer() argument 94 ret = emul->mock_api->transfer(emul->target, msgs, num_msgs, addr); in i2c_emul_transfer() 100 return api->transfer(emul->target, msgs, num_msgs, addr); in i2c_emul_transfer()
|
/Zephyr-Core-3.7.0/drivers/i3c/ |
D | i3c_handlers.c | 42 uint8_t num_msgs) in copy_i3c_msgs_and_transfer() argument 44 struct i3c_msg copy[num_msgs]; in copy_i3c_msgs_and_transfer() 48 memcpy(copy, msgs, num_msgs * sizeof(*msgs)); in copy_i3c_msgs_and_transfer() 53 for (i = 0U; i < num_msgs; i++) { in copy_i3c_msgs_and_transfer() 58 return z_impl_i3c_transfer(target, copy, num_msgs); in copy_i3c_msgs_and_transfer() 62 struct i3c_msg *msgs, uint8_t num_msgs) in z_vrfy_i3c_transfer() argument 72 K_OOPS(K_SYSCALL_VERIFY(num_msgs >= 1 && num_msgs < 32)); in z_vrfy_i3c_transfer() 75 K_OOPS(K_SYSCALL_MEMORY_ARRAY_READ(msgs, num_msgs, in z_vrfy_i3c_transfer() 80 (uint8_t)num_msgs); in z_vrfy_i3c_transfer()
|
/Zephyr-Core-3.7.0/drivers/sensor/bosch/bmi160/ |
D | emul_bmi160.h | 26 __maybe_unused static bool emul_bmi160_i2c_is_touching_reg(struct i2c_msg *msgs, int num_msgs, in emul_bmi160_i2c_is_touching_reg() argument 29 if (num_msgs != 2) { in emul_bmi160_i2c_is_touching_reg() 54 __maybe_unused static bool emul_bmi160_i2c_is_reading_reg(struct i2c_msg *msgs, int num_msgs, in emul_bmi160_i2c_is_reading_reg() argument 57 if (!emul_bmi160_i2c_is_touching_reg(msgs, num_msgs, reg)) { in emul_bmi160_i2c_is_reading_reg() 72 __maybe_unused static bool emul_bmi160_i2c_is_writing_reg(struct i2c_msg *msgs, int num_msgs, in emul_bmi160_i2c_is_writing_reg() argument 75 if (!emul_bmi160_i2c_is_touching_reg(msgs, num_msgs, reg)) { in emul_bmi160_i2c_is_writing_reg()
|
/Zephyr-Core-3.7.0/include/zephyr/drivers/ |
D | i2c.h | 218 uint8_t num_msgs, 227 uint8_t num_msgs, 511 void i2c_dump_msgs_rw(const struct device *dev, const struct i2c_msg *msgs, uint8_t num_msgs, 529 uint8_t num_msgs, uint16_t addr) in i2c_dump_msgs() argument 531 i2c_dump_msgs_rw(dev, msgs, num_msgs, addr, false); in i2c_dump_msgs() 573 uint8_t num_msgs) in i2c_xfer_stats() argument 581 STATS_INCN(state->stats, message_count, num_msgs); in i2c_xfer_stats() 582 for (uint8_t i = 0U; i < num_msgs; i++) { in i2c_xfer_stats() 666 uint8_t num_msgs) in i2c_xfer_stats() argument 670 ARG_UNUSED(num_msgs); in i2c_xfer_stats() [all …]
|
/Zephyr-Core-3.7.0/drivers/fuel_gauge/max17048/ |
D | emul_max17048.c | 69 int num_msgs, int addr) in max17048_emul_transfer_i2c() argument 76 __ASSERT_NO_MSG(msgs && num_msgs); in max17048_emul_transfer_i2c() 78 i2c_dump_msgs_rw(target->dev, msgs, num_msgs, addr, false); in max17048_emul_transfer_i2c() 79 switch (num_msgs) { in max17048_emul_transfer_i2c() 120 LOG_ERR("Invalid number of messages: %d", num_msgs); in max17048_emul_transfer_i2c()
|
/Zephyr-Core-3.7.0/tests/drivers/sensor/ina230/src/ |
D | ina230_emul.c | 77 static int ina230_emul_transfer_i2c(const struct emul *target, struct i2c_msg msgs[], int num_msgs, in ina230_emul_transfer_i2c() argument 83 if (!msgs || num_msgs < 1 || num_msgs > 2) { in ina230_emul_transfer_i2c() 84 LOG_ERR("Invalid number of messages: %d", num_msgs); in ina230_emul_transfer_i2c() 93 if (num_msgs == 1) { in ina230_emul_transfer_i2c()
|
/Zephyr-Core-3.7.0/drivers/charger/ |
D | emul_sbs_charger.c | 70 int num_msgs, int addr) in sbs_charger_emul_transfer_i2c() argument 80 i2c_dump_msgs_rw(target->dev, msgs, num_msgs, addr, false); in sbs_charger_emul_transfer_i2c() 81 switch (num_msgs) { in sbs_charger_emul_transfer_i2c() 122 LOG_ERR("Invalid number of messages: %d", num_msgs); in sbs_charger_emul_transfer_i2c()
|
/Zephyr-Core-3.7.0/drivers/sensor/amd_sb_tsi/ |
D | sb_tsi_emul.c | 48 int num_msgs, int addr) in sb_tsi_emul_transfer_i2c() argument 54 __ASSERT_NO_MSG(msgs && num_msgs); in sb_tsi_emul_transfer_i2c() 56 i2c_dump_msgs_rw(target->dev, msgs, num_msgs, addr, false); in sb_tsi_emul_transfer_i2c() 57 switch (num_msgs) { in sb_tsi_emul_transfer_i2c() 89 LOG_ERR("Invalid number of messages: %d", num_msgs); in sb_tsi_emul_transfer_i2c()
|
/Zephyr-Core-3.7.0/tests/drivers/sensor/ina237/src/ |
D | ina237_emul.c | 71 static int ina237_emul_transfer_i2c(const struct emul *target, struct i2c_msg msgs[], int num_msgs, in ina237_emul_transfer_i2c() argument 77 if (!msgs || num_msgs < 1 || num_msgs > 2) { in ina237_emul_transfer_i2c() 78 LOG_ERR("Invalid number of messages: %d", num_msgs); in ina237_emul_transfer_i2c() 87 if (num_msgs == 1) { in ina237_emul_transfer_i2c()
|
/Zephyr-Core-3.7.0/drivers/sensor/f75303/ |
D | f75303_emul.c | 52 int num_msgs, int addr) in f75303_emul_transfer_i2c() argument 58 __ASSERT_NO_MSG(msgs && num_msgs); in f75303_emul_transfer_i2c() 60 i2c_dump_msgs_rw(target->dev, msgs, num_msgs, addr, false); in f75303_emul_transfer_i2c() 61 switch (num_msgs) { in f75303_emul_transfer_i2c() 93 LOG_ERR("Invalid number of messages: %d", num_msgs); in f75303_emul_transfer_i2c()
|
/Zephyr-Core-3.7.0/drivers/sensor/adi/adltc2990/ |
D | adltc2990_emul.c | 74 int num_msgs, int addr) in adltc2990_emul_transfer_i2c() argument 78 i2c_dump_msgs_rw(target->dev, msgs, num_msgs, addr, false); in adltc2990_emul_transfer_i2c() 80 if (num_msgs < 1) { in adltc2990_emul_transfer_i2c() 81 LOG_ERR("Invalid number of messages: %d", num_msgs); in adltc2990_emul_transfer_i2c()
|
/Zephyr-Core-3.7.0/tests/drivers/sensor/bmi160/include/ |
D | checks.h | 15 static inline bool bmi160_i2c_is_touching_reg(struct i2c_msg *msgs, int num_msgs, int reg) in bmi160_i2c_is_touching_reg() argument 17 __ASSERT_NO_MSG(num_msgs == 2); in bmi160_i2c_is_touching_reg()
|
/Zephyr-Core-3.7.0/tests/drivers/i2c/i2c_target_api/common/ |
D | i2c_virtual.c | 150 uint8_t num_msgs, uint16_t target) in i2c_virtual_transfer() argument 165 while (num_msgs > 0) { in i2c_virtual_transfer() 166 if (num_msgs > 1) { in i2c_virtual_transfer() 182 if ((num_msgs == 1U) && !(current->flags & I2C_MSG_STOP)) { in i2c_virtual_transfer() 201 num_msgs--; in i2c_virtual_transfer()
|
/Zephyr-Core-3.7.0/drivers/bbram/ |
D | bbram_microchip_mcp7940n_emul.c | 38 static int mcp7940n_emul_transfer_i2c(const struct emul *target, struct i2c_msg *msgs, int num_msgs, in mcp7940n_emul_transfer_i2c() argument 43 i2c_dump_msgs_rw(target->dev, msgs, num_msgs, addr, false); in mcp7940n_emul_transfer_i2c() 45 if (num_msgs < 1) { in mcp7940n_emul_transfer_i2c() 46 LOG_ERR("Invalid number of messages: %d", num_msgs); in mcp7940n_emul_transfer_i2c()
|
/Zephyr-Core-3.7.0/tests/drivers/sensor/bmi160/src/ |
D | i2c.c | 19 static int mock_i2c_transfer(const struct emul *target, struct i2c_msg *msgs, int num_msgs, in mock_i2c_transfer() argument 25 bmi160_i2c_is_touching_reg(msgs, num_msgs, mock_i2c_transfer_fail_reg_number)) { in mock_i2c_transfer()
|
/Zephyr-Core-3.7.0/drivers/fuel_gauge/bq27z746/ |
D | emul_bq27z746.c | 274 static int bq27z746_emul_transfer_i2c(const struct emul *target, struct i2c_msg *msgs, int num_msgs, in bq27z746_emul_transfer_i2c() argument 280 __ASSERT_NO_MSG(msgs && num_msgs); in bq27z746_emul_transfer_i2c() 282 i2c_dump_msgs_rw(target->dev, msgs, num_msgs, addr, false); in bq27z746_emul_transfer_i2c() 283 switch (num_msgs) { in bq27z746_emul_transfer_i2c() 315 LOG_ERR("Invalid number of messages: %d", num_msgs); in bq27z746_emul_transfer_i2c()
|
/Zephyr-Core-3.7.0/include/zephyr/drivers/i2c/ |
D | rtio.h | 52 uint8_t num_msgs); 99 int i2c_rtio_transfer(struct i2c_rtio *ctx, struct i2c_msg *msgs, uint8_t num_msgs, uint16_t addr);
|
/Zephyr-Core-3.7.0/tests/subsys/emul/src/ |
D | emul_tester.c | 44 static int emul_tester_transfer(const struct emul *target, struct i2c_msg *msgs, int num_msgs, in emul_tester_transfer() argument 49 ARG_UNUSED(num_msgs); in emul_tester_transfer()
|
/Zephyr-Core-3.7.0/drivers/eeprom/ |
D | eeprom_at2x_emul.c | 56 int num_msgs, int addr) in at24_emul_transfer() argument 84 i2c_dump_msgs_rw(target->dev, msgs, num_msgs, addr, false); in at24_emul_transfer() 85 switch (num_msgs) { in at24_emul_transfer()
|
/Zephyr-Core-3.7.0/drivers/sensor/asahi_kasei/akm09918c/ |
D | akm09918c_emul.c | 75 int num_msgs, int addr) in akm09918c_emul_transfer_i2c() argument 79 i2c_dump_msgs_rw(target->dev, msgs, num_msgs, addr, false); in akm09918c_emul_transfer_i2c() 81 if (num_msgs < 1) { in akm09918c_emul_transfer_i2c() 82 LOG_ERR("Invalid number of messages: %d", num_msgs); in akm09918c_emul_transfer_i2c()
|