Share via


SerialDevice.PinChanged Event

Definition

Event handler that is invoked when the state of a signal or line changes on the serial port.

// Register
event_token PinChanged(TypedEventHandler<SerialDevice, PinChangedEventArgs const&> const& handler) const;

// Revoke with event_token
void PinChanged(event_token const* cookie) const;

// Revoke with event_revoker
SerialDevice::PinChanged_revoker PinChanged(auto_revoke_t, TypedEventHandler<SerialDevice, PinChangedEventArgs const&> const& handler) const;
public event TypedEventHandler<SerialDevice,PinChangedEventArgs> PinChanged;
function onPinChanged(eventArgs) { /* Your code */ }
serialDevice.addEventListener("pinchanged", onPinChanged);
serialDevice.removeEventListener("pinchanged", onPinChanged);
- or -
serialDevice.onpinchanged = onPinChanged;
Public Custom Event PinChanged As TypedEventHandler(Of SerialDevice, PinChangedEventArgs) 

Event Type

Remarks

This event is used to detect and respond to changes in the signal state of the serial port. When state changes, the PinChanged event handler is invoked and information is received in a PinChangedEventArgs object. Determine the type of signal by retrieving the PinChange property. Those property values are defined in the SerialPinChange enumeration.

Applies to