accel15 2.0.0.0
|
API for configuring and manipulating Accel 15 Click driver. More...
Topics | |
Accel 15 Registers List | |
List of registers of Accel 15 Click driver. | |
Accel 15 Registers Settings | |
Settings for registers of Accel 15 Click driver. | |
Accel 15 MikroBUS Map | |
MikroBUS pin mapping of Accel 15 Click driver. | |
Functions | |
void | accel15_cfg_setup (accel15_cfg_t *cfg) |
Accel 15 configuration object setup function. | |
void | accel15_drv_interface_selection (accel15_cfg_t *cfg, accel15_drv_t drv_sel) |
Accel 15 driver interface setup function. | |
err_t | accel15_init (accel15_t *ctx, accel15_cfg_t *cfg) |
Accel 15 initialization function. | |
err_t | accel15_default_cfg (accel15_t *ctx) |
Accel 15 default configuration function. | |
err_t | accel15_generic_write (accel15_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Accel 15 data writing function. | |
err_t | accel15_generic_read (accel15_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Accel 15 data reading function. | |
void | accel15_soft_reset (accel15_t *ctx) |
Accel 15 soft reset function. | |
err_t | accel15_check_id (accel15_t *ctx) |
Accel 15 check ID function. | |
uint8_t | accel15_get_error (accel15_t *ctx) |
Accel 15 get error function. | |
uint8_t | accel15_get_status (accel15_t *ctx) |
Accel 15 status function. | |
void | accel15_enable_accel (accel15_t *ctx) |
Accel 15 enable accel function. | |
void | accel15_cfg_accel (accel15_t *ctx, uint8_t acc_odr, uint8_t g_range) |
Accel 15 config accel function. | |
uint8_t | accel15_get_internal_status (accel15_t *ctx) |
Accel 15 internal status function. | |
err_t | accel15_get_axis_data (accel15_t *ctx, accel15_axis_t *axis) |
Accel 15 get accelerometer axis function. | |
uint8_t | accel15_get_int_1 (accel15_t *ctx) |
Accel 15 get Interrupt 1 function. | |
uint8_t | accel15_get_int_2 (accel15_t *ctx) |
Accel 15 get Interrupt 1 function. | |
API for configuring and manipulating Accel 15 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void accel15_cfg_accel | ( | accel15_t * | ctx, |
uint8_t | acc_odr, | ||
uint8_t | g_range ) |
Accel 15 config accel function.
This function executes a configuration of the accelerometer data of the BMA490L High-performance longevity acceleration sensor on the Accel 15 click board.
[in] | ctx | : Click context object. See accel15_t object definition for detailed explanation. |
[in] | acc_odr | :
|
[in] | g_range | :
|
void accel15_cfg_setup | ( | accel15_cfg_t * | cfg | ) |
Accel 15 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See accel15_cfg_t object definition for detailed explanation. |
err_t accel15_check_id | ( | accel15_t * | ctx | ) |
Accel 15 check ID function.
This function check ID and communication of the BMA490L High-performance longevity acceleration sensor on the Accel 15 click board.
[in] | ctx | : Click context object. See accel15_t object definition for detailed explanation. |
0
- Communication OK, -1
- Communication Error.err_t accel15_default_cfg | ( | accel15_t * | ctx | ) |
Accel 15 default configuration function.
This function executes a default configuration of Accel 15 click board.
[in] | ctx | : Click context object. See accel15_t object definition for detailed explanation. |
0
- Success, -1
- Error.void accel15_drv_interface_selection | ( | accel15_cfg_t * | cfg, |
accel15_drv_t | drv_sel ) |
Accel 15 driver interface setup function.
This function sets a serial driver interface which will be used further in the click driver.
[out] | cfg | : Click configuration structure. See accel15_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See accel15_drv_t object definition for detailed explanation. |
void accel15_enable_accel | ( | accel15_t * | ctx | ) |
Accel 15 enable accel function.
This function enable accelerometer data of the BMA490L High-performance longevity acceleration sensor on the Accel 15 click board.
[in] | ctx | : Click context object. See accel15_t object definition for detailed explanation. |
err_t accel15_generic_read | ( | accel15_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
Accel 15 data reading function.
This function reads a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See accel15_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.err_t accel15_generic_write | ( | accel15_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
Accel 15 data writing function.
This function writes a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See accel15_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.err_t accel15_get_axis_data | ( | accel15_t * | ctx, |
accel15_axis_t * | axis ) |
Accel 15 get accelerometer axis function.
This function get accelerometer data of the BMA490L High-performance longevity acceleration sensor on the Accel 15 click board.
[in] | ctx | : Click context object. See accel15_t object definition for detailed explanation. |
[in] | axis | : An object that contains X , Y and Z axis data. |
0
- Success, -1
- Error.uint8_t accel15_get_error | ( | accel15_t * | ctx | ) |
Accel 15 get error function.
This function get internal error flags of the BMA490L High-performance longevity acceleration sensor on the Accel 15 click board.
[in] | ctx | : Click context object. See accel15_t object definition for detailed explanation. |
uint8_t accel15_get_int_1 | ( | accel15_t * | ctx | ) |
Accel 15 get Interrupt 1 function.
This function get states of the Interrupt 1 ( INT pin ) BMA490L High-performance longevity acceleration sensor on the Accel 15 click board.
[in] | ctx | : Click context object. See accel15_t object definition for detailed explanation. |
0
- Low pin state, 1
- High pin state.uint8_t accel15_get_int_2 | ( | accel15_t * | ctx | ) |
Accel 15 get Interrupt 1 function.
This function get states of the Interrupt 2 ( AN pin ) BMA490L High-performance longevity acceleration sensor on the Accel 15 click board.
[in] | ctx | : Click context object. See accel15_t object definition for detailed explanation. |
0
- Low pin state, 1
- High pin state.uint8_t accel15_get_internal_status | ( | accel15_t * | ctx | ) |
Accel 15 internal status function.
This function get internal status message of the BMA490L High-performance longevity acceleration sensor on the Accel 15 click board.
[in] | ctx | : Click context object. See accel15_t object definition for detailed explanation. |
uint8_t accel15_get_status | ( | accel15_t * | ctx | ) |
Accel 15 status function.
This function get sensor status flags of the BMA490L High-performance longevity acceleration sensor on the Accel 15 click board.
[in] | ctx | : Click context object. See accel15_t object definition for detailed explanation. |
err_t accel15_init | ( | accel15_t * | ctx, |
accel15_cfg_t * | cfg ) |
Accel 15 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See accel15_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See accel15_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.void accel15_soft_reset | ( | accel15_t * | ctx | ) |
Accel 15 soft reset function.
This function executes a software reset of the BMA490L High-performance longevity acceleration sensor on the Accel 15 click board.
[in] | ctx | : Click context object. See accel15_t object definition for detailed explanation. |