# WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.9

import enum
import datetime
import sys
import types
import typing

import winsdk.system
import winsdk.windows.devices.pwm.provider
import winsdk.windows.foundation
import winsdk.windows.foundation.collections

class PwmPulsePolarity(enum.IntEnum):
    ACTIVE_HIGH = 0
    ACTIVE_LOW = 1

Self = typing.TypeVar('Self')

class PwmController(winsdk.system.Object):
    actual_frequency: winsdk.system.Double
    max_frequency: winsdk.system.Double
    min_frequency: winsdk.system.Double
    pin_count: winsdk.system.Int32
    @staticmethod
    def _from(obj: winsdk.system.Object) -> PwmController: ...
    @staticmethod
    def from_id_async(device_id: str) -> winsdk.windows.foundation.IAsyncOperation[PwmController]: ...
    @staticmethod
    def get_controllers_async(provider: typing.Optional[winsdk.windows.devices.pwm.provider.IPwmProvider]) -> winsdk.windows.foundation.IAsyncOperation[winsdk.windows.foundation.collections.IVectorView[PwmController]]: ...
    @staticmethod
    def get_default_async() -> winsdk.windows.foundation.IAsyncOperation[PwmController]: ...
    @typing.overload
    @staticmethod
    def get_device_selector() -> str: ...
    @typing.overload
    @staticmethod
    def get_device_selector(friendly_name: str) -> str: ...
    def open_pin(self, pin_number: winsdk.system.Int32) -> typing.Optional[PwmPin]: ...
    def set_desired_frequency(self, desired_frequency: winsdk.system.Double) -> winsdk.system.Double: ...

class PwmPin(winsdk.system.Object):
    polarity: PwmPulsePolarity
    controller: typing.Optional[PwmController]
    is_started: winsdk.system.Boolean
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winsdk.system.Object) -> PwmPin: ...
    def close(self) -> None: ...
    def get_active_duty_cycle_percentage(self) -> winsdk.system.Double: ...
    def set_active_duty_cycle_percentage(self, duty_cycle_percentage: winsdk.system.Double) -> None: ...
    def start(self) -> None: ...
    def stop(self) -> None: ...

