GpioPin.ValueChanged イベント

定義

汎用 I/O (GPIO) ピンの値が変更された場合に発生します。これは、ピンが入力として構成されている場合、またはピンが出力として構成されているときに値がピンに書き込まれたときに、外部刺激が原因で発生します。

// Register
event_token ValueChanged(TypedEventHandler<GpioPin, GpioPinValueChangedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
GpioPin::ValueChanged_revoker ValueChanged(auto_revoke_t, TypedEventHandler<GpioPin, GpioPinValueChangedEventArgs const&> const& handler) const;
public event TypedEventHandler<GpioPin,GpioPinValueChangedEventArgs> ValueChanged;
function onValueChanged(eventArgs) { /* Your code */ }
gpioPin.addEventListener("valuechanged", onValueChanged);
gpioPin.removeEventListener("valuechanged", onValueChanged);
- or -
gpioPin.onvaluechanged = onValueChanged;
Public Custom Event ValueChanged As TypedEventHandler(Of GpioPin, GpioPinValueChangedEventArgs) 

イベントの種類

Windows の要件

アプリの機能
lowLevel

適用対象

こちらもご覧ください