Skip to content

Commit a18b991

Browse files
committed
Added pyi to SPI.c
1 parent 1e94d18 commit a18b991

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

  • shared-bindings/busio

shared-bindings/busio/SPI.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,19 @@
4040
#include "py/runtime.h"
4141
#include "supervisor/shared/translate.h"
4242

43+
class SPI:
44+
def __init__(self, clock: microcontroller.Pin, MOSI: microcontroller.Pin = None, MISO: microcontroller.Pin = None): ...
45+
def deinit(self, ) -> Any: ...
46+
def __enter__(self, ) -> Any: ...
47+
def __exit__(self, ) -> Any: ...
48+
def configure(self, *, baudrate: int = 100000, polarity: int = 0, phase: int = 0, bits: int = 8) -> Any: ...
49+
def try_lock(self, ) -> Any: ...
50+
def unlock(self, ) -> Any: ...
51+
def write(self, buffer: bytearray, *, start: Any = 0, end: int = None) -> Any: ...
52+
def readinto(self, buffer: bytearray, *, start: Any = 0, end: int = None, write_value: int = 0) -> Any: ...
53+
def write_readinto(self, buffer_out: bytearray, buffer_in: bytearray, *, out_start: Any = 0, out_end: int = None, in_start: Any = 0, in_end: int = None) -> Any: ...
54+
frequency: Any = ...
55+
4356
//| .. currentmodule:: busio
4457
//|
4558
//| :class:`SPI` -- a 3-4 wire serial protocol

0 commit comments

Comments
 (0)