/*
 DESCRIPTION:



 TEST RESULT: 

 DESIGNED TIME: 

 DESIGNER: ZhuHongshun/zhslove_2006@126.com

*/


#ifndef ADC_VOLT_CURRENT_GET_H
#define ADC_VOLT_CURRENT_GET_H

#include "C28x_FPU_FastRTS.h"

//-----------------------------------------------------------------------------
//  Define the structure of the POSSPEED Object 
//-----------------------------------------------------------------------------
typedef struct {float COS;  //Output:  电池电压
                float SIN;	//Output:  直流母线电容充电电压
				float VDC;   //Output: 直流电流

				float Ia;   //Output:  A相电流
				float Ib;   //Output:  B相电流
				float Ic;   //Output:  C相电流
				float theta_mech;   //Output:  机械角度
				float theta_elec;   //Output:  电气角度
				float theta_mech_pre;   //Output:  机械角度
				float theta_elec_pre;   //Output:  电气角度
				float speed_mech;   //Output:  机械角速度
				float speed_elec;   //Output:  电气角速度
				float np;   //Output:  电机极对数
				float direction;  //方向
				float rpm;  //转速（r/min）


                float Volt_channelA0;//Output:DSP A通道8个管脚上的电压值
				float Volt_channelA1;
				float Volt_channelA2;
				float Volt_channelA3;
				float Volt_channelA4;
				float Volt_channelA5;
				float Volt_channelA6;
				float Volt_channelA7;

				float Volt_channelB0;
				float Volt_channelB1;
				float Volt_channelB2;
				float Volt_channelB3;
				float Volt_channelB4;
				float Volt_channelB5;
				float Volt_channelB6;
				float Volt_channelB7;

                void (*init)();       // Pointer to the init function 
                void (*read)();       // Pointer to the read function 
               }ADC_VOLT_CURRENT_GET;


//-----------------------------------------------------------------------------
// Define a POSSPEED_handle
//-----------------------------------------------------------------------------
typedef ADC_VOLT_CURRENT_GET  *ADC_VOLT_CURRENT_GET_handle;


//-----------------------------------------------------------------------------
// Default initializer for the POSSPEED Object.
//-----------------------------------------------------------------------------
#define ADC_VOLT_CURRENT_GET_DEFAULTS {0,0,0,\
                                       0,0,0,0,0,0,\
                                       0,0,0,2,0,0,\
                                       0,0,0,0,0,0,0,0,\
                                       0,0,0,0,0,0,0,0,\
									 (void (*)(long))ADC_volt_current_get_Init,\
									 (void (*)(long))ADC_volt_current_get_Calc}
//-----------------------------------------------------------------------------
//  Prototypes for the functions in posspeed.c                                 
//-----------------------------------------------------------------------------
void ADC_volt_current_get_Init();
void ADC_volt_current_get_Calc(ADC_VOLT_CURRENT_GET_handle); 




#endif

//==============================================================
//End of file.
//==============================================================



