ramp.h

来自「2802 步进电机控制器」· C头文件 代码 · 共 45 行

H
45
字号
/* =================================================================================
File name:        RAMP.H  (IQ version)                  
                    
Originator:		ECS Development

Description: 
Header file containing constants, data type definitions, and 
function prototypes for the RAMP module.
=====================================================================================
 History:
-------------------------------------------------------------------------------------
 04-15-2005	Version 3.20                                                   
------------------------------------------------------------------------------*/
#ifndef __RAMP_H__
#define __RAMP_H__

typedef struct { _iq           TargetIn; 	    // Input: Target input (pu)
				 unsigned long DelayRate;	    // Parameter: Maximum delay rate (Q0) - independently with global Q			
		 	 	 _iq           MaxLimit;	    // Parameter: Minimum limit (pu)				  
				 _iq           MinLimit;	    // Parameter: Maximum limit (pu)
				 unsigned long DelayCounter;    // Variable: Incremental delay (Q0) - independently with global Q	
				 _iq           TargetOut;    	// Output: Target output (pu)				 
				 unsigned int  EqualFlag;		// Output: Flag output (Q0) - independently with global Q
		  	  	 void (*calc)();	  	// Pointer to calculation function
				 } RAMP;	            

/*-----------------------------------------------------------------------------
Default initalizer for the RAMP object.
-----------------------------------------------------------------------------*/                     
#define RAMP_DEFAULTS { 0, \
                           40, \
                          	_IQ(1), \
                          	_IQ(-1), \
                          	0, \
                          	0, \
                          	0, \
                   			(void (*)(unsigned long))ramp_calc }

/*------------------------------------------------------------------------------
Prototypes for the functions in RAMP.C
------------------------------------------------------------------------------*/
void ramp_calc(RAMP *);

#endif // __RAMP_H__

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?