XDK API  3.6.0
Documentation
Macros | Functions | Variables
Environmental.c File Reference

This module is common to different BST Environmental sensor.Used to initialize, configure and gets the data from the sensor. More...

#include "BCDS_SensorsInfo.h"
#include "BCDS_Environmental.h"
#include "Environmental.h"
#include "EnvironmentalUtils.h"
#include "BCDS_Bme280Utils.h"
#include <bme280.h>
+ Include dependency graph for Environmental.c:

Macros

#define BCDS_MODULE_ID   BCDS_SENSORS_ID_ENVIRONMENTAL
 

Functions

static Retcode_T bme280LibErrorMapping (BME280_RETURN_FUNCTION_TYPE BME280_libReturn)
 
Retcode_T Environmental_compensateData (Environmental_HandlePtr_T handle, Environmental_DataPtr_T sensorData)
 Compensates temperature and relative humidity values. More...
 
Retcode_T Environmental_deInit (Environmental_HandlePtr_T handle)
 DeInitializes the environmental sensor referenced by the passed handle. More...
 
Retcode_T Environmental_getPowerMode (Environmental_HandlePtr_T handle, Environmental_PowerModesPtr_T mode)
 Gets the power mode for the environmental sensor referenced by the passed handle. More...
 
Retcode_T Environmental_getStandbyDuration (Environmental_HandlePtr_T handle, Environmental_StandbyTimePtr_T duration)
 reads the StandbyDuration for the environmental sensor More...
 
Retcode_T Environmental_init (Environmental_HandlePtr_T handle)
 Initializes the environmental sensor referenced by the passed handle. More...
 
Retcode_T Environmental_readCompensatedData (Environmental_HandlePtr_T handle, Environmental_DataPtr_T sensorData)
 Reads and compensates temperature and relative humidity values. More...
 
Retcode_T Environmental_readData (Environmental_HandlePtr_T handle, Environmental_DataPtr_T sensorData)
 Reads Temperature in milli degree Celsius,pressure in Pascal and humidity in(%rh) values from the environmental sensor. More...
 
Retcode_T Environmental_readDataLSB (Environmental_HandlePtr_T handle, Environmental_LsbDataPtr_T sensorData)
 Reads Temperature,pressure and humidity Raw values from the environmental sensor. More...
 
Retcode_T Environmental_readHumidity (Environmental_HandlePtr_T handle, uint32_t *humidity)
 Reads Humidity values in(%rh) from the environmental sensor. More...
 
Retcode_T Environmental_readHumidityLSB (Environmental_HandlePtr_T handle, int32_t *humiditylsb)
 Reads Humidity LSB(raw) values from the environmental sensor. More...
 
Retcode_T Environmental_readPressure (Environmental_HandlePtr_T handle, uint32_t *pressure)
 Reads Pressure in Pascal values from the environmental sensor. More...
 
Retcode_T Environmental_readPressureLSB (Environmental_HandlePtr_T handle, int32_t *pressurelsb)
 Reads Pressure LSB(raw) values from the environmental sensor. More...
 
Retcode_T Environmental_readTemperature (Environmental_HandlePtr_T handle, int32_t *temperature)
 Reads Temperature in milli degree Celsius values from the environmental sensor. More...
 
Retcode_T Environmental_readTemperatureLSB (Environmental_HandlePtr_T handle, int32_t *temperaturelsb)
 Reads Temperature LSB(raw) values from the environmental sensor. More...
 
Retcode_T Environmental_setFilterCoefficient (Environmental_HandlePtr_T handle, Environmental_FilterCoefficient_T filter)
 sets the Filter Coefficient for the environmental sensor More...
 
Retcode_T Environmental_setOverSamplingHumidity (Environmental_HandlePtr_T handle, Environmental_OverSampling_T samplingRate)
 sets the OverSampling rate of Humidity data for the environmental sensor referenced by the passed handle. More...
 
Retcode_T Environmental_setOverSamplingPressure (Environmental_HandlePtr_T handle, Environmental_OverSampling_T samplingRate)
 sets the OverSampling rate of pressure data for the environmental sensor referenced by the passed handle. More...
 
Retcode_T Environmental_setOverSamplingTemperature (Environmental_HandlePtr_T handle, Environmental_OverSampling_T samplingRate)
 sets the OverSampling rate of temperature data for the environmental sensor referenced by the passed handle. More...
 
Retcode_T Environmental_setPowerMode (Environmental_HandlePtr_T handle, Environmental_PowerModes_T mode)
 Sets the power mode for the environmental sensor referenced by the passed handle. More...
 
Retcode_T Environmental_setStandbyDuration (Environmental_HandlePtr_T handle, Environmental_StandbyTime_T duration)
 Sets the StandbyDuration for the environmental sensor. More...
 
Retcode_T Environmental_setTemperatureOffset (Environmental_HandlePtr_T handle, int32_t offset)
 Register the ambient temperature offset in millidegree Kelvin. More...
 
static int8_t mappingEnumForGetFunctions (uint8_t start, uint8_t end, uint8_t getValueToBeTransalated, const uint8_t *lookUpTablePtr)
 
static Retcode_T setOverSampling (int8_t ParamType, Environmental_HandlePtr_T handle, Environmental_OverSampling_T samplingRate)
 

Variables

static const uint8_t filterCoeffLookUpTable [ENVIRONMENTAL_FILTER_COEFF_OUT_OF_RANGE]
 
static const uint8_t modeLookUpTable [ENVIRONMENTAL_POWERMODE_OUT_OF_RANGE]
 
static const uint8_t overSamplingLookUpTable [ENVIRONMENTAL_OVERSAMP_OUT_OF_RANGE]
 
static const uint8_t standbytimeLookUpTable [ENVIRONMENTAL_STANDBY_TIME_OUT_OF_RANGE]
 

Macro Definition Documentation

#define BCDS_MODULE_ID   BCDS_SENSORS_ID_ENVIRONMENTAL

Function Documentation

static Retcode_T bme280LibErrorMapping ( BME280_RETURN_FUNCTION_TYPE  BME280_libReturn)
static

+ Here is the caller graph for this function:

static int8_t mappingEnumForGetFunctions ( uint8_t  start,
uint8_t  end,
uint8_t  getValueToBeTransalated,
const uint8_t *  lookUpTablePtr 
)
static

+ Here is the caller graph for this function:

static Retcode_T setOverSampling ( int8_t  ParamType,
Environmental_HandlePtr_T  handle,
Environmental_OverSampling_T  samplingRate 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

const uint8_t filterCoeffLookUpTable[ENVIRONMENTAL_FILTER_COEFF_OUT_OF_RANGE]
static
Initial value:
=
{
}
#define BME280_FILTER_COEFF_OFF
Definition: bme280.h:553
#define BME280_FILTER_COEFF_8
Definition: bme280.h:556
#define BME280_FILTER_COEFF_4
Definition: bme280.h:555
#define BME280_FILTER_COEFF_2
Definition: bme280.h:554
const uint8_t modeLookUpTable[ENVIRONMENTAL_POWERMODE_OUT_OF_RANGE]
static
Initial value:
= {
}
#define BME280_SLEEP_MODE
Definition: bme280.h:501
#define BME280_FORCED_MODE
Definition: bme280.h:502
const uint8_t overSamplingLookUpTable[ENVIRONMENTAL_OVERSAMP_OUT_OF_RANGE]
static
Initial value:
=
{
}
#define BME280_OVERSAMP_8X
Definition: bme280.h:523
#define BME280_OVERSAMP_1X
Definition: bme280.h:520
#define BME280_OVERSAMP_4X
Definition: bme280.h:522
#define BME280_OVERSAMP_2X
Definition: bme280.h:521
#define BME280_OVERSAMP_SKIPPED
Definition: bme280.h:519
const uint8_t standbytimeLookUpTable[ENVIRONMENTAL_STANDBY_TIME_OUT_OF_RANGE]
static
Initial value:
=
{
}
#define BME280_STANDBY_TIME_125_MS
Definition: bme280.h:510
#define BME280_STANDBY_TIME_1000_MS
Definition: bme280.h:513
#define BME280_STANDBY_TIME_1_MS
Definition: bme280.h:508
#define BME280_STANDBY_TIME_63_MS
Definition: bme280.h:509
#define BME280_STANDBY_TIME_500_MS
Definition: bme280.h:512
#define BME280_STANDBY_TIME_10_MS
Definition: bme280.h:514
#define BME280_STANDBY_TIME_250_MS
Definition: bme280.h:511

All rights reserved. The use is subject to the XDK SDK EULA by Bosch Connected Devices and Solutions GmbH.
This documentation file has been automatically generated on Thu Mar 14 2019 19:12:48 by doxygen 1.8.8