⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 trap_gen.h

📁 TI的digital motor control lib的源代码。了解TI的编程规范
💻 H
字号:
/* =================================================================================
File name:        TRAP_GEN.H                     
                    
Originator:	Digital Control Systems Group
			Texas Instruments

Description: 
Header file containing constants, data type definitions, and 
function prototypes for the TRAPGEN_CALC module.
=====================================================================================
 History:
-------------------------------------------------------------------------------------
 02-08-2001		Release	Rev 1.0                                                   
------------------------------------------------------------------------------*/

#ifndef __TRAP_GEN_H__
#define __TRAP_GEN_H__

typedef struct {  int  trap_delay_cntr;  /* Variable: Delay counter (Q0) */
				  int  trap_dly_max_tmp; /* Variable: Temp maximum delay input (Q0) */
				  int  trap_timer;		/* Variable: Timer (Q15) */
				  int  trap_max;		/* Input: Maximum input (Q15) */			
		 	 	  int  trap_max_tmp;	/* Variable: Temp maximum input (Q15) */
		 	 	  int  trap_dly_max;	/* Input: Maximum delay input (Q0) */
				  int  trap_min; 		/* Input: Minimum input (Q15) */
				  int  trap_min_tmp;	/* Variable: Temp mimimum input (Q15) */			
				  int  trap_out_lo;		/* Variable: Trapezoidal output (Q31) */
				  int  trap_out;		/* Output: Trapezoidal output (Q31) */
		  	  	  int  (*calc)();	  	/* Pointer to calculation function */ 
				 } TRAPGEN;	            

/*-----------------------------------------------------------------------------
Default initalizer for the TRAPGEN object.
-----------------------------------------------------------------------------*/                     
#define TRAPGEN_DEFAULTS { 0x0000, \
                          0x0004, \
                          0x0000, \
                          0x2000, \
                          0x2000, \
                          0x0004, \
                          0x2000, \
                          0x2000, \
                          0x0000, \
                          0x0000, \
               			  (int (*)(int))trapgen_calc }

/*------------------------------------------------------------------------------
Prototypes for the functions in TRAP_GEN.ASM
------------------------------------------------------------------------------*/
void trapgen_calc(TRAPGEN *);

#endif /* __TRAP_GEN_H__ */

⌨️ 快捷键说明

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