trap_gen.h
来自「无刷直流电机的无传感器控制TI程序」· C头文件 代码 · 共 53 行
H
53 行
/* =================================================================================
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 + =
减小字号Ctrl + -
显示快捷键?