Lines Matching refs:slave_cfg
222 struct i2c_target_config *slave_cfg; in stm32_i2c_slave_event() local
224 if (data->slave_cfg->flags != I2C_TARGET_FLAGS_ADDR_10_BITS) { in stm32_i2c_slave_event()
229 if (data->slave_cfg != NULL && in stm32_i2c_slave_event()
230 slave_address == data->slave_cfg->address) { in stm32_i2c_slave_event()
231 slave_cfg = data->slave_cfg; in stm32_i2c_slave_event()
234 slave_cfg = data->slave2_cfg; in stm32_i2c_slave_event()
244 if (data->slave_cfg != NULL) { in stm32_i2c_slave_event()
245 slave_cfg = data->slave_cfg; in stm32_i2c_slave_event()
252 slave_cb = slave_cfg->callbacks; in stm32_i2c_slave_event()
257 if (slave_cb->read_processed(slave_cfg, &val) < 0) { in stm32_i2c_slave_event()
268 if (slave_cb->write_received(slave_cfg, val)) { in stm32_i2c_slave_event()
286 slave_cb->stop(slave_cfg); in stm32_i2c_slave_event()
299 if (slave_cb->write_requested(slave_cfg) < 0) { in stm32_i2c_slave_event()
307 if (slave_cb->read_requested(slave_cfg, &val) < 0) { in stm32_i2c_slave_event()
333 if (data->slave_cfg && data->slave2_cfg) { in i2c_stm32_target_register()
361 if (!data->slave_cfg) { in i2c_stm32_target_register()
362 data->slave_cfg = config; in i2c_stm32_target_register()
363 if (data->slave_cfg->flags == I2C_TARGET_FLAGS_ADDR_10_BITS) { in i2c_stm32_target_register()
408 if (config == data->slave_cfg) { in i2c_stm32_target_unregister()
410 data->slave_cfg = NULL; in i2c_stm32_target_unregister()
423 if (data->slave_cfg || data->slave2_cfg) { in i2c_stm32_target_unregister()
424 LOG_DBG("i2c: target#%c still registered", data->slave_cfg?'1':'2'); in i2c_stm32_target_unregister()