Emlid.WindowsIot.Hardware.Boards.Navio.NavioRCInputDevice.OnInputPinValueChanged C# (CSharp) 메소드

OnInputPinValueChanged() 개인적인 메소드

Handles GPIO changes (rising and falling PWM signal), recording them to the decoder queue.
Main hardware routine which triggers the input translation process. This code must run as quickly as possible else we could miss the next event!
private OnInputPinValueChanged ( Windows.Devices.Gpio.GpioPin sender, Windows.Devices.Gpio.GpioPinValueChangedEventArgs arguments ) : void
sender Windows.Devices.Gpio.GpioPin
arguments Windows.Devices.Gpio.GpioPinValueChangedEventArgs
리턴 void
        private void OnInputPinValueChanged(GpioPin sender, GpioPinValueChangedEventArgs arguments)
        {
            // Get PWM value
            var time = StopwatchExtensions.GetTimestampInMicroseconds();
            var level = arguments.Edge == GpioPinEdge.RisingEdge;
            var value = new PwmValue(time, level);

            // Queue for processing
            _valueBuffer.Enqueue(value);
            _valueTrigger.Set();
        }