summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordherrada <dylan.herrada@gmail.com>2020-04-22 15:22:34 -0400
committerdherrada <dylan.herrada@gmail.com>2020-04-22 15:22:34 -0400
commita18b991ca90670758afadfe0e78ec97cf56bf5e3 (patch)
tree35067673211252598063f9b18dce50d8f613b9a4
parent1e94d18db55e931a20558e3ca089c964b77ea97e (diff)
Added pyi to SPI.c
-rw-r--r--shared-bindings/busio/SPI.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/shared-bindings/busio/SPI.c b/shared-bindings/busio/SPI.c
index 043c1089d..e01e9e35e 100644
--- a/shared-bindings/busio/SPI.c
+++ b/shared-bindings/busio/SPI.c
@@ -40,6 +40,19 @@
#include "py/runtime.h"
#include "supervisor/shared/translate.h"
+class SPI:
+ def __init__(self, clock: microcontroller.Pin, MOSI: microcontroller.Pin = None, MISO: microcontroller.Pin = None): ...
+ def deinit(self, ) -> Any: ...
+ def __enter__(self, ) -> Any: ...
+ def __exit__(self, ) -> Any: ...
+ def configure(self, *, baudrate: int = 100000, polarity: int = 0, phase: int = 0, bits: int = 8) -> Any: ...
+ def try_lock(self, ) -> Any: ...
+ def unlock(self, ) -> Any: ...
+ def write(self, buffer: bytearray, *, start: Any = 0, end: int = None) -> Any: ...
+ def readinto(self, buffer: bytearray, *, start: Any = 0, end: int = None, write_value: int = 0) -> Any: ...
+ 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: ...
+ frequency: Any = ...
+
//| .. currentmodule:: busio
//|
//| :class:`SPI` -- a 3-4 wire serial protocol