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

SensorUtils Interfaces of BMA280. More...

+ Collaboration diagram for BMA280_SensorUtils:

Files

file  BCDS_Bma280Utils.h
 

Data Structures

struct  Bma280Utils_ConfigInterrupt_S
 structure to represent interrupt configuration of Bma280 More...
 
struct  Bma280Utils_Info_S
 structure to hold the Bma280 specific configurations like GPIO ,I2c and axisRemap More...
 
struct  Bma280Utils_SlopeIntrConfig_S
 structure representing the configuration of Bma280 slope interrupt More...
 

Typedefs

typedef struct
Bma280Utils_ConfigInterrupt_S 
Bma280Utils_ConfigInterrupt_T
 
typedef struct
Bma280Utils_ConfigInterrupt_S
Bma280Utils_ConfigInterruptPtr_T
 
typedef struct Bma280Utils_Info_S Bma280Utils_Info_T
 
typedef struct Bma280Utils_Info_SBma280Utils_InfoPtr_T
 
typedef enum
Bma280Utils_IntrChannel_E 
Bma280Utils_IntrChannel_T
 
typedef void * Bma280Utils_IntrConfigPtr_T
 Pointer to represent interrupt configuration structure. More...
 
typedef enum Bma280Utils_IntrType_E Bma280Utils_IntrType_T
 
typedef struct
Bma280Utils_SlopeIntrConfig_S 
Bma280Utils_SlopeIntrConfig_T
 
typedef struct
Bma280Utils_SlopeIntrConfig_S
Bma280Utils_SlopeIntrConfigPtr_T
 

Enumerations

enum  Bma280Utils_IntrChannel_E
 Enumeration to represent supported interrupt channels of Bma280. More...
 
enum  Bma280Utils_IntrType_E
 Enumeration to represent supported interrupt types of Bma280. More...
 

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

Detailed Description

The interface header exports High-level Sensor API's which are used to Initialize sensor, Configure interrupt and re-map the axis for the BMA280.


Data Structure Documentation

struct Bma280Utils_ConfigInterrupt_S
struct Bma280Utils_Info_S
+ Collaboration diagram for Bma280Utils_Info_S:

Data Fields

uint32_t BspSensorId
 
uint8_t dev_addr
 
BSP_Sensor_InterruptCallback_T ISRCallback
 
AxisRemap_Config_T remap
 

Field Documentation

uint32_t BspSensorId
uint8_t dev_addr
struct Bma280Utils_SlopeIntrConfig_S

Data Fields

uint8_t slopeDuration
 
uint8_t slopeEnableX
 
uint8_t slopeEnableY
 
uint8_t slopeEnableZ
 
uint8_t slopeThreshold
 

Field Documentation

uint8_t slopeDuration

Interrupt triggers on enabled axis, when threshold value exceeds and remains for duration mentioned in this field

uint8_t slopeEnableX

set 1/0 to enable/disable slope interrupt for X axis

uint8_t slopeEnableY

set 1/0 to enable/disable slope interrupt for Y axis

uint8_t slopeEnableZ

set 1/0 to enable/disable slope interrupt for Z axis

uint8_t slopeThreshold

Interrupt triggers on enabled axis, whenever it exceeds this threshold value

Typedef Documentation

Enumeration Type Documentation

Enumerator
BMA280UTILS_INTERRUPT_CHANNEL1 
BMA280UTILS_INTERRUPT_CHANNEL2 
BMA280UTILS_INTERRUPT_CHANNEL_INVALID 
Enumerator
BMA280UTILS_NEW_DATA_INTERRUPT 
BMA280UTILS_SLOPE_INTERRUPT 
BMA280UTILS_DOUBLE_TAP_INTERRUPT 
BMA280UTILS_LOW_G_INTERRUPT 
BMA280UTILS_INVALID_INTERRUPT 

Function Documentation

Retcode_T Bma280Utils_configInterrupt ( Bma280Utils_InfoPtr_T  bma280Info,
Bma280Utils_ConfigInterruptPtr_T  interruptConfig 
)
Parameters
[in]bma280Info:Structure holding the bma280 specific configurations.Callback for the interrupt and its type should be given in this handle
[in]interruptConfig:Structure holding the information about interrupt type,channel and its related configuration should be given here
Return values
RETCODE_OKConfiguration of interrupt for BMA280 is success.
RETCODE_NULL_POINTERwhen any of the input parameter(interruptConfig & interruptConfig->configInterrupt) is NULL.
RETCODE_LIB_NULL_POINTERwhen any of the input parameter for BST library API is NULL.
RETCODE_BST_BMA280_ERRORwhen error is returned from BST library API.
RETCODE_INVALID_PARAMwhen the interrupt configuration parameter is invalid.
RETCODE_UNINITIALIZEDwhen this api is called before initializing Bma280 sensor
Note
The return value consist of (First 1 MSByte represents Package ID, Next byte represents Severity and Last 2 LSBytes represents error code).

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T Bma280Utils_disableInterrupt ( Bma280Utils_InfoPtr_T  bma280Info,
Bma280Utils_IntrType_T  interruptType,
Bma280Utils_IntrChannel_T  interruptChannel 
)
Parameters
[in]bma280Info:structure holding the Bma280 specific configurations
[in]interruptType:type of interrupt that needs to be disabled
[in]interruptChannel:interrupt channel in which interrupt needs to be disabled
Return values
RETCODE_OKBMA280 disable interrupt success
RETCODE_LIB_NULL_POINTERwhen any of the input parameter for BST library API is NULL.
RETCODE_BST_BMA280_ERRORwhen error is returned from BST library API.
RETCODE_INVALID_PARAMwhen the interrupt configuration parameter is invalid.
RETCODE_UNINITIALIZEDwhen this api is called before initializing Bma280 sensor.
Note
The return value consist of (First MSB Byte represents Package ID,Next Byte represents Severity and Last 2LSB Bytes represents error code).

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T Bma280Utils_initialize ( Bma280Utils_InfoPtr_T  bma280Info)
Parameters
[in]bma280Info:structure holding the bma280 specific configurations
Return values
RETCODE_OKBMA280 is initialized successfully.
RETCODE_NULL_POINTERwhen any of the input parameter(bma280Info->ISRCallback or bma280Info) is NULL.
RETCODE_LIB_NULL_POINTERwhen any of the input parameter for BST library API is NULL.
RETCODE_BST_BMA280_ERRORwhen error is returned from BST library API.
RETCODE_DOPPLE_INITIALIZATIONWhen initialization is already done.
Returns
In case of other failures refer BSP_SensorNode_Enable or #I2CSensorTransceiver_Init API's.
Note
1) The return value consist of (First MSB Byte represents Package ID,Next Byte represents Severity and Last 2LSB Bytes represents error code).
2) The support of multiple instances is not possible due to the limitation in the BST library.
3) Calling Bma280 initialization API present in sensorUtils (Bma280Utils_initialize) and BST library (bma2x2_init) concurrently will lead to unexpected behaviour.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T Bma280Utils_remapAxis ( Bma280Utils_InfoPtr_T  bma280Info,
AxisRemap_Data_T accelData 
)
Parameters
[in]bma280Info:structure holding the Bma280 specific configurations. The information about remap configuration should be given in this struct
[in,out]accelData: while calling this API structure will hold the Bma280 data that needs to be the remapped. After calling this API the structure will hold remapped data
Return values
RETCODE_OKBMA280 axis remap success
RETCODE_NULL_POINTERwhen any of the input parameter is NULL.
RETCODE_UNINITIALIZEDwhen this api is called before initializing Bma280 sensor.
Returns
In case of other failures refer AxisRemap_remapSensorData API.
Note
The return value consist of (First MSB Byte represents Package ID,Next Byte represents Severity and Last 2LSB Bytes represents error code).

copying the actual sensor data into a local variable

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T Bma280Utils_uninitialize ( Bma280Utils_InfoPtr_T  bma280Info)
Parameters
[in]bma280Info:structure holding the bma280 specific configurations
Return values
RETCODE_OKBMA280 un-initialization success
RETCODE_NULL_POINTERwhen bma280Info is NULL.
RETCODE_UNINITIALIZEDwhen this api is called before initializing Bma280 sensor.
Returns
In case of other failures refer BSP_SensorNode_Disable or BSP_SensorNode_IsAllNodesDisabled or #I2CSensorTransceiver_Deinit API.
Note
The return value consist of (First MSB Byte represents Package ID,Next Byte represents Severity and Last 2LSB Bytes represents error code).

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