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

📄 f243_cap.h

📁 TI公司24X系列DSP控制无刷直流电机
💻 H
字号:
/* ==================================================================================
File name:        F243_CAP.H                     
                    
Originator:	Digital Control Systems Group
			Texas Instruments
Description:  
This file defines handy constants for register initializations
contains prototypes for the functions in F243_CAP.C,
and has definitions of structs etc.
=====================================================================================
 History:
-------------------------------------------------------------------------------------
 9-15-2000	Release	Rev 1.00                                                  
---------------------------------------------------------------------------------- */

/* F243 Register TxCON                                                        */
/*----------------------------------------------------------------------------*/
#ifndef __F243_CAP_H__
#define __F243_CAP_H__

#include "..\include\F243BMSK.H"

/*-----------------------------------------------------------------------------
    Initialization states for T2CON and CAPCON 
------------------------------------------------------------------------------*/
#define CAP_INIT_STATE    0xb0a8
#define TIMER_INIT_STATE (FREE_RUN_FLAG+TIMER_CONT_UP+TIMER_CLK_PRESCALE_X_8+ \
                          TIMER_ENABLE_BY_OWN+TIMER_ENABLE+                   \
                          TIMER_CLOCK_SRC_INTERNAL+ TIMER_COMPARE_LD_ON_ZERO)


/*-----------------------------------------------------------------------------
Define the structure of the Capture Driver Object 
------------------------------------------------------------------------------*/
typedef struct { int time_stamp;
                 int (*init)();       /* Pointer to the init function         */
                 int (*read)();       /* Pointer to the init function         */
               } CAPTURE;

/*-----------------------------------------------------------------------------
Define a handle for the CAPTURE object
------------------------------------------------------------------------------*/
typedef CAPTURE *CAPTURE_handle;





/*------------------------------------------------------------------------------
Prototypes for the functions in F243_CAP.C
------------------------------------------------------------------------------*/
void F243_CAP_Init(CAPTURE_handle); 
int  F243_CAP1_Read(CAPTURE_handle);                                             



/*------------------------------------------------------------------------------
Default Initializer for the F243 CAPTURE Object
------------------------------------------------------------------------------*/
#define F243CAP1        {1,    \
                        (int (*)(int))F243_CAP_Init,  \
                        (int (*)(int))F243_CAP1_Read  \
                         }
/*------------------------------------------------------------------------------
Target Independent Default Initializer CAPTURE Object
------------------------------------------------------------------------------*/
#define CAPTURE_DEFAULTS F243CAP1

#endif /* __F243_CAP_H__ */

⌨️ 快捷键说明

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