tmrangle 2.0.0.0
|
Functions | |
void | tmrangle_cfg_setup (tmrangle_cfg_t *cfg) |
Config Object Initialization function. | |
TMRANGLE_RETVAL | tmrangle_init (tmrangle_t *ctx, tmrangle_cfg_t *cfg) |
Initialization function. | |
uint16_t | tmrangle_read_channel_adc (tmrangle_t *ctx, uint8_t channel) |
Read the ADC value of the selected channel function. | |
void | tmrangle_calculate_diff (tmrangle_t *ctx) |
Calculate the differential values of sin,cos signal and angle function. | |
void | tmrangle_init_sensor_data (tmrangle_t *ctx) |
Read and stores parameters data function. | |
void | tmrangle_calib_calculate_one_direction (tmrangle_t *ctx, tmrangle_rotation_data_store_t *rotation_data_store) |
Calculates and stores parameters, based on found parameters function. | |
void | tmrangle_calib_calculate_ortho (tmrangle_calib_data_t *calib_param) |
Calculates and stores parameters, based on found parameters from both CW and CCW function. | |
void | tmrangle_init_calib_data (tmrangle_t *ctx, tmrangle_calib_data_t *calib_param, trigonometry_t *dev) |
Initialization and stores calibration parameters function. | |
float | tmrangle_get_calib_deff_angle (tmrangle_t *ctx, tmrangle_calib_data_t *calib_param) |
Calculate the calibrated angle ( radians ) function. | |
float | tmrangle_get_calib_angle (tmrangle_t *ctx, tmrangle_calib_data_t *calib_param) |
Calculate the calibrated angle ( degree ) function. | |
void | tmrangle_calib_find_min_max (tmrangle_t *ctx, tmrangle_rotation_data_store_t *rotation_data_store) |
Compare and stores rotation parameters function. | |
void | tmrangle_calib_one_direction_min_max (tmrangle_t *ctx, tmrangle_rotation_data_store_t *rotation_data_store) |
Find and stores rotation parameters ( min, max ) function. | |
void | tmrangle_calibration_find_param (tmrangle_t *ctx, tmrangle_calib_data_t *calib_param) |
Get new calibration rotation parameters function. | |
void tmrangle_calculate_diff | ( | tmrangle_t * | ctx | ) |
Calculate the differential values of sin,cos signal and angle function.
ctx | Click object. |
@description Function calculates the differential values will be used to get the uncalibrated angle value or in the calibration procedure of the TLE5501 magnetic position sensor � analog TMR based angle sensors on TMR Angle Click board.
void tmrangle_calib_calculate_one_direction | ( | tmrangle_t * | ctx, |
tmrangle_rotation_data_store_t * | rotation_data_store ) |
Calculates and stores parameters, based on found parameters function.
ctx | Click object. |
rotation_data_store | Structure where rotation data be stored |
@description Function calculates and stores parameters, based on found parameters of the TLE5501 magnetic position sensor � analog TMR based angle sensors on TMR Angle Click board.
void tmrangle_calib_calculate_ortho | ( | tmrangle_calib_data_t * | calib_param | ) |
Calculates and stores parameters, based on found parameters from both CW and CCW function.
calib_param | Structure where calibration parameters ( CW and CCW ) data be stored |
@description Function calculates and stores parameters, based on found parameters from both CW and CCW of the TLE5501 magnetic position sensor � analog TMR based angle sensors on TMR Angle Click board.
void tmrangle_calib_find_min_max | ( | tmrangle_t * | ctx, |
tmrangle_rotation_data_store_t * | rotation_data_store ) |
Compare and stores rotation parameters function.
ctx | Click object. |
rotation_data_store | Structure where rotation parameters data be stored |
@description Function compare and stores rotation parameters, used to search for the min/max differential signal level of the TLE5501 magnetic position sensor � analog TMR based angle sensors on TMR Angle Click board.
void tmrangle_calib_one_direction_min_max | ( | tmrangle_t * | ctx, |
tmrangle_rotation_data_store_t * | rotation_data_store ) |
Find and stores rotation parameters ( min, max ) function.
ctx | Click object. |
rotation_data_store | Structure where rotation parameters data be stored |
@description Function compare and stores rotation parameters, used to search for the magnitude components (at 45 and 135 deg) and min/max signal level of the TLE5501 magnetic position sensor � analog TMR based angle sensors on TMR Angle Click board.
void tmrangle_calibration_find_param | ( | tmrangle_t * | ctx, |
tmrangle_calib_data_t * | calib_param ) |
Get new calibration rotation parameters function.
ctx | Click object. |
calib_param | Structure where calibration parameters data be stored |
@description Function get when new calibration parameters have been found, this function will do mathematical calculations, which will take more time for one moment of the TLE5501 magnetic position sensor � analog TMR based angle sensors on TMR Angle Click board.
void tmrangle_cfg_setup | ( | tmrangle_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
float tmrangle_get_calib_angle | ( | tmrangle_t * | ctx, |
tmrangle_calib_data_t * | calib_param ) |
Calculate the calibrated angle ( degree ) function.
ctx | Click object. |
calib_param | Structure where calibration parameters data be stored |
@description Function calculate the calibrated angle in degree and this structure holds the current sensor calibration parameters of the TLE5501 magnetic position sensor � analog TMR based angle sensors on TMR Angle Click board.
float tmrangle_get_calib_deff_angle | ( | tmrangle_t * | ctx, |
tmrangle_calib_data_t * | calib_param ) |
Calculate the calibrated angle ( radians ) function.
ctx | Click object. |
calib_param | Structure where calibration parameters data be stored |
@description Function calculates the calibrated angle in radians of the TLE5501 magnetic position sensor � analog TMR based angle sensors on TMR Angle Click board.
TMRANGLE_RETVAL tmrangle_init | ( | tmrangle_t * | ctx, |
tmrangle_cfg_t * | cfg ) |
Initialization function.
tmrangle | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void tmrangle_init_calib_data | ( | tmrangle_t * | ctx, |
tmrangle_calib_data_t * | calib_param, | ||
trigonometry_t * | dev ) |
Initialization and stores calibration parameters function.
ctx | Click object. |
calib_param | Structure where calibration parameters data be stored |
dev | Structure with trigonometry values. |
@description Function initialization and stores calibration parameters of the TLE5501 magnetic position sensor � analog TMR based angle sensors on TMR Angle Click board.
void tmrangle_init_sensor_data | ( | tmrangle_t * | ctx | ) |
Read and stores parameters data function.
ctx | Click object. |
@description Function read and stores negative and positive, sine and cosine parameters data of the TLE5501 magnetic position sensor � analog TMR based angle sensors on TMR Angle Click board.
uint16_t tmrangle_read_channel_adc | ( | tmrangle_t * | ctx, |
uint8_t | channel ) |
Read the ADC value of the selected channel function.
ctx | Click object. |
channel |
@description Function read the ADC value of the selected channel of the TLE5501 magnetic position sensor � analog TMR based angle sensors on TMR Angle Click board.