angle10 2.1.0.0
|
API for configuring and manipulating Angle 10 Click driver. More...
Topics | |
Angle 10 Settings | |
Settings of Angle 10 Click driver. | |
Angle 10 MikroBUS Map | |
MikroBUS pin mapping of Angle 10 Click driver. | |
Functions | |
void | angle10_cfg_setup (angle10_cfg_t *cfg) |
Angle 10 configuration object setup function. | |
err_t | angle10_init (angle10_t *ctx, angle10_cfg_t *cfg) |
Angle 10 initialization function. | |
err_t | angle10_read_raw_adc (angle10_t *ctx, uint16_t *raw_adc) |
Angle 10 read raw ADC value function. | |
err_t | angle10_read_voltage (angle10_t *ctx, float *voltage) |
Angle 10 read voltage level function. | |
err_t | angle10_set_vref (angle10_t *ctx, float vref) |
Angle 10 set vref function. | |
err_t | angle10_get_angle (angle10_t *ctx, float *angle) |
Angle 10 get angle function. | |
API for configuring and manipulating Angle 10 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void angle10_cfg_setup | ( | angle10_cfg_t * | cfg | ) |
Angle 10 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See angle10_cfg_t object definition for detailed explanation. |
err_t angle10_get_angle | ( | angle10_t * | ctx, |
float * | angle ) |
Angle 10 get angle function.
This function reads the magnetic angular position in degrees based on ANGLE10_NUM_CONVERSIONS of voltage measurements.
[in] | ctx | : Click context object. See angle10_t object definition for detailed explanation. |
[out] | angle | : Angle in degrees [0-360]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t angle10_init | ( | angle10_t * | ctx, |
angle10_cfg_t * | cfg ) |
Angle 10 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See angle10_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See angle10_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t angle10_read_raw_adc | ( | angle10_t * | ctx, |
uint16_t * | raw_adc ) |
Angle 10 read raw ADC value function.
This function reads raw ADC value.
[in] | ctx | : Click context object. See angle10_t object definition for detailed explanation. |
[out] | raw_adc | : Output ADC result. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t angle10_read_voltage | ( | angle10_t * | ctx, |
float * | voltage ) |
Angle 10 read voltage level function.
This function reads raw ADC value and converts it to proportional voltage level.
[in] | ctx | : Click context object. See angle10_t object definition for detailed explanation. |
[out] | voltage | : Output voltage level [V]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t angle10_set_vref | ( | angle10_t * | ctx, |
float | vref ) |
Angle 10 set vref function.
This function sets the voltage reference for Angle 10 click driver.
[in] | ctx | : Click context object. See angle10_t object definition for detailed explanation. |
[in] | vref | : Reference voltage (volts). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.