Here is my answer for below your question.
- Set I2C communication. This function is to set i2c for our platform.
coines_set_shuttleboard_vdd_vddio_config(3300, 3300); (both in the interface_init function)
- coines_set_shuttleboard_vdd_vddio_config handles our board power source. In your case, no need to apply.
coines_soft_reset(); - Please remove it. bme68x_coines_deinit is not necessary for test.
coines_delay_msec(1000); - mili second delay function.
Thanks for helping.
Now I try to adapt the code.
One further question. If I have already initialized the I2C communication in my project (I use it with other sensors), does I need to use this command coines_config_i2c_bus(COINES_I2C_BUS_0, COINES_I2C_STANDARD_MODE);
or can I avoid it?
No you don't have to do.
It's our i2c configuration code, so you don't need it 🙂
Thanks again for the answer.
I have a last (I hope) question.
I was looking the API code and I saw that a lot of functions refer to SPI comunication (for example in get_regs function there is a mask called BME68X_SPI_RD_MSK even though in the previous if the condition is I2C interface). I use I2C comunication, does it create a problem?
You should do use I2C or SPI without any problem in BME688 API.
All SPI functions should be called only if you select BME68X_SPI_INTF.
Please let me know if you have any questions.