You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123 lines
3.3 KiB

5 days ago
/******************************************************************************
(C), 2018-2099, Radkil
******************************************************************************
: msp_TI5MOTOR.h
: 稿
: radkil
: 202668
:
: msp_TI5MOTOR.c
:
1. : 202668
: radkil
:
******************************************************************************/
/*----------------------------------------------*
* *
*----------------------------------------------*/
/*----------------------------------------------*
* *
*----------------------------------------------*/
/*----------------------------------------------*
* *
*----------------------------------------------*/
/*----------------------------------------------*
* *
*----------------------------------------------*/
/*----------------------------------------------*
* *
*----------------------------------------------*/
/*----------------------------------------------*
* *
*----------------------------------------------*/
/*----------------------------------------------*
* *
*----------------------------------------------*/
#ifndef __MSP_TI5MOTOR_H__
#define __MSP_TI5MOTOR_H__
#ifdef __cplusplus
#if __cplusplus
extern "C"{
#endif
#endif /* __cplusplus */
/*==============================================*
* include header files *
*----------------------------------------------*/
#include <stdint.h>
/*==============================================*
* constants or macros define *
*----------------------------------------------*/
typedef struct _MotorParameters {
int32_t MotorID;
int32_t RxIndex;
int32_t Run_Mode;
int32_t Current;
int32_t Target_Current;
int32_t Velcity;
int32_t Target_Velcity;
int32_t Position;
int32_t Target_Position;
int32_t ERROR_Flag;
int32_t Temperature_Motor;
int32_t Temperature_PCB;
int32_t AccTime;
int32_t DecTime;
int32_t EncoderOffset; /* 53 83 设置位置偏移 int32_t "设置偏移值和目标位置
= - " */
} MotorParameters;
#pragma pack (2) /*指定按2字节对齐*/
typedef struct _CSP
{
int16_t Current;
int16_t Velocity;
int32_t Position;
} CSP;
typedef struct _TSP
{
int32_t Torque;
int32_t Velocity;
int32_t Position;
} TSP;
#pragma pack () /*取消指定对齐,恢复缺省对齐*/
/*==============================================*
* project-wide global variables *
*----------------------------------------------*/
/*==============================================*
* routines' or functions' implementations *
*----------------------------------------------*/
#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif /* __cplusplus */
#endif /* __MSP_TI5MOTOR_H__ */