📄 gsi.h
字号:
| DRV_NOTCONFIGURED - The driver is not yet configured
|
+------------------------------------------------------------------------------
*/
extern USHORT GSI_Read (UBYTE DeviceNo,
void *Buffer,
USHORT *Length,
ULONG *State);
/*
+------------------------------------------------------------------------------
| Function : GSI_Write
+------------------------------------------------------------------------------
| Description : This functions copies the provided data into the buffer of the
| driver and sets the line states. This function must return
| immediately after copying, even if there is not enough space in
| the driver buffer to copy all provided data.
|
| Parameters : DeviceNo - serial device number
| Buffer - buffer containing the data
| Length - On call: size of data; On return: copied bytes
| State - line states of the serial connection
| Mask - manipulated State bits
|
| Return : DRV_OK - Function successful
| DRV_INVALID_PARAMS - The specified device does not exist
| DRV_INTERNAL_ERROR - Internal driver error
| DRV_NOTCONFIGURED - The driver is not yet configured
|
+------------------------------------------------------------------------------
*/
extern USHORT GSI_Write (UBYTE DeviceNo,
void *Buffer,
USHORT *Length,
ULONG State,
ULONG Mask);
/*
+------------------------------------------------------------------------------
| Function : GSI_Look
+------------------------------------------------------------------------------
| Description : This function copies received data into a caller provided
| buffer without delete the data in the driver buffer. It should
| always return immediately after copying the data, without
| waiting for any more data.
|
| Parameters : DeviceNo - serial device number
| Buffer - buffer to copy the data
| Length - On call: size of Buffer; On return: copied bytes
| State - line states of the serial connection
|
| Return : DRV_OK - Function successful
| DRV_INVALID_PARAMS - The specified device does not exist
| DRV_INTERNAL_ERROR - Internal driver error
| DRV_NOTCONFIGURED - The driver is not yet configured
|
+------------------------------------------------------------------------------
*/
extern USHORT GSI_Look (UBYTE DeviceNo,
void *Buffer,
USHORT *Length,
ULONG *State);
/*
+------------------------------------------------------------------------------
| Function : GSI_Clear
+------------------------------------------------------------------------------
| Description : This function is used to clear the device internal buffers.
|
| Parameters : DeviceNo - serial device number
| BufferType - buffer to be cleared
|
| Return : DRV_OK - Function successful
| DRV_INVALID_PARAMS - The specified device does not exist
| DRV_INTERNAL_ERROR - Internal driver error
| DRV_INPROCESS - The driver is busy clearing the buffers
|
+------------------------------------------------------------------------------
*/
extern USHORT GSI_Clear (UBYTE DeviceNo,
USHORT BufferType);
/*
+------------------------------------------------------------------------------
| Function : GSI_Flush
+------------------------------------------------------------------------------
| Description : This function is used to flush the device internal transmit
| buffer.
|
| Parameters : DeviceNo - serial device number
|
| Return : DRV_OK - Function successful
| DRV_INVALID_PARAMS - The specified device does not exist
| DRV_INTERNAL_ERROR - Internal driver error
| DRV_INPROCESS - The driver is busy clearing the buffers
| DRV_NOTCONFIGURED - The driver is not yet configured
|
+------------------------------------------------------------------------------
*/
extern USHORT GSI_Flush (UBYTE DeviceNo);
/*
+------------------------------------------------------------------------------
| Function : GSI_SetSignal
+------------------------------------------------------------------------------
| Description : This function enables indication signals from the driver. These
| signals are sent via the device callback function.
|
| Parameters : DeviceNo - serial device number
| SignalType - Signal type to be set
|
| Return : DRV_OK - Function successful
| DRV_INVALID_PARAMS - parameters out of range
| DRV_INTERNAL_ERROR - Internal driver error
| DRV_SIGFCT_NOTAVAILABLE - no event signaling functionality
|
+------------------------------------------------------------------------------
*/
extern USHORT GSI_SetSignal (UBYTE DeviceNo,
USHORT SignalType);
/*
+------------------------------------------------------------------------------
| Function : GSI_ResetSignal
+------------------------------------------------------------------------------
| Description : This function disables indication signals from the driver.
|
| Parameters : DeviceNo - serial device number
| SignalType - Signal type to be reset
|
| Return : DRV_OK - Function successful
| DRV_INVALID_PARAMS - parameters out of range
| DRV_INTERNAL_ERROR - Internal driver error
| DRV_SIGFCT_NOTAVAILABLE - no event signaling functionality
|
+------------------------------------------------------------------------------
*/
extern USHORT GSI_ResetSignal (UBYTE DeviceNo,
USHORT SignalType);
/*
+------------------------------------------------------------------------------
| Function : GSI_SetConfig
+------------------------------------------------------------------------------
| Description : This function configures the serial device.
|
| Parameters : DeviceNo - serial device number
| DCBPtr - pointer to the driver control block
|
| Return : DRV_OK - Function successful
| DRV_INVALID_PARAMS - parameters out of range
| DRV_INTERNAL_ERROR - Internal driver error
|
+------------------------------------------------------------------------------
*/
extern USHORT GSI_SetConfig (UBYTE DeviceNo,
T_GSI_DCB *DCBPtr);
/*
+------------------------------------------------------------------------------
| Function : GSI_GetConfig
+------------------------------------------------------------------------------
| Description : This function reads the serial device configuration.
|
| Parameters : DeviceNo - serial device number
| DCBPtr - pointer to the driver control block
|
| Return : DRV_OK - Function successful
| DRV_INTERNAL_ERROR - Internal driver error
| DRV_NOTCONFIGURED - The driver is not yet configured
|
+------------------------------------------------------------------------------
*/
extern USHORT GSI_GetConfig (UBYTE DeviceNo,
T_GSI_DCB *DCBPtr);
/*
+------------------------------------------------------------------------------
| Function : GSI_Callback
+------------------------------------------------------------------------------
| Description : This function is needed for cascaded drivers. This function
| must not be confused with the parameter CallbackFunc passed to
| GSI_Init().
|
| Parameters : Signal - pointer to the signal information data
|
| Return : no return value
|
+------------------------------------------------------------------------------
*/
extern void GSI_Callback (T_DRV_SIGNAL *Signal);
#endif /* _TARGET_ */
#endif /* !GSI_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -