Main Content

getpinstatus

Get serial pin status

Description

example

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

Examples

collapse all

Get the serial pin status for the specified port.

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

  struct with fields:

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

Input Arguments

collapse all

Serial port, specified as a serialport object.

Example: serialport()

Output Arguments

collapse all

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

See Also

Functions

Introduced in R2019b