// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_Devices_Pwm_Provider_H #define WINRT_Windows_Devices_Pwm_Provider_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.240405.15"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.240405.15" #include "winrt/Windows.Devices.Pwm.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Devices.Pwm.Provider.2.h" namespace winrt::impl { template auto consume_Windows_Devices_Pwm_Provider_IPwmControllerProvider::PinCount() const { int32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Pwm::Provider::IPwmControllerProvider)->get_PinCount(&value)); return value; } template auto consume_Windows_Devices_Pwm_Provider_IPwmControllerProvider::ActualFrequency() const { double value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Pwm::Provider::IPwmControllerProvider)->get_ActualFrequency(&value)); return value; } template auto consume_Windows_Devices_Pwm_Provider_IPwmControllerProvider::SetDesiredFrequency(double frequency) const { double result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Pwm::Provider::IPwmControllerProvider)->SetDesiredFrequency(frequency, &result)); return result; } template auto consume_Windows_Devices_Pwm_Provider_IPwmControllerProvider::MaxFrequency() const { double value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Pwm::Provider::IPwmControllerProvider)->get_MaxFrequency(&value)); return value; } template auto consume_Windows_Devices_Pwm_Provider_IPwmControllerProvider::MinFrequency() const { double value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Pwm::Provider::IPwmControllerProvider)->get_MinFrequency(&value)); return value; } template auto consume_Windows_Devices_Pwm_Provider_IPwmControllerProvider::AcquirePin(int32_t pin) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Pwm::Provider::IPwmControllerProvider)->AcquirePin(pin)); } template auto consume_Windows_Devices_Pwm_Provider_IPwmControllerProvider::ReleasePin(int32_t pin) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Pwm::Provider::IPwmControllerProvider)->ReleasePin(pin)); } template auto consume_Windows_Devices_Pwm_Provider_IPwmControllerProvider::EnablePin(int32_t pin) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Pwm::Provider::IPwmControllerProvider)->EnablePin(pin)); } template auto consume_Windows_Devices_Pwm_Provider_IPwmControllerProvider::DisablePin(int32_t pin) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Pwm::Provider::IPwmControllerProvider)->DisablePin(pin)); } template auto consume_Windows_Devices_Pwm_Provider_IPwmControllerProvider::SetPulseParameters(int32_t pin, double dutyCycle, bool invertPolarity) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Pwm::Provider::IPwmControllerProvider)->SetPulseParameters(pin, dutyCycle, invertPolarity)); } template auto consume_Windows_Devices_Pwm_Provider_IPwmProvider::GetControllers() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::Pwm::Provider::IPwmProvider)->GetControllers(&result)); return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template struct produce : produce_base { int32_t __stdcall get_PinCount(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PinCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ActualFrequency(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ActualFrequency()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetDesiredFrequency(double frequency, double* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().SetDesiredFrequency(frequency)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MaxFrequency(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaxFrequency()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MinFrequency(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MinFrequency()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall AcquirePin(int32_t pin) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AcquirePin(pin); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ReleasePin(int32_t pin) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ReleasePin(pin); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall EnablePin(int32_t pin) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().EnablePin(pin); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall DisablePin(int32_t pin) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DisablePin(pin); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetPulseParameters(int32_t pin, double dutyCycle, bool invertPolarity) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetPulseParameters(pin, dutyCycle, invertPolarity); return 0; } catch (...) { return to_hresult(); } }; template struct produce : produce_base { int32_t __stdcall GetControllers(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetControllers()); return 0; } catch (...) { return to_hresult(); } }; } WINRT_EXPORT namespace winrt::Windows::Devices::Pwm::Provider { } namespace std { #ifndef WINRT_LEAN_AND_MEAN template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; #endif #ifdef __cpp_lib_format #endif } #endif