示例#1
0
 internal EventConfig(int _gpioPin, GpioPinMode _pinMode, PinEventStates _pinEventState, Func <OnValueChangedEventArgs, bool> _onEvent)
 {
     GpioPin           = _gpioPin;
     PinMode           = _pinMode;
     PinEventState     = _pinEventState;
     IsEventRegistered = false;
     OnEvent           = _onEvent;
 }
 internal OnValueChangedEventArgs(int _pinNumber, GpioPinState _pinState,
                                  bool _pinCurrentDigitalValue, GpioPinMode _pinDriveMode, PinEventStates _state,
                                  GpioPinState _previousPinState, bool _previousDigitalValue)
 {
     Pin                  = _pinNumber;
     CurrentState         = _pinState;
     CurrentDigitalValue  = _pinCurrentDigitalValue;
     CurrentMode          = _pinDriveMode;
     TimeStamp            = DateTime.Now;
     PreviousPinState     = _previousPinState;
     PreviousDigitalValue = _previousDigitalValue;
     CurrentEventState    = _state;
 }