XDK API  3.6.0
Documentation
Macros | Functions | Variables
Bma280Utils.c File Reference
#include "BCDS_SensorUtils.h"
#include "BCDS_Bma280Utils.h"
#include "SensorUtilsAxisRemap.h"
#include "BCDS_I2CTransceiver.h"
#include "SensorNodeMapping.h"
#include "BCDS_BSP_Board.h"
#include <bma2x2.h>
+ Include dependency graph for Bma280Utils.c:

Macros

#define BCDS_MODULE_ID   BCDS_SENSORUTILS_ID_BMA280
 
#define BMA280_MAX_ALLOWED_SLOPE_DURATION   UINT8_C(3)
 
#define CONFIGURATION_DELAY   UINT32_C(10)
 
#define DISABLE_INTERRUPT   UINT8_C(0)
 
#define ENABLE_INTERRUPT   UINT8_C(1)
 

Functions

Retcode_T Bma280Utils_configInterrupt (Bma280Utils_InfoPtr_T bma280Info, Bma280Utils_ConfigInterruptPtr_T interruptConfig)
 Function to Configure interrupts of Bma280. Before calling this API Update the below information in the appropriate structure 1) Update callback function in Bma280Utils_InfoPtr_T. 2) Update the type of callback(deferred or real time) in Bma280Utils_InfoPtr_T. 3) Update interrupt type and channel to Which interrupt needs be associated in Bma280Utils_ConfigInterrupt_T. 4) Update Bma280Utils_IntrConfigPtr_T with appropriate interrupt configuration After calling this API the given interrupt will be enabled on the given channel and the callback will be associated with the interrupt. More...
 
static void Bma280Utils_DelayMS (BMA2x2_MDELAY_DATA_TYPE delayMS)
 Function to provide a delay. More...
 
Retcode_T Bma280Utils_disableInterrupt (Bma280Utils_InfoPtr_T bma280Info, Bma280Utils_IntrType_T interruptType, Bma280Utils_IntrChannel_T interruptChannel)
 Function to Disable the Interrupt. More...
 
Retcode_T Bma280Utils_initialize (Bma280Utils_InfoPtr_T bma280Info)
 Function to initialize Bma280. This needs to be called before calling any other API. More...
 
Retcode_T Bma280Utils_remapAxis (Bma280Utils_InfoPtr_T bma280Info, AxisRemap_Data_T *accelData)
 Function to read remapped Bma280 data. More...
 
Retcode_T Bma280Utils_uninitialize (Bma280Utils_InfoPtr_T bma280Info)
 Function to uninitialize Accel.After calling this API sensor is no more usable without initializing it again by calling Bma280Utils_initialize() API. More...
 
static Retcode_T configureNewDataInterrupt (Bma280Utils_IntrChannel_T interruptChannel)
 Function responsible to configure interrupt for new sensor data. More...
 
static Retcode_T configureSlopeInterrupt (Bma280Utils_SlopeIntrConfigPtr_T slopeIntrConfig, Bma280Utils_IntrChannel_T interruptChannel)
 Function responsible to configure interrupt conditions in the support layer. More...
 
static Retcode_T libErrorMapping (BMA2x2_RETURN_FUNCTION_TYPE bmaLibReturn)
 This function maps error codes returned from BMA280 library to retcode values. More...
 

Variables

struct bma2x2_t bma280Initialization
 
static bool initializationStatus = false
 

Macro Definition Documentation

#define BCDS_MODULE_ID   BCDS_SENSORUTILS_ID_BMA280
#define BMA280_MAX_ALLOWED_SLOPE_DURATION   UINT8_C(3)

macro to set maximum allowed slope duration

#define CONFIGURATION_DELAY   UINT32_C(10)

macro used to represent the delay needed between changing the configuration and enabling the interrupt variable to check initialization status

#define DISABLE_INTERRUPT   UINT8_C(0)

macro used to disable the interrupt

#define ENABLE_INTERRUPT   UINT8_C(1)

macro used to enable the interrupt

Function Documentation

static void Bma280Utils_DelayMS ( BMA2x2_MDELAY_DATA_TYPE  delayMS)
static
Parameters
delayMSDelay in milliseconds

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static Retcode_T configureNewDataInterrupt ( Bma280Utils_IntrChannel_T  interruptChannel)
static
Parameters
[in]interruptChannel- Channel to which interrupt needs to be configured
Return values
RETCODE_OKBMA280 sensor configure slope interrupt success.
RETCODE_FAILUREBMA280 sensor configure slope interrupt failed.
RETCODE_INVALID_PARAMBMA280 sensor configure slope interrupt failed because of invalid input parameter.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static Retcode_T configureSlopeInterrupt ( Bma280Utils_SlopeIntrConfigPtr_T  slopeIntrConfig,
Bma280Utils_IntrChannel_T  interruptChannel 
)
static
Parameters
[in]slopeIntrConfigstructure representing to slope interrupt configuration
[in]interruptChannelChannel to which interrupt needs to be configured
Return values
RETCODE_OKBMA280 sensor configure slope interrupt success.
RETCODE_FAILUREBMA280 sensor configure slope interrupt failed.
RETCODE_INVALID_PARAMBMA280 sensor configure slope interrupt failed because of invalid input parameter.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static Retcode_T libErrorMapping ( BMA2x2_RETURN_FUNCTION_TYPE  bmaLibReturn)
static
Parameters
[in]bmaLibReturn- Return value from BMA2X2 library
Return values
RETCODE_OKBMA2X2 sensor API call success
RETCODE_BST_BMA280_ERRORBMA2X2 sensor API call failed
RETCODE_LIB_NULL_POINTERBMA2X2 sensor API call failed because of NULL input parameter

+ Here is the caller graph for this function:

Variable Documentation

struct bma2x2_t bma280Initialization
bool initializationStatus = false
static

BMA280 initialization structure


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