External Interfaces/API Reference    
freeserial

Release hold on a serial port

Syntax

Arguments

'port'
A serial port name, or a cell array of serial port names
obj
A serial port object, or an array of serial port objects.

Description

freeserial releases the hold MATLAB has on all serial ports.

freeserial('port') releases the hold MATLAB has on the serial port specified by port. port can be a cell array of strings.

freeserial(obj) releases the hold MATLAB has on the serial port associated with the object specified by obj. obj can be an array of serial port objects.

Remarks

An error is returned if a serial port object is connected to the port that is being freed. Use the fclose function to disconnect the serial port object from the serial port.

freeserial is necessary only on Windows platforms. You should use freeserial if you need to connect to the serial port from another application after a serial port object has been connected to that port, and you do not want to exit MATLAB.

See Also

Functions

fclose


  fread (serial) fscanf (serial)