
UM0516
STBLLIB library
2.3.2
COM_Close
BYTE COM_Close()
Closes the current serial connection.
Table 4. COM_Close description
Field
Type
Description
Output
BYTE
SUCCESS, Error otherwise (see Error codes.).
2.3.3
COM_Open
BYTE COM_Open()
Opens the selected serial port. Use SetCOMSettings before selecting and configuring the
serial port to be used, otherwise default settings (serial communication over COM1 at
115 200 baud, 8 bits, with no parity and nbStopBit = 1) are applied.
Table 5. COM_Open description
Field
Type
Description
Output
BYTE
SUCCESS, Error otherwise (see Error codes.).
2.3.4
COM_is_Open
BOOL COM_is_Open()
Gets the status of the selected serial port.
Table 6. COM_is_Open description
Field
Type
Description
Output
BOOL
Returns TRUE if the serial communication is opened, FALSE
otherwise
2.3.5
GetPaketSize
BYTE GetPaketSize(LPBYTE size)
Gets the maximum packet size to be transmitted to the device, the packet size is set to
0x100 as default and updated when calling STBL_Init_BL method.
Table 7. GetPacketSize description
Field
Type
Description
Input size
LPBYTE Pointer to the maximum packet size to be transmitted to the device.
Output
BYTE
SUCCESS, Error otherwise (see Error codes.).
Doc ID 14490 Rev 2
9/26

























