// // 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.I2c.Provider.idl"; // Forward Declare namespace Windows { namespace Devices { apicontract DevicesLowLevelContract; } } namespace Windows { namespace Devices { namespace I2c { namespace Provider { interface II2cProvider; } } } } namespace Windows { namespace Foundation { interface IClosable; } } namespace Windows { namespace Devices { namespace I2c { typedef enum I2cBusSpeed I2cBusSpeed; typedef enum I2cSharingMode I2cSharingMode; typedef enum I2cTransferStatus I2cTransferStatus; typedef struct I2cTransferResult I2cTransferResult; interface II2cConnectionSettings; interface II2cConnectionSettingsFactory; interface II2cController; interface II2cControllerStatics; interface II2cDevice; interface II2cDeviceStatics; runtimeclass I2cConnectionSettings; runtimeclass I2cController; runtimeclass I2cDevice; } } } // Generic instantiations namespace Windows { namespace Devices { namespace I2c { 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 I2c { [contract(Windows.Devices.DevicesLowLevelContract, 1.0)] enum I2cBusSpeed { StandardMode = 0, FastMode = 1 }; [contract(Windows.Devices.DevicesLowLevelContract, 1.0)] enum I2cSharingMode { Exclusive = 0, Shared = 1 }; [contract(Windows.Devices.DevicesLowLevelContract, 1.0)] enum I2cTransferStatus { FullTransfer = 0, PartialTransfer = 1, SlaveAddressNotAcknowledged = 2, ClockStretchTimeout = 3, UnknownError = 4 }; [contract(Windows.Devices.DevicesLowLevelContract, 1.0)] struct I2cTransferResult { Windows.Devices.I2c.I2cTransferStatus Status; UINT32 BytesTransferred; }; [contract(Windows.Devices.DevicesLowLevelContract, 1.0)] [exclusiveto(Windows.Devices.I2c.I2cConnectionSettings)] [uuid(F2DB1307-AB6F-4639-A767-54536DC3460F)] interface II2cConnectionSettings : IInspectable { [propget] HRESULT SlaveAddress([out] [retval] INT32* value); [propput] HRESULT SlaveAddress([in] INT32 value); [propget] HRESULT BusSpeed([out] [retval] Windows.Devices.I2c.I2cBusSpeed* value); [propput] HRESULT BusSpeed([in] Windows.Devices.I2c.I2cBusSpeed value); [propget] HRESULT SharingMode([out] [retval] Windows.Devices.I2c.I2cSharingMode* value); [propput] HRESULT SharingMode([in] Windows.Devices.I2c.I2cSharingMode value); } [contract(Windows.Devices.DevicesLowLevelContract, 1.0)] [exclusiveto(Windows.Devices.I2c.I2cConnectionSettings)] [uuid(81B586B3-9693-41B1-A243-DED4F6E66926)] interface II2cConnectionSettingsFactory : IInspectable { HRESULT Create([in] INT32 slaveAddress, [out] [retval] Windows.Devices.I2c.I2cConnectionSettings** value); } [contract(Windows.Devices.DevicesLowLevelContract, 2.0)] [exclusiveto(Windows.Devices.I2c.I2cController)] [uuid(C48AB1B2-87A0-4166-8E3E-B4B8F97CD729)] interface II2cController : IInspectable { HRESULT GetDevice([in] Windows.Devices.I2c.I2cConnectionSettings* settings, [out] [retval] Windows.Devices.I2c.I2cDevice** device); } [contract(Windows.Devices.DevicesLowLevelContract, 2.0)] [exclusiveto(Windows.Devices.I2c.I2cController)] [uuid(40FC0365-5F05-4E7E-84BD-100DB8E0AEC5)] interface II2cControllerStatics : IInspectable { HRESULT GetControllersAsync([in] Windows.Devices.I2c.Provider.II2cProvider* provider, [out] [retval] Windows.Foundation.IAsyncOperation*>** operation); HRESULT GetDefaultAsync([out] [retval] Windows.Foundation.IAsyncOperation** operation); } [contract(Windows.Devices.DevicesLowLevelContract, 1.0)] [exclusiveto(Windows.Devices.I2c.I2cDevice)] [uuid(8636C136-B9C5-4F70-9449-CC46DC6F57EB)] interface II2cDevice : IInspectable requires Windows.Foundation.IClosable { [propget] HRESULT DeviceId([out] [retval] HSTRING* value); [propget] HRESULT ConnectionSettings([out] [retval] Windows.Devices.I2c.I2cConnectionSettings** value); HRESULT Write([in] UINT32 __bufferSize, [in] [size_is(__bufferSize)] BYTE* buffer); HRESULT WritePartial([in] UINT32 __bufferSize, [in] [size_is(__bufferSize)] BYTE* buffer, [out] [retval] Windows.Devices.I2c.I2cTransferResult* result); HRESULT Read([range(0x00000000, 0x7FFFFFFF)] [in] UINT32 __bufferSize, [out] [size_is(__bufferSize)] BYTE* buffer); HRESULT ReadPartial([range(0x00000000, 0x7FFFFFFF)] [in] UINT32 __bufferSize, [out] [size_is(__bufferSize)] BYTE* buffer, [out] [retval] Windows.Devices.I2c.I2cTransferResult* result); HRESULT WriteRead([in] UINT32 __writeBufferSize, [in] [size_is(__writeBufferSize)] BYTE* writeBuffer, [range(0x00000000, 0x7FFFFFFF)] [in] UINT32 __readBufferSize, [out] [size_is(__readBufferSize)] BYTE* readBuffer); HRESULT WriteReadPartial([in] UINT32 __writeBufferSize, [in] [size_is(__writeBufferSize)] BYTE* writeBuffer, [range(0x00000000, 0x7FFFFFFF)] [in] UINT32 __readBufferSize, [out] [size_is(__readBufferSize)] BYTE* readBuffer, [out] [retval] Windows.Devices.I2c.I2cTransferResult* result); } [contract(Windows.Devices.DevicesLowLevelContract, 1.0)] [uuid(91A33BE3-7334-4512-96BC-FBAE9459F5F6)] interface II2cDeviceStatics : IInspectable { [overload("GetDeviceSelector")] HRESULT GetDeviceSelector([out] [retval] HSTRING* value); [overload("GetDeviceSelector")] HRESULT GetDeviceSelectorFromFriendlyName([in] HSTRING friendlyName, [out] [retval] HSTRING* value); HRESULT FromIdAsync([in] HSTRING deviceId, [in] Windows.Devices.I2c.I2cConnectionSettings* settings, [out] [retval] Windows.Foundation.IAsyncOperation** operation); } [activatable(Windows.Devices.I2c.II2cConnectionSettingsFactory, Windows.Devices.DevicesLowLevelContract, 1.0)] [contract(Windows.Devices.DevicesLowLevelContract, 1.0)] [marshaling_behavior(agile)] runtimeclass I2cConnectionSettings { [default] interface Windows.Devices.I2c.II2cConnectionSettings; } [contract(Windows.Devices.DevicesLowLevelContract, 2.0)] [marshaling_behavior(agile)] [static(Windows.Devices.I2c.II2cControllerStatics, Windows.Devices.DevicesLowLevelContract, 2.0)] runtimeclass I2cController { [default] interface Windows.Devices.I2c.II2cController; } [contract(Windows.Devices.DevicesLowLevelContract, 1.0)] [marshaling_behavior(agile)] [static(Windows.Devices.I2c.II2cDeviceStatics, Windows.Devices.DevicesLowLevelContract, 1.0)] runtimeclass I2cDevice { [default] interface Windows.Devices.I2c.II2cDevice; interface Windows.Foundation.IClosable; } } } }