Skip to content

Commit 726899b

Browse files
committed
Add SEEED_ARCH_MIX (mimxrt) v1.26.1
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
1 parent 8177762 commit 726899b

File tree

195 files changed

+19162
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

195 files changed

+19162
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Jos Verlinde
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# micropython-mimxrt-seeed_arch_mix-stubs
2+
3+
4+
This is a stub-only package for MicroPython.
5+
It is intended to be installed in a projects virtual environment to allow static type checkers and intellisense features to be used while writing Micropython code.
6+
7+
The version of this package is alligned the the version of the MicroPython firmware.
8+
- Major, Minor and Patch levels are alligned to the same version as the firmware.
9+
- The post release level is used to publish new releases of the stubs.
10+
11+
For `Micropython 1.17` the stubs are published as `1.17.post1` ... `1.17.post2`
12+
for `Micropython 1.18` the stubs are published as `1.18.post1` ... `1.18.post2`
13+
14+
To install the latest stubs:
15+
`pip install -I micropython-<port>-stubs` where port is the port of the MicroPython firmware.
16+
17+
To install the stubs for an older version, such as MicroPython 1.17:
18+
`pip install micropython-stm32-stubs==1.17.*` which will install the last post release of the stubs for MicroPython 1.17.
19+
20+
21+
As the creation of the stubs, and merging of the different types is still going though improvements, the stub packages are marked as Beta.
22+
To upgrade stubs to the latest stubs for a specific version use `pip install micropython-stm32-stubs==1.17.* --upgrade`
23+
24+
If you have suggestions or find any issues with the stubs, please report them in the [MicroPython-stubs Discussions](https://github.com/Josverl/micropython-stubs/discussions)
25+
26+
For an overview of Micropython Stubs please see: https://micropython-stubs.readthedocs.io/en/main/
27+
* List of all stubs : https://micropython-stubs.readthedocs.io/en/main/firmware_grp.html
28+
29+
30+
31+
Included stubs:
32+
* Merged stubs from `stubs/micropython-v1_26_1-mimxrt-SEEED_ARCH_MIX-merged`
33+
* Core stubs from `stubs/micropython-core`
34+
35+
36+
origin | Family | Port | Board | Version
37+
-------|--------|------|-------|--------
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
"""Allows for type checking of Micropython specific builtins by pyright and pylance.
2+
"""
3+
4+
from typing import Tuple, TypeVar
5+
6+
Const_T = TypeVar("Const_T", int, float, str, bytes, Tuple) # constant
7+
8+
def const(expr: Const_T) -> Const_T:
9+
"""
10+
Used to declare that the expression is a constant so that the compiler can
11+
optimise it. The use of this function should be as follows::
12+
13+
from micropython import const
14+
15+
CONST_X = const(123)
16+
CONST_Y = const(2 * CONST_X + 1)
17+
18+
Constants declared this way are still accessible as global variables from
19+
outside the module they are declared in. On the other hand, if a constant
20+
begins with an underscore then it is hidden, it is not available as a global
21+
variable, and does not take up any memory during execution.
22+
23+
This `const` function is recognised directly by the MicroPython parser and is
24+
provided as part of the :mod:`micropython` module mainly so that scripts can be
25+
written which run under both CPython and MicroPython, by following the above
26+
pattern.
27+
"""
28+
...
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""
2+
Module: '_onewire' on micropython-v1.26.1-mimxrt-SEEED_ARCH_MIX
3+
"""
4+
5+
# MCU: {'variant': '', 'build': '', 'arch': 'armv7emdp', 'port': 'mimxrt', 'board': 'SEEED_ARCH_MIX', 'board_id': 'SEEED_ARCH_MIX', 'mpy': 'v6.3', 'ver': '1.26.1', 'family': 'micropython', 'cpu': 'MIMXRT1052DVL5B', 'version': '1.26.1'}
6+
# Stubber: v1.26.3
7+
from __future__ import annotations
8+
from _typeshed import Incomplete
9+
10+
def reset(*args, **kwargs) -> Incomplete: ...
11+
def writebyte(*args, **kwargs) -> Incomplete: ...
12+
def writebit(*args, **kwargs) -> Incomplete: ...
13+
def crc8(*args, **kwargs) -> Incomplete: ...
14+
def readbyte(*args, **kwargs) -> Incomplete: ...
15+
def readbit(*args, **kwargs) -> Incomplete: ...
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
"""
2+
Binary/ASCII conversions.
3+
4+
MicroPython module: https://docs.micropython.org/en/v1.26.0/library/binascii.html
5+
6+
CPython module: :mod:`python:binascii` https://docs.python.org/3/library/binascii.html .
7+
8+
This module implements conversions between binary data and various
9+
encodings of it in ASCII form (in both directions).
10+
11+
---
12+
Module: 'binascii' on micropython-v1.26.1-mimxrt-SEEED_ARCH_MIX
13+
"""
14+
15+
# MCU: {'variant': '', 'build': '', 'arch': 'armv7emdp', 'port': 'mimxrt', 'board': 'SEEED_ARCH_MIX', 'board_id': 'SEEED_ARCH_MIX', 'mpy': 'v6.3', 'ver': '1.26.1', 'family': 'micropython', 'cpu': 'MIMXRT1052DVL5B', 'version': '1.26.1'}
16+
# Stubber: v1.26.3
17+
from __future__ import annotations
18+
from _typeshed import Incomplete
19+
from typing import Any, Optional
20+
from typing_extensions import Awaitable, TypeAlias, TypeVar
21+
22+
def crc32(data, value: Optional[Any] = None) -> Incomplete:
23+
"""
24+
Compute CRC-32, the 32-bit checksum of *data*, starting with an initial CRC
25+
of *value*. The default initial CRC is zero. The algorithm is consistent
26+
with the ZIP file checksum.
27+
"""
28+
...
29+
30+
def hexlify(data: bytes, sep: str | bytes = ..., /) -> bytes:
31+
"""
32+
Convert the bytes in the *data* object to a hexadecimal representation.
33+
Returns a bytes object.
34+
35+
If the additional argument *sep* is supplied it is used as a separator
36+
between hexadecimal values.
37+
"""
38+
...
39+
40+
def unhexlify(data: str | bytes, /) -> bytes:
41+
"""
42+
Convert hexadecimal data to binary representation. Returns bytes string.
43+
(i.e. inverse of hexlify)
44+
"""
45+
...
46+
47+
def b2a_base64(data: bytes, /) -> bytes:
48+
"""
49+
Encode binary data in base64 format, as in `RFC 3548
50+
<https://tools.ietf.org/html/rfc3548.html>`_. Returns the encoded data
51+
followed by a newline character if newline is true, as a bytes object.
52+
"""
53+
...
54+
55+
def a2b_base64(data: str | bytes, /) -> bytes:
56+
"""
57+
Decode base64-encoded data, ignoring invalid characters in the input.
58+
Conforms to `RFC 2045 s.6.8 <https://tools.ietf.org/html/rfc2045#section-6.8>`_.
59+
Returns a bytes object.
60+
"""
61+
...
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
"""
2+
Mathematical functions for complex numbers.
3+
4+
MicroPython module: https://docs.micropython.org/en/v1.26.0/library/cmath.html
5+
6+
CPython module: :mod:`python:cmath` https://docs.python.org/3/library/cmath.html .
7+
8+
The ``cmath`` module provides some basic mathematical functions for
9+
working with complex numbers.
10+
11+
Availability: not available on WiPy and ESP8266. Floating point support
12+
required for this module.
13+
14+
---
15+
Module: 'cmath' on micropython-v1.26.1-mimxrt-SEEED_ARCH_MIX
16+
"""
17+
18+
# MCU: {'variant': '', 'build': '', 'arch': 'armv7emdp', 'port': 'mimxrt', 'board': 'SEEED_ARCH_MIX', 'board_id': 'SEEED_ARCH_MIX', 'mpy': 'v6.3', 'ver': '1.26.1', 'family': 'micropython', 'cpu': 'MIMXRT1052DVL5B', 'version': '1.26.1'}
19+
# Stubber: v1.26.3
20+
from __future__ import annotations
21+
from _typeshed import Incomplete
22+
from typing import SupportsComplex, SupportsFloat, SupportsIndex, Tuple
23+
from typing_extensions import Awaitable, TypeAlias, TypeVar
24+
25+
_C: TypeAlias = SupportsFloat | SupportsComplex | SupportsIndex | complex
26+
27+
e: float = 2.718281828459045
28+
"""base of the natural logarithm"""
29+
pi: float = 3.141592653589793
30+
"""the ratio of a circle's circumference to its diameter"""
31+
32+
def polar(z: _C, /) -> Tuple:
33+
"""
34+
Returns, as a tuple, the polar form of ``z``.
35+
"""
36+
...
37+
38+
def sqrt(z: _C, /) -> complex:
39+
"""
40+
Return the square-root of ``z``.
41+
"""
42+
...
43+
44+
def rect(r: float, phi: float, /) -> float:
45+
"""
46+
Returns the complex number with modulus ``r`` and phase ``phi``.
47+
"""
48+
...
49+
50+
def sin(z: _C, /) -> float:
51+
"""
52+
Return the sine of ``z``.
53+
"""
54+
...
55+
56+
def exp(z: _C, /) -> float:
57+
"""
58+
Return the exponential of ``z``.
59+
"""
60+
...
61+
62+
def cos(z: _C, /) -> float:
63+
"""
64+
Return the cosine of ``z``.
65+
"""
66+
...
67+
68+
def phase(z: _C, /) -> float:
69+
"""
70+
Returns the phase of the number ``z``, in the range (-pi, +pi].
71+
"""
72+
...
73+
74+
def log(z: _C, /) -> float:
75+
"""
76+
Return the natural logarithm of ``z``. The branch cut is along the negative real axis.
77+
"""
78+
...
79+
80+
def log10(z: _C, /) -> float:
81+
"""
82+
Return the base-10 logarithm of ``z``. The branch cut is along the negative real axis.
83+
"""
84+
...

0 commit comments

Comments
 (0)