GpioPin.ValueChanged Kejadian

Definisi

Terjadi ketika nilai pin I/O tujuan umum (GPIO) berubah, baik karena stimulus eksternal saat pin dikonfigurasi sebagai input, atau ketika nilai ditulis ke pin saat pin dikonfigurasi sebagai output.

// 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) 

Jenis Acara

Persyaratan Windows

Kemampuan aplikasi
lowLevel

Berlaku untuk

Lihat juga