// // Copyright (c) Microsoft Corporation. All rights reserved. // // // File generated by WinMDIDL version 8.00.0021 // import "inspectable.idl"; import "AsyncInfo.idl"; import "EventToken.idl"; import "windowscontracts.idl"; import "Windows.Foundation.idl"; import "Windows.Devices.idl"; import "Windows.Devices.Spi.Provider.idl"; // Forward Declare namespace Windows { namespace Devices { apicontract DevicesLowLevelContract; } } namespace Windows { namespace Devices { namespace Spi { namespace Provider { interface ISpiProvider; } } } } namespace Windows { namespace Foundation { interface IClosable; } } namespace Windows { namespace Devices { namespace Spi { typedef enum SpiMode SpiMode; typedef enum SpiSharingMode SpiSharingMode; interface ISpiBusInfo; interface ISpiConnectionSettings; interface ISpiConnectionSettingsFactory; interface ISpiController; interface ISpiControllerStatics; interface ISpiDevice; interface ISpiDeviceStatics; runtimeclass SpiBusInfo; runtimeclass SpiConnectionSettings; runtimeclass SpiController; runtimeclass SpiDevice; } } } // Generic instantiations namespace Windows { namespace Devices { namespace Spi { declare { interface Windows.Foundation.Collections.IIterable; interface Windows.Foundation.Collections.IIterator; interface Windows.Foundation.Collections.IVectorView; interface Windows.Foundation.IAsyncOperation; interface Windows.Foundation.IAsyncOperation; interface Windows.Foundation.IAsyncOperation*>; } } } } // Type definition namespace Windows { namespace Devices { namespace Spi { [contract(Windows.Devices.DevicesLowLevelContract, 1.0)] enum SpiMode { Mode0 = 0, Mode1 = 1, Mode2 = 2, Mode3 = 3 }; [contract(Windows.Devices.DevicesLowLevelContract, 1.0)] enum SpiSharingMode { Exclusive = 0, Shared = 1 }; [contract(Windows.Devices.DevicesLowLevelContract, 1.0)] [exclusiveto(Windows.Devices.Spi.SpiBusInfo)] [uuid(9929444A-54F2-48C6-B952-9C32FC02C669)] interface ISpiBusInfo : IInspectable { [propget] HRESULT ChipSelectLineCount([out] [retval] INT32* value); [propget] HRESULT MinClockFrequency([out] [retval] INT32* value); [propget] HRESULT MaxClockFrequency([out] [retval] INT32* value); [propget] HRESULT SupportedDataBitLengths([out] [retval] Windows.Foundation.Collections.IVectorView** value); } [contract(Windows.Devices.DevicesLowLevelContract, 1.0)] [exclusiveto(Windows.Devices.Spi.SpiConnectionSettings)] [uuid(5283A37F-F935-4B9F-A7A7-3A7890AFA5CE)] interface ISpiConnectionSettings : IInspectable { [propget] HRESULT ChipSelectLine([out] [retval] INT32* value); [propput] HRESULT ChipSelectLine([in] INT32 value); [propget] HRESULT Mode([out] [retval] Windows.Devices.Spi.SpiMode* value); [propput] HRESULT Mode([in] Windows.Devices.Spi.SpiMode value); [propget] HRESULT DataBitLength([out] [retval] INT32* value); [propput] HRESULT DataBitLength([in] INT32 value); [propget] HRESULT ClockFrequency([out] [retval] INT32* value); [propput] HRESULT ClockFrequency([in] INT32 value); [propget] HRESULT SharingMode([out] [retval] Windows.Devices.Spi.SpiSharingMode* value); [propput] HRESULT SharingMode([in] Windows.Devices.Spi.SpiSharingMode value); } [contract(Windows.Devices.DevicesLowLevelContract, 1.0)] [exclusiveto(Windows.Devices.Spi.SpiConnectionSettings)] [uuid(FF99081E-10C4-44B7-9FEA-A748B5A46F31)] interface ISpiConnectionSettingsFactory : IInspectable { HRESULT Create([in] INT32 chipSelectLine, [out] [retval] Windows.Devices.Spi.SpiConnectionSettings** value); } [contract(Windows.Devices.DevicesLowLevelContract, 2.0)] [exclusiveto(Windows.Devices.Spi.SpiController)] [uuid(A8D3C829-9895-4159-A934-8741F1EE6D27)] interface ISpiController : IInspectable { HRESULT GetDevice([in] Windows.Devices.Spi.SpiConnectionSettings* settings, [out] [retval] Windows.Devices.Spi.SpiDevice** device); } [contract(Windows.Devices.DevicesLowLevelContract, 2.0)] [exclusiveto(Windows.Devices.Spi.SpiController)] [uuid(0D5229E2-138B-4E48-B964-4F2F79B9C5A2)] interface ISpiControllerStatics : IInspectable { HRESULT GetDefaultAsync([out] [retval] Windows.Foundation.IAsyncOperation** operation); HRESULT GetControllersAsync([in] Windows.Devices.Spi.Provider.ISpiProvider* provider, [out] [retval] Windows.Foundation.IAsyncOperation*>** operation); } [contract(Windows.Devices.DevicesLowLevelContract, 1.0)] [exclusiveto(Windows.Devices.Spi.SpiDevice)] [uuid(05D5356D-11B6-4D39-84D5-95DFB4C9F2CE)] interface ISpiDevice : IInspectable requires Windows.Foundation.IClosable { [propget] HRESULT DeviceId([out] [retval] HSTRING* value); [propget] HRESULT ConnectionSettings([out] [retval] Windows.Devices.Spi.SpiConnectionSettings** value); HRESULT Write([in] UINT32 __bufferSize, [in] [size_is(__bufferSize)] BYTE* buffer); HRESULT Read([range(0x00000000, 0x7FFFFFFF)] [in] UINT32 __bufferSize, [out] [size_is(__bufferSize)] BYTE* buffer); HRESULT TransferSequential([in] UINT32 __writeBufferSize, [in] [size_is(__writeBufferSize)] BYTE* writeBuffer, [range(0x00000000, 0x7FFFFFFF)] [in] UINT32 __readBufferSize, [out] [size_is(__readBufferSize)] BYTE* readBuffer); HRESULT TransferFullDuplex([in] UINT32 __writeBufferSize, [in] [size_is(__writeBufferSize)] BYTE* writeBuffer, [range(0x00000000, 0x7FFFFFFF)] [in] UINT32 __readBufferSize, [out] [size_is(__readBufferSize)] BYTE* readBuffer); } [contract(Windows.Devices.DevicesLowLevelContract, 1.0)] [uuid(A278E559-5720-4D3F-BD93-56F5FF5A5879)] interface ISpiDeviceStatics : IInspectable { [overload("GetDeviceSelector")] HRESULT GetDeviceSelector([out] [retval] HSTRING* value); [overload("GetDeviceSelector")] HRESULT GetDeviceSelectorFromFriendlyName([in] HSTRING friendlyName, [out] [retval] HSTRING* value); HRESULT GetBusInfo([in] HSTRING busId, [out] [retval] Windows.Devices.Spi.SpiBusInfo** busInfo); HRESULT FromIdAsync([in] HSTRING busId, [in] Windows.Devices.Spi.SpiConnectionSettings* settings, [out] [retval] Windows.Foundation.IAsyncOperation** operation); } [contract(Windows.Devices.DevicesLowLevelContract, 1.0)] [marshaling_behavior(agile)] runtimeclass SpiBusInfo { [default] interface Windows.Devices.Spi.ISpiBusInfo; } [activatable(Windows.Devices.Spi.ISpiConnectionSettingsFactory, Windows.Devices.DevicesLowLevelContract, 1.0)] [contract(Windows.Devices.DevicesLowLevelContract, 1.0)] [marshaling_behavior(agile)] runtimeclass SpiConnectionSettings { [default] interface Windows.Devices.Spi.ISpiConnectionSettings; } [contract(Windows.Devices.DevicesLowLevelContract, 2.0)] [marshaling_behavior(agile)] [static(Windows.Devices.Spi.ISpiControllerStatics, Windows.Devices.DevicesLowLevelContract, 2.0)] runtimeclass SpiController { [default] interface Windows.Devices.Spi.ISpiController; } [contract(Windows.Devices.DevicesLowLevelContract, 1.0)] [marshaling_behavior(agile)] [static(Windows.Devices.Spi.ISpiDeviceStatics, Windows.Devices.DevicesLowLevelContract, 1.0)] runtimeclass SpiDevice { [default] interface Windows.Devices.Spi.ISpiDevice; interface Windows.Foundation.IClosable; } } } }