MicroPython/uctypes.py

Sun, 25 Aug 2019 19:25:37 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 25 Aug 2019 19:25:37 +0200
changeset 2
2c3f30af031d
permissions
-rw-r--r--

Started to add the stubs for MicroPython.

2
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3 # Copyright (c) 2019 Detlev Offenbach <detlev@die-offenbachs.de>
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module containing stubs for API generation of the def 'uctypes' module.
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 LITTLE_ENDIAN = 0
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11 BIG_ENDIAN = 0
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12 NATIVE = 0
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13 UINT8 = 0
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14 INT8 = 0
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15 UINT16 = 0
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16 INT16 = 0
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 UINT32 = 0
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 INT32 = 0
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 UINT64 = 0
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 INT64 = 0
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 FLOAT32 = 0
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 FLOAT64 = 0
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 VOID = 0
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 PTR = 0
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25 ARRAY = 0
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 def sizeof(struct, layout_type=NATIVE):
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 pass
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 def addressof(obj):
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 pass
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 def bytes_at(addr, size):
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 pass
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 def bytearray_at(addr, size):
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 pass
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 class struct():
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 def __init__(self, addr, descriptor, layout_type=NATIVE):
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 pass
2c3f30af031d Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42

eric ide

mercurial