Typedefs | |
typedef BOOL(* | pbMBPSerialTransmitterEmptyAPIV1CB )(xMBHandle xHdl, UBYTE *pubValue) MB_CDECL_SUFFIX |
typedef void(* | pvMBPSerialReceiverAPIV1CB )(xMBHandle xHdl, UBYTE ubValue) |
typedef BOOL(* | pbMBPSerialTransmitterEmptyAPIV2CB )(xMBHandle xHdl, UBYTE *pubBufferOut, USHORT usBufferMax, USHORT *pusBufferWritten) MB_CDECL_SUFFIX |
typedef void(* | pvMBPSerialReceiverAPIV2CB )(xMBHandle xHdl, const UBYTE *pubBufferIn, USHORT usBufferLen) MB_CDECL_SUFFIX |
typedef void * | pbMBPSerialTransmitterEmptyCB |
typedef void * | pvMBPSerialReceiverCB |
Functions | |
eMBErrorCode | eMBPSerialInit (xMBPSerialHandle *pxSerialHdl, UCHAR ucPort, ULONG ulBaudRate, UCHAR ucDataBits, eMBSerialParity eParity, UCHAR ucStopBits, xMBHandle xMBHdl) |
eMBErrorCode | eMBPSerialClose (xMBPSerialHandle xSerialHdl) |
eMBErrorCode | eMBPSerialTxEnable (xMBPSerialHandle xSerialHdl, pbMBPSerialTransmitterEmptyCB pbMBPTransmitterEmptyFN) |
eMBErrorCode | eMBPSerialRxEnable (xMBPSerialHandle xSerialHdl, pvMBPSerialReceiverCB pvMBPReceiveFN) |
|
This function is called by the porting layer if the transmitter is ready to accept new characters.
The function should either store a new byte in the pointer
|
|
Called by the porting layer if the transmitter can accept new data and APIV2 is enabled.
This function should be called by the porting layer when the transmitter is enabled an new character can be accepted. The MODBUS stack will write up to
|
|
Abstract type which points either to the API V1 or API V2 functions depending on the setting of MBS_SERIAL_API_VERSION. If API V1 is enabled a variable of this type holds a function pointer of type pbMBPSerialTransmitterEmptyAPIV1CB. If API V2 is enabled it holds a pointer of type pbMBPSerialTransmitterEmptyAPIV2CB. |
|
This function should be called when a new character has been received by the porting layer.
|
|
Called by the porting layer if new data is available and API V2 is enabled.
If the receiver is enabled the porting layer should call this function whenever there is new data available. The number of bytes available is passed in
|
|
Abstract type which points either to the API V1 or API V2 functions depending on the setting of MBS_SERIAL_API_VERSION. If API V1 is enabled a variable of this type holds a function pointer of type pvMBPSerialReceiverAPIV1CB. If API V2 is enabled it holds a pointer of type pvMBPSerialReceiverAPIV2CB. |
|
Close a serial port. This function should release all resources used by this instance such that it can be used again.
|
|
This function should initialize a new serial port and return a handle to it.
|
|
Enables the receiver and registers a callback or disables it. After the receiver has been enabled the callback function should be called for every new character. Only valid characters should be passed to the stack.
|
|
Enables the transmitter and registers a callback or disables it.
After the transmitter has been enabled the callback function should be called until it returns
|