?? f243_bldcpwm.h
字號:
/* ==================================================================================
File name: F243_BLDCPWM.H
Originator: Digital Control Systems Group
Texas Instruments
Description:
This file defines handy constants for object initializations and
contains prototypes for the functions in F243BLDCPWM1.C and F243BLDCPWM2.ASM
and has definitions of structs etc.
=====================================================================================
History:
-------------------------------------------------------------------------------------
9-15-2000 Release Rev 1.0
---------------------------------------------------------------------------------- */
#ifndef __F243_BLDCPWM_H__
#define __F243_BLDCPWM_H__
#include "..\include\F243BMSK.H"
/*----------------------------------------------------------------------------
Initialization constant for the F243 Timer TxCON for PWM Generation.
----------------------------------------------------------------------------*/
#define PWM_INIT_STATE (FREE_RUN_FLAG + \
TIMER_CONT_UP + \
TIMER_CLK_PRESCALE_X_1 + \
TIMER_ENABLE)
/*-----------------------------------------------------------------------------
Define the structure of BLDC3_PWM_DRV
-----------------------------------------------------------------------------*/
typedef struct {
int cmtn_ptr_bd; /* Commutation(or switching) state pointer input[Q0] */
int mfunc_p; /* Duty ratio of the PWM outputs[Q15] */
int period_max; /* Maximum period */
int d_func; /* PWM period modulation input[Q15] */
int (*init)(); /* Function pointer to INIT function */
int (*update)(); /* Function pointer to UPDATE function */
} PWMGEN;
/*-----------------------------------------------------------------------------
Define a PWMGEN_handle
-----------------------------------------------------------------------------*/
typedef PWMGEN *PWMGEN_handle;
/*------------------------------------------------------------------------------
Default Initializers for the F243 PWMGEN Object
------------------------------------------------------------------------------*/
#define F243_PWMGEN_DEFAULTS { 0x0, \
0x7fff, \
0x03e8, \
0x0 , \
(int (*)(int))F243_BLDC_PWM_Init, \
(int (*)(int))F243_BLDC_PWM_Update \
}
#define PWMGEN_DEFAULTS F243_PWMGEN_DEFAULTS
/*----------------------------------------------------------------------------
Function prototypes for the functions in F243BLDCPWM1.C , F243BLDCPWM2.ASM
----------------------------------------------------------------------------*/
int F243_BLDC_PWM_Init(PWMGEN_handle);
int F243_BLDC_PWM_Update(PWMGEN_handle);
#endif /* __F243_BLDCPWM_H__ */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -