f2407cap.h

来自「TI公司24X系列DSP控制无刷直流电机」· C头文件 代码 · 共 72 行

H
72
字号
/* ==================================================================================
File name:        F2407CAP.H                     
                    
Originator:	Digital Control Systems Group
			Texas Instruments
Description:  
This file defines handy constants for register initializations
contains prototypes for the functions in F2407_CAP?.(C/ASM),
and has definitions of structs etc.
=====================================================================================
 History:
-------------------------------------------------------------------------------------
 9-15-2000	Release	Rev 1.00                                                  
---------------------------------------------------------------------------------- */

/* F2407 Register TxCON                                                        */
/*----------------------------------------------------------------------------*/
#ifndef __F2407CAP_H__
#define __F2407CAP_H__


#include "..\include\F2407BMSK.H"

/*-----------------------------------------------------------------------------
    Initialization states for T2CON,T4CON and CAPCONA,CAPCONB 
------------------------------------------------------------------------------*/
#define CAP_INIT_STATE    0xA050
#define TIMER_INIT_STATE (FREE_RUN_FLAG+TIMER_CONT_UP+TIMER_CLK_PRESCALE_X_128+ \
                          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 F2407_EV1_CAP_Init(CAPTURE_handle);
int  F2407_EV1_CAP1_Read(CAPTURE_handle);                                             

/*------------------------------------------------------------------------------
Default Initializer for the F2407_EV1 CAPTURE Object
------------------------------------------------------------------------------*/
#define F2407EV1CAP1    {1,    \
                        (int (*)(int))F2407_EV1_CAP_Init,  \
                        (int (*)(int))F2407_EV1_CAP1_Read  \
                         }

/*------------------------------------------------------------------------------
Target Independent Default Initializer CAPTURE Object
------------------------------------------------------------------------------*/
#define CAPTURE_DEFAULTS F2407EV1CAP1


#endif /*  __F2407_CAP_H__ */




⌨️ 快捷键说明

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