amrangle 2.0.0.0
|
API for configuring and manipulating AMR Angle Click driver. More...
Topics | |
AMR Angle toolchain select | |
List of working boards for AMR Angle gain control. | |
AMR Angle gain control mode list | |
List of possible modes of AMR Angle gain control. | |
AMR Angle power down state mode list | |
List of possible modes for AMR Angle power down. | |
AMR Angle MikroBUS Map | |
MikroBUS pin mapping of AMR Angle Click driver. | |
Functions | |
void | amrangle_cfg_setup (amrangle_cfg_t *cfg, uint8_t sel_toolchain) |
AMR Angle configuration object setup function. | |
err_t | amrangle_init (amrangle_t *ctx, amrangle_cfg_t *cfg) |
AMR Angle initialization function. | |
void | amrangle_default_cfg (amrangle_t *ctx) |
AMR Angle default configuration function. | |
float | amrangle_angle_read (amrangle_t *ctx) |
AMR Angle read angle function. | |
err_t | amrangle_read_vtp_voltage (amrangle_t *ctx, float *vtp_volts) |
AMR Angle read vtp voltage function. | |
float | amrangle_read_vtp_temp (amrangle_t *ctx) |
AMR Angle read temperature function. | |
void | amrangle_gain_control_mode (amrangle_t *ctx, uint8_t gain_control) |
AMR Angle gain control mode function. | |
void | amrangle_power_down_pin (amrangle_t *ctx, uint8_t pd_state) |
AMR Angle power down function. | |
API for configuring and manipulating AMR Angle Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
float amrangle_angle_read | ( | amrangle_t * | ctx | ) |
AMR Angle read angle function.
This function reads an angle in degrees.
[in] | ctx | : Click context object. See amrangle_t object definition for detailed explanation. |
void amrangle_cfg_setup | ( | amrangle_cfg_t * | cfg, |
uint8_t | sel_toolchain ) |
AMR Angle configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See amrangle_cfg_t object definition for detailed explanation. |
[in] | sel_toolchain | : Selected toolchain.
|
void amrangle_default_cfg | ( | amrangle_t * | ctx | ) |
AMR Angle default configuration function.
This function executes a default configuration of AMR Angle click board.
[in] | ctx | : Click context object. See amrangle_t object definition for detailed explanation. |
void amrangle_gain_control_mode | ( | amrangle_t * | ctx, |
uint8_t | gain_control ) |
AMR Angle gain control mode function.
This function sets the gain control mode pin which is used to compensate the sensor amplitude output for reduction of temperature variation.
[in] | ctx | : Click context object. See amrangle_t object definition for detailed explanation. |
[in] | state | : Gain control state. |
See #err_t definition for detailed explanation.
err_t amrangle_init | ( | amrangle_t * | ctx, |
amrangle_cfg_t * | cfg ) |
AMR Angle initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See amrangle_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See amrangle_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.void amrangle_power_down_pin | ( | amrangle_t * | ctx, |
uint8_t | pd_state ) |
AMR Angle power down function.
This function controls the power down pin which can be used to shut down the device.
[in] | ctx | : Click context object. See amrangle_t object definition for detailed explanation. |
[in] | state | : Power down state. |
See #err_t definition for detailed explanation.
float amrangle_read_vtp_temp | ( | amrangle_t * | ctx | ) |
AMR Angle read temperature function.
This function returns calculated temperature using vtp pin voltage. The calculation is performed by extracting constants from linear function using VTEMP Output Voltage vs Temperature graph ( ADA4571 datasheet - Figure 21. ).
[in] | ctx | : Click context object. See amrangle_t object definition for detailed explanation. |
See #err_t definition for detailed explanation.
err_t amrangle_read_vtp_voltage | ( | amrangle_t * | ctx, |
float * | vtp_volts ) |
AMR Angle read vtp voltage function.
This function reads analog voltage from vtp pin.
[in] | ctx | : Click context object. See amrangle_t object definition for detailed explanation. |
[out] | vtp_volts | : Analog pin voltage. |
0
- Success, -1
- Error.