CircuitPython/busio.py

changeset 6
81a2208f13e4
child 7
e336d6afc5a6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CircuitPython/busio.py	Wed Aug 28 19:53:19 2019 +0200
@@ -0,0 +1,108 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2019 Detlev Offenbach <detlev@die-offenbachs.de>
+#
+
+"""
+Module containing stubs for API generation of the 'busio' module.
+"""
+
+class I2C():
+    def __init__(self, scl, sda, *, frequency=400000):
+        pass
+    
+    def deinit(self):
+        pass
+    
+    def scan(self):
+        pass
+    
+    def try_lock(self):
+        pass
+    
+    def unlock(self):
+        pass
+    
+    def readfrom_into(self, address, buffer, *, start=0, end=None):
+        pass
+    
+    def writeto(self, address, buffer, *, start=0, end=None, stop=True):
+        pass
+
+class OneWire():
+    def __init__(self, pin):
+        pass
+    
+    def deinit(self):
+        pass
+    
+    def reset(self):
+        pass
+    
+    def read_bit(self):
+        pass
+    
+    def write_bit(self, value):
+        pass
+
+class SPI():
+    def __init__(self, clock, MOSI=None, MISO=None):
+        pass
+    
+    def deinit(self):
+        pass
+    
+    def configure(self, *, baudrate=100000, polarity=0, phase=0, bits=8):
+        pass
+    
+    
+    def try_lock(self):
+        pass
+    
+    def unlock(self):
+        pass
+    
+    def write(self, buffer, *, start=0, end=None):
+        pass
+    
+    def readinto(self, buffer, *, start=0, end=None, write_value=0):
+        pass
+    
+    def write_readinto(self, buffer_out, buffer_in, *, out_start=0,
+                       out_end=None, in_start=0, in_end=None):
+        pass
+    
+    @property
+    def frequency(self):
+        pass
+
+class UART():
+    def __init__(self, x, rx, *, baudrate=9600, bits=8, parity=None, stop=1,
+                 timeout=1, receiver_buffer_size=64):
+        pass
+    
+    def deinit(self):
+        pass
+    
+    def read(self, nbytes=None):
+        pass
+    
+    def readinto(self, buf):
+        pass
+    
+    def readline(self):
+        pass
+    
+    def write(self, buf):
+        pass
+    
+    @property
+    def baudrate(self):
+        pass
+    
+    @property
+    def in_waiting(self):
+        pass
+    
+    def reset_input_buffer(self):
+        pass

eric ide

mercurial