HPM SDK
HPMicro Software Development Kit
hpm_mcl_abz.c File Reference
#include "hpm_mcl_abz.h"

Functions

hpm_mcl_stat_t hpm_mcl_abz_get_theta (void *qei_base, uint32_t phase_count, float deta_theta, float *theta)
 Get the angle of the abz encoder. More...
 
hpm_mcl_stat_t hpm_mcl_abz_get_abs_theta (void *qei_base, uint32_t phase_count, float deta_theta, float offset, float *theta)
 Get absolute angle value. More...
 

Function Documentation

◆ hpm_mcl_abz_get_abs_theta()

hpm_mcl_stat_t hpm_mcl_abz_get_abs_theta ( void *  qei_base,
uint32_t  phase_count,
float  deta_theta,
float  theta0,
float *  theta 
)

Get absolute angle value.

Parameters
qei_baseqei peripheral base address
phase_countNumber of pulses per revolution
deta_thetaMechanical angle for each pulse
theta0Initial angle calibration value
thetarad
Returns
hpm_mcl_stat_t

◆ hpm_mcl_abz_get_theta()

hpm_mcl_stat_t hpm_mcl_abz_get_theta ( void *  qei_base,
uint32_t  phase_count,
float  deta_theta,
float *  theta 
)

Get the angle of the abz encoder.

Parameters
qei_baseqei peripheral base address
phase_countNumber of pulses per revolution
deta_thetaMechanical angle for each pulse
thetarad
Returns
hpm_mcl_stat_t