ruuvi.drivers.c  ${PROJECT_VERSION}
Drivers for external sensors and peripherals on embedded systems.
ruuvi_interface_bme280.h
Go to the documentation of this file.
1 #ifndef RUUVI_INTERFACE_BME280_H
2 #define RUUVI_INTERFACE_BME280_H
3 #include "ruuvi_driver_error.h"
4 #include "ruuvi_driver_sensor.h"
5 
49 #define BME280_HUMIDITY_OFFSET (-3.0f)
50 
56 void bosch_delay_ms (uint32_t time_ms);
57 
60  environmental_sensor, rd_bus_t bus, uint8_t handle);
63  environmental_sensor, rd_bus_t bus, uint8_t handle);
65 rd_status_t ri_bme280_samplerate_set (uint8_t * samplerate);
67 rd_status_t ri_bme280_samplerate_get (uint8_t * samplerate);
69 rd_status_t ri_bme280_resolution_set (uint8_t * resolution);
71 rd_status_t ri_bme280_resolution_get (uint8_t * resolution);
73 rd_status_t ri_bme280_scale_set (uint8_t * scale);
75 rd_status_t ri_bme280_scale_get (uint8_t * scale);
77 rd_status_t ri_bme280_dsp_set (uint8_t * dsp, uint8_t * parameter);
79 rd_status_t ri_bme280_dsp_get (uint8_t * dsp, uint8_t * parameter);
81 rd_status_t ri_bme280_mode_set (uint8_t * mode);
83 rd_status_t ri_bme280_mode_get (uint8_t * mode);
86  data);
87 
88 #ifdef CEEDLING
89 #include "bme280_defs.h"
90 rd_status_t bme280_i2c_init (const struct bme280_dev * const p_dev, const uint8_t handle);
91 rd_status_t bme280_spi_init (const struct bme280_dev * const p_dev, const uint8_t handle);
92 rd_status_t ri2bme_rate (struct bme280_dev * p_dev, uint8_t * const samplerate);
93 uint32_t bme280_max_meas_time (const uint8_t oversampling);
94 #endif
95 
97 #endif
uint32_t rd_status_t
bitfield for representing errors
rd_bus_t
Type of bus sensor uses.
Ruuvi error codes and error check function.
Ruuvi sensor interface Lifecycle: Beta
rd_status_t ri_bme280_init(rd_sensor_t *environmental_sensor, rd_bus_t bus, uint8_t handle)
rd_sensor_init_fp
rd_status_t ri_bme280_samplerate_get(uint8_t *samplerate)
rd_sensor_setup_fp
rd_status_t ri_bme280_uninit(rd_sensor_t *environmental_sensor, rd_bus_t bus, uint8_t handle)
rd_sensor_init_fp
rd_status_t ri_bme280_dsp_set(uint8_t *dsp, uint8_t *parameter)
rd_sensor_dsp_fp
rd_status_t ri_bme280_mode_get(uint8_t *mode)
rd_sensor_setup_fp
rd_status_t ri_bme280_dsp_get(uint8_t *dsp, uint8_t *parameter)
rd_sensor_dsp_fp
rd_status_t ri_bme280_resolution_get(uint8_t *resolution)
rd_sensor_setup_fp
rd_status_t ri_bme280_resolution_set(uint8_t *resolution)
rd_sensor_setup_fp
rd_status_t ri_bme280_scale_get(uint8_t *scale)
rd_sensor_setup_fp
rd_status_t ri_bme280_mode_set(uint8_t *mode)
rd_sensor_setup_fp
rd_status_t ri_bme280_scale_set(uint8_t *scale)
rd_sensor_setup_fp
rd_status_t ri_bme280_samplerate_set(uint8_t *samplerate)
rd_sensor_setup_fp
rd_status_t ri_bme280_data_get(rd_sensor_data_t *const data)
rd_sensor_data_fp
void bosch_delay_ms(uint32_t time_ms)
Implement delay in Bosch signature.
Generic sensor data struct.
Interface to sensor. Some sensors can implement additional functions. The additional functions are de...