include/industry/foc/*/foc_angle.h: add a field with angle type

This commit is contained in:
raiden00pl 2021-10-29 11:37:03 +02:00 committed by Xiang Xiao
parent 9c8e3cc46a
commit 27c282a58a
3 changed files with 15 additions and 2 deletions
include/industry/foc

@ -30,6 +30,7 @@
#include <dspb16.h>
#include "industry/foc/fixed16/foc_handler.h"
#include "industry/foc/foc_common.h"
/****************************************************************************
* Public Type Definition
@ -49,7 +50,8 @@ struct foc_angle_in_b16_s
struct foc_angle_out_b16_s
{
b16_t angle;
uint8_t type; /* Angle type */
b16_t angle; /* Agnle */
};
/* Forward declaration */

@ -30,6 +30,7 @@
#include <dsp.h>
#include "industry/foc/float/foc_handler.h"
#include "industry/foc/foc_common.h"
/****************************************************************************
* Public Type Definition
@ -49,7 +50,8 @@ struct foc_angle_in_f32_s
struct foc_angle_out_f32_s
{
float angle;
uint8_t type; /* Angle type */
float angle; /* Angle */
};
/* Forward declaration */

@ -71,6 +71,15 @@ enum foc_ramp_mode_e
RAMP_MODE_NORMAL = 3, /* Normal operation */
};
/* Angle handler type */
enum foc_angle_type_e
{
FOC_ANGLE_TYPE_INVALID = 0, /* Reserved */
FOC_ANGLE_TYPE_ELE = 1, /* Electrical angle */
FOC_ANGLE_TYPE_MECH = 2, /* Mechanical angle */
};
/****************************************************************************
* Public Function Prototypes
****************************************************************************/