📄 rampgen.h
字号:
/* =================================================================================
File name: RAMPGEN.H
Originator: Digital Control Systems Group
Texas Instruments
Description:
This file contains type definitions, constants and initializers for
the ramp generation functions contained in RAMPGEN.ASM
=====================================================================================
History:
-------------------------------------------------------------------------------------
09-15-2000 Release Rev 1.00
01-15-2001 Release Rev 1.10
------------------------------------------------------------------------------*/
#ifndef __RAMPGEN_H__
#define __RAMPGEN_H__
/*-----------------------------------------------------------------------------
Define the structure of the RAMPGEN
RAMP Function Generator
-----------------------------------------------------------------------------*/
typedef struct { int rmp_freq; /* Input: Ramp frequency (Q15) */
int step_angle_max; /* Parameter: Maximum step angle (Q0) */
int angle_rg; /* Variable: Step angle (Q0) */
int rmp_gain; /* Input: Ramp gain (Q15) */
int rmp_out; /* Output: Ramp signal (Q15) */
int rmp_offset; /* Input: Ramp offset (Q15) */
int (*calc)(); /* Pointer to calculation function */
} RAMPGEN;
typedef RAMPGEN *RAMPGEN_handle;
/*------------------------------------------------------------------------------
Object Initializers
------------------------------------------------------------------------------*/
#define RAMPGEN_DEFAULTS {0x3FFF, 1000, 0x0000, 0x3FFF, 0x0000, 0x3FFF, \
(int (*)(int))rampgen_calc }
/*------------------------------------------------------------------------------
Funtion prototypes
------------------------------------------------------------------------------*/
void rampgen_calc(RAMPGEN_handle);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -