/* =================================================================================
File name:        RMP3CNTL.H  (IQ version)                  
                    
Originator:	Digital Control Systems Group
			Texas Instruments

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

typedef struct { _iq DesiredInput; 		// Input: Desired ramp input (Q0) - independently with global Q

				 _iq PosRampPlus1;			// Parameter: Ramp3 delay expressed in no of sampling period (Q0) - independently with global Q
		 	 	 _iq PosRampMinus1;	        // Variable: Counter for rmp3 delay (Q0) - independently with global Q
                 _iq PosRampPlus2;           // Parameter: Ramp3 delay expressed in no of sampling period (Q0) - independently with global Q
                 _iq PosRampMinus2;          // Variable: Counter for rmp3 delay (Q0) - independently with global Q

                 _iq NegRampPlus1;          // Parameter: Ramp3 delay expressed in no of sampling period (Q0) - independently with global Q
                 _iq NegRampMinus1;         // Variable: Counter for rmp3 delay (Q0) - independently with global Q
                 _iq NegRampPlus2;          // Parameter: Ramp3 delay expressed in no of sampling period (Q0) - independently with global Q
                 _iq NegRampMinus2;         // Variable: Counter for rmp3 delay (Q0) - independently with global Q

				 _iq Out;					// Output: Ramp3 output (Q0) - independently with global Q

                 _iq RampLowLimit1;          // Parameter: Minimum ramp output (Q0) - independently with global Q
                 _iq RampHighLimit1;         // Parameter: Minimum ramp output (Q0) - independently with global Q

				 _iq RampLowLimit;	    	// Parameter: Minimum ramp output (Q0) - independently with global Q
				 _iq RampHighLimit;	    	// Parameter: Minimum ramp output (Q0) - independently with global Q
				 //Uint32 RampDoneFlag;		// Output: Flag output (Q0) - independently with global Q
		  	  	 void (*calc)();	  		// Pointer to calculation function 
				 } RMP_V2;

typedef RMP_V2 *RMP_V2_handle;
/*-----------------------------------------------------------------------------
Default initalizer for the RMP3 object.
-----------------------------------------------------------------------------*/                     
#define RMP_V2_DEFAULTS { 0, \
                        0, \
                        0, \
                        0, \
                        0, \
                        0, \
                        0, \
                        0, \
                        0, \
                        0, \
                        0, \
                        0, \
                        0, \
                        0x00000050, \
             			(void (*)())rmp_cntl_v2_calc }

/*------------------------------------------------------------------------------
Prototypes for the functions in RMP3CNTL.C
------------------------------------------------------------------------------*/
void rmp_cntl_v2_calc(RMP_V2_handle);



#endif // __RMP3_CNTL_H__

