📄 f2407hall3.h
字号:
/* ==================================================================================
File name: F2407HALL3.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 F2407HALL3.C.
Target: TMS320F2407 family
=====================================================================================
History:
-------------------------------------------------------------------------------------
05-31-2007 Version 3.20: Using DSP2407A
---------------------------------------------------------------------------------- */
#ifndef __F2407_HALL3_H__
#define __F2407_HALL3_H__
#include <F2407BMSK.H>
/*-----------------------------------------------------------------------------
Initialization states for T4CON and CAPCONB(选择通用定时器4和捕获单元4/5/6,检测两个边沿)
------------------------------------------------------------------------------*/
#define HALL3_INIT_STATE 0xB0FC
/*-----------------------------------------------------------------------------
Define the structure of the Capture Driver Object
------------------------------------------------------------------------------*/
typedef struct { int HallMap[4]; // Variable: CAP/GPIO logic levels for HallMapPointer = 0-5
int CapFlag; // Variable: CAP flags, indicating which CAP detected the edge
int HallMapPointer; // Input/Output (see note below): During hall map creation, this variable points to the
// current commutation state. After map creation, it
// points to the next commutation state.
int tab;
void (*init)(); // Pointer to the init function
void (*read)(); // Pointer to the read function
} HALL3;
/* Note:
- When HallMapPointer is as an input, it is defined by MOD6_CNT.
- When HallMapPointer is as an output, during hall map creation,
this variable points to the current commutation state.
After map creation, it points to the next commutation state.
*/
/*-----------------------------------------------------------------------------
Define a handle for the HALL3 object
------------------------------------------------------------------------------*/
typedef HALL3 *HALL3_handle;
/*------------------------------------------------------------------------------
Default Initializer for the F2407_EV2 HALL3 Object
------------------------------------------------------------------------------*/
#define F2407EV2HALL3 { {0,0,0,0}, \
0xFFFF, \
0, \
0, \
(void (*)(int))F2407_EV2_HALL3_Init, \
(void (*)(int))F2407_EV2_HALL3_Read \
}
/*------------------------------------------------------------------------------
Target Independent Default Initializer HALL3 Object
------------------------------------------------------------------------------*/
#define HALL3_DEFAULTS F2407EV2HALL3
/*------------------------------------------------------------------------------
Prototypes for the functions in F2407HALL3.C
------------------------------------------------------------------------------*/
void F2407_EV2_HALL3_Init(HALL3_handle);
void F2407_EV2_HALL3_Read(HALL3_handle);
//void F2407_EV2_HALL3_Determine_State(HALL3_handle);
//void F2407_EV2_HALL3_Debounce(HALL3_handle);
//void F2407_EV2_HALL3_Next_State_Ptr(HALL3_handle);
//void F2407_EV2_HALL3_Create_Map(HALL3_handle);
#endif // __F2407_HALL3_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -