Closed zafersn closed 1 year ago
I fixed issue by editting sensor driver.c . rest of them are ok
static const struct sensor_driver_api bme680_api_funcs = {
.sample_fetch = bme680_sample_fetch,
.channel_get = bme680_channel_get,
};
static struct bme680_data bme680_data = {
.dev.delay_ms = &k_sleep,
.dev.write = &bme680_reg_write,
.dev.read = &bme680_reg_read,
.dev.intf = BME680_I2C_INTF,
};
static const struct bme680_config bme680_config = {
.bus = I2C_DT_SPEC_INST_GET(0)
};
DEVICE_DT_INST_DEFINE(0, bme680_init, NULL, &bme680_data,
&bme680_config, POST_KERNEL, CONFIG_BME_SENSOR_INIT_PRIORITY,
&bme680_api_funcs);
to
static const struct sensor_driver_api bme680_api_funcs = {
.sample_fetch = bme680_sample_fetch_netfeasa,
.channel_get = bme680_channel_get_netfeasa,
};
static struct bme680_data bme680_data = {
.dev.delay_ms = &k_sleep,
.dev.write = &bme680_reg_write,
.dev.read = &bme680_reg_read,
.dev.intf = BME680_I2C_INTF,
};
#define BME_IDEFINE(inst) \
static const struct bme680_config bme680_cfg_##inst = { \
.bus = I2C_DT_SPEC_INST_GET(inst), \
}; \
SENSOR_DEVICE_DT_INST_DEFINE(inst, bme680_init, NULL, \
&bme680_data, &bme680_cfg_##inst, \
POST_KERNEL, CONFIG_SENSOR_INIT_PRIORITY, \
&bme680_api_funcs);
DT_INST_FOREACH_STATUS_OKAY(BME_IDEFINE)
Hi,
I am trying to use a bme sensors over the tca9546 a multiplexor, here is the dts defination. When I call my sensor by
DEVICE_DT_GET(DT_ALIAS(temp_sensor));
macro I am gettingmain.c:80: undefined reference to __device_dts_ord_117
error in complining time although it works when I call mux channel instead of sensor. But this time im getting runtime error because program doesnt write/read correct sensor register addresses.error with restart loop:
Where am I doing wrong or missing something?
aliases:
dts:
prj.conf
BTW, I am working on nrf 9160 sip based custom board with ncs 2.2.0