|
RocketLogger
1.1
|
Include dependency graph for bme280.c:Go to the source code of this file.
Functions | |
| int | BME280_init (int sensor_identifier) |
| void | BME280_close (int sensor_identifier) |
| int | BME280_read (int sensor_identifier) |
| int32_t | BME280_getValue (int sensor_identifier, int channel) |
| int | BME280_getID (void) |
| int | BME280_readCalibration (int sensor_identifier) |
| int | BME280_setParameters (int sensor_identifier) |
| int | BME280_getIndex (int sensor_identifier) |
| int32_t | BME280_compensate_temperature_fine (int sensor_identifier, int32_t temperature_raw) |
| int32_t | BME280_compensate_temperature (int sensor_identifier, int32_t temperature_raw) |
| uint32_t | BME280_compensate_preasure (int sensor_identifier, int32_t preasure_raw, int32_t temperature_raw) |
| uint32_t | BME280_compensate_humidity (int sensor_identifier, int32_t humidity_raw, int32_t temperature_raw) |
Variables | |
| const int | BME280_sensors [] = BME280_I2C_ADDRESSES |
| int32_t | BME280_temperature [sizeof(BME280_sensors)] = {0} |
| int32_t | BME280_humidity [sizeof(BME280_sensors)] = {0} |
| int32_t | BME280_preasure [sizeof(BME280_sensors)] = {0} |
| struct BME280_calibration_t | BME280_calibration [sizeof(BME280_sensors)] |
| void BME280_close | ( | int | sensor_identifier | ) |
| uint32_t BME280_compensate_humidity | ( | int | sensor_identifier, |
| int32_t | humidity_raw, | ||
| int32_t | temperature_raw | ||
| ) |
Get the compensated relative humidity in micros (0.0001 percents).
| sensor_identifier | The I2C address of the sensor |
| humidity_raw | The raw humidity reading |
| temperature_raw | The raw temperature reading |
Definition at line 397 of file bme280.c.
References BME280_calibration, BME280_compensate_temperature_fine(), BME280_getIndex(), BME280_calibration_t::H1, BME280_calibration_t::H2, BME280_calibration_t::H3, BME280_calibration_t::H4, BME280_calibration_t::H5, and BME280_calibration_t::H6.
Referenced by BME280_read().
Here is the call graph for this function:| uint32_t BME280_compensate_preasure | ( | int | sensor_identifier, |
| int32_t | preasure_raw, | ||
| int32_t | temperature_raw | ||
| ) |
Get the compensated preasure in milli Pascal.
| sensor_identifier | The I2C address of the sensor |
| preasure_raw | The raw preasure reading |
| temperature_raw | The raw temperature reading |
Definition at line 352 of file bme280.c.
References BME280_calibration, BME280_compensate_temperature_fine(), BME280_getIndex(), BME280_calibration_t::P1, BME280_calibration_t::P2, BME280_calibration_t::P3, BME280_calibration_t::P4, BME280_calibration_t::P5, BME280_calibration_t::P6, BME280_calibration_t::P7, BME280_calibration_t::P8, and BME280_calibration_t::P9.
Referenced by BME280_read().
Here is the call graph for this function:| int32_t BME280_compensate_temperature | ( | int | sensor_identifier, |
| int32_t | temperature_raw | ||
| ) |
Get the compensated temperature in milli degree centigrade.
| sensor_identifier | The I2C address of the sensor |
| temperature_raw | The raw temperature reading |
Definition at line 337 of file bme280.c.
References BME280_compensate_temperature_fine().
Referenced by BME280_read().
Here is the call graph for this function:| int32_t BME280_compensate_temperature_fine | ( | int | sensor_identifier, |
| int32_t | temperature_raw | ||
| ) |
Get fine grained temperature compensation value for further processing.
| sensor_identifier | The I2C address of the sensor |
| temperature_raw | The raw temperature reading |
Definition at line 310 of file bme280.c.
References BME280_calibration, BME280_getIndex(), BME280_calibration_t::T1, BME280_calibration_t::T2, and BME280_calibration_t::T3.
Referenced by BME280_compensate_humidity(), BME280_compensate_preasure(), and BME280_compensate_temperature().
Here is the call graph for this function:| int BME280_getID | ( | void | ) |
Get the device ID
| sensor_identifier | The I2C address of the sensor |
Definition at line 169 of file bme280.c.
References BME280_REG_ID, ERROR, rl_log(), sensor_bus, and Sensors_getSharedBus().
Referenced by BME280_init().
Here is the call graph for this function:| int BME280_getIndex | ( | int | sensor_identifier | ) |
Get the index of the sensor with specified address.
| sensor_identifier | The sensor address used to look up the index |
Definition at line 293 of file bme280.c.
References BME280_sensors.
Referenced by BME280_compensate_humidity(), BME280_compensate_preasure(), BME280_compensate_temperature_fine(), BME280_getValue(), BME280_read(), and BME280_readCalibration().
| int32_t BME280_getValue | ( | int | sensor_identifier, |
| int | channel | ||
| ) |
Get the values read from the sensor
| sensor_identifier | The I2C address of the sensor |
| channel | The channel of the sensor to get |
Definition at line 146 of file bme280.c.
References BME280_CHANNEL_HUMIDITY, BME280_CHANNEL_PREASURE, BME280_CHANNEL_TEMPERATURE, BME280_getIndex(), BME280_humidity, BME280_preasure, and BME280_temperature.
Here is the call graph for this function:| int BME280_init | ( | int | sensor_identifier | ) |
Initialize the light sensor
| sensor_identifier | The I2C address of the sensor |
Definition at line 48 of file bme280.c.
References BME280_getID(), BME280_ID, BME280_readCalibration(), BME280_setParameters(), ERROR, FAILURE, rl_log(), sensor_bus, Sensors_getSharedBus(), Sensors_initSharedComm(), and SUCCESS.
Here is the call graph for this function:| int BME280_read | ( | int | sensor_identifier | ) |
Read the sensor values.
| sensor_identifier | The I2C address of the sensor |
Definition at line 98 of file bme280.c.
References BME280_compensate_humidity(), BME280_compensate_preasure(), BME280_compensate_temperature(), BME280_DATA_BLOCK_SIZE, BME280_getIndex(), BME280_humidity, BME280_preasure, BME280_REG_PREASURE_MSB, BME280_temperature, ERROR, FAILURE, rl_log(), sensor_bus, Sensors_getSharedBus(), Sensors_initSharedComm(), and SUCCESS.
Here is the call graph for this function:| int BME280_readCalibration | ( | int | sensor_identifier | ) |
Read the sensor specifc calibration values.
| sensor_identifier | The I2C address of the sensor |
Definition at line 185 of file bme280.c.
References BME280_calibration, BME280_CALIBRATION_BLOCK1_SIZE, BME280_CALIBRATION_BLOCK2_SIZE, BME280_getIndex(), BME280_REG_CALIBRATION_BLOCK1, BME280_REG_CALIBRATION_BLOCK2, ERROR, FAILURE, BME280_calibration_t::H1, BME280_calibration_t::H2, BME280_calibration_t::H3, BME280_calibration_t::H4, BME280_calibration_t::H5, BME280_calibration_t::H6, BME280_calibration_t::P1, BME280_calibration_t::P2, BME280_calibration_t::P3, BME280_calibration_t::P4, BME280_calibration_t::P5, BME280_calibration_t::P6, BME280_calibration_t::P7, BME280_calibration_t::P8, BME280_calibration_t::P9, rl_log(), sensor_bus, Sensors_getSharedBus(), SUCCESS, BME280_calibration_t::T1, BME280_calibration_t::T2, and BME280_calibration_t::T3.
Referenced by BME280_init().
Here is the call graph for this function:| int BME280_setParameters | ( | int | sensor_identifier | ) |
Set the sensor parameter to default for continuous sensing.
Definition at line 252 of file bme280.c.
References BME280_FILTER_OFF, BME280_MODE_NORMAL, BME280_OVERSAMPLE_HUMIDITY_1, BME280_OVERSAMPLE_PREASURE_1, BME280_OVERSAMPLE_TEMPERATURE_1, BME280_REG_CONFIG, BME280_REG_CONTROL_HUMIDITY, BME280_REG_CONTROL_MEASURE, BME280_STANDBY_DURATION_250, ERROR, FAILURE, rl_log(), sensor_bus, Sensors_getSharedBus(), and SUCCESS.
Referenced by BME280_init().
Here is the call graph for this function:| struct BME280_calibration_t BME280_calibration[sizeof(BME280_sensors)] |
Definition at line 41 of file bme280.c.
Referenced by BME280_compensate_humidity(), BME280_compensate_preasure(), BME280_compensate_temperature_fine(), and BME280_readCalibration().
| int32_t BME280_humidity[sizeof(BME280_sensors)] = {0} |
Definition at line 38 of file bme280.c.
Referenced by BME280_getValue(), and BME280_read().
| int32_t BME280_preasure[sizeof(BME280_sensors)] = {0} |
Definition at line 39 of file bme280.c.
Referenced by BME280_getValue(), and BME280_read().
| const int BME280_sensors[] = BME280_I2C_ADDRESSES |
Copyright (c) 2016-2017, Swiss Federal Institute of Technology (ETH Zurich) All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition at line 35 of file bme280.c.
Referenced by BME280_getIndex().
| int32_t BME280_temperature[sizeof(BME280_sensors)] = {0} |
Definition at line 37 of file bme280.c.
Referenced by BME280_getValue(), and BME280_read().