HPM SDK
HPMicro Software Development Kit
Encode Position driver APIs

enc pos driver APIs More...

Functions

float encoder_position_to_deg (uint32_t pos)
 caculate degree of angle from pos More...
 
uint32_t encoder_deg_to_position (float deg)
 caculate posistion from degree of angle More...
 
float encoder_position_to_rad (uint32_t pos)
 caculate radian of angle from pos More...
 
uint32_t encoder_rad_to_position (float rad)
 caculate posistion from radian of angle More...
 

Detailed Description

enc pos driver APIs

Function Documentation

◆ encoder_deg_to_position()

uint32_t encoder_deg_to_position ( float  deg)

#include <drivers/inc/hpm_enc_pos_drv.h>

caculate posistion from degree of angle

Parameters
[in]degdegree of angle
Returns
position value.

◆ encoder_position_to_deg()

float encoder_position_to_deg ( uint32_t  pos)

#include <drivers/inc/hpm_enc_pos_drv.h>

caculate degree of angle from pos

Parameters
[in]posposition value
Returns
degree of angle.

◆ encoder_position_to_rad()

float encoder_position_to_rad ( uint32_t  pos)

#include <drivers/inc/hpm_enc_pos_drv.h>

caculate radian of angle from pos

Parameters
[in]posposition value
Returns
radian of angle.

◆ encoder_rad_to_position()

uint32_t encoder_rad_to_position ( float  rad)

#include <drivers/inc/hpm_enc_pos_drv.h>

caculate posistion from radian of angle

Parameters
[in]radradian of angle
Returns
position value.