BME280 Driver 2.0.x
Driver for BME280 sensor
Loading...
Searching...
No Matches
i2c_rtos Struct Reference

Data Fields

i2c_port_t i2c_port_nr
 
SemaphoreHandle_t i2c_mutex
 
I2C_HandleTypeDef * i2c_handle
 

Detailed Description

File Name : main.c Description : Code for freertos applications

This is an example of use BME280_driver with ESP32 platform and FreeRTOS enviroment Functions of this driver are not reentrant so user is obligated to use mutexes to protect sensor's structure and communication peripherials. Here we use only one sensor in one task so mutex for BME280_t structure was skipped. There is one sensor connected to I2C0, pin SDO is connected to GND Results are stored as integers inside bme1_data structure. Sensor if initialized, then configured. Inside app_main task single measure is forced every 1000ms.

File Name : freertos.c Description : Code for freertos applications

This is an example of use BME280_driver with STM32 platform and HAL library placed in Freertos enviroment. Functions of this driver are not reentrant so user is obligated to use mutexes to protect sensor's structure and communication peripherials. Here we use only one sensor in one task so mutex for BME280_t structure was skipped. There is one sensor connected to I2C1, pin SDO is connected to GND Results are stored as integers inside bme1_data structure. Sensor if initialized, then configured. Inside BME280_Task single measure is forced every 500ms.


The documentation for this struct was generated from the following files: