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

Functions

hpm_mcl_stat_t hpm_mcl_analog_init (mcl_analog_t *analog, mcl_analog_cfg_t *cfg, mcl_cfg_t *mcl_cfg)
 Initialize data structures for analog functions. More...
 
hpm_mcl_stat_t hpm_mcl_analog_get_value (mcl_analog_t *analog, mcl_analog_chn_t chn, float *value)
 Get the value of the analog channel. More...
 
hpm_mcl_stat_t hpm_mcl_analog_iir_filter_init (mcl_analog_t *analog, mcl_analog_chn_t chn, mcl_filter_iir_df1_t *iir)
 Initializing the iir filter for analog functions. More...
 
hpm_mcl_stat_t hpm_mcl_analog_disable_iir_filter (mcl_analog_t *analog, mcl_analog_chn_t chn)
 Turn off the iir filter for analog functions. More...
 
hpm_mcl_stat_t hpm_mcl_analog_step_convert (mcl_analog_t *analog, float value, mcl_analog_chn_t chn, float angle, float *output)
 Current conversion of stepper motors. More...
 

Function Documentation

◆ hpm_mcl_analog_disable_iir_filter()

hpm_mcl_stat_t hpm_mcl_analog_disable_iir_filter ( mcl_analog_t analog,
mcl_analog_chn_t  chn 
)

Turn off the iir filter for analog functions.

Parameters
analogmcl_analog_t
chnmcl_analog_chn_t
Returns
hpm_mcl_stat_t

◆ hpm_mcl_analog_get_value()

hpm_mcl_stat_t hpm_mcl_analog_get_value ( mcl_analog_t analog,
mcl_analog_chn_t  chn,
float *  value 
)

Get the value of the analog channel.

Parameters
analogmcl_analog_t
chnmcl_analog_chn_t
valueProcessed Sample Values
Returns
hpm_mcl_stat_t

◆ hpm_mcl_analog_iir_filter_init()

hpm_mcl_stat_t hpm_mcl_analog_iir_filter_init ( mcl_analog_t analog,
mcl_analog_chn_t  chn,
mcl_filter_iir_df1_t iir 
)

Initializing the iir filter for analog functions.

Parameters
analogmcl_analog_t
chnmcl_analog_chn_t
iirmcl_filter_iir_df1_t
Returns
hpm_mcl_stat_t

◆ hpm_mcl_analog_init()

hpm_mcl_stat_t hpm_mcl_analog_init ( mcl_analog_t analog,
mcl_analog_cfg_t cfg,
mcl_cfg_t mcl_cfg 
)

Initialize data structures for analog functions.

Parameters
analogmcl_analog_t
cfgmcl_analog_cfg_t
mcl_cfgmcl_cfg_t
Returns
hpm_mcl_stat_t

◆ hpm_mcl_analog_step_convert()

hpm_mcl_stat_t hpm_mcl_analog_step_convert ( mcl_analog_t analog,
float  value,
mcl_analog_chn_t  chn,
float  angle,
float *  output 
)

Current conversion of stepper motors.

Parameters
analogmcl_analog_t
valueRaw data acquired by the analog function
chnmcl_analog_chn_t
angleelectrical angle
outputTransformed data
Returns
hpm_mcl_stat_t