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

import datetime
import sys
import types
import typing
import uuid as _uuid
from builtins import property as _property

import winrt._winrt
import winrt.system
import winrt.windows.foundation
import winrt.windows.foundation.collections

from winrt.windows.devices.spi.provider import ProviderSpiMode, ProviderSpiSharingMode

Self = typing.TypeVar('Self')

class ProviderSpiConnectionSettings(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> ProviderSpiConnectionSettings: ...
    def __new__(cls: typing.Type[ProviderSpiConnectionSettings], chip_select_line: winrt.system.Int32) -> ProviderSpiConnectionSettings:...
    @_property
    def sharing_mode(self) -> ProviderSpiSharingMode: ...
    @sharing_mode.setter
    def sharing_mode(self, value: ProviderSpiSharingMode) -> None: ...
    @_property
    def mode(self) -> ProviderSpiMode: ...
    @mode.setter
    def mode(self, value: ProviderSpiMode) -> None: ...
    @_property
    def data_bit_length(self) -> winrt.system.Int32: ...
    @data_bit_length.setter
    def data_bit_length(self, value: winrt.system.Int32) -> None: ...
    @_property
    def clock_frequency(self) -> winrt.system.Int32: ...
    @clock_frequency.setter
    def clock_frequency(self, value: winrt.system.Int32) -> None: ...
    @_property
    def chip_select_line(self) -> winrt.system.Int32: ...
    @chip_select_line.setter
    def chip_select_line(self, value: winrt.system.Int32) -> None: ...

class ISpiControllerProvider(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> ISpiControllerProvider: ...
    def get_device_provider(self, settings: typing.Optional[ProviderSpiConnectionSettings], /) -> typing.Optional[ISpiDeviceProvider]: ...

class ISpiDeviceProvider(winrt.system.Object):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> ISpiDeviceProvider: ...
    def close(self) -> None: ...
    def read(self, buffer: winrt.system.Array[winrt.system.UInt8], /) -> None: ...
    def transfer_full_duplex(self, write_buffer: winrt.system.Array[winrt.system.UInt8], read_buffer: winrt.system.Array[winrt.system.UInt8], /) -> None: ...
    def transfer_sequential(self, write_buffer: winrt.system.Array[winrt.system.UInt8], read_buffer: winrt.system.Array[winrt.system.UInt8], /) -> None: ...
    def write(self, buffer: winrt.system.Array[winrt.system.UInt8], /) -> None: ...
    @_property
    def connection_settings(self) -> typing.Optional[ProviderSpiConnectionSettings]: ...
    @_property
    def device_id(self) -> str: ...

class ISpiProvider(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> ISpiProvider: ...
    def get_controllers_async(self) -> winrt.windows.foundation.IAsyncOperation[winrt.windows.foundation.collections.IVectorView[ISpiControllerProvider]]: ...

