Microbit/microbit/i2c.py

Sat, 24 Aug 2019 17:04:25 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 24 Aug 2019 17:04:25 +0200
changeset 0
b3daa2ebea2f
permissions
-rw-r--r--

MicroPython stubs project started

0
b3daa2ebea2f MicroPython stubs project started
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
b3daa2ebea2f MicroPython stubs project started
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
b3daa2ebea2f MicroPython stubs project started
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3 # Copyright (c) 2019 Detlev Offenbach <detlev@die-offenbachs.de>
b3daa2ebea2f MicroPython stubs project started
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
b3daa2ebea2f MicroPython stubs project started
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
b3daa2ebea2f MicroPython stubs project started
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
b3daa2ebea2f MicroPython stubs project started
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module containing stubs for API generation of the 'microbit.i2c' module.
b3daa2ebea2f MicroPython stubs project started
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
b3daa2ebea2f MicroPython stubs project started
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
b3daa2ebea2f MicroPython stubs project started
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 from microbit import pin19, pin20
b3daa2ebea2f MicroPython stubs project started
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11
b3daa2ebea2f MicroPython stubs project started
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12 def init(freq=100000, sda=pin20, scl=pin19):
b3daa2ebea2f MicroPython stubs project started
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13 pass
b3daa2ebea2f MicroPython stubs project started
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14
b3daa2ebea2f MicroPython stubs project started
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15 def scan():
b3daa2ebea2f MicroPython stubs project started
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16 pass
b3daa2ebea2f MicroPython stubs project started
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17
b3daa2ebea2f MicroPython stubs project started
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 def read(addr, n, repeat=False):
b3daa2ebea2f MicroPython stubs project started
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 pass
b3daa2ebea2f MicroPython stubs project started
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20
b3daa2ebea2f MicroPython stubs project started
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 def write(addr, buf, repeat=False):
b3daa2ebea2f MicroPython stubs project started
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 pass

eric ide

mercurial