gmrangle 2.0.0.0
|
Functions | |
void | gmrangle_cfg_setup (gmrangle_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | gmrangle_init (gmrangle_t *ctx, gmrangle_cfg_t *cfg) |
Initialization function. | |
uint16_t | gmrangle_read_data (gmrangle_t *ctx, uint8_t reg) |
Generic read 16-bit data function. | |
void | gmrangle_write_data (gmrangle_t *ctx, uint8_t reg, uint16_t tx_data) |
Generic write 16-bit data function. | |
uint16_t | gmrangle_get_status (gmrangle_t *ctx) |
Get the status data function. | |
void | gmrangle_set_act_status (gmrangle_t *ctx, uint16_t a_data) |
Set activation status register function. | |
int16_t | gmrangle_get_angle_speed_value (gmrangle_t *ctx) |
Get the angle speed value function. | |
void | gmrangle_get_angle_speed (gmrangle_t *ctx, float *final_angle_speed, int16_t *angle_speed_val) |
Get the angle speed function. | |
float | gmrangle_get_angle_range (gmrangle_t *ctx) |
Get the angle range function. | |
int16_t | gmrangle_get_num_revolutions (gmrangle_t *ctx) |
Get the number of revolutions function. | |
uint16_t | gmrangle_get_angle_value (gmrangle_t *ctx) |
Get the angle value function. | |
float | gmrangle_calculate_angle (gmrangle_t *ctx) |
Calculate angle function. | |
float gmrangle_calculate_angle | ( | gmrangle_t * | ctx | ) |
Calculate angle function.
ctx | Click object. |
This function calculate the float value of the angle in degree of the TLE5012 GMR-Based Angular Sensor on the GMR Angle click board.
void gmrangle_cfg_setup | ( | gmrangle_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
float gmrangle_get_angle_range | ( | gmrangle_t * | ctx | ) |
Get the angle range function.
ctx | Click object. |
This function read value of the angle range from the 6-bit register address ( GMRANGLE_REG_MOD_2 ) of the TLE5012 GMR-Based Angular Sensor on the GMR Angle click board.
void gmrangle_get_angle_speed | ( | gmrangle_t * | ctx, |
float * | final_angle_speed, | ||
int16_t * | angle_speed_val ) |
Get the angle speed function.
ctx | Click object. |
final_angle_speed | Pointer to the memory location where float be stored |
angle_speed_val | Pointer to the memory location where 16-bit signed be stored |
This function get the angle speed by read from the from the 6-bit register address ( GMRANGLE_REG_ASPD ) of the TLE5012 GMR-Based Angular Sensor on the GMR Angle click board.
int16_t gmrangle_get_angle_speed_value | ( | gmrangle_t * | ctx | ) |
Get the angle speed value function.
ctx | Click object. |
This function read 16-bit signed angle speed value from the 6-bit register address ( GMRANGLE_REG_ASPD ) of the TLE5012 GMR-Based Angular Sensor on the GMR Angle click board.
uint16_t gmrangle_get_angle_value | ( | gmrangle_t * | ctx | ) |
Get the angle value function.
ctx | Click object. |
This function read the 16-bit signed value of the angle from the 6-bit register address ( GMRANGLE_REG_AVAL ) of the TLE5012 GMR-Based Angular Sensor on the GMR Angle click board.
int16_t gmrangle_get_num_revolutions | ( | gmrangle_t * | ctx | ) |
Get the number of revolutions function.
ctx | Click object. |
This function read the number of the revolutions from the 6-bit register address ( GMRANGLE_REG_AREV ) of the TLE5012 GMR-Based Angular Sensor on the GMR Angle click board.
uint16_t gmrangle_get_status | ( | gmrangle_t * | ctx | ) |
Get the status data function.
ctx | Click object. |
[ bit 0 ] : Status Reset:
This function read 16-bit status data from the 6-bit register address ( GMRANGLE_REG_STAT ) of the TLE5012 GMR-Based Angular Sensor on the GMR Angle click board.
err_t gmrangle_init | ( | gmrangle_t * | ctx, |
gmrangle_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this click.
uint16_t gmrangle_read_data | ( | gmrangle_t * | ctx, |
uint8_t | reg ) |
Generic read 16-bit data function.
ctx | Click object. |
reg | 6-bit register address. |
This function read 16-bit data from the targeted 6-bit register address of the TLE5012 GMR-Based Angular Sensor on the GMR Angle click board.
void gmrangle_set_act_status | ( | gmrangle_t * | ctx, |
uint16_t | a_data ) |
Set activation status register function.
ctx | Click object. |
[ bit 0 ] : Activation of Hardware Reset:
This function write 16-bit a_data data to the 6-bit register address ( GMRANGLE_REG_ACSTAT ) of the TLE5012 GMR-Based Angular Sensor on the GMR Angle click board.
void gmrangle_write_data | ( | gmrangle_t * | ctx, |
uint8_t | reg, | ||
uint16_t | tx_data ) |
Generic write 16-bit data function.
ctx | Click object. |
reg | 6-bit register address. |
tx_data | 16-bit data to write. |
This function write the 16-bit data to the targeted 6-bit register address of the TLE5012 GMR-Based Angular Sensor on the GMR Angle click board.