ruuvi.drivers.c
${PROJECT_VERSION}
Drivers for external sensors and peripherals on embedded systems.
|
#include "ruuvi_driver_enabled_modules.h"
#include "ruuvi_driver_error.h"
#include "ruuvi_driver_sensor.h"
#include "ruuvi_interface_bme280.h"
#include "ruuvi_interface_environmental.h"
#include "ruuvi_interface_gpio.h"
#include "ruuvi_interface_spi.h"
#include "ruuvi_interface_spi_bme280.h"
#include "ruuvi_interface_i2c.h"
#include "ruuvi_interface_i2c_bme280.h"
#include "ruuvi_interface_yield.h"
#include <string.h>
#include "bme280.h"
#include "bme280_defs.h"
#include "bme280_selftest.h"
Go to the source code of this file.
Macros | |
#define | BME280_MEAS_TIME_CONST1 (1.25F) |
#define | BME280_MEAS_TIME_CONST2 (2.3F) |
#define | BME280_MEAS_TIME_CONST3 (3.0F) |
#define | BME280_MEAS_TIME_CONST4 (2.0F) |
#define | BME280_MEAS_TIME_CONST5 (0.575F) |
#define | BME280_MEAS_TIME_CONST6 (2U) |
#define | BME280_SAMPLERATE_1000MS (1U) |
#define | BME280_SAMPLERATE_500MS (2U) |
#define | BME280_SAMPLERATE_125MS (8U) |
#define | BME280_SAMPLERATE_62_5MS (16U) |
#define | BME280_SAMPLERATE_20MS (50U) |
#define | BME280_SAMPLERATE_10MS (100U) |
#define | BME280_SAMPLERATE_0_5MS (200U) |
#define | BME280_DSP_MODE_0 (1U) |
#define | BME280_DSP_MODE_1 (2U) |
#define | BME280_DSP_MODE_2 (4U) |
#define | BME280_DSP_MODE_3 (8U) |
#define | BME280_DSP_MODE_4 (16U) |
#define | BME280_HUMIDITY (0) |
#define | BME280_PRESSURE (1) |
#define | BME280_TEMPERATURE (2) |
#define | BME280_SENS_NUM (3) |
#define | BME280_HUMIDITY_MAX_VALUE (100.0f) |
Typedefs | |
typedef float | bme_float |
Requires Bosch BME280_driver, available under BSD-3 on GitHub. Will only get compiled if RI_BME280_ENABLED is defined as true Requires BME280_FLOAT_ENABLE defined in makefile or otherwise passed to preprocessor
Definition in file ruuvi_interface_bme280.c.
#define BME280_DSP_MODE_0 (1U) |
Definition at line 55 of file ruuvi_interface_bme280.c.
#define BME280_DSP_MODE_1 (2U) |
Definition at line 56 of file ruuvi_interface_bme280.c.
#define BME280_DSP_MODE_2 (4U) |
Definition at line 57 of file ruuvi_interface_bme280.c.
#define BME280_DSP_MODE_3 (8U) |
Definition at line 58 of file ruuvi_interface_bme280.c.
#define BME280_DSP_MODE_4 (16U) |
Definition at line 59 of file ruuvi_interface_bme280.c.
#define BME280_HUMIDITY (0) |
Definition at line 61 of file ruuvi_interface_bme280.c.
#define BME280_HUMIDITY_MAX_VALUE (100.0f) |
Definition at line 66 of file ruuvi_interface_bme280.c.
#define BME280_MEAS_TIME_CONST1 (1.25F) |
Definition at line 40 of file ruuvi_interface_bme280.c.
#define BME280_MEAS_TIME_CONST2 (2.3F) |
Definition at line 41 of file ruuvi_interface_bme280.c.
#define BME280_MEAS_TIME_CONST3 (3.0F) |
Definition at line 42 of file ruuvi_interface_bme280.c.
#define BME280_MEAS_TIME_CONST4 (2.0F) |
Definition at line 43 of file ruuvi_interface_bme280.c.
#define BME280_MEAS_TIME_CONST5 (0.575F) |
Definition at line 44 of file ruuvi_interface_bme280.c.
#define BME280_MEAS_TIME_CONST6 (2U) |
Definition at line 45 of file ruuvi_interface_bme280.c.
#define BME280_PRESSURE (1) |
Definition at line 62 of file ruuvi_interface_bme280.c.
#define BME280_SAMPLERATE_0_5MS (200U) |
Definition at line 53 of file ruuvi_interface_bme280.c.
#define BME280_SAMPLERATE_1000MS (1U) |
Definition at line 47 of file ruuvi_interface_bme280.c.
#define BME280_SAMPLERATE_10MS (100U) |
Definition at line 52 of file ruuvi_interface_bme280.c.
#define BME280_SAMPLERATE_125MS (8U) |
Definition at line 49 of file ruuvi_interface_bme280.c.
#define BME280_SAMPLERATE_20MS (50U) |
Definition at line 51 of file ruuvi_interface_bme280.c.
#define BME280_SAMPLERATE_500MS (2U) |
Definition at line 48 of file ruuvi_interface_bme280.c.
#define BME280_SAMPLERATE_62_5MS (16U) |
Definition at line 50 of file ruuvi_interface_bme280.c.
#define BME280_SENS_NUM (3) |
Definition at line 64 of file ruuvi_interface_bme280.c.
#define BME280_TEMPERATURE (2) |
Definition at line 63 of file ruuvi_interface_bme280.c.
typedef float bme_float |
Definition at line 68 of file ruuvi_interface_bme280.c.
void bosch_delay_ms | ( | uint32_t | time_ms | ) |
Implement delay in Bosch signature.
[in] | time_ms | time to delay |
Definition at line 128 of file ruuvi_interface_bme280.c.
rd_status_t ri_bme280_data_get | ( | rd_sensor_data_t *const | p_data | ) |
Definition at line 853 of file ruuvi_interface_bme280.c.
rd_status_t ri_bme280_dsp_get | ( | uint8_t * | dsp, |
uint8_t * | parameter | ||
) |
Definition at line 724 of file ruuvi_interface_bme280.c.
rd_status_t ri_bme280_dsp_set | ( | uint8_t * | dsp, |
uint8_t * | parameter | ||
) |
Definition at line 600 of file ruuvi_interface_bme280.c.
rd_status_t ri_bme280_init | ( | rd_sensor_t * | p_sensor, |
rd_bus_t | bus, | ||
uint8_t | handle | ||
) |
Initialize BME280 into low-power mode
Definition at line 209 of file ruuvi_interface_bme280.c.
rd_status_t ri_bme280_mode_get | ( | uint8_t * | mode | ) |
Definition at line 806 of file ruuvi_interface_bme280.c.
rd_status_t ri_bme280_mode_set | ( | uint8_t * | mode | ) |
Definition at line 773 of file ruuvi_interface_bme280.c.
rd_status_t ri_bme280_resolution_get | ( | uint8_t * | resolution | ) |
Definition at line 418 of file ruuvi_interface_bme280.c.
rd_status_t ri_bme280_resolution_set | ( | uint8_t * | resolution | ) |
Definition at line 390 of file ruuvi_interface_bme280.c.
rd_status_t ri_bme280_samplerate_get | ( | uint8_t * | samplerate | ) |
Definition at line 338 of file ruuvi_interface_bme280.c.
rd_status_t ri_bme280_samplerate_set | ( | uint8_t * | samplerate | ) |
Definition at line 312 of file ruuvi_interface_bme280.c.
rd_status_t ri_bme280_scale_get | ( | uint8_t * | scale | ) |
Definition at line 462 of file ruuvi_interface_bme280.c.
rd_status_t ri_bme280_scale_set | ( | uint8_t * | scale | ) |
Definition at line 434 of file ruuvi_interface_bme280.c.
rd_status_t ri_bme280_uninit | ( | rd_sensor_t * | sensor, |
rd_bus_t | bus, | ||
uint8_t | handle | ||
) |
Definition at line 257 of file ruuvi_interface_bme280.c.