Syntax
int GetConnectionStatus(
const unsigned int com_port
);
Parameters
- com_port
-
[in] Specify the COM port number for which you want to get the connection status.
Value Description COM3 Bluetooth SPP (Master) COM4 Bluetooth HID (Slave) COM5 Bluetooth SPP (Slave)
Return value
Returns the connection status of the specified COM port.
Value | Description |
---|---|
COM_STATE_CLOSE | The specified port is closed. |
COM_STATE_CONNECT | The specified port is connecting. |
COM_STATE_DISCONNECT | The specified port is being disconnected. |
COM_STATE_WAIT_ACCEPT | The specified port is waiting for a connection. |
COM_STATE_ACCEPTED | The specified port has connection permission. |
ERROR | The specified port is invalid. |
Remarks
Gets the connection status of the specified serial port.
Requirements
Header file:
lib.hLibrary file:
libSTARTUPOPH5000.a
Last updated: 2020/10/07