This function closes a communications port previously opened by the ComOpen function.

Syntax

void ComClose(
  int port
);

Parameters

port
[in] Specifies which communications port is to be closed.
See the table below for details.
ValueDescription
COM3 Bluetooth SPP (Master)
COM4 Bluetooth HID (Slave)
COM5 Bluetooth SPP (Slave)
COM9 USB VCP
COM10 USB HID
Other COM ports are reserved for the system for OS or extension.

Return value

None

Remarks

Never leave a communication port open longer then necessary, since it increases power consumption.

Requirements

Header file:
lib.h
Library file:
libSTARTUPOPH5000.a

Last updated: 2020/10/07