accelpressure 2.1.0.0
|
API for configuring and manipulating AccelPressure Click driver. More...
Topics | |
AccelPressure Registers List | |
List of registers of AccelPressure Click driver. | |
AccelPressure Registers Settings | |
Settings for registers of AccelPressure Click driver. | |
AccelPressure MikroBUS Map | |
MikroBUS pin mapping of AccelPressure Click driver. | |
Functions | |
void | accelpressure_cfg_setup (accelpressure_cfg_t *cfg) |
AccelPressure configuration object setup function. | |
err_t | accelpressure_init (accelpressure_t *ctx, accelpressure_cfg_t *cfg) |
AccelPressure initialization function. | |
err_t | accelpressure_default_cfg (accelpressure_t *ctx) |
AccelPressure default configuration function. | |
err_t | accelpressure_acc_reg_write (accelpressure_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
AccelPressure accel I2C writing function. | |
err_t | accelpressure_acc_reg_read (accelpressure_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
AccelPressure accel I2C reading function. | |
err_t | accelpressure_press_reg_write (accelpressure_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
AccelPressure pressure I2C writing function. | |
err_t | accelpressure_press_reg_read (accelpressure_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
AccelPressure pressure I2C reading function. | |
err_t | accelpressure_get_device_id (accelpressure_t *ctx, uint8_t *device_id) |
AccelPressure get device ID function. | |
err_t | accelpressure_get_status (accelpressure_t *ctx, uint8_t *status) |
AccelPressure get status function. | |
err_t | accelpressure_sw_reset (accelpressure_t *ctx) |
AccelPressure soft reset function. | |
err_t | accelpressure_set_acc_mode (accelpressure_t *ctx, uint8_t op_mode) |
AccelPressure set accel operating mode function. | |
err_t | accelpressure_set_fsr (accelpressure_t *ctx, uint8_t fsr) |
AccelPressure set FSR function. | |
err_t | accelpressure_get_axes_data (accelpressure_t *ctx, accelpressure_axes_t *axes) |
AccelPressure get the accel sensor axes function. | |
err_t | accelpressure_set_press_mode (accelpressure_t *ctx, uint8_t op_mode) |
AccelPressure set pressure operating mode function. | |
err_t | accelpressure_get_drdy_status (accelpressure_t *ctx, uint8_t *drdy) |
AccelPressure get data ready status function. | |
err_t | accelpressure_get_pressure (accelpressure_t *ctx, float *pressure) |
AccelPressure get pressure data function. | |
err_t | accelpressure_get_temperature (accelpressure_t *ctx, float *temperature) |
AccelPressure get temperature data function. | |
uint8_t | accelpressure_get_mot_det (accelpressure_t *ctx) |
AccelPressure get motion detect state function. | |
API for configuring and manipulating AccelPressure Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
err_t accelpressure_acc_reg_read | ( | accelpressure_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
AccelPressure accel I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See accelpressure_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t accelpressure_acc_reg_write | ( | accelpressure_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
AccelPressure accel I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See accelpressure_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void accelpressure_cfg_setup | ( | accelpressure_cfg_t * | cfg | ) |
AccelPressure configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See accelpressure_cfg_t object definition for detailed explanation. |
err_t accelpressure_default_cfg | ( | accelpressure_t * | ctx | ) |
AccelPressure default configuration function.
This function executes a default configuration of AccelPressure click board.
[in] | ctx | : Click context object. See accelpressure_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t accelpressure_get_axes_data | ( | accelpressure_t * | ctx, |
accelpressure_axes_t * | axes ) |
AccelPressure get the accel sensor axes function.
This function reads the accelerometer sensor axes data of the FXLS8974, 3-Axis Low-g Accelerometer on the AccelPressure Click board.
[in] | ctx | : Click context object. See accelpressure_t object definition for detailed explanation. |
[out] | axes | : Linear acceleration output data object (mg). See accelpressure_axes_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t accelpressure_get_device_id | ( | accelpressure_t * | ctx, |
uint8_t * | device_id ) |
AccelPressure get device ID function.
This function reads the device identification data of the FXLS8974, 3-Axis Low-g Accelerometer on the AccelPressure Click board.
[in] | ctx | : Click context object. See accelpressure_t object definition for detailed explanation. |
[out] | device_id | : Device identification. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t accelpressure_get_drdy_status | ( | accelpressure_t * | ctx, |
uint8_t * | drdy ) |
AccelPressure get data ready status function.
This function reads the data ready status of the MPL3115A2, I2C precision pressure sensor with altimetry on the AccelPressure Click board.
[in] | ctx | : Click context object. See accelpressure_t object definition for detailed explanation. |
[in] | drdy | : Data ready status. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t accelpressure_get_mot_det | ( | accelpressure_t * | ctx | ) |
AccelPressure get motion detect state function.
This function checks if motion is detected by reading the states of the MOT (INT) pin of the FXLS8974, 3-Axis Low-g Accelerometer on the AccelPressure Click board.
[in] | ctx | : Click context object. See accelpressure_t object definition for detailed explanation. |
0
- Motion is detected, 1
- No motion. err_t accelpressure_get_pressure | ( | accelpressure_t * | ctx, |
float * | pressure ) |
AccelPressure get pressure data function.
This function reads the pressure data conversion of the MPL3115A2, I2C precision pressure sensor with altimetry on the AccelPressure Click board.
[in] | ctx | : Click context object. See accelpressure_t object definition for detailed explanation. |
[out] | pressure | : Pressure data [mbar]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t accelpressure_get_status | ( | accelpressure_t * | ctx, |
uint8_t * | status ) |
AccelPressure get status function.
This function reads the status data of the FXLS8974, 3-Axis Low-g Accelerometer on the AccelPressure Click board.
[in] | ctx | : Click context object. See accelpressure_t object definition for detailed explanation. |
[out] | status | : Status data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t accelpressure_get_temperature | ( | accelpressure_t * | ctx, |
float * | temperature ) |
AccelPressure get temperature data function.
This function reads the temperature data conversion of the MPL3115A2, I2C precision pressure sensor with altimetry on the AccelPressure Click board.
[in] | ctx | : Click context object. See accelpressure_t object definition for detailed explanation. |
[out] | temperature | : Temperature data [degree Celsius]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t accelpressure_init | ( | accelpressure_t * | ctx, |
accelpressure_cfg_t * | cfg ) |
AccelPressure initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See accelpressure_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See accelpressure_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t accelpressure_press_reg_read | ( | accelpressure_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
AccelPressure pressure I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See accelpressure_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t accelpressure_press_reg_write | ( | accelpressure_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
AccelPressure pressure I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See accelpressure_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t accelpressure_set_acc_mode | ( | accelpressure_t * | ctx, |
uint8_t | op_mode ) |
AccelPressure set accel operating mode function.
This function sets the desired accelerometer operating mode of the FXLS8974, 3-Axis Low-g Accelerometer on the AccelPressure Click board.
[in] | ctx | : Click context object. See accelpressure_t object definition for detailed explanation. |
[in] | op_mode | : Standby/Active mode selection. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t accelpressure_set_fsr | ( | accelpressure_t * | ctx, |
uint8_t | fsr ) |
AccelPressure set FSR function.
This function sets the desired full-scale measurement range of the FXLS8974, 3-Axis Low-g Accelerometer on the AccelPressure Click board.
[in] | ctx | : Click context object. See accelpressure_t object definition for detailed explanation. |
[in] | fsr | : Full-scale measurement range. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t accelpressure_set_press_mode | ( | accelpressure_t * | ctx, |
uint8_t | op_mode ) |
AccelPressure set pressure operating mode function.
This function sets the desired pressure operating mode of the MPL3115A2, I2C precision pressure sensor with altimetry on the AccelPressure Click board.
[in] | ctx | : Click context object. See accelpressure_t object definition for detailed explanation. |
[in] | op_mode | : Standby/Active mode selection. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t accelpressure_sw_reset | ( | accelpressure_t * | ctx | ) |
AccelPressure soft reset function.
This function trigger the soft reset sequence of the FXLS8974, 3-Axis Low-g Accelerometer on the AccelPressure Click board.
[in] | ctx | : Click context object. See accelpressure_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.