GpioPin.ValueChanged Événement

Définition

Se produit lorsque la valeur de la broche d’E/S à usage général (GPIO) change, soit en raison d’un stimulus externe lorsque la broche est configurée en tant qu’entrée, soit lorsqu’une valeur est écrite dans l’épingle lorsque l’épingle est configurée en tant que sortie.

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

Type d'événement

Configuration requise pour Windows

Fonctionnalités de l’application
lowLevel

S’applique à

Voir aussi