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

📄 f281xcap.h

📁 TI公司28系列DSP控制无刷直流电机
💻 H
字号:
/* ==================================================================================
File name:        F281XCAP.H                     
                    
Originator:	Digital Control Systems Group
			Texas Instruments
Description:  
Header file containing data type and object definitions and 
initializers. Also contains prototypes for the functions in F281XCAP.C.

Target: TMS320F281x family

=====================================================================================
 History:
-------------------------------------------------------------------------------------
 04-15-2005	Version 3.20: Using DSP281x v. 1.00 or higher 
---------------------------------------------------------------------------------- */

#ifndef __F281X_CAP_H__
#define __F281X_CAP_H__

#include "f281xbmsk.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 { Uint32 TimeStamp;     // Output: Timer value when capture is detected (Q0)
                 void (*init)();       // Pointer to the init function 
                 Uint16 (*read)();     // Pointer to the read function 
               } CAPTURE;

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

/*------------------------------------------------------------------------------
Default Initializer for the F281X_EV1 CAPTURE Object
------------------------------------------------------------------------------*/
#define F281XEV1CAP1    {1,    \
                        (void (*)(Uint32))F281X_EV1_CAP_Init,  \
                        (Uint16 (*)(Uint32))F281X_EV1_CAP_Read  \
                         }

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

/*------------------------------------------------------------------------------
Prototypes for the functions in F281XCAP.C
------------------------------------------------------------------------------*/
void F281X_EV1_CAP_Init(CAPTURE_handle);
Uint16 F281X_EV1_CAP_Read(CAPTURE_handle);                                             

#endif //  __F281X_CAP_H__




⌨️ 快捷键说明

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