inclinometer 2.0.0.0
|
API for configuring and manipulating Inclinometer Click driver. More...
Topics | |
Inclinometer Registers List | |
List of registers of Inclinometer Click driver. | |
Inclinometer Commands | |
Commands of Inclinometer Click driver. | |
Inclinometer MikroBUS Map | |
MikroBUS pin mapping of Inclinometer Click driver. | |
Functions | |
void | inclinometer_cfg_setup (inclinometer_cfg_t *cfg) |
Inclinometer configuration object setup function. | |
err_t | inclinometer_init (inclinometer_t *ctx, inclinometer_cfg_t *cfg) |
Inclinometer initialization function. | |
err_t | inclinometer_default_cfg (inclinometer_t *ctx) |
Inclinometer default configuration function. | |
err_t | inclinometer_generic_write (inclinometer_t *ctx, uint8_t reg, uint16_t data_in) |
Data writing function. | |
err_t | inclinometer_generic_read (inclinometer_t *ctx, uint8_t reg, uint16_t *data_out) |
Data reading function. | |
err_t | inclinometer_cmd_write (inclinometer_t *ctx, uint32_t cmd) |
CMD writing function. | |
err_t | inclinometer_cmd_read (inclinometer_t *ctx, uint32_t cmd, uint16_t *cmd_data) |
CMD reading function. | |
err_t | inclinometer_get_temperature (inclinometer_t *ctx, float *temperature) |
Temperature reading. | |
err_t | inclinometer_get_axes (inclinometer_t *ctx, inclinometer_accel_t *axes_data) |
Axes reading. | |
err_t | inclinometer_get_angle (inclinometer_t *ctx, inclinometer_accel_t *angle_data) |
Angle reading. | |
API for configuring and manipulating Inclinometer Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void inclinometer_cfg_setup | ( | inclinometer_cfg_t * | cfg | ) |
Inclinometer configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See inclinometer_cfg_t object definition for detailed explanation. |
err_t inclinometer_cmd_read | ( | inclinometer_t * | ctx, |
uint32_t | cmd, | ||
uint16_t * | cmd_data ) |
CMD reading function.
This function reads a data from predefined command.
[in] | ctx | : Click context object. See inclinometer_t object definition for detailed explanation. |
[in] | cmd | : Predefined command. See #inclinometer_cmd def group for detailed explanation. |
[out] | cmd_data | : Output read data. |
0
- Success, -1
- Error.err_t inclinometer_cmd_write | ( | inclinometer_t * | ctx, |
uint32_t | cmd ) |
CMD writing function.
This function writes predefined command.
[in] | ctx | : Click context object. See inclinometer_t object definition for detailed explanation. |
[in] | cmd | : Predefined command. See #inclinometer_cmd def group for detailed explanation. |
0
- Success, -1
- Error.err_t inclinometer_default_cfg | ( | inclinometer_t * | ctx | ) |
Inclinometer default configuration function.
This function executes a default configuration of Inclinometer click board.
[in] | ctx | : Click context object. See inclinometer_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t inclinometer_generic_read | ( | inclinometer_t * | ctx, |
uint8_t | reg, | ||
uint16_t * | data_out ) |
Data reading function.
This function reads a data from register.
[in] | ctx | : Click context object. See inclinometer_t object definition for detailed explanation. |
[in] | reg | :Register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error.err_t inclinometer_generic_write | ( | inclinometer_t * | ctx, |
uint8_t | reg, | ||
uint16_t | data_in ) |
Data writing function.
This function writes a data to register.
[in] | ctx | : Click context object. See inclinometer_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error.err_t inclinometer_get_angle | ( | inclinometer_t * | ctx, |
inclinometer_accel_t * | angle_data ) |
Angle reading.
This function reads a angle data from device.
[in] | ctx | : Click context object. See inclinometer_t object definition for detailed explanation. |
[out] | angle_data | : Output read data. See inclinometer_accel_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t inclinometer_get_axes | ( | inclinometer_t * | ctx, |
inclinometer_accel_t * | axes_data ) |
Axes reading.
This function reads a axes data from device.
[in] | ctx | : Click context object. See inclinometer_t object definition for detailed explanation. |
[out] | axes_data | : Output read data. See inclinometer_accel_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t inclinometer_get_temperature | ( | inclinometer_t * | ctx, |
float * | temperature ) |
Temperature reading.
This function reads a temperature data from device.
[in] | ctx | : Click context object. See inclinometer_t object definition for detailed explanation. |
[out] | temperature | : Output read data. |
0
- Success, -1
- Error.err_t inclinometer_init | ( | inclinometer_t * | ctx, |
inclinometer_cfg_t * | cfg ) |
Inclinometer initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See inclinometer_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See inclinometer_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.