📄 encodrbd.h
字号:
/*****************************************************************************
*** ENCODRBD.H -- header file (US Digital Optical Encoder Interface Board) ***
******************************************************************************
**** ****
**** Header file containing I/O register mapping and other info ****
**** for the US Digital board ****
**** ****
**** Last revision date: 1/4/99 ****
**** Programmer: Dan Block ****
**** ****
*****************************************************************************/
#define ENCINIT 0
#define ENCDIV 5000 //Number of (counts/div)*4
#define ENCPI 3.1415926536F
#define ENCBASE ((PUCHAR)0x220) /* default BASE address of interface board */
#define DATA1 ((PUCHAR)0x220) /* data register of LS7166 */
#define CONTROL1 ((PUCHAR)0x221) /* control register of LS7166 */
#define DATA2 ((PUCHAR)0x222) /* data register of LS7166 */
#define CONTROL2 ((PUCHAR)0x223) /* control register of LS7166 */
#define DATA3 ((PUCHAR)0x224) /* data register of LS7166 */
#define CONTROL3 ((PUCHAR)0x225) /* control register of LS7166 */
#define DATA4 ((PUCHAR)0x226) /* data register of LS7166 */
#define CONTROL4 ((PUCHAR)0x227) /* control register of LS7166 */
#define LATCH ((PUCHAR)0x228) /* a read causes all LS7166s to latch counter */
/* LS7166 commands */
#define MASTER_RESET 0X20 /* master reset command */
#define INPUT_SETUP 0X68 /* command to setup counter input */
#define QUAD_X1 0XC1 /* command to setup quadrature multiplier to 1 */
#define QUAD_X2 0XC2 /* command to setup quadrature multiplier to 2 */
#define QUAD_X4 0XC3 /* command to setup quadrature multiplier to 4 */
#define ADDR_RESET 0X01 /* command to reset address pointer */
#define LATCH_CNTR 0X02 /* command to latch counter */
#define CNTR_RESET 0X04 /* command to reset counter */
#define PRESET_CTR 0X08 /* transfer preset to counter */
VOID _stdcall init_7166(void);
VOID _stdcall hard_latch(void);
long _stdcall read_chip1(void);
long _stdcall read_chip2(void);
long _stdcall read_chip3(void);
long _stdcall read_chip4(void);
VOID _stdcall read_encoders(float*,float*);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -