/Zephyr-Core-2.7.6/tests/boards/intel_s1000_crb/main/src/ |
D | i2c_test.c | 57 void test_i2c_write_led(const struct device *i2c_dev, uint16_t i2c_slave_led, in test_i2c_write_led() argument 111 ret = i2c_reg_write_byte(i2c_dev, i2c_slave_led, 0x40, 0xFF); in test_i2c_write_led() 112 ret |= i2c_reg_write_byte(i2c_dev, i2c_slave_led, LED0, led_val[0]); in test_i2c_write_led() 113 ret |= i2c_reg_write_byte(i2c_dev, i2c_slave_led, LED1, led_val[1]); in test_i2c_write_led() 114 ret |= i2c_reg_write_byte(i2c_dev, i2c_slave_led, LED2, led_val[2]); in test_i2c_write_led() 115 ret |= i2c_reg_write_byte(i2c_dev, i2c_slave_led, LED3, led_val[3]); in test_i2c_write_led() 116 ret |= i2c_reg_write_byte(i2c_dev, i2c_slave_led, LED4, led_val[4]); in test_i2c_write_led() 117 ret |= i2c_reg_write_byte(i2c_dev, i2c_slave_led, LED5, led_val[5]); in test_i2c_write_led() 124 void test_i2c_read_led(const struct device *i2c_dev, uint16_t i2c_slave_led) in test_i2c_read_led() argument 129 ret = i2c_reg_read_byte(i2c_dev, i2c_slave_led, LED0, &data); in test_i2c_read_led() [all …]
|
/Zephyr-Core-2.7.6/tests/boards/altera_max10/i2c_master/src/ |
D | i2c_master.c | 31 static int powerup_adv7513(const struct device *i2c_dev) in powerup_adv7513() argument 37 if (i2c_reg_write_byte(i2c_dev, ADV7513_HDMI_I2C_SLAVE_ADDR, in powerup_adv7513() 42 if (i2c_reg_read_byte(i2c_dev, ADV7513_HDMI_I2C_SLAVE_ADDR, in powerup_adv7513() 50 if (i2c_reg_write_byte(i2c_dev, ADV7513_HDMI_I2C_SLAVE_ADDR, in powerup_adv7513() 56 if (i2c_reg_read_byte(i2c_dev, ADV7513_HDMI_I2C_SLAVE_ADDR, in powerup_adv7513() 68 const struct device *i2c_dev = in test_i2c_adv7513() local 73 if (!i2c_dev) { in test_i2c_adv7513() 79 if (i2c_configure(i2c_dev, i2c_cfg)) { in test_i2c_adv7513() 85 zassert_true(powerup_adv7513(i2c_dev) == TC_PASS, in test_i2c_adv7513() 91 if (i2c_reg_read_byte(i2c_dev, ADV7513_HDMI_I2C_SLAVE_ADDR, in test_i2c_adv7513() [all …]
|
/Zephyr-Core-2.7.6/tests/drivers/i2c/i2c_api/src/ |
D | test_i2c.c | 34 const struct device *i2c_dev = device_get_binding(I2C_DEV_NAME); in test_gy271() local 36 if (!i2c_dev) { in test_gy271() 42 if (i2c_configure(i2c_dev, i2c_cfg)) { in test_gy271() 51 if (i2c_write(i2c_dev, datas, 2, 0x1E)) { in test_gy271() 58 if (i2c_write(i2c_dev, datas, 2, 0x1E)) { in test_gy271() 66 if (i2c_write(i2c_dev, datas, 1, 0x1E)) { in test_gy271() 74 if (i2c_read(i2c_dev, datas, 6, 0x1E)) { in test_gy271() 89 const struct device *i2c_dev = device_get_binding(I2C_DEV_NAME); in test_burst_gy271() local 91 if (!i2c_dev) { in test_burst_gy271() 97 if (i2c_configure(i2c_dev, i2c_cfg)) { in test_burst_gy271() [all …]
|
/Zephyr-Core-2.7.6/samples/drivers/i2c_fujitsu_fram/src/ |
D | main.c | 19 static int write_bytes(const struct device *i2c_dev, uint16_t addr, in write_bytes() argument 41 return i2c_transfer(i2c_dev, &msgs[0], 2, FRAM_I2C_ADDR); in write_bytes() 44 static int read_bytes(const struct device *i2c_dev, uint16_t addr, in read_bytes() argument 68 return i2c_transfer(i2c_dev, &msgs[0], 2, FRAM_I2C_ADDR); in read_bytes() 73 const struct device *i2c_dev = DEVICE_DT_GET(DT_NODELABEL(i2c0)); in main() local 78 if (!device_is_ready(i2c_dev)) { in main() 86 ret = write_bytes(i2c_dev, 0x00, &data[0], 1); in main() 95 ret = write_bytes(i2c_dev, 0x01, &data[0], 1); in main() 104 ret = read_bytes(i2c_dev, 0x00, &data[0], 1); in main() 113 ret = read_bytes(i2c_dev, 0x01, &data[0], 1); in main() [all …]
|
/Zephyr-Core-2.7.6/drivers/sensor/si7006/ |
D | si7006.c | 26 const struct device *i2c_dev; member 36 static int si7006_get_humidity(const struct device *i2c_dev, in si7006_get_humidity() argument 42 retval = i2c_burst_read(i2c_dev, DT_INST_REG_ADDR(0), in si7006_get_humidity() 63 static int si7006_get_old_temperature(const struct device *i2c_dev, in si7006_get_old_temperature() argument 69 retval = i2c_burst_read(i2c_dev, DT_INST_REG_ADDR(0), in si7006_get_old_temperature() 92 retval = si7006_get_humidity(si_data->i2c_dev, si_data); in si7006_sample_fetch() 94 retval = si7006_get_old_temperature(si_data->i2c_dev, si_data); in si7006_sample_fetch() 153 drv_data->i2c_dev = device_get_binding( in si7006_init() 156 if (!drv_data->i2c_dev) { in si7006_init()
|
/Zephyr-Core-2.7.6/tests/boards/mec15xxevb_assy6853/i2c_api/src/ |
D | main.c | 34 const struct device *i2c_dev = device_get_binding(I2C_DEV_NAME); in test_i2c_pca95xx() local 36 zassert_true(i2c_dev, "Cannot get i2c device"); in test_i2c_pca95xx() 39 ret = i2c_configure(i2c_dev, i2c_cfg); in test_i2c_pca95xx() 47 ret = i2c_write(i2c_dev, datas, 3, 0x26); in test_i2c_pca95xx() 53 ret = i2c_write(i2c_dev, datas, 1, 0x26); in test_i2c_pca95xx() 57 ret = i2c_read(i2c_dev, datas, 2, 0x26); in test_i2c_pca95xx()
|
/Zephyr-Core-2.7.6/drivers/i2c/ |
D | i2c_nios2.c | 26 ALT_AVALON_I2C_DEV_t i2c_dev; member 55 alt_avalon_i2c_init(&config->i2c_dev); in i2c_nios2_configure() 73 &config->i2c_dev, &config->irq_data); in i2c_nios2_transfer() 93 alt_avalon_i2c_master_target_set(&config->i2c_dev, addr); in i2c_nios2_transfer() 98 &config->i2c_dev, in i2c_nios2_transfer() 103 (&config->i2c_dev, in i2c_nios2_transfer() 121 &config->i2c_dev); in i2c_nios2_transfer() 139 alt_avalon_i2c_disable(&config->i2c_dev); in i2c_nios2_transfer() 149 alt_handle_irq(&config->i2c_dev, DT_INST_IRQN(0)); in i2c_nios2_isr() 160 .i2c_dev = { [all …]
|
D | i2c_npcx_controller.h | 21 void npcx_i2c_ctrl_mutex_lock(const struct device *i2c_dev); 28 void npcx_i2c_ctrl_mutex_unlock(const struct device *i2c_dev); 41 int npcx_i2c_ctrl_configure(const struct device *i2c_dev, uint32_t dev_config); 58 int npcx_i2c_ctrl_transfer(const struct device *i2c_dev, struct i2c_msg *msgs,
|
D | i2c_npcx_controller.c | 748 void npcx_i2c_ctrl_mutex_lock(const struct device *i2c_dev) in npcx_i2c_ctrl_mutex_lock() argument 750 struct i2c_ctrl_data *const data = DRV_DATA(i2c_dev); in npcx_i2c_ctrl_mutex_lock() 755 void npcx_i2c_ctrl_mutex_unlock(const struct device *i2c_dev) in npcx_i2c_ctrl_mutex_unlock() argument 757 struct i2c_ctrl_data *const data = DRV_DATA(i2c_dev); in npcx_i2c_ctrl_mutex_unlock() 762 int npcx_i2c_ctrl_configure(const struct device *i2c_dev, uint32_t dev_config) in npcx_i2c_ctrl_configure() argument 764 struct i2c_ctrl_data *const data = DRV_DATA(i2c_dev); in npcx_i2c_ctrl_configure() 780 i2c_ctrl_config_bus_freq(i2c_dev, data->bus_freq); in npcx_i2c_ctrl_configure() 784 int npcx_i2c_ctrl_transfer(const struct device *i2c_dev, struct i2c_msg *msgs, in npcx_i2c_ctrl_transfer() argument 787 struct i2c_ctrl_data *const data = DRV_DATA(i2c_dev); in npcx_i2c_ctrl_transfer() 794 if (i2c_ctrl_bus_busy(i2c_dev) || in npcx_i2c_ctrl_transfer() [all …]
|
/Zephyr-Core-2.7.6/drivers/led/ |
D | tlc59108.c | 53 const struct device *i2c_dev; member 67 if (i2c_reg_update_byte(config->i2c_dev, config->i2c_addr, in tlc59108_set_ledout() 75 if (i2c_reg_update_byte(config->i2c_dev, config->i2c_addr, in tlc59108_set_ledout() 113 if (i2c_reg_write_byte(config->i2c_dev, config->i2c_addr, in tlc59108_led_blink() 127 if (i2c_reg_write_byte(config->i2c_dev, config->i2c_addr, in tlc59108_led_blink() 135 if (i2c_reg_update_byte(config->i2c_dev, config->i2c_addr, in tlc59108_led_blink() 166 if (i2c_reg_write_byte(config->i2c_dev, config->i2c_addr, in tlc59108_led_set_brightness() 203 if (!device_is_ready(config->i2c_dev)) { in tlc59108_led_init() 204 LOG_ERR("I2C bus device %s is not ready", config->i2c_dev->name); in tlc59108_led_init() 209 if (i2c_reg_update_byte(config->i2c_dev, config->i2c_addr, in tlc59108_led_init() [all …]
|
D | ht16k33.c | 65 const struct device *i2c_dev; member 121 if (i2c_write(config->i2c_dev, &cmd, sizeof(cmd), config->i2c_addr)) { in ht16k33_led_blink() 148 if (i2c_write(config->i2c_dev, &cmd, sizeof(cmd), config->i2c_addr)) { in ht16k33_led_set_brightness() 183 if (i2c_write(config->i2c_dev, cmd, sizeof(cmd), config->i2c_addr)) { in ht16k33_led_set_state() 216 err = i2c_burst_read(config->i2c_dev, config->i2c_addr, in ht16k33_process_keyscan_data() 313 if (!device_is_ready(config->i2c_dev)) { in ht16k33_init() 328 err = i2c_write(config->i2c_dev, cmd, 1, config->i2c_addr); in ht16k33_init() 338 err = i2c_write(config->i2c_dev, cmd, sizeof(cmd), config->i2c_addr); in ht16k33_init() 346 err = i2c_write(config->i2c_dev, cmd, 1, config->i2c_addr); in ht16k33_init() 354 err = i2c_write(config->i2c_dev, cmd, 1, config->i2c_addr); in ht16k33_init() [all …]
|
/Zephyr-Core-2.7.6/samples/drivers/i2s/echo/src/ |
D | codec.c | 19 const struct device *i2c_dev = DEVICE_DT_GET(WM8731_I2C_NODE); in init_wm8731_i2c() local 105 if (!device_is_ready(i2c_dev)) { in init_wm8731_i2c() 106 printk("%s is not ready\n", i2c_dev->name); in init_wm8731_i2c() 114 ret = i2c_reg_write_byte(i2c_dev, WM8731_I2C_ADDR, in init_wm8731_i2c()
|
/Zephyr-Core-2.7.6/drivers/sensor/si7055/ |
D | si7055.c | 23 const struct device *i2c_dev; member 33 static int si7055_get_temperature(const struct device *i2c_dev, in si7055_get_temperature() argument 43 retval = i2c_burst_read(i2c_dev, DT_INST_REG_ADDR(0), in si7055_get_temperature() 80 retval = si7055_get_temperature(si_data->i2c_dev, si_data); in si7055_sample_fetch() 135 drv_data->i2c_dev = device_get_binding( in si7055_init() 138 if (!drv_data->i2c_dev) { in si7055_init()
|
/Zephyr-Core-2.7.6/drivers/sensor/ens210/ |
D | ens210.c | 43 static int ens210_measure(const struct device *i2c_dev, in ens210_measure() argument 56 ret = i2c_reg_write_byte(i2c_dev, in ens210_measure() 69 ret = i2c_reg_read_byte(i2c_dev, in ens210_measure() 193 static int ens210_sys_reset(const struct device *i2c_dev) in ens210_sys_reset() argument 201 ret = i2c_reg_write_byte(i2c_dev, DT_INST_REG_ADDR(0), in ens210_sys_reset() 209 static int ens210_sys_enable(const struct device *i2c_dev, uint8_t low_power) in ens210_sys_enable() argument 217 ret = i2c_reg_write_byte(i2c_dev, DT_INST_REG_ADDR(0), in ens210_sys_enable() 225 static int ens210_wait_boot(const struct device *i2c_dev) in ens210_wait_boot() argument 232 ret = i2c_reg_read_byte(i2c_dev, DT_INST_REG_ADDR(0), in ens210_wait_boot() 246 ens210_sys_reset(i2c_dev); in ens210_wait_boot() [all …]
|
/Zephyr-Core-2.7.6/drivers/dac/ |
D | dac_mcp4725.c | 36 const struct device *i2c_dev; member 106 ret = i2c_write(config->i2c_dev, tx_data, sizeof(tx_data), in mcp4725_write_value() 116 if (!device_is_ready(config->i2c_dev)) { in dac_mcp4725_init() 122 if (mcp4725_wait_until_ready(config->i2c_dev, config->i2c_addr)) { in dac_mcp4725_init() 137 .i2c_dev = DEVICE_DT_GET(DT_INST_BUS(index)), \
|
/Zephyr-Core-2.7.6/drivers/sensor/si7060/ |
D | si7060.c | 21 const struct device *i2c_dev; member 28 if (i2c_reg_read_byte(drv_data->i2c_dev, in si7060_reg_read() 39 return i2c_reg_write_byte(drv_data->i2c_dev, in si7060_reg_write() 104 drv_data->i2c_dev = device_get_binding( in si7060_chip_init() 107 if (!drv_data->i2c_dev) { in si7060_chip_init()
|
/Zephyr-Core-2.7.6/samples/boards/bbc_microbit/line_follower_robot/src/ |
D | main.c | 19 const struct device *i2c_dev; variable 60 i2c_write(i2c_dev, buf, 3, 0x10); in motor_left_control() 77 i2c_write(i2c_dev, buf, 3, 0x10); in motor_right_control() 119 i2c_dev = device_get_binding(I2C0_LABEL); in main()
|
/Zephyr-Core-2.7.6/drivers/sensor/lm75/ |
D | lm75.c | 28 const struct device *i2c_dev; member 35 return i2c_burst_read(cfg->i2c_dev, cfg->i2c_addr, reg, buf, size); in lm75_reg_read() 101 if (device_is_ready(cfg->i2c_dev)) { in lm75_init() 112 .i2c_dev = DEVICE_DT_GET(DT_INST_BUS(inst)), \
|
/Zephyr-Core-2.7.6/drivers/gpio/ |
D | gpio_pca953x.c | 67 const struct device *i2c_dev; member 89 rc = i2c_reg_read_byte(cfg->i2c_dev, cfg->i2c_addr, in update_input() 246 rc = i2c_reg_write_byte(cfg->i2c_dev, cfg->i2c_addr, in gpio_pca953x_config() 252 rc = i2c_reg_write_byte(cfg->i2c_dev, cfg->i2c_addr, in gpio_pca953x_config() 282 rc = i2c_reg_read_byte(cfg->i2c_dev, cfg->i2c_addr, in gpio_pca953x_port_read() 318 rc = i2c_reg_write_byte(cfg->i2c_dev, cfg->i2c_addr, in gpio_pca953x_port_write() 422 if (!device_is_ready(cfg->i2c_dev)) { in gpio_pca953x_init() 486 .i2c_dev = DEVICE_DT_GET(DT_INST_BUS(n)), \
|
/Zephyr-Core-2.7.6/drivers/sensor/sbs_gauge/ |
D | sbs_gauge.c | 27 status = i2c_burst_read(cfg->i2c_dev, cfg->i2c_addr, reg_addr, in sbs_cmd_reg_read() 267 if (!device_is_ready(cfg->i2c_dev)) { in sbs_gauge_init() 268 LOG_ERR("%s device is not ready", cfg->i2c_dev->name); in sbs_gauge_init() 284 .i2c_dev = DEVICE_DT_GET(DT_INST_BUS(index)), \
|
D | sbs_gauge.h | 76 const struct device *i2c_dev; member
|
/Zephyr-Core-2.7.6/drivers/crypto/ |
D | crypto_ataes132a_priv.h | 255 int ataes132a_init(const struct device *i2c_dev); 314 int ataes132a_aes_ccm_decrypt(const struct device *i2c_dev, 362 int ataes132a_aes_ccm_encrypt(const struct device *i2c_dev, 390 int ataes132a_aes_ecb_block(const struct device *i2c_dev,
|
/Zephyr-Core-2.7.6/drivers/counter/ |
D | rtc_mcp7940n.c | 46 const struct device *i2c_dev; member 196 int rc = i2c_write_read(cfg->i2c_dev, cfg->addr, in read_register() 218 int rc = i2c_write_read(cfg->i2c_dev, cfg->addr, in read_time() 245 rc = i2c_write(cfg->i2c_dev, time_data, sizeof(time_data), cfg->addr); in write_register() 290 rc = i2c_write(cfg->i2c_dev, time_data, size + 1, cfg->addr); in write_data_block() 671 if (!device_is_ready(cfg->i2c_dev)) { in mcp7940n_init() 672 LOG_ERR("I2C device %s is not ready", cfg->i2c_dev->name); in mcp7940n_init() 759 .i2c_dev = DEVICE_DT_GET(DT_INST_BUS(index)), \
|
/Zephyr-Core-2.7.6/tests/lib/devicetree/api/src/ |
D | main.c | 302 const char *i2c_dev = "TEST_I2C_DEV"; in test_bus() local 383 zassert_true(!strncmp(i2c_dev, DT_INST_LABEL(0), strlen(i2c_dev)), ""); in test_bus()
|