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

📄 driver.h

📁 这是我编写的深圳地铁S335型司机控制器的检测程序
💻 H
📖 第 1 页 / 共 5 页
字号:
    USHORT      TrigMode;
    FLOAT far   *VoltageArray;
} PT_MAIVoltageIn, FAR * LPT_MAIVoltageIn;

typedef struct tagPT_MAIVoltageInExp
{
    USHORT      NumChan;
    USHORT far  *DasChanArray;
    USHORT far  *DasGainArray;
    USHORT far  *ExpChanArray;
    FLOAT far   *VoltageArray;
} PT_MAIVoltageInExp, FAR * LPT_MAIVoltageInExp;

typedef struct tagPT_TCMuxRead
{
    USHORT      DasChan;
    USHORT      DasGain;
    USHORT      ExpChan;
    USHORT      TCType;
    USHORT      TempScale;
    FLOAT far   *temp;
} PT_TCMuxRead, FAR * LPT_TCMuxRead;

typedef struct tagPT_AOConfig
{
    USHORT      chan;
    USHORT      RefSrc;
    FLOAT       MaxValue;
    FLOAT       MinValue;
} PT_AOConfig, FAR * LPT_AOConfig;

typedef struct tagPT_AOBinaryOut
{
    USHORT      chan;
    USHORT      BinData;
} PT_AOBinaryOut, FAR * LPT_AOBinaryOut;

typedef struct tagPT_AOVoltageOut
{
    USHORT      chan;
    FLOAT       OutputValue;
} PT_AOVoltageOut, FAR * LPT_AOVoltageOut;

typedef struct tagPT_AOScale
{
    USHORT      chan;
    FLOAT       OutputValue;
    USHORT far  *BinData;
}PT_AOScale,    FAR * LPT_AOScale;

typedef struct tagPT_DioSetPortMode
{
    USHORT      port;
    USHORT      dir;
} PT_DioSetPortMode, FAR * LPT_DioSetPortMode;

typedef struct tagPT_DioGetConfig
{
    SHORT far      *PortArray;
    USHORT         NumOfPorts;
} PT_DioGetConfig, FAR * LPT_DioGetConfig;

typedef struct tagPT_DioReadPortByte
{
    USHORT      port;
    USHORT far  *value;
} PT_DioReadPortByte, FAR * LPT_DioReadPortByte;

typedef struct tagPT_DioWritePortByte
{
    USHORT      port;
    USHORT      mask;
    USHORT      state;
} PT_DioWritePortByte, FAR * LPT_DioWritePortByte;

typedef struct tagPT_DioReadBit
{
    USHORT      port;
    USHORT      bit;
    USHORT far  *state;
} PT_DioReadBit, FAR * LPT_DioReadBit;

typedef struct tagPT_DioWriteBit
{
    USHORT      port;
    USHORT      bit;
    USHORT      state;
} PT_DioWriteBit, FAR * LPT_DioWriteBit;

typedef struct tagPT_DioGetCurrentDOByte
{
    USHORT      port;
    USHORT far  *value;
} PT_DioGetCurrentDOByte, FAR * LPT_DioGetCurrentDOByte;

typedef struct tagPT_DioGetCurrentDOBit
{
    USHORT      port;
    USHORT      bit;
    USHORT far  *state;
} PT_DioGetCurrentDOBit, FAR * LPT_DioGetCurrentDOBit;


typedef struct tagPT_WritePortByte
{
    USHORT      port;
    USHORT      ByteData;
} PT_WritePortByte, FAR * LPT_WritePortByte;

typedef struct tagPT_WritePortWord
{
    USHORT      port;
    USHORT      WordData;
} PT_WritePortWord, FAR * LPT_WritePortWord;

//\\\\\\\\\\\\\\\\\\\\ 2.0C ///////////////////
typedef struct tagPT_WritePortDword
{
    USHORT      port;
    ULONG       DwordData;
} PT_WritePortDword, FAR * LPT_WritePortDword;
////////////////////// 2.0C ///////////////////


typedef struct tagPT_ReadPortByte
{
    USHORT      port;
    USHORT far  *ByteData;
} PT_ReadPortByte, FAR * LPT_ReadPortByte;

typedef struct tagPT_ReadPortWord
{
    USHORT      port;
    USHORT far  *WordData;
} PT_ReadPortWord, FAR * LPT_ReadPortWord;

//\\\\\\\\\\\\\\\\\\\ V2.0C /////////////////////
typedef struct tagPT_ReadPortDword
{
    USHORT      port;
    ULONG far  *DwordData;
}PT_ReadPortDword, FAR * LPT_ReadPortDword;

//\\\\\\\\\\\\\\\\\\\ V2.0B /////////////////////
typedef struct tagPT_CounterConfig
{
   USHORT usCounter;                // counter selected
   USHORT usInitValue;              // initial counter value
   USHORT usCountMode;              // pre-defined mode for counter 
   USHORT usCountDirect;            // counting direction 0-down; 1-up
   USHORT usCountEdge;              // count source edge
	USHORT usOutputEnable;           // counter output enable-1, disable-0
   USHORT usOutputMode;             // output mode
   USHORT usClkSrc;                 // clock source selection
   USHORT usGateSrc;                // gate source selection
   USHORT usGatePolarity;           // gating porality 
} PT_CounterConfig, FAR * LPT_CounterConfig;
///////////////////// V2.0B /////////////////////

typedef struct tagPT_CounterEventStart
{
    USHORT      counter;
    USHORT      GateMode;
} PT_CounterEventStart, FAR * LPT_CounterEventStart;

typedef struct tagPT_CounterEventRead
{
    USHORT      counter;
    USHORT far  *overflow;
    ULONG far   *count;
} PT_CounterEventRead, FAR * LPT_CounterEventRead;

typedef struct tagPT_CounterFreqStart
{
    USHORT      counter;
    USHORT      GatePeriod;
    USHORT      GateMode;
} PT_CounterFreqStart, FAR * LPT_CounterFreqStart;

typedef struct tagPT_CounterFreqRead
{
    USHORT      counter;
    FLOAT far   *freq;
} PT_CounterFreqRead, FAR * LPT_CounterFreqRead;

//\\\\\\\\\\\\\\\\\\\ V2.0B /////////////////////
typedef struct tagPT_FreqOutStart
{
   USHORT  usChannel;   // channel selected
   USHORT  usDivider;   // divider value
   USHORT  usFoutSrc;   // freq out source   
} PT_FreqOutStart, * LPT_FreqOutStart;
///////////////////// V2.0B /////////////////////

typedef struct tagPT_CounterPulseStart
{
    USHORT      counter;
    FLOAT       period;
    FLOAT       UpCycle;
    USHORT      GateMode;
} PT_CounterPulseStart, FAR * LPT_CounterPulseStart;

typedef struct tagPT_QCounterConfig
{
    USHORT      counter;
    USHORT      LatchSrc;
    USHORT      LatchOverflow;
    USHORT      ResetOnLatch;
    USHORT      ResetValue;
} PT_QCounterConfig, FAR * LPT_QCounterConfig;

typedef struct tagPT_QCounterConfigSys
{
    USHORT      SysClock;
    USHORT      TimeBase;
    USHORT      TimeDivider;
    USHORT      CascadeMode;
} PT_QCounterConfigSys, FAR * LPT_QCounterConfigSys;

typedef struct tagPT_QCounterStart
{
    USHORT      counter;
    USHORT      InputMode;
} PT_QCounterStart, FAR * LPT_QCounterStart;

typedef struct tagPT_QCounterRead
{
    USHORT      counter;
    USHORT far  *overflow;
    ULONG far   *LoCount;
    ULONG far   *HiCount;
} PT_QCounterRead, FAR * LPT_QCounterRead;

typedef struct tagPT_AlarmConfig
{
    USHORT      chan;
    FLOAT       LoLimit;
    FLOAT       HiLimit;
} PT_AlarmConfig, FAR * LPT_AlarmConfig;

typedef struct tagPT_AlarmEnable
{
    USHORT      chan;
    USHORT      LatchMode;
    USHORT      enabled;
} PT_AlarmEnable, FAR * LPT_AlarmEnable;

typedef struct tagPT_AlarmCheck
{
    USHORT      chan;
    USHORT far  *LoState;
    USHORT far  *HiState;
} PT_AlarmCheck, FAR * LPT_AlarmCheck;

typedef struct tagPT_WDTEnable
{
    USHORT      message;
    HWND        Destination;
} PT_WDTEnable, FAR * LPT_WDTEnable;

typedef struct tagPT_FAIIntStart
{
    USHORT      TrigSrc;
    DWORD       SampleRate;
    USHORT      chan;
    USHORT      gain;
    USHORT far  *buffer;
    ULONG       count;
    USHORT      cyclic;
    USHORT      IntrCount;
} PT_FAIIntStart, FAR * LPT_FAIIntStart;

typedef struct tagPT_FAIIntScanStart
{
    USHORT      TrigSrc;
    DWORD       SampleRate;
    USHORT      NumChans;
    USHORT      StartChan;
    USHORT far  *GainList;
    USHORT far  *buffer;
    ULONG       count;
    USHORT      cyclic;
    USHORT      IntrCount;
} PT_FAIIntScanStart, FAR * LPT_FAIIntScanStart;

typedef struct tagPT_FAIDmaStart
{
    USHORT      TrigSrc;
    DWORD       SampleRate;
    USHORT      chan;
    USHORT      gain;
    USHORT far  *buffer;
    ULONG       count;
} PT_FAIDmaStart, FAR * LPT_FAIDmaStart;

typedef struct tagPT_FAIDmaScanStart
{
    USHORT      TrigSrc;
    DWORD       SampleRate;
    USHORT      NumChans;
    USHORT      StartChan;
    USHORT far  *GainList;
    USHORT far  *buffer;
    ULONG       count;
} PT_FAIDmaScanStart, FAR * LPT_FAIDmaScanStart;

typedef struct tagPT_FAIDualDmaStart
{
    USHORT      TrigSrc;
    DWORD       SampleRate;
    USHORT      chan;
    USHORT      gai

⌨️ 快捷键说明

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