XDK API  3.6.0
Documentation
Files | Data Structures | Typedefs | Enumerations | Functions

Environmental Sensor Interface. More...

+ Collaboration diagram for Environmental:

Files

file  BCDS_Environmental.h
 

Data Structures

struct  Environmental_Data_S
 
struct  Environmental_Handle_S
 structure to hold the Environmental sensor specific GPIO ,I2c configurations and the function pointers to initialize configure and get the data from the sensor More...
 
struct  Environmental_LsbData_S
 
struct  Environmental_SensorInfo_S
 

Typedefs

typedef struct Environmental_Data_S Environmental_Data_T
 
typedef struct
Environmental_Data_S
Environmental_DataPtr_T
 
typedef enum
Environmental_FilterCoefficient_E 
Environmental_FilterCoefficient_T
 
typedef enum
Environmental_FilterCoefficient_E
Environmental_FilterCoefficientPtr_T
 
typedef struct
Environmental_Handle_S 
Environmental_Handle_T
 
typedef struct
Environmental_Handle_S
Environmental_HandlePtr_T
 
typedef struct
Environmental_LsbData_S 
Environmental_LsbData_T
 
typedef struct
Environmental_LsbData_S
Environmental_LsbDataPtr_T
 
typedef enum
Environmental_OverSampling_E 
Environmental_OverSampling_T
 
typedef enum
Environmental_OverSampling_E
Environmental_OverSamplingPtr_T
 
typedef enum
Environmental_PowerModes_E 
Environmental_PowerModes_T
 
typedef enum
Environmental_PowerModes_E
Environmental_PowerModesPtr_T
 
typedef enum
Environmental_SensorID_E 
Environmental_SensorID_T
 
typedef struct
Environmental_SensorInfo_S 
Environmental_SensorInfo_T
 
typedef struct
Environmental_SensorInfo_S
Environmental_SensorInfoPtr_T
 
typedef enum
Environmental_StandbyTime_E 
Environmental_StandbyTime_T
 
typedef enum
Environmental_StandbyTime_E
Environmental_StandbyTimePtr_T
 

Enumerations

enum  Environmental_FilterCoefficient_E
 
enum  Environmental_OverSampling_E
 
enum  Environmental_PowerModes_E
 
enum  Environmental_SensorID_E
 
enum  Environmental_StandbyTime_E
 

Functions

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...
 

Detailed Description

The interface header exports advance Sensor API's which are used to Initialize Environmental sensor, Configure power Modes, Sleep Duration & Over sampling. Also has API's for reading sensor values & reading mode Settings.


Data Structure Documentation

struct Environmental_Data_S

Data structure for Environmental sensor data in standard units

Data Fields

uint32_t humidity
 
uint32_t pressure
 
int32_t temperature
 

Field Documentation

uint32_t humidity
uint32_t pressure
int32_t temperature
struct Environmental_Handle_S
+ Collaboration diagram for Environmental_Handle_S:

Data Fields

Environmental_SensorInfo_T SensorInformation
 
void * SensorPtr
 

Field Documentation

Environmental_SensorInfo_T SensorInformation

Structure to hold logical identity to environmental sensor

void* SensorPtr

Pointer to structure containing hardware specific configuration

struct Environmental_LsbData_S

Data structure for Environmental sensor LSB data

Data Fields

int32_t humidity
 
int32_t pressure
 
int32_t temperature
 

Field Documentation

int32_t humidity
int32_t pressure
int32_t temperature
struct Environmental_SensorInfo_S

to hold the environmental type and its initialization status

Data Fields

uint8_t initializationStatus
 
Environmental_SensorID_T sensorID
 

Field Documentation

uint8_t initializationStatus

value to indicate whether the environmental sensor is properly initialized before

logical sensor ID to represents physical environmental sensor

Typedef Documentation

Enumeration Type Documentation

enum values to represent Time constant of IIR filter supported by the Environmental sensor

Enumerator
ENVIRONMENTAL_BME280_FILTER_COEFF_OFF 
ENVIRONMENTAL_BME280_FILTER_COEFF_2 
ENVIRONMENTAL_BME280_FILTER_COEFF_4 
ENVIRONMENTAL_BME280_FILTER_COEFF_8 
ENVIRONMENTAL_BME280_FILTER_COEFF_16 
ENVIRONMENTAL_FILTER_COEFF_OUT_OF_RANGE 

enum values to represent Oversampling supported by the Environmental sensor

Enumerator
ENVIRONMENTAL_BME280_OVERSAMP_SKIPPED 

This option could be used to disable data measurement

ENVIRONMENTAL_BME280_OVERSAMP_1X 
ENVIRONMENTAL_BME280_OVERSAMP_2X 
ENVIRONMENTAL_BME280_OVERSAMP_4X 
ENVIRONMENTAL_BME280_OVERSAMP_8X 
ENVIRONMENTAL_BME280_OVERSAMP_16X 
ENVIRONMENTAL_OVERSAMP_OUT_OF_RANGE 

enum values to represent Power Modes supported by the Environmental sensor

Enumerator
ENVIRONMENTAL_BME280_POWERMODE_SLEEP 

no operation, all registers accessible, lowest power, selected after startup

ENVIRONMENTAL_BME280_POWERMODE_FORCED 

perform one measurement, store results and return to sleep mode

ENVIRONMENTAL_BME280_POWERMODE_NORMAL 

perpetual cycling of measurements and inactive periods

ENVIRONMENTAL_POWERMODE_OUT_OF_RANGE 

This Specifies maximum number of enum elements and it is used only for error handling

enum values to represent environmental types supported

Enumerator
ENVIRONMENTAL_BME280 

ID to represents bme280 environmental sensor

ENVIRONMENTAL_INVALID_ID 

This Specifies maximum number of enum elements and it is used only for error handling

enum values to represent StandbyTime(ms) supported by the Environmental sensor

Enumerator
ENVIRONMENTAL_BME280_STANDBY_TIME_1_MS 
ENVIRONMENTAL_BME280_STANDBY_TIME_63_MS 
ENVIRONMENTAL_BME280_STANDBY_TIME_125_MS 
ENVIRONMENTAL_BME280_STANDBY_TIME_250_MS 
ENVIRONMENTAL_BME280_STANDBY_TIME_500_MS 
ENVIRONMENTAL_BME280_STANDBY_TIME_1000_MS 
ENVIRONMENTAL_BME280_STANDBY_TIME_10_MS 
ENVIRONMENTAL_BME280_STANDBY_TIME_20_MS 
ENVIRONMENTAL_STANDBY_TIME_OUT_OF_RANGE 

Function Documentation

Retcode_T Environmental_compensateData ( Environmental_HandlePtr_T  handle,
Environmental_DataPtr_T  sensorData 
)

Compensates temperature and humidity values read using Environmental_readData() The result can be seen as the ambient values outside the sensor

Note
Please set an appropriate temperature offset value using the Environmental_setTemperatureOffset() function before using this API
Parameters
[in]handleHandle to the environmental object
[in]sensorDataParameter in which Temperature(mDegC),pressure(Pascal) and relative humidity (%rH) data from environmental sensor
Return values
RETCODE_SUCCESSSet compensateData success.
RETCODE_NULL_POINTERIn case of NULL pointers arguments passed.
RETCODE_UNINITIALIZEDif called without initializing the sensor.
RETCODE_INVALID_PARAMIn case of trying to set invalid compensate data.
Note
The return value consist of (First 1 MSByte represents Package ID, Next byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to BCDS_getSensorErrorCode API to know the sensor return code present in BCDS_SensorErrorType_E.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T Environmental_deInit ( Environmental_HandlePtr_T  handle)
Parameters
[in]handleHandle to the environmental object
Return values
RETCODE_SUCCESSEnvironmental De-initialization success.
RETCODE_INVALID_PARAMIn case of invalid sensor handle.
Returns
In case of any other error refer Bme280Utils_uninitialize error codes.
Note
The return value consist of (First 1 MSByte represents Package ID, Next byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to BCDS_getSensorErrorCode API to know the sensor return code present in BCDS_SensorErrorType_E.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T Environmental_getPowerMode ( Environmental_HandlePtr_T  handle,
Environmental_PowerModesPtr_T  mode 
)
Parameters
[in]handleHandle to the environmental object
[in]modeLast configured power mode of environmental sensor
Return values
RETCODE_SUCCESSGet power mode success.
RETCODE_UNINITIALIZEDif called without initializing the sensor.
RETCODE_INVALID_PARAMIn case of invalid sensor handle.
RETCODE_NOT_SUPPORTEDIn case of getting power mode values other than Environmental_PowerModes_E.
Returns
In case of other failures refer bme280LibErrorMapping API's.
Note
The return value consist of (First 1 MSByte represents Package ID, Next byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to BCDS_getSensorErrorCode API to know the sensor return code present in BCDS_SensorErrorType_E.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T Environmental_getStandbyDuration ( Environmental_HandlePtr_T  handle,
Environmental_StandbyTimePtr_T  duration 
)
Parameters
[in]handleHandle to the environmental object
[in]durationLast configured Standby duration of environmental
Return values
RETCODE_SUCCESSEnvironmental get standby duration success.
RETCODE_UNINITIALIZEDif called without initializing the sensor.
RETCODE_INVALID_PARAMIn case of NULL pointer arguments.
RETCODE_NOT_SUPPORTEDin case of getting standby duration values other than Environmental_StandbyTime_E
Returns
In case of other failures refer bme280LibErrorMapping API's.
Note
The return value consist of (First 1 MSByte represents Package ID, Next byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to BCDS_getSensorErrorCode API to know the sensor return code present in BCDS_SensorErrorType_E

+ Here is the call graph for this function:

Retcode_T Environmental_init ( Environmental_HandlePtr_T  handle)
Parameters
[in]handleHandle to the environmental sensor object
Return values
RETCODE_SUCCESSEnvironmental initialization success.
RETCODE_INVALID_PARAMIn case of invalid sensor handle.
Returns
In case of any other error refer Bme280Utils_initialize error codes.
Warning
This function needs to be called before calling any other accelerometer API.
Note
The return value consist of (First 1 MSByte represents Package ID, Next byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to BCDS_getSensorErrorCode API to know the sensor return code present in BCDS_SensorErrorType_E.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T Environmental_readCompensatedData ( Environmental_HandlePtr_T  handle,
Environmental_DataPtr_T  sensorData 
)

Reads and compensates temperature and humidity values The result can be seen as the ambient values outside the sensor

Note
Please set an appropriate temperature offset value using the Environmental_setTemperatureOffset() function before using this API
Parameters
[in]handleHandle to the environmental object
[in]sensorDataParameter in which Temperature(mDegC),pressure(Pascal) and relative humidity (%rH) data from environmental sensor
Return values
RETCODE_SUCCESSRead compensateData success.
RETCODE_NULL_POINTERIn case of NULL pointers arguments passed.
Returns
In case of other error code refer Environmental_readData or Environmental_compensateData API.
Note
The return value consist of (First 1 MSByte represents Package ID, Next byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to BCDS_getSensorErrorCode API to know the sensor return code present in BCDS_SensorErrorType_E.

+ Here is the call graph for this function:

Retcode_T Environmental_readData ( Environmental_HandlePtr_T  handle,
Environmental_DataPtr_T  sensorData 
)
Parameters
[in]handleHandle to the environmental object
[in]sensorDataParameter in which Temperature(mDegC),pressure(Pascal) and Humidity(%rh) data from environmental sensor
Return values
RETCODE_SUCCESSEnvironmental ReadData success.
RETCODE_UNINITIALIZEDif called without initializing the sensor.
RETCODE_INVALID_PARAMIn case of invalid sensor handle.
Returns
In case of other failures refer bme280LibErrorMapping API's.
Note
The return value consist of (First 1 MSByte represents Package ID, Next byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to BCDS_getSensorErrorCode API to know the sensor return code present in BCDS_SensorErrorType_E.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T Environmental_readDataLSB ( Environmental_HandlePtr_T  handle,
Environmental_LsbDataPtr_T  sensorData 
)
Parameters
[in]handleHandle to the environmental object
[in]sensorDataParameter in which Temperature,pressure and humidity LSB raw data from environmental sensor gets collected.
Return values
RETCODE_SUCCESSEnvironmental ReadDataLSB success.
RETCODE_UNINITIALIZEDif called without initializing the sensor.
RETCODE_INVALID_PARAMIn case of invalid sensor handle.
Returns
In case of other failures refer bme280LibErrorMapping API's.
Note
The return value consist of (First 1 MSByte represents Package ID, Next byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to BCDS_getSensorErrorCode API to know the sensor return code present in BCDS_SensorErrorType_E.

+ Here is the call graph for this function:

Retcode_T Environmental_readHumidity ( Environmental_HandlePtr_T  handle,
uint32_t *  humidity 
)
Parameters
[in]handleHandle to the environmental object
[in]humidityParameter in which Humidity(%rh) data from environmental sensor gets collected.
Return values
RETCODE_SUCCESSEnvironmental read Humidity success.
RETCODE_UNINITIALIZEDif called without initializing the sensor.
RETCODE_INVALID_PARAMIn case of NULL pointer arguments.
Returns
In case of other failures refer bme280LibErrorMapping API's.
Note
The return value consist of (First 1 MSByte represents Package ID, Next byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to BCDS_getSensorErrorCode API to know the sensor return code present in BCDS_SensorErrorType_E.

+ Here is the call graph for this function:

Retcode_T Environmental_readHumidityLSB ( Environmental_HandlePtr_T  handle,
int32_t *  humiditylsb 
)
Parameters
[in]handleHandle to the environmental object
[in]humiditylsbParameter in which Humidity LSB raw data from environmental sensor gets collected.
Return values
RETCODE_SUCCESSEnvironmental read Humidity LSB success.
RETCODE_UNINITIALIZEDif called without initializing the sensor.
RETCODE_INVALID_PARAMIn case of invalid sensor handle.
Returns
In case of other failures refer bme280LibErrorMapping API's.
Note
The return value consist of (First 1 MSByte represents Package ID, Next byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to BCDS_getSensorErrorCode API to know the sensor return code present in BCDS_SensorErrorType_E.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T Environmental_readPressure ( Environmental_HandlePtr_T  handle,
uint32_t *  pressure 
)
Parameters
[in]handleHandle to the environmental object
[in]pressureParameter in which Pressure(Pascal) data from environmental sensor gets collected.
Return values
RETCODE_SUCCESSEnvironmental read Pressure success.
RETCODE_UNINITIALIZEDif called without initializing the sensor.
RETCODE_INVALID_PARAMIn case of NULL pointer arguments.
Returns
In case of other failures refer bme280LibErrorMapping API's.
Note
The return value consist of (First 1 MSByte represents Package ID, Next byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to BCDS_getSensorErrorCode API to know the sensor return code present in BCDS_SensorErrorType_E.

+ Here is the call graph for this function:

Retcode_T Environmental_readPressureLSB ( Environmental_HandlePtr_T  handle,
int32_t *  pressurelsb 
)
Parameters
[in]handleHandle to the environmental object
[in]pressurelsbParameter in which pressure LSB raw data from environmental sensor gets collected.
Return values
RETCODE_SUCCESSEnvironmental read Pressure LSB success.
RETCODE_UNINITIALIZEDif called without initializing the sensor.
RETCODE_INVALID_PARAMIn case of invalid sensor handle.
Returns
In case of other failures refer bme280LibErrorMapping API's.
Note
The return value consist of (First 1 MSByte represents Package ID, Next byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to BCDS_getSensorErrorCode API to know the sensor return code present in BCDS_SensorErrorType_E.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T Environmental_readTemperature ( Environmental_HandlePtr_T  handle,
int32_t *  temperature 
)
Parameters
[in]handleHandle to the environmental object
[in]temperatureParameter in which Temperature(mDegC) data from environmental sensor gets collected.
Return values
RETCODE_SUCCESSEnvironmental read Temperature success.
RETCODE_UNINITIALIZEDif called without initializing the sensor.
RETCODE_INVALID_PARAMIn case of NULL pointer arguments.
Returns
In case of other failures refer bme280LibErrorMapping API's.
Note
The return value consist of (First 1 MSByte represents Package ID, Next byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to BCDS_getSensorErrorCode API to know the sensor return code present in BCDS_SensorErrorType_E.

+ Here is the call graph for this function:

Retcode_T Environmental_readTemperatureLSB ( Environmental_HandlePtr_T  handle,
int32_t *  temperaturelsb 
)
Parameters
[in]handleHandle to the environmental object
[in]temperaturelsbParameter in which Temperature LSB raw data from environmental sensor gets collected.
Return values
RETCODE_SUCCESSEnvironmental read Temperature LSB success.
RETCODE_UNINITIALIZEDif called without initializing the sensor.
RETCODE_INVALID_PARAMIn case of invalid sensor handle.
Returns
In case of other failures refer bme280LibErrorMapping API's.
Note
The return value consist of (First 1 MSByte represents Package ID, Next byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to BCDS_getSensorErrorCode API to know the sensor return code present in BCDS_SensorErrorType_E.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T Environmental_setFilterCoefficient ( Environmental_HandlePtr_T  handle,
Environmental_FilterCoefficient_T  filter 
)
Parameters
[in]handleHandle to the environmental object
[in]filterset value for the Filter Coefficient
Return values
RETCODE_SUCCESSEnvironmental set filter coefficient success.
RETCODE_UNINITIALIZEDif called without initializing the sensor.
RETCODE_INVALID_PARAMIn case of NULL pointer arguments.
RETCODE_NOT_SUPPORTEDin case of setting filter values other than Environmental_FilterCoefficient_E
Returns
In case of other failures refer bme280LibErrorMapping API's.
Note
The return value consist of (First 1 MSByte represents Package ID, Next byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to BCDS_getSensorErrorCode API to know the sensor return code present in BCDS_SensorErrorType_E

+ Here is the call graph for this function:

Retcode_T Environmental_setOverSamplingHumidity ( Environmental_HandlePtr_T  handle,
Environmental_OverSampling_T  samplingRate 
)
Note
If this function is called with option ENVIRONMENTAL_BME280_OVERSAMP_SKIPPED then humidity measurement will be disabled and default value 0x8000 returned for all the subsequent read operation.
Parameters
[in]handleHandle to the environmental object
[in]samplingRateset value for the Humidity OverSampling rate.
Return values
RETCODE_SUCCESSEnvironmental set over sampling humidity success.
RETCODE_UNINITIALIZEDif called without initializing the sensor.
RETCODE_INVALID_PARAMIn case of NULL pointer arguments.
RETCODE_NOT_SUPPORTEDin case of setting over sampling values other than Environmental_OverSampling_E
Returns
Failure can also be because of Environmental_getPowerMode or Environmental_setPowerMode API's.
Note
The return value consist of (First 1 MSByte represents Package ID, Next byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to BCDS_getSensorErrorCode API to know the sensor return code present in BCDS_SensorErrorType_E
Warning
In order to have this setting effective for subsequent measurements, User needs to provide minimum 100 milliseconds delay after calling this API and then the sensor values can be read

Example Usage:

void delayAPI(uint32_t milliSecondsDelay)
{
// Implement the delay logic here
}
{
printf("Environmental_setOverSamplingHumidity Success\n\r");
delayAPI(100);
}

+ Here is the call graph for this function:

Retcode_T Environmental_setOverSamplingPressure ( Environmental_HandlePtr_T  handle,
Environmental_OverSampling_T  samplingRate 
)
Note
If this function is called with option ENVIRONMENTAL_BME280_OVERSAMP_SKIPPED then pressure measurement will be disabled and default value 0x80000 returned for all the subsequent read operation.
Parameters
[in]handleHandle to the environmental object
[in]samplingRateset value for the Pressure OverSampling rate.
Return values
RETCODE_SUCCESSEnvironmental set over sampling pressure success.
RETCODE_UNINITIALIZEDif called without initializing the sensor.
RETCODE_INVALID_PARAMIn case of NULL pointer arguments.
RETCODE_NOT_SUPPORTEDin case of setting over sampling values other than Environmental_OverSampling_E
Returns
Failure can also be because of Environmental_getPowerMode or Environmental_setPowerMode API's.
Note
The return value consist of (First 1 MSByte represents Package ID, Next byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to BCDS_getSensorErrorCode API to know the sensor return code present in BCDS_SensorErrorType_E
Warning
In order to have this setting effective for subsequent measurements, User needs to provide minimum 100 milliseconds delay after calling this API and then the sensor values can be read

Example Usage:

void delayAPI(uint32_t milliSecondsDelay)
{
// Implement the delay logic here
}
{
printf("Environmental_setOverSamplingPressure Success\n\r");
delayAPI(100);
}

+ Here is the call graph for this function:

Retcode_T Environmental_setOverSamplingTemperature ( Environmental_HandlePtr_T  handle,
Environmental_OverSampling_T  samplingRate 
)
Note
If this function is called with option ENVIRONMENTAL_BME280_OVERSAMP_SKIPPED then temperature measurement will be disabled and default value 0x80000 returned for all the subsequent read operation.
Parameters
[in]handleHandle to the environmental object
[in]samplingRateset value for the Temperature OverSampling rate.
Return values
RETCODE_SUCCESSEnvironmental set over sampling temperature success.
RETCODE_UNINITIALIZEDif called without initializing the sensor.
RETCODE_INVALID_PARAMIn case of NULL pointer arguments.
RETCODE_NOT_SUPPORTEDin case of setting over sampling values other than Environmental_OverSampling_E
Returns
Failure can also be because of Environmental_getPowerMode or Environmental_setPowerMode API's.
Note
The return value consist of (First 1 MSByte represents Package ID, Next byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to BCDS_getSensorErrorCode API to know the sensor return code present in BCDS_SensorErrorType_E
Warning
In order to have this setting effective for subsequent measurements, User needs to provide minimum 100 milliseconds delay after calling this API and then the sensor values can be read

Example Usage:

void delayAPI(uint32_t milliSecondsDelay)
{
// Implement the delay logic here
}
{
printf("Environmental_setOverSamplingTemperature Success\n\r");
delayAPI(100);
}

+ Here is the call graph for this function:

Retcode_T Environmental_setPowerMode ( Environmental_HandlePtr_T  handle,
Environmental_PowerModes_T  mode 
)
Parameters
[in]handleHandle to the environmental object
[in]modeThe desired power mode that needs to be set
Return values
RETCODE_SUCCESSSet power mode success.
RETCODE_UNINITIALIZEDif called without initializing the sensor.
RETCODE_INVALID_PARAMIn case of invalid sensor handle.
RETCODE_NOT_SUPPORTEDIn case of setting power mode values other than Environmental_PowerModes_E.
Returns
In case of other failures refer bme280LibErrorMapping API's.
Note
The return value consist of (First 1 MSByte represents Package ID, Next byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to BCDS_getSensorErrorCode API to know the sensor return code present in BCDS_SensorErrorType_E.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T Environmental_setStandbyDuration ( Environmental_HandlePtr_T  handle,
Environmental_StandbyTime_T  duration 
)
Parameters
[in]handleHandle to the environmental object
[in]durationset value for the desired Standby duration
Return values
RETCODE_SUCCESSEnvironmental set standby duration success.
RETCODE_UNINITIALIZEDif called without initializing the sensor.
RETCODE_INVALID_PARAMIn case of NULL pointer arguments.
RETCODE_NOT_SUPPORTEDin case of setting standby duration values other than Environmental_StandbyTime_E
Returns
In case of other failures refer bme280LibErrorMapping API's.
Note
The return value consist of (First 1 MSByte represents Package ID, Next byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to BCDS_getSensorErrorCode API to know the sensor return code present in BCDS_SensorErrorType_E.

+ Here is the call graph for this function:

Retcode_T Environmental_setTemperatureOffset ( Environmental_HandlePtr_T  handle,
int32_t  offset 
)

Registers a temperature offset to be used by the temperature compensation API.

T_ambient = T_sensor + T_offset

Parameters
[in]handleHandle to the environmental object
[in]offsetParameter in which Temperature offset (mDegC) is given to be registered in the temperature compensation API
Return values
RETCODE_SUCCESSSet temperature offset success.
RETCODE_NULL_POINTERIn case of NULL pointers arguments passed.
RETCODE_UNINITIALIZEDif called without initializing the sensor.
Note
The return value consist of (First 1 MSByte represents Package ID, Next byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to BCDS_getSensorErrorCode API to know the sensor return code present in BCDS_SensorErrorType_E.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


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:51 by doxygen 1.8.8