Home
last modified time | relevance | path

Searched refs:i2c (Results 1 – 25 of 1317) sorted by relevance

12345678910>>...53

/Zephyr-latest/drivers/i2c/
Di2c_ll_stm32_v1.c34 static void stm32_i2c_generate_start_condition(I2C_TypeDef *i2c) in stm32_i2c_generate_start_condition() argument
36 uint16_t cr1 = LL_I2C_ReadReg(i2c, CR1); in stm32_i2c_generate_start_condition()
40 LL_I2C_WriteReg(i2c, CR1, cr1 & ~I2C_CR1_STOP); in stm32_i2c_generate_start_condition()
43 LL_I2C_GenerateStartCondition(i2c); in stm32_i2c_generate_start_condition()
52 I2C_TypeDef *i2c = cfg->i2c; in stm32_i2c_disable_transfer_interrupts() local
54 LL_I2C_DisableIT_TX(i2c); in stm32_i2c_disable_transfer_interrupts()
55 LL_I2C_DisableIT_RX(i2c); in stm32_i2c_disable_transfer_interrupts()
56 LL_I2C_DisableIT_EVT(i2c); in stm32_i2c_disable_transfer_interrupts()
57 LL_I2C_DisableIT_BUF(i2c); in stm32_i2c_disable_transfer_interrupts()
60 LL_I2C_DisableIT_ERR(i2c); in stm32_i2c_disable_transfer_interrupts()
[all …]
Di2c_max32.c75 mxc_i2c_regs_t *i2c = cfg->regs; in api_configure() local
79 ret = MXC_I2C_SetFrequency(i2c, MXC_I2C_STD_MODE); in api_configure()
83 ret = MXC_I2C_SetFrequency(i2c, MXC_I2C_FAST_SPEED); in api_configure()
88 ret = MXC_I2C_SetFrequency(i2c, MXC_I2C_FASTPLUS_SPEED); in api_configure()
94 ret = MXC_I2C_SetFrequency(i2c, MXC_I2C_HIGH_SPEED); in api_configure()
111 mxc_i2c_regs_t *i2c = config->regs; in api_target_register() local
116 ret = MXC_I2C_Init(i2c, 0, cfg->address); in api_target_register()
120 MXC_I2C_SlaveTransactionAsync(i2c, NULL); in api_target_register()
130 mxc_i2c_regs_t *i2c = config->regs; in api_target_unregister() local
139 return MXC_I2C_Init(i2c, 1, 0); in api_target_unregister()
[all …]
Di2c_ll_stm32_v2.c126 I2C_TypeDef *i2c = cfg->i2c; in msg_init() local
128 if (LL_I2C_IsEnabledReloadMode(i2c)) { in msg_init()
129 LL_I2C_SetTransferSize(i2c, msg->len); in msg_init()
132 LL_I2C_SetMasterAddressingMode(i2c, in msg_init()
134 LL_I2C_SetSlaveAddr(i2c, (uint32_t) slave); in msg_init()
136 LL_I2C_SetMasterAddressingMode(i2c, in msg_init()
138 LL_I2C_SetSlaveAddr(i2c, (uint32_t) slave << 1); in msg_init()
143 LL_I2C_EnableReloadMode(i2c); in msg_init()
145 LL_I2C_DisableReloadMode(i2c); in msg_init()
147 LL_I2C_DisableAutoEndMode(i2c); in msg_init()
[all …]
Di2c_max32_rtio.c72 mxc_i2c_regs_t *i2c = cfg->regs; in max32_do_configure() local
76 ret = MXC_I2C_SetFrequency(i2c, MXC_I2C_STD_MODE); in max32_do_configure()
80 ret = MXC_I2C_SetFrequency(i2c, MXC_I2C_FAST_SPEED); in max32_do_configure()
85 ret = MXC_I2C_SetFrequency(i2c, MXC_I2C_FASTPLUS_SPEED); in max32_do_configure()
91 ret = MXC_I2C_SetFrequency(i2c, MXC_I2C_HIGH_SPEED); in max32_do_configure()
111 mxc_i2c_regs_t *i2c = cfg->regs; in max32_msg_start() local
115 req->i2c = i2c; in max32_msg_start()
119 MXC_I2C_ClearRXFIFO(i2c); in max32_msg_start()
120 MXC_I2C_ClearTXFIFO(i2c); in max32_msg_start()
121 MXC_I2C_SetRXThreshold(i2c, 1); in max32_msg_start()
[all …]
Di2c_sam0.c88 SercomI2cm *i2c = cfg->regs; in i2c_sam0_terminate_on_error() local
90 if (!(i2c->STATUS.reg & (SERCOM_I2CM_STATUS_ARBLOST | in i2c_sam0_terminate_on_error()
112 data->msg.status = i2c->STATUS.reg; in i2c_sam0_terminate_on_error()
118 i2c->STATUS.reg = SERCOM_I2CM_STATUS_ARBLOST | in i2c_sam0_terminate_on_error()
124 wait_synchronization(i2c); in i2c_sam0_terminate_on_error()
126 i2c->INTENCLR.reg = SERCOM_I2CM_INTENCLR_MASK; in i2c_sam0_terminate_on_error()
127 if (i2c->INTFLAG.reg & (SERCOM_I2CM_INTFLAG_MB | SERCOM_I2CM_INTFLAG_SB)) { in i2c_sam0_terminate_on_error()
128 i2c->CTRLB.bit.CMD = 3; in i2c_sam0_terminate_on_error()
138 SercomI2cm *i2c = cfg->regs; in i2c_sam0_isr() local
141 uint32_t status = i2c->INTFLAG.reg; in i2c_sam0_isr()
[all …]
Di2c_ifx_xmc4.c71 XMC_USIC_CH_t *i2c; member
109 XMC_I2C_CH_Stop(config->i2c); in ifx_xmc4_i2c_configure()
113 XMC_I2C_CH_Init(config->i2c, &data->cfg); in ifx_xmc4_i2c_configure()
114 XMC_I2C_CH_SetInputSource(config->i2c, XMC_I2C_CH_INPUT_SCL, config->scl_src); in ifx_xmc4_i2c_configure()
115 XMC_I2C_CH_SetInputSource(config->i2c, XMC_I2C_CH_INPUT_SDA, config->sda_src); in ifx_xmc4_i2c_configure()
117 XMC_USIC_CH_SetFractionalDivider(config->i2c, in ifx_xmc4_i2c_configure()
123 XMC_I2C_CH_Start(config->i2c); in ifx_xmc4_i2c_configure()
194 XMC_I2C_CH_ClearStatusFlag(config->i2c, 0xFFFFFFFF); in ifx_xmc4_i2c_transfer()
202 XMC_I2C_CH_MasterRepeatedStart(config->i2c, addr << 1, cmd_type); in ifx_xmc4_i2c_transfer()
204 XMC_I2C_CH_MasterStart(config->i2c, addr << 1, cmd_type); in ifx_xmc4_i2c_transfer()
[all …]
DKconfig45 "zephyr,i2c-dump-allowlist" and phandles to the devices that need to be traced.
47 i2c-dump-allowlist {
48 compatible = "zephyr,i2c-dump-allowlist";
84 Blocking i2c calls when I2C_RTIO is enabled are copied into a per driver
94 Blocking i2c calls when I2C_RTIO is enabled are copied into a per driver
112 and get an error relating to not enough i2c msgs this is the Kconfig to manipulate.
119 source "drivers/i2c/target/Kconfig"
120 source "drivers/i2c/Kconfig.ambiq"
121 source "drivers/i2c/Kconfig.andes_atciic100"
122 source "drivers/i2c/Kconfig.b91"
[all …]
/Zephyr-latest/samples/modules/tflite-micro/magic_wand/renode/
Dlitex-vexriscv-tflite.resc11 logLevel 3 i2c
17 i2c.adxl345 MaxFifoDepth 1
18 i2c.adxl345 FeedSample $ORIGIN/circle.data
19 i2c.adxl345 FeedSample 0 15000 15000 128
20 i2c.adxl345 FeedSample 0 0 0 128
21 i2c.adxl345 FeedSample $ORIGIN/angle.data
22 i2c.adxl345 FeedSample 0 15000 15000 128
23 i2c.adxl345 FeedSample 0 0 0 128
24 i2c.adxl345 FeedSample $ORIGIN/circle.data
25 i2c.adxl345 FeedSample 0 15000 15000 128
[all …]
/Zephyr-latest/drivers/led/
Dis31fl3216a.c33 struct i2c_dt_spec i2c; member
36 static int is31fl3216a_write_buffer(const struct i2c_dt_spec *i2c, in is31fl3216a_write_buffer() argument
41 status = i2c_write_dt(i2c, buffer, num_bytes); in is31fl3216a_write_buffer()
50 static int is31fl3216a_write_reg(const struct i2c_dt_spec *i2c, uint8_t reg, in is31fl3216a_write_reg() argument
55 return is31fl3216a_write_buffer(i2c, buffer, sizeof(buffer)); in is31fl3216a_write_reg()
58 static int is31fl3216a_update_pwm(const struct i2c_dt_spec *i2c) in is31fl3216a_update_pwm() argument
60 return is31fl3216a_write_reg(i2c, IS31FL3216A_REG_UPDATE, 0); in is31fl3216a_update_pwm()
97 status = is31fl3216a_write_buffer(&config->i2c, i2c_buffer, in is31fl3216a_led_write_channels()
103 return is31fl3216a_update_pwm(&config->i2c); in is31fl3216a_led_write_channels()
119 status = is31fl3216a_write_reg(&config->i2c, pwm_reg, pwm_value); in is31fl3216a_led_set_brightness()
[all …]
/Zephyr-latest/drivers/sensor/th02/
Dth02.c22 static uint8_t read8(const struct i2c_dt_spec *i2c, uint8_t d) in read8() argument
26 if (i2c_reg_read_byte_dt(i2c, d, &buf) < 0) { in read8()
32 static int is_ready(const struct i2c_dt_spec *i2c) in is_ready() argument
37 if (i2c_reg_read_byte_dt(i2c, TH02_REG_STATUS, &status) < 0) { in is_ready()
48 static uint16_t get_humi(const struct i2c_dt_spec *i2c) in get_humi() argument
52 if (i2c_reg_write_byte_dt(i2c, TH02_REG_CONFIG, TH02_CMD_MEASURE_HUMI) < 0) { in get_humi()
56 while (!is_ready(i2c)) { in get_humi()
59 humidity = read8(i2c, TH02_REG_DATA_H) << 8; in get_humi()
60 humidity |= read8(i2c, TH02_REG_DATA_L); in get_humi()
66 uint16_t get_temp(const struct i2c_dt_spec *i2c) in get_temp() argument
[all …]
/Zephyr-latest/drivers/sensor/apds9960/
Dapds9960.c69 if (i2c_reg_update_byte_dt(&config->i2c, in apds9960_sample_fetch()
78 if (i2c_reg_read_byte_dt(&config->i2c, in apds9960_sample_fetch()
85 if (i2c_reg_read_byte_dt(&config->i2c, in apds9960_sample_fetch()
92 if (i2c_burst_read_dt(&config->i2c, in apds9960_sample_fetch()
102 if (i2c_reg_update_byte_dt(&config->i2c, in apds9960_sample_fetch()
110 if (i2c_reg_write_byte_dt(&config->i2c, in apds9960_sample_fetch()
158 if (i2c_reg_write_byte_dt(&config->i2c, in apds9960_proxy_setup()
165 if (i2c_reg_write_byte_dt(&config->i2c, in apds9960_proxy_setup()
172 if (i2c_reg_write_byte_dt(&config->i2c, in apds9960_proxy_setup()
179 if (i2c_reg_update_byte_dt(&config->i2c, in apds9960_proxy_setup()
[all …]
/Zephyr-latest/tests/boards/mec15xxevb_assy6853/i2c_api/src/
Dmain.c25 ZTEST(i2c, test_i2c_pca95xx) in ZTEST() argument
32 const struct i2c_dt_spec i2c = I2C_DT_SPEC_GET(DT_COMPAT_GET_ANY_STATUS_OKAY(nxp_pca95xx)); in ZTEST() local
34 zassert_true(device_is_ready(i2c.bus), "I2C controller device is not ready"); in ZTEST()
37 ret = i2c_configure(i2c.bus, i2c_cfg); in ZTEST()
45 ret = i2c_write_dt(&i2c, datas, 3); in ZTEST()
51 ret = i2c_write_dt(&i2c, datas, 1); in ZTEST()
55 ret = i2c_read_dt(&i2c, datas, 2); in ZTEST()
63 ZTEST_SUITE(i2c, NULL, NULL, NULL, NULL, NULL);
/Zephyr-latest/drivers/gpio/
Dgpio_pcal64xxa.c97 typedef int (*pcal64xxa_pins_cfg_apply)(const struct i2c_dt_spec *i2c,
99 typedef int (*pcal64xxa_pins_cfg_read)(const struct i2c_dt_spec *i2c,
101 typedef int (*pcal64xxa_triggers_apply)(const struct i2c_dt_spec *i2c,
103 typedef int (*pcal64xxa_reset_state_apply)(const struct i2c_dt_spec *i2c);
104 typedef int (*pcal64xxa_inputs_read)(const struct i2c_dt_spec *i2c, pcal64xxa_data_t *int_sources,
106 typedef int (*pcal64xxa_outputs_write)(const struct i2c_dt_spec *i2c, pcal64xxa_data_t outputs);
121 struct i2c_dt_spec i2c; member
186 rc = drv_cfg->chip_api->pins_cfg_apply(&drv_cfg->i2c, &pins_cfg); in pcal64xxa_pin_configure()
208 rc = drv_cfg->chip_api->inputs_read(&drv_cfg->i2c, &int_sources, &input_port); in pcal64xxa_process_input()
318 rc = drv_cfg->chip_api->outputs_write(&drv_cfg->i2c, output); in pcal64xxa_port_set_raw()
[all …]
/Zephyr-latest/boards/seagate/faze/
Dfaze-pinctrl.dtsi21 nxp,i2c-mode;
22 nxp,i2c-filter = "slow";
31 nxp,i2c-mode;
32 nxp,i2c-filter = "fast";
42 nxp,i2c-mode;
43 nxp,i2c-filter = "slow";
53 nxp,i2c-mode;
54 nxp,i2c-filter = "fast";
/Zephyr-latest/drivers/usb_c/tcpc/
Dtcpci.c212 int tcpci_read_reg8(const struct i2c_dt_spec *i2c, uint8_t reg, uint8_t *value) in tcpci_read_reg8() argument
217 ret = i2c_write_read(i2c->bus, i2c->addr, &reg, sizeof(reg), value, sizeof(*value)); in tcpci_read_reg8()
225 LOG_ERR(LOG_COMM_ERR_STR, i2c->bus->name, i2c->addr, "r8", reg, *value); in tcpci_read_reg8()
231 int tcpci_write_reg8(const struct i2c_dt_spec *i2c, uint8_t reg, uint8_t value) in tcpci_write_reg8() argument
237 ret = i2c_write(i2c->bus, buf, 2, i2c->addr); in tcpci_write_reg8()
245 LOG_ERR(LOG_COMM_ERR_STR, i2c->bus->name, i2c->addr, "w8", reg, value); in tcpci_write_reg8()
251 int tcpci_update_reg8(const struct i2c_dt_spec *i2c, uint8_t reg, uint8_t mask, uint8_t value) in tcpci_update_reg8() argument
256 ret = tcpci_read_reg8(i2c, reg, &old_value); in tcpci_update_reg8()
264 ret = tcpci_write_reg8(i2c, reg, old_value); in tcpci_update_reg8()
269 int tcpci_read_reg16(const struct i2c_dt_spec *i2c, uint8_t reg, uint16_t *value) in tcpci_read_reg16() argument
[all …]
/Zephyr-latest/drivers/sensor/ams/tmd2620/
Dtmd2620.c93 ret = i2c_reg_update_byte_dt(&config->i2c, TMD2620_INTENAB_REG, TMD2620_INTENAB_PIEN, in tmd2620_sample_fetch()
105 ret = i2c_reg_update_byte_dt(&config->i2c, TMD2620_ENABLE_REG, tmp, tmp); in tmd2620_sample_fetch()
115 ret = i2c_reg_read_byte_dt(&config->i2c, TMD2620_STATUS_REG, &tmp); in tmd2620_sample_fetch()
125 ret = i2c_reg_read_byte_dt(&config->i2c, TMD2620_PDATA_REG, &data->pdata); in tmd2620_sample_fetch()
136 ret = i2c_reg_update_byte_dt(&config->i2c, TMD2620_ENABLE_REG, tmp, 0); in tmd2620_sample_fetch()
143 ret = i2c_reg_update_byte_dt(&config->i2c, TMD2620_STATUS_REG, TMD2620_STATUS_PINT, in tmd2620_sample_fetch()
178 (void)i2c_reg_read_byte_dt(&config->i2c, TMD2620_ID_REG, &chip_id); in tmd2620_sensor_setup()
180 ret = i2c_reg_read_byte_dt(&config->i2c, TMD2620_ID_REG, &chip_id); in tmd2620_sensor_setup()
187 LOG_ERR("Chip id is invalid! Device @%02x is no TMD2620!", config->i2c.addr); in tmd2620_sensor_setup()
191 ret = i2c_reg_write_byte_dt(&config->i2c, TMD2620_ENABLE_REG, 0); in tmd2620_sensor_setup()
[all …]
/Zephyr-latest/tests/drivers/build_all/haptics/
Dapp.overlay6 #include <zephyr/dt-bindings/i2c/i2c.h>
13 test_i2c: i2c@11112222 {
16 compatible = "vnd,i2c";
21 #include "i2c.dtsi"
/Zephyr-latest/tests/drivers/build_all/bbram/
Dapp.overlay6 #include <zephyr/dt-bindings/i2c/i2c.h>
13 test_i2c: i2c@11112222 {
16 compatible = "vnd,i2c";
21 #include "i2c.dtsi"
/Zephyr-latest/tests/drivers/build_all/crypto/
Dapp.overlay6 #include <zephyr/dt-bindings/i2c/i2c.h>
13 test_i2c: i2c@11112222 {
16 compatible = "vnd,i2c";
21 #include "i2c.dtsi"
/Zephyr-latest/tests/misc/check_init_priorities/boards/
Dnative_sim.overlay16 test_i2c: i2c@11112222 {
19 compatible = "vnd,i2c";
24 test_dev_a: test-i2c-dev@10 {
25 compatible = "vnd,i2c-device";
31 test_dev_b: test-i2c-dev@11 {
32 compatible = "vnd,i2c-device";
/Zephyr-latest/tests/lib/devicetree/devices/
Dapp.overlay26 test_i2c: i2c@11112222 {
29 compatible = "vnd,i2c";
34 test_dev_a: test-i2c-dev@10 {
35 compatible = "vnd,i2c-device";
41 test_gpiox: test-i2c-dev@11 {
49 test_dev_b: test-i2c-dev@12 {
50 compatible = "vnd,i2c-device";
56 test_dev_c: test-i2c-dev@13 {
57 compatible = "vnd,i2c-device";
77 test-i2c-dev@14 {
[all …]
/Zephyr-latest/tests/drivers/build_all/i2c/boards/
Dqemu_cortex_m3.overlay7 #include <zephyr/dt-bindings/i2c/i2c.h>
10 i2c0: i2c@88888888 {
19 i2c1: i2c@88898888 {
28 i2c2: i2c@888A8888 {
29 compatible = "brcm,iproc-i2c";
/Zephyr-latest/tests/boards/mec172xevb_assy6906/i2c_api/src/
Dmain.c32 const struct i2c_dt_spec i2c = I2C_DT_SPEC_GET(DT_COMPAT_GET_ANY_STATUS_OKAY(nxp_pca95xx)); in ZTEST() local
34 zassert_true(device_is_ready(i2c.bus), "I2C controller device is not ready"); in ZTEST()
37 ret = i2c_configure(i2c.bus, i2c_cfg); in ZTEST()
45 ret = i2c_write_dt(&i2c, datas, 3); in ZTEST()
51 ret = i2c_write_dt(&i2c, datas, 1); in ZTEST()
55 ret = i2c_read_dt(&i2c, datas, 2); in ZTEST()
/Zephyr-latest/drivers/sensor/renesas/isl29035/
Disl29035.c31 if (i2c_reg_read_byte_dt(&config->i2c, in isl29035_sample_fetch()
36 if (i2c_reg_read_byte_dt(&config->i2c, ISL29035_DATA_LSB_REG, in isl29035_sample_fetch()
82 if (!device_is_ready(config->i2c.bus)) { in isl29035_init()
90 if (i2c_reg_update_byte_dt(&config->i2c, ISL29035_ID_REG, in isl29035_init()
97 if (i2c_reg_write_byte_dt(&config->i2c, in isl29035_init()
103 if (i2c_reg_write_byte_dt(&config->i2c, in isl29035_init()
110 if (i2c_reg_update_byte_dt(&config->i2c, in isl29035_init()
119 if (i2c_reg_update_byte_dt(&config->i2c, in isl29035_init()
128 if (i2c_reg_update_byte_dt(&config->i2c, in isl29035_init()
152 .i2c = I2C_DT_SPEC_INST_GET(inst), \
/Zephyr-latest/drivers/sensor/ti/tmp007/
Dtmp007.c23 int tmp007_reg_read(const struct i2c_dt_spec *i2c, uint8_t reg, uint16_t *val) in tmp007_reg_read() argument
25 if (i2c_burst_read_dt(i2c, reg, (uint8_t *) val, 2) < 0) { in tmp007_reg_read()
35 int tmp007_reg_write(const struct i2c_dt_spec *i2c, uint8_t reg, uint16_t val) in tmp007_reg_write() argument
39 return i2c_write_dt(i2c, tx_buf, sizeof(tx_buf)); in tmp007_reg_write()
42 int tmp007_reg_update(const struct i2c_dt_spec *i2c, uint8_t reg, in tmp007_reg_update() argument
48 if (tmp007_reg_read(i2c, reg, &old_val) < 0) { in tmp007_reg_update()
55 return tmp007_reg_write(i2c, reg, new_val); in tmp007_reg_update()
67 if (tmp007_reg_read(&cfg->i2c, TMP007_REG_TOBJ, &val) < 0) { in tmp007_sample_fetch()
111 if (!device_is_ready(cfg->i2c.bus)) { in tmp007_init()
132 .i2c = I2C_DT_SPEC_INST_GET(inst), \

12345678910>>...53