-api-id | -api-type |
---|---|
P:Windows.Devices.Gpio.GpioChangeCounter.Polarity |
winrt property |
Gets or sets the polarity of transitions that will be counted. The polarity may only be changed when pin counting is not started.
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().