?? f243_cap.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.0
---------------------------------------------------------------------------------- */
/* 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 + -