📄 gdic.h
字号:
/*****************************************************
gdic.h - Initializes the GDIC
----------------------------------------------------
*****************************************************/
#ifndef __GDIC_H_
#define __GDIC_H_
#include "hidef.h" /* this file declares symbols user by the CodeWarrior environment */
#define GDICLeft 0
#define GDICRight 1
#define LSmallGage 0
#define LLargeGage 1
#define RLargeGage 2
#define RSmallGage 3
#define GDICLCS 0x10 /* chip select for left GDIC */
#define GDICRCS 0x40 /* chip select for right GDIC */
#define GDICLRst 0x20 /* reset line for left GDIC */
#define GDICRRst 0x80 /* reset line for right GDIC */
/* */
#define CnfgPECCRCmd 0x0000
#define StatusCmd 0x1000
#define MaxVelCmd 0x2000
#define Gage0PosCmd 0x4000
#define Gage1PosCmd 0x6000
#define RTZCmd 0x8000
#define RTZCnfgCmd 0xa000
#define RampSelCmd 0xc000
/* PECCR register bit definitions */
#define Pos0CCW 0x0000
#define Pos0CW 0x0080
#define Pos1CCW 0x0100
#define Pos1CW 0x0180
#define MMTMotor 0x0000
#define SwitecMotor 0x0040
#define AirCoreEmul 0x0020
#define ClkCalNom 0x0010
#define ClkCalMax 0x0000
#define EnClkCal 0x0008
#define AdjOsc 0x0004
#define EnableGage0 0x0001
#define EnableGage1 0x0002
#define PECCRConfgVal CnfgPECCRCmd + EnableGage0 + EnableGage1 + ClkCalNom + MMTMotor
#define PECCRStatusOut 0x0000
#define PECCRRTZAccOut 0x0800
#define PECCRGage0PosOut 0x0c00
#define PECCRGage1PosOut 0x0d00
#define PECCRSpeedOut 0x0e00
/* Velocity command register bits */
#define VelG0 0x0100
#define VelG1 0x0200
#define VelMax 0x00ff
/* */
#define FastResponse 0x1000
#define FullSweep 4092
/* Device Status Register Bits */
#define DIR1 0x8000
#define DIR0 0x4000
#define ZPOS1 0x2000
#define ZPOS0 0x1000
#define CMD1 0x0800
#define CMD0 0x0400
#define OV 0x0200
#define UV 0x0100
#define CAL 0x0080
#define OVUV 0x0040
#define MOV1 0x0020
#define MOV0 0x0010
#define RTZ1 0x0008
#define RTZ0 0x0004
#define OT1 0x0002
#define OT0 0x0001
/* RTZ Register bit definitions */
#define RTZEnable 0x0002
void Delay_mSec(uint msec);
void GDICInit(void);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -