📄 stim.h
字号:
//
// Define 'XDCR_DATA' as a type into which specific transducer data may be
// placed.
// Note that the structure of this data-type will be specific to this
// implementation. It should also be noted that the external interface to the
// data-type will allow the interface to the data to be re-used.
//
typedef union {
unsigned int ChData;// - must be equal in size to the largest field
unsigned int Ch1; // Ch1 - 12bit ADC, Sensor
boolean Ch2; // Ch2 - Fan, Actuator ('on' or 'off')
} XDCR_DATA;
//
// Define a 'CHANNEL' type, into which will go some channel specific info.
//
typedef struct {
// Standard and Auxiliary status registers must exist for
// each channel.
//
STD_STATUS_REGISTER StdStatus;
AUX_STATUS_REGISTER AuxStatus;
// Standard and Auxiliary interrupt mask registers must exist
// for each channel.
//
STD_INTERRUPT_MASK StdIntMask;
AUX_INTERRUPT_MASK AuxIntMask;
// Each channel has transducer data, and data length (in bytes)
// associated with it.
XDCR_DATA Data;
} CHANNEL;
// STIM module Function Prototypes
// -------------------------------
CHANNEL* STIM_GetChHandle(unsigned char ucChNum);
boolean STIM_GetXdcrData(unsigned char ucChNum, unsigned char* pBuf);
boolean STIM_SetXdcrData(unsigned char ucChNum, unsigned char* pBuf);
void STIM_GetVersion(char* pVersion);
void STIM_SoftReset(void);
void STIM_InitialReset(void);
void STIM_ChannelReset(unsigned char ucChNum);
U8E STIM_GetXdcrType(unsigned char ucChNum);
void STIM_SetState(unsigned char ucState);
unsigned char STIM_GetState(void);
U8E STIM_GetResetFlag(void);
void STIM_SetResetFlag(U8E eFlag);
// Channel specific Data Sampling/Data Setting functions:
// -----------------------------------------------------
void STIM_InitCh1(void);
void STIM_InitCh2(void);
unsigned int STIM_GetCh1Sample(void);
void STIM_SetCh2State(boolean bState);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -