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

📄 f243_bldcpwm.h

📁 TI的digital motor control lib的源代码。了解TI的编程规范
💻 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 + -