angle2 2.0.0.0
|
Functions | |
void | angle2_cfg_setup (angle2_cfg_t *cfg) |
Config Object Initialization function. | |
ANGLE2_RETVAL | angle2_init (angle2_t *ctx, angle2_cfg_t *cfg) |
Initialization function. | |
void | angle2_default_cfg (angle2_t *ctx) |
Click Default Configuration function. | |
void | angle2_generic_transfer (angle2_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
double | angle2_write_reg (angle2_t *ctx, uint8_t addr, uint8_t input) |
Register write function. | |
double | angle2_read_reg (angle2_t *ctx, uint8_t addr, uint8_t *output) |
Register read function. | |
double | angle2_get_angle (angle2_t *ctx) |
Angle read function. | |
double | angle2_get_angle_with_time_index (angle2_t *ctx, uint8_t *time_index) |
Angle with time index read function. | |
void | angle2_set_zero_scale (angle2_t *ctx, double zero_deg) |
Set zero scale function. | |
void | angle2_enable_trimming (angle2_t *ctx, uint8_t state) |
Enable trimming function. | |
void | angle2_flash_reg (angle2_t *ctx, uint8_t reg_sel) |
Flash register function. | |
void angle2_cfg_setup | ( | angle2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void angle2_default_cfg | ( | angle2_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Angle 2 click.
void angle2_enable_trimming | ( | angle2_t * | ctx, |
uint8_t | state ) |
Enable trimming function.
ctx | Click object. |
state | Trimming state. |
@description This function sets the trimming state.
void angle2_flash_reg | ( | angle2_t * | ctx, |
uint8_t | reg_sel ) |
Flash register function.
ctx | Click object. |
reg_sel | Register select. |
@description This function flashes the specified register.
void angle2_generic_transfer | ( | angle2_t * | ctx, |
uint8_t * | wr_buf, | ||
uint16_t | wr_len, | ||
uint8_t * | rd_buf, | ||
uint16_t | rd_len ) |
Generic transfer function.
ctx | Click object. |
wr_buf | Write data buffer |
wr_len | Number of byte in write data buffer |
rd_buf | Read data buffer |
rd_len | Number of byte in read data buffer |
@description Generic SPI transfer, for sending and receiving packages
double angle2_get_angle | ( | angle2_t * | ctx | ) |
Angle read function.
ctx | Click object. |
@description This function reads angle data from the click module.
double angle2_get_angle_with_time_index | ( | angle2_t * | ctx, |
uint8_t * | time_index ) |
Angle with time index read function.
ctx | Click object. |
@description This function reads angle and time index data from the click module.
ANGLE2_RETVAL angle2_init | ( | angle2_t * | ctx, |
angle2_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
double angle2_read_reg | ( | angle2_t * | ctx, |
uint8_t | addr, | ||
uint8_t * | output ) |
Register read function.
ctx | Click object. |
addr | Register address. |
output | Variable in which the read data is stored. |
@description This function reads 1 byte of data from the specified register address.
void angle2_set_zero_scale | ( | angle2_t * | ctx, |
double | zero_deg ) |
Set zero scale function.
ctx | Click object. |
zero_deg | Zero degree value. |
@description This function sets the zero scale value.
double angle2_write_reg | ( | angle2_t * | ctx, |
uint8_t | addr, | ||
uint8_t | input ) |
Register write function.
ctx | Click object. |
addr | Register address. |
input | Data to be written. |
@description This function writes 1 byte of data to the specified register address.