angle9 2.1.0.0
|
API for configuring and manipulating Angle 9 Click driver. More...
Topics | |
Angle 9 Registers List | |
List of registers of Angle 9 Click driver. | |
Angle 9 Registers Settings | |
Settings for registers of Angle 9 Click driver. | |
Angle 9 MikroBUS Map | |
MikroBUS pin mapping of Angle 9 Click driver. | |
Functions | |
void | angle9_cfg_setup (angle9_cfg_t *cfg) |
Angle 9 configuration object setup function. | |
err_t | angle9_init (angle9_t *ctx, angle9_cfg_t *cfg) |
Angle 9 initialization function. | |
err_t | angle9_write_register (angle9_t *ctx, uint8_t reg, uint16_t data_in) |
Angle 9 write register function. | |
err_t | angle9_read_register (angle9_t *ctx, uint8_t reg, uint16_t *data_out) |
Angle 9 read register function. | |
uint8_t | angle9_get_pwm_pin (angle9_t *ctx) |
Angle 9 get pwm pin function. | |
err_t | angle9_read_angle (angle9_t *ctx, float *angle) |
Angle 9 read angle function. | |
err_t | angle9_read_temperature (angle9_t *ctx, float *temperature) |
Angle 9 read temperature function. | |
err_t | angle9_read_field_strength (angle9_t *ctx, uint16_t *field_str) |
Angle 9 read field strength function. | |
API for configuring and manipulating Angle 9 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void angle9_cfg_setup | ( | angle9_cfg_t * | cfg | ) |
Angle 9 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See angle9_cfg_t object definition for detailed explanation. |
uint8_t angle9_get_pwm_pin | ( | angle9_t * | ctx | ) |
Angle 9 get pwm pin function.
This function returns the PWM pin logic state.
[in] | ctx | : Click context object. See angle9_t object definition for detailed explanation. |
err_t angle9_init | ( | angle9_t * | ctx, |
angle9_cfg_t * | cfg ) |
Angle 9 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See angle9_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See angle9_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t angle9_read_angle | ( | angle9_t * | ctx, |
float * | angle ) |
Angle 9 read angle function.
This function reads the magnetic angular position in degrees.
[in] | ctx | : Click context object. See angle9_t object definition for detailed explanation. |
[out] | angle | : Magnetic angular position in degrees. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t angle9_read_field_strength | ( | angle9_t * | ctx, |
uint16_t * | field_str ) |
Angle 9 read field strength function.
This function reads the magnetic field strength in gauss.
[in] | ctx | : Click context object. See angle9_t object definition for detailed explanation. |
[out] | field_str | : Magnetic field strength in gauss. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t angle9_read_register | ( | angle9_t * | ctx, |
uint8_t | reg, | ||
uint16_t * | data_out ) |
Angle 9 read register function.
This function reads two bytes of data from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See angle9_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t angle9_read_temperature | ( | angle9_t * | ctx, |
float * | temperature ) |
Angle 9 read temperature function.
This function reads the sensor internal temperature in degrees celsius.
[in] | ctx | : Click context object. See angle9_t object definition for detailed explanation. |
[out] | temperature | : Sensor internal temperature in degrees celsius. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t angle9_write_register | ( | angle9_t * | ctx, |
uint8_t | reg, | ||
uint16_t | data_in ) |
Angle 9 write register function.
This function writes two bytes of data to the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See angle9_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.