Main Content

getpinstatus

Get serial pin status

Description

status = getpinstatus(device) gets the serial pin status and returns it as a structure to status.

example

Examples

collapse all

Get the serial pin status for the specified port.

device = serialport("COM3",9600);
 ⋮
status = getpinstatus(device)
status = 

  struct with fields:

      ClearToSend: 1
     DataSetReady: 1
    CarrierDetect: 1
    RingIndicator: 0

Input Arguments

collapse all

Serial port connection, specified as a serialport object.

Example: getpinstatus(device) returns the serial pin status for the serial port connection device.

Output Arguments

collapse all

Pin status, returned as a structure with the logical type fields named ClearToSend, DataSetReady, CarrierDetect, and RingIndicator.

Version History

Introduced in R2019b

See Also

Functions