User's Manual

Table Of Contents
RK-5424-5 Reference Kit User’s Guide 4-33
iBeanAPI_IO.h
13. ibApi_IO_WriteSerial()
ibApi_FUNC ibApi_IO_WriteSerial (
ibApi_APIHANDLE api_hdl,
ibApi_DEVICEID device_id,
ibApi_UINT8 buffer[],
ibApi_UINT16 buffer_size
);
This function writes buffer_size bytes pointed to by the buffer pointer to the specified device
handle. Prior to use, the ibApi_FIELDID_USERDATAMODE field must have been configured
for serial operation. The specific contents of the user data block and its maximum size are
application defined but must be equal to or smaller than that the maximum payload size
supported. Maximum payload size supported is returned when the function
ibApi_WriteSerialData() is called with buffer_size=0.
Parameters:
api_hdl: (input) API handle returned from ibApi_Open().
device_id: (input) ID of the device to be accessed.
buffer: (input) Pointer to packet to transmit.
buffer_size: (input) Number of bytes in user data packet to transmit.
Return Value:
Bytes sent if successful, or an error code (<0) if not.