accel30
2.1.0.0
|
API for configuring and manipulating Accel 30 Click driver. More...
Modules | |
Accel 30 Registers List | |
List of registers of Accel 30 Click driver. | |
Accel 30 Registers Settings | |
Settings for registers of Accel 30 Click driver. | |
Accel 30 MikroBUS Map | |
MikroBUS pin mapping of Accel 30 Click driver. | |
Functions | |
void | accel30_cfg_setup (accel30_cfg_t *cfg) |
Accel 30 configuration object setup function. More... | |
void | accel30_drv_interface_selection (accel30_cfg_t *cfg, accel30_drv_t drv_sel) |
Accel 30 driver interface setup function. More... | |
err_t | accel30_init (accel30_t *ctx, accel30_cfg_t *cfg) |
Accel 30 initialization function. More... | |
err_t | accel30_default_cfg (accel30_t *ctx) |
Accel 30 default configuration function. More... | |
err_t | accel30_generic_write (accel30_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Accel 30 data writing function. More... | |
err_t | accel30_generic_read (accel30_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Accel 30 data reading function. More... | |
err_t | accel30_set_mode (accel30_t *ctx, accel30_op_mode_t mode) |
Accel 30 set operating mode function. More... | |
err_t | accel30_set_range_ctrl (accel30_t *ctx, accel30_range_t range) |
Accel 30 set range control function. More... | |
err_t | accel30_soft_reset (accel30_t *ctx) |
Accel 30 soft reset function. More... | |
err_t | accel30_set_sniff_gain (accel30_t *ctx, accel30_gain_t gain) |
Accel 30 set sniff gain function. More... | |
err_t | accel30_set_wake_gain (accel30_t *ctx, accel30_gain_t gain) |
Accel 30 set wake gain function. More... | |
err_t | accel30_set_resolution_ctrl (accel30_t *ctx, accel30_resolution_t resolution) |
Accel 30 set resolution control function. More... | |
err_t | accel30_set_sample_rate (accel30_t *ctx, accel30_cwake_t sample_rate) |
Accel 30 set sampling rate function. More... | |
err_t | accel30_set_sniff_sample_rate (accel30_t *ctx, accel30_sniff_sr_t sample_rate) |
Accel 30 set sniff sampling rate function. More... | |
err_t | accel30_set_pwr_mode (accel30_t *ctx, accel30_power_mode_t pwr_mode) |
Accel 30 set power mode function. More... | |
err_t | accel30_get_axis (accel30_t *ctx, accel30_axis_t *acc_axis) |
Accel 30 get accel data function. More... | |
err_t | accel30_get_avg_axes (accel30_t *ctx, accel30_avg_axis_t *acc_avg_axis) |
Accel 30 get accel averaged data function. More... | |
uint8_t | accel30_get_int_pin (accel30_t *ctx) |
Accel 30 get interrupt function. More... | |
API for configuring and manipulating Accel 30 Click driver.
void accel30_cfg_setup | ( | accel30_cfg_t * | cfg | ) |
Accel 30 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See accel30_cfg_t object definition for detailed explanation. |
err_t accel30_default_cfg | ( | accel30_t * | ctx | ) |
Accel 30 default configuration function.
This function executes a default configuration of Accel 30 click board.
[in] | ctx | : Click context object. See accel30_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void accel30_drv_interface_selection | ( | accel30_cfg_t * | cfg, |
accel30_drv_t | drv_sel | ||
) |
Accel 30 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 accel30_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See accel30_drv_t object definition for detailed explanation. |
err_t accel30_generic_read | ( | accel30_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
Accel 30 data reading function.
This function reads a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See accel30_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 accel30_generic_write | ( | accel30_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
Accel 30 data writing function.
This function writes a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See accel30_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 accel30_get_avg_axes | ( | accel30_t * | ctx, |
accel30_avg_axis_t * | acc_avg_axis | ||
) |
Accel 30 get accel averaged data function.
This function reads accel averaged data for all three axis of MC3635 3-Axis Accelerometer on the Accel 30 Click board™.
[in] | ctx | : Click context object. See accel30_t object definition for detailed explanation. |
[out] | acc_avg_axis | : Accel averaged axis output. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t accel30_get_axis | ( | accel30_t * | ctx, |
accel30_axis_t * | acc_axis | ||
) |
Accel 30 get accel data function.
This function reads accel data for all three axis of MC3635 3-Axis Accelerometer on the Accel 30 Click board™.
[in] | ctx | : Click context object. See accel30_t object definition for detailed explanation. |
[out] | acc_axis | : Accel axis output. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t accel30_get_int_pin | ( | accel30_t * | ctx | ) |
Accel 30 get interrupt function.
This function get states of the Interrupt ( INT ) pin of MC3635 3-Axis Accelerometer on the Accel 30 Click board™.
[in] | ctx | : Click context object. See accel30_t object definition for detailed explanation. |
0
- Low pin state, -1
- High pin state. err_t accel30_init | ( | accel30_t * | ctx, |
accel30_cfg_t * | cfg | ||
) |
Accel 30 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See accel30_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See accel30_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t accel30_set_mode | ( | accel30_t * | ctx, |
accel30_op_mode_t | mode | ||
) |
Accel 30 set operating mode function.
This function set the desired operating mode value of MC3635 3-Axis Accelerometer on the Accel 30 Click board™.
[in] | ctx | : Click context object. See accel30_t object definition for detailed explanation. |
[in] | mode | : Operating mode. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t accel30_set_pwr_mode | ( | accel30_t * | ctx, |
accel30_power_mode_t | pwr_mode | ||
) |
Accel 30 set power mode function.
This function set the desired power mode of MC3635 3-Axis Accelerometer on the Accel 30 Click board™.
[in] | ctx | : Click context object. See accel30_t object definition for detailed explanation. |
[in] | sample_rate | : Sniff sampling rate. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t accel30_set_range_ctrl | ( | accel30_t * | ctx, |
accel30_range_t | range | ||
) |
Accel 30 set range control function.
This function set the desired range control value of MC3635 3-Axis Accelerometer on the Accel 30 Click board™.
[in] | ctx | : Click context object. See accel30_t object definition for detailed explanation. |
[in] | range | : Range control. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t accel30_set_resolution_ctrl | ( | accel30_t * | ctx, |
accel30_resolution_t | resolution | ||
) |
Accel 30 set resolution control function.
This function set the desired resolution control value of MC3635 3-Axis Accelerometer on the Accel 30 Click board™.
[in] | ctx | : Click context object. See accel30_t object definition for detailed explanation. |
[in] | resolution | : Resolution. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t accel30_set_sample_rate | ( | accel30_t * | ctx, |
accel30_cwake_t | sample_rate | ||
) |
Accel 30 set sampling rate function.
This function set the desired sampling rate value of MC3635 3-Axis Accelerometer on the Accel 30 Click board™.
[in] | ctx | : Click context object. See accel30_t object definition for detailed explanation. |
[in] | sample_rate | : Sampling rate. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t accel30_set_sniff_gain | ( | accel30_t * | ctx, |
accel30_gain_t | gain | ||
) |
Accel 30 set sniff gain function.
This function set the desired sniff gain value of MC3635 3-Axis Accelerometer on the Accel 30 Click board™.
[in] | ctx | : Click context object. See accel30_t object definition for detailed explanation. |
[in] | gain | : Sniff gain. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t accel30_set_sniff_sample_rate | ( | accel30_t * | ctx, |
accel30_sniff_sr_t | sample_rate | ||
) |
Accel 30 set sniff sampling rate function.
This function set the desired sniff sampling rate value of MC3635 3-Axis Accelerometer on the Accel 30 Click board™.
[in] | ctx | : Click context object. See accel30_t object definition for detailed explanation. |
[in] | sample_rate | : Sniff sampling rate. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t accel30_set_wake_gain | ( | accel30_t * | ctx, |
accel30_gain_t | gain | ||
) |
Accel 30 set wake gain function.
This function set the desired wake gain value of MC3635 3-Axis Accelerometer on the Accel 30 Click board™.
[in] | ctx | : Click context object. See accel30_t object definition for detailed explanation. |
[in] | gain | : Sniff gain. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t accel30_soft_reset | ( | accel30_t * | ctx | ) |
Accel 30 soft reset function.
This function perform a software reset of MC3635 3-Axis Accelerometer on the Accel 30 Click board™.
[in] | ctx | : Click context object. See accel30_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.