//
// Copyright (c) Microsoft Corporation. All rights reserved.
// 
//
// File generated by WinMDIDL version 8.00.0013
//

import "inspectable.idl";
import "AsyncInfo.idl";
import "EventToken.idl";
import "Windows.Foundation.idl";
import "Windows.Devices.Pwm.Provider.idl";
// Additional imports to ensure that all required headers are included
cpp_quote("#if defined(__cplusplus)")
cpp_quote("}")
cpp_quote("#endif // defined(__cplusplus)")
cpp_quote("#include <Windows.Foundation.h>")
cpp_quote("#if !defined(__windows2Edevices2Epwm2Eprovider_h__)")
cpp_quote("#include <Windows.Devices.Pwm.Provider.h>")
cpp_quote("#endif // !defined(__windows2Edevices2Epwm2Eprovider_h__)")
cpp_quote("#if defined(__cplusplus)")
cpp_quote("extern \"C\" {")
cpp_quote("#endif // defined(__cplusplus)")

// Forward Declare
namespace Windows
{
    namespace Devices
    {
        namespace Pwm
        {
            namespace Provider
            {
                interface IPwmProvider;
            }
        }
    }
}
namespace Windows
{
    namespace Foundation
    {
        interface IClosable;
    }
}
namespace Windows
{
    namespace Devices
    {
        namespace Pwm
        {
            typedef enum PwmPulsePolarity PwmPulsePolarity;

            interface IPwmController;

            interface IPwmControllerStatics;

            interface IPwmPin;

            runtimeclass PwmPin;

            runtimeclass PwmController;
        }
    }
}

// Generic instantiations
namespace Windows
{
    namespace Devices
    {
        namespace Pwm
        {
            declare
            {
                interface Windows.Foundation.Collections.IIterable<Windows.Devices.Pwm.PwmController*>;

                interface Windows.Foundation.Collections.IIterator<Windows.Devices.Pwm.PwmController*>;

                interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Pwm.PwmController*>;

                interface Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Devices.Pwm.PwmController*>*>;
            }
        }
    }
}

// Type definition
namespace Windows
{
    namespace Devices
    {
        namespace Pwm
        {
            [version(0x0A000000)]
            enum PwmPulsePolarity
            {
                ActiveHigh = 0,
                ActiveLow  = 1
            };

            [exclusiveto(Windows.Devices.Pwm.PwmController)]
            [uuid(C45F5C85-D2E8-42CF-9BD6-CF5ED029E6A7)]
            [version(0x0A000000)]
            interface IPwmController : IInspectable
            {
                [propget] HRESULT PinCount([out] [retval] INT32* value);
                [propget] HRESULT ActualFrequency([out] [retval] DOUBLE* value);
                HRESULT SetDesiredFrequency([in] DOUBLE desiredFrequency, [out] [retval] DOUBLE* value);
                [propget] HRESULT MinFrequency([out] [retval] DOUBLE* value);
                [propget] HRESULT MaxFrequency([out] [retval] DOUBLE* value);
                HRESULT OpenPin([in] INT32 pinNumber, [out] [retval] Windows.Devices.Pwm.PwmPin** pin);
            }

            [exclusiveto(Windows.Devices.Pwm.PwmController)]
            [uuid(4263BDA1-8946-4404-BD48-81DD124AF4D9)]
            [version(0x0A000000)]
            interface IPwmControllerStatics : IInspectable
            {
                HRESULT GetControllersAsync([in] Windows.Devices.Pwm.Provider.IPwmProvider* provider, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Devices.Pwm.PwmController*>*>** operation);
            }

            [exclusiveto(Windows.Devices.Pwm.PwmPin)]
            [uuid(22972DC8-C6CF-4821-B7F9-C6454FB6AF79)]
            [version(0x0A000000)]
            interface IPwmPin : IInspectable
                requires
                    Windows.Foundation.IClosable
            {
                [propget] HRESULT Controller([out] [retval] Windows.Devices.Pwm.PwmController** value);
                HRESULT GetActiveDutyCyclePercentage([out] [retval] DOUBLE* result);
                HRESULT SetActiveDutyCyclePercentage([in] DOUBLE dutyCyclePercentage);
                [propget] HRESULT Polarity([out] [retval] Windows.Devices.Pwm.PwmPulsePolarity* value);
                [propput] HRESULT Polarity([in] Windows.Devices.Pwm.PwmPulsePolarity value);
                HRESULT Start();
                HRESULT Stop();
                [propget] HRESULT IsStarted([out] [retval] boolean* value);
            }

            [marshaling_behavior(agile)]
            [version(0x0A000000)]
            runtimeclass PwmPin
            {
                [default] interface Windows.Devices.Pwm.IPwmPin;
                interface Windows.Foundation.IClosable;
            }

            [marshaling_behavior(agile)]
            [static(Windows.Devices.Pwm.IPwmControllerStatics, 0x0A000000)]
            [version(0x0A000000)]
            runtimeclass PwmController
            {
                [default] interface Windows.Devices.Pwm.IPwmController;
            }
        }
    }
}
