This driver is used for BOSCH's BME690 sensor. This driver is intended for use with Zephyr.
To use this driver add the below snippet to you west.yml file:
- name: irnas-bme69x-driver
repo-path: irnas-bme69x-driver
path: irnas/irnas-bme69x-driver
remote: irnas
revision: v1.0.1After adding the above snippet to your west.yml file, run east update in your terminal.
A node needs to be added to your device-tree file aswell:
If you will be using the I²C(0) connection
&i2c0{
bme69x: bme69x@76 {
compatible = "irnas,bme69x";
label = "bme69x";
reg = <0x76>;
status = "okay";
};
};
If you will be using the SPI(0) connection
&spi0{
bme69x: bme69x@76 {
compatible = "irnas,bme69x";
label = "bme69x";
reg = <0x76>;
status = "okay";
};
};
Warning
SPI communication support has been implemented but not tested. Use at your own risk.
The driver will initialize at boot and can be accessed via:
const struct device *bme69x_sensor = DEVICE_DT_GET(DT_NODELABEL(bme69x));The driver exposes internal structure types and function calls to users for users to use freely. From here there are two options for controlling the driver:
User can configure and control parts of the sensor with:
- sensor_attr_set
- sensor_sample_fetch
- sensor_channel_get
To use BOSCH's API the user first need to get the bme69x_dev pointer from the driver.
That can be done using the exposed function:
struct bme69x_dev *bme69x_get_bme69x_dev_ptr(const struct device *dev);by providing the function with a pointer to the sensor device, the user gets the bme69x pointer
which is then used to control most BOSCH API functions.
This driver also supports the use of the BSEC library, but does not provide the library by itself. The users need to acquire it on their own behalf.
Read more about acquiring the BSEC library and its integration in the README.md file.