Skip to content

Commit

Permalink
-Added Converting LSB of the differences of accelerometer values to m…
Browse files Browse the repository at this point in the history
…g API

-Added macros for resulting minimum difference signal in mg for self test
-Refactored the source code
  • Loading branch information
BST-Github-Admin authored and kegov committed May 17, 2019
1 parent 0aee413 commit 4d01cd4
Show file tree
Hide file tree
Showing 9 changed files with 4,426 additions and 3,414 deletions.
4,761 changes: 2,735 additions & 2,026 deletions bma400.c

Large diffs are not rendered by default.

28 changes: 18 additions & 10 deletions bma400.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2017 - 2018 Bosch Sensortec GmbH
* Copyright (C) 2018 - 2019 Bosch Sensortec GmbH
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -40,31 +40,37 @@
* patent rights of the copyright holder.
*
* @file bma400.h
* @date 25 Sep 2018
* @version 1.5.0
* @date 09 May 2019
* @version 1.5.2
* @brief
*
*/

/*! @file bma400.h */

/*!
* @defgroup BMA400 SENSOR API
* @{
*/

#ifndef BMA400_H__
#define BMA400_H__

/*! CPP guard */
#ifdef __cplusplus
extern "C" {
#endif

/*********************************************************************/
/* header files */

#include "bma400_defs.h"

/*********************************************************************/
/* (extern) variable declarations */
/*********************************************************************/
/* function prototype declarations */

/*!
* @brief This API is the entry point, Call this API before using other APIs.
* This API reads the chip-id of the sensor which is the first step to
Expand Down Expand Up @@ -301,7 +307,8 @@ int8_t bma400_get_interrupt_status(uint16_t *int_status, const struct bma400_dev
* @return Result of API execution status
* @retval zero -> Success / +ve value -> Warning / -ve value -> Error
*/
int8_t bma400_get_interrupts_enabled(struct bma400_int_enable *int_select, uint8_t n_sett, const struct bma400_dev *dev);
int8_t bma400_get_interrupts_enabled(struct bma400_int_enable *int_select, uint8_t n_sett,
const struct bma400_dev *dev);

/*!
* @brief This API is used to enable the various interrupts
Expand All @@ -324,7 +331,8 @@ int8_t bma400_get_interrupts_enabled(struct bma400_int_enable *int_select, uint8
* @return Result of API execution status
* @retval zero -> Success / +ve value -> Warning / -ve value -> Error
*/
int8_t bma400_enable_interrupt(const struct bma400_int_enable *int_select, uint8_t n_sett, const struct bma400_dev *dev);
int8_t bma400_enable_interrupt(const struct bma400_int_enable *int_select, uint8_t n_sett,
const struct bma400_dev *dev);

/*!
* @brief This API is used to get the step counter output in form
Expand Down Expand Up @@ -416,9 +424,9 @@ int8_t bma400_get_fifo_data(struct bma400_fifo_data *fifo, const struct bma400_d
* @retval zero -> Success / +ve value -> Warning / -ve value -> Error
*/
int8_t bma400_extract_accel(struct bma400_fifo_data *fifo,
struct bma400_sensor_data *accel_data,
uint16_t *frame_count,
const struct bma400_dev *dev);
struct bma400_sensor_data *accel_data,
uint16_t *frame_count,
const struct bma400_dev *dev);

/*!
* @brief This is used to perform self test of accelerometer in BMA400
Expand Down Expand Up @@ -448,7 +456,7 @@ int8_t bma400_set_step_counter_param(uint8_t *sccr_conf, const struct bma400_dev

#ifdef __cplusplus
}
#endif /* End of CPP guard */
#endif /* End of CPP guard */

#endif /* BMA400_H__ */
#endif /* BMA400_H__ */
/** @}*/
Loading

0 comments on commit 4d01cd4

Please sign in to comment.