angle6 2.0.0.0
|
API for configuring and manipulating Angle 6 Click driver. More...
Topics | |
Angle 6 Registers List | |
List of registers of Angle 6 Click driver. | |
Angle 6 Registers Settings | |
Settings for registers of Angle 6 Click driver. | |
Angle 6 MikroBUS Map | |
MikroBUS pin mapping of Angle 6 Click driver. | |
Functions | |
void | angle6_cfg_setup (angle6_cfg_t *cfg) |
Angle 6 configuration object setup function. | |
err_t | angle6_init (angle6_t *ctx, angle6_cfg_t *cfg) |
Angle 6 initialization function. | |
err_t | angle6_default_cfg (angle6_t *ctx) |
Angle 6 default configuration function. | |
err_t | angle6_write_register (angle6_t *ctx, uint8_t reg, uint8_t data_in) |
Angle 6 write register function. | |
err_t | angle6_read_register (angle6_t *ctx, uint8_t reg, uint8_t *data_out) |
Angle 6 read register function. | |
err_t | angle6_read_angle (angle6_t *ctx, float *angle) |
Angle 6 read angle function. | |
uint8_t | angle6_get_pwm_pin (angle6_t *ctx) |
Angle 6 get pwm pin function. | |
uint8_t | angle6_get_mgh_pin (angle6_t *ctx) |
Angle 6 get mgh pin function. | |
uint8_t | angle6_get_mgl_pin (angle6_t *ctx) |
Angle 6 get mgl pin function. | |
API for configuring and manipulating Angle 6 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void angle6_cfg_setup | ( | angle6_cfg_t * | cfg | ) |
Angle 6 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See angle6_cfg_t object definition for detailed explanation. |
err_t angle6_default_cfg | ( | angle6_t * | ctx | ) |
Angle 6 default configuration function.
This function executes a default configuration of Angle 6 click board.
[in] | ctx | : Click context object. See angle6_t object definition for detailed explanation. |
0
- Success, -1
- Error.uint8_t angle6_get_mgh_pin | ( | angle6_t * | ctx | ) |
Angle 6 get mgh pin function.
This function returns the MGH alarm flag (MGH) pin logic state.
[in] | ctx | : Click context object. See angle6_t object definition for detailed explanation. |
uint8_t angle6_get_mgl_pin | ( | angle6_t * | ctx | ) |
Angle 6 get mgl pin function.
This function returns the MGL alarm flag (MGL) pin logic state.
[in] | ctx | : Click context object. See angle6_t object definition for detailed explanation. |
uint8_t angle6_get_pwm_pin | ( | angle6_t * | ctx | ) |
Angle 6 get pwm pin function.
This function returns the PWM absolute output pin logic state.
[in] | ctx | : Click context object. See angle6_t object definition for detailed explanation. |
err_t angle6_init | ( | angle6_t * | ctx, |
angle6_cfg_t * | cfg ) |
Angle 6 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See angle6_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See angle6_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t angle6_read_angle | ( | angle6_t * | ctx, |
float * | angle ) |
Angle 6 read angle function.
This function reads raw angle data and converts it to degrees.
[in] | ctx | : Click context object. See angle6_t object definition for detailed explanation. |
[out] | angle | : Angle in degrees. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t angle6_read_register | ( | angle6_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out ) |
Angle 6 read register function.
This function reads a data byte from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See angle6_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 angle6_write_register | ( | angle6_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
Angle 6 write register function.
This function writes a data byte to the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See angle6_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.