Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 1.04 KB

gpiochangecounter_polarity.md

File metadata and controls

29 lines (18 loc) · 1.04 KB
-api-id -api-type
P:Windows.Devices.Gpio.GpioChangeCounter.Polarity
winrt property

Windows.Devices.Gpio.GpioChangeCounter.Polarity

-description

Gets or sets the polarity of transitions that will be counted. The polarity may only be changed when pin counting is not started.

-property-value

-remarks

The default polarity value is Falling. See GpioChangePolarity for more information on polarity values. Counting a single edge can be considerably more efficient than counting both edges.

The following exceptions can be thrown when setting the polarity:

  • E_INVALIDARG - value is not a valid GpioChangePolarity value.
  • HRESULT_FROM_WIN32(ERROR_BAD_COMMAND) - change counting is currently active. Polarity can only be set before calling Start() or after calling Stop().

-see-also

-examples