Skip to content

Commit 2a1dde4

Browse files
committed
Add MicroPython v1.26.1 mimxrt stubs based on SEEED_ARCH_MIX
included frozen stubs in other mimxrt boards to improve type annotations. Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
1 parent 116402a commit 2a1dde4

Some content is hidden

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

79 files changed

+7527
-197
lines changed

publish/micropython-v1_26_1-mimxrt-mimxrt1010_evk-stubs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ For an overview of Micropython Stubs please see: https://micropython-stubs.read
3030

3131
Included stubs:
3232
* Merged stubs from `stubs/micropython-v1_26_1-mimxrt-MIMXRT1010_EVK-merged`
33+
* Frozen stubs from `stubs/micropython-v1_26_1-frozen/mimxrt/GENERIC`
3334
* Core stubs from `stubs/micropython-core`
3435

3536

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from _typeshed import Incomplete
2+
from machine import Pin as Pin
3+
4+
bdev: Incomplete
5+
fs: Incomplete
6+
sdcard: Incomplete
7+
fat: Incomplete
Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,15 @@
1-
"""
2-
Module: 'dht' on micropython-v1.26.1-mimxrt-MIMXRT1010_EVK
3-
"""
4-
5-
# MCU: {'variant': '', 'build': '', 'arch': 'armv7emsp', 'port': 'mimxrt', 'board': 'MIMXRT1010_EVK', 'board_id': 'MIMXRT1010_EVK', 'mpy': 'v6.3', 'ver': '1.26.1', 'family': 'micropython', 'cpu': 'MIMXRT1011DAE5A', 'version': '1.26.1'}
6-
# Stubber: v1.26.3
7-
from __future__ import annotations
81
from _typeshed import Incomplete
92

10-
def dht_readinto(*args, **kwargs) -> Incomplete: ...
11-
123
class DHTBase:
13-
def measure(self, *args, **kwargs) -> Incomplete: ...
14-
def __init__(self, *argv, **kwargs) -> None: ...
15-
16-
class DHT22:
17-
def measure(self, *args, **kwargs) -> Incomplete: ...
18-
def temperature(self, *args, **kwargs) -> Incomplete: ...
19-
def humidity(self, *args, **kwargs) -> Incomplete: ...
20-
def __init__(self, *argv, **kwargs) -> None: ...
21-
22-
class DHT11:
23-
def measure(self, *args, **kwargs) -> Incomplete: ...
24-
def temperature(self, *args, **kwargs) -> Incomplete: ...
25-
def humidity(self, *args, **kwargs) -> Incomplete: ...
26-
def __init__(self, *argv, **kwargs) -> None: ...
4+
pin: Incomplete
5+
buf: Incomplete
6+
def __init__(self, pin) -> None: ...
7+
def measure(self) -> None: ...
8+
9+
class DHT11(DHTBase):
10+
def humidity(self): ...
11+
def temperature(self): ...
12+
13+
class DHT22(DHTBase):
14+
def humidity(self): ...
15+
def temperature(self): ...
Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
"""
2-
Module: 'ds18x20' on micropython-v1.26.1-mimxrt-MIMXRT1010_EVK
3-
"""
4-
5-
# MCU: {'variant': '', 'build': '', 'arch': 'armv7emsp', 'port': 'mimxrt', 'board': 'MIMXRT1010_EVK', 'board_id': 'MIMXRT1010_EVK', 'mpy': 'v6.3', 'ver': '1.26.1', 'family': 'micropython', 'cpu': 'MIMXRT1011DAE5A', 'version': '1.26.1'}
6-
# Stubber: v1.26.3
7-
from __future__ import annotations
81
from _typeshed import Incomplete
2+
from micropython import const as const
93

10-
def const(*args, **kwargs) -> Incomplete: ...
4+
_CONVERT: int
5+
_RD_SCRATCH: int
6+
_WR_SCRATCH: int
117

128
class DS18X20:
13-
def read_scratch(self, *args, **kwargs) -> Incomplete: ...
14-
def read_temp(self, *args, **kwargs) -> Incomplete: ...
15-
def write_scratch(self, *args, **kwargs) -> Incomplete: ...
16-
def convert_temp(self, *args, **kwargs) -> Incomplete: ...
17-
def scan(self, *args, **kwargs) -> Incomplete: ...
18-
def __init__(self, *argv, **kwargs) -> None: ...
9+
ow: Incomplete
10+
buf: Incomplete
11+
def __init__(self, onewire) -> None: ...
12+
def scan(self): ...
13+
def convert_temp(self) -> None: ...
14+
def read_scratch(self, rom): ...
15+
def write_scratch(self, rom, buf) -> None: ...
16+
def read_temp(self, rom): ...
Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,21 @@
1-
"""
2-
Module: 'onewire' on micropython-v1.26.1-mimxrt-MIMXRT1010_EVK
3-
"""
4-
5-
# MCU: {'variant': '', 'build': '', 'arch': 'armv7emsp', 'port': 'mimxrt', 'board': 'MIMXRT1010_EVK', 'board_id': 'MIMXRT1010_EVK', 'mpy': 'v6.3', 'ver': '1.26.1', 'family': 'micropython', 'cpu': 'MIMXRT1011DAE5A', 'version': '1.26.1'}
6-
# Stubber: v1.26.3
7-
from __future__ import annotations
8-
from typing import Final
91
from _typeshed import Incomplete
102

113
class OneWireError(Exception): ...
124

135
class OneWire:
14-
SKIP_ROM: Final[int] = 204
15-
SEARCH_ROM: Final[int] = 240
16-
MATCH_ROM: Final[int] = 85
17-
def select_rom(self, *args, **kwargs) -> Incomplete: ...
18-
def writebit(self, *args, **kwargs) -> Incomplete: ...
19-
def writebyte(self, *args, **kwargs) -> Incomplete: ...
20-
def _search_rom(self, *args, **kwargs) -> Incomplete: ...
21-
def write(self, *args, **kwargs) -> Incomplete: ...
22-
def crc8(self, *args, **kwargs) -> Incomplete: ...
23-
def readinto(self, *args, **kwargs) -> Incomplete: ...
24-
def scan(self, *args, **kwargs) -> Incomplete: ...
25-
def reset(self, *args, **kwargs) -> Incomplete: ...
26-
def readbit(self, *args, **kwargs) -> Incomplete: ...
27-
def readbyte(self, *args, **kwargs) -> Incomplete: ...
28-
def __init__(self, *argv, **kwargs) -> None: ...
6+
SEARCH_ROM: int
7+
MATCH_ROM: int
8+
SKIP_ROM: int
9+
pin: Incomplete
10+
def __init__(self, pin) -> None: ...
11+
def reset(self, required: bool = False): ...
12+
def readbit(self): ...
13+
def readbyte(self): ...
14+
def readinto(self, buf) -> None: ...
15+
def writebit(self, value): ...
16+
def writebyte(self, value): ...
17+
def write(self, buf) -> None: ...
18+
def select_rom(self, rom) -> None: ...
19+
def scan(self): ...
20+
def _search_rom(self, l_rom, diff): ...
21+
def crc8(self, data): ...

publish/micropython-v1_26_1-mimxrt-mimxrt1010_evk-stubs/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ include = [
4343
]
4444
packages = [
4545
{ include = "__builtins__.pyi" },
46+
{ include = "_boot.pyi" },
4647
{ include = "_onewire.pyi" },
4748
{ include = "binascii.pyi" },
4849
{ include = "cmath.pyi" },

publish/micropython-v1_26_1-mimxrt-seeed_arch_mix-stubs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ For an overview of Micropython Stubs please see: https://micropython-stubs.read
3030

3131
Included stubs:
3232
* Merged stubs from `stubs/micropython-v1_26_1-mimxrt-SEEED_ARCH_MIX-merged`
33+
* Frozen stubs from `stubs/micropython-v1_26_1-frozen/mimxrt/SEEED_ARCH_MIX`
3334
* Core stubs from `stubs/micropython-core`
3435

3536

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from _typeshed import Incomplete
2+
from machine import Pin as Pin
3+
4+
bdev: Incomplete
5+
fs: Incomplete
6+
sdcard: Incomplete
7+
fat: Incomplete
Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,15 @@
1-
"""
2-
Module: 'dht' 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
81
from _typeshed import Incomplete
92

10-
def dht_readinto(*args, **kwargs) -> Incomplete: ...
11-
123
class DHTBase:
13-
def measure(self, *args, **kwargs) -> Incomplete: ...
14-
def __init__(self, *argv, **kwargs) -> None: ...
15-
16-
class DHT22:
17-
def measure(self, *args, **kwargs) -> Incomplete: ...
18-
def temperature(self, *args, **kwargs) -> Incomplete: ...
19-
def humidity(self, *args, **kwargs) -> Incomplete: ...
20-
def __init__(self, *argv, **kwargs) -> None: ...
21-
22-
class DHT11:
23-
def measure(self, *args, **kwargs) -> Incomplete: ...
24-
def temperature(self, *args, **kwargs) -> Incomplete: ...
25-
def humidity(self, *args, **kwargs) -> Incomplete: ...
26-
def __init__(self, *argv, **kwargs) -> None: ...
4+
pin: Incomplete
5+
buf: Incomplete
6+
def __init__(self, pin) -> None: ...
7+
def measure(self) -> None: ...
8+
9+
class DHT11(DHTBase):
10+
def humidity(self): ...
11+
def temperature(self): ...
12+
13+
class DHT22(DHTBase):
14+
def humidity(self): ...
15+
def temperature(self): ...
Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
"""
2-
Module: 'ds18x20' 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
81
from _typeshed import Incomplete
2+
from micropython import const as const
93

10-
def const(*args, **kwargs) -> Incomplete: ...
4+
_CONVERT: int
5+
_RD_SCRATCH: int
6+
_WR_SCRATCH: int
117

128
class DS18X20:
13-
def read_scratch(self, *args, **kwargs) -> Incomplete: ...
14-
def read_temp(self, *args, **kwargs) -> Incomplete: ...
15-
def write_scratch(self, *args, **kwargs) -> Incomplete: ...
16-
def convert_temp(self, *args, **kwargs) -> Incomplete: ...
17-
def scan(self, *args, **kwargs) -> Incomplete: ...
18-
def __init__(self, *argv, **kwargs) -> None: ...
9+
ow: Incomplete
10+
buf: Incomplete
11+
def __init__(self, onewire) -> None: ...
12+
def scan(self): ...
13+
def convert_temp(self) -> None: ...
14+
def read_scratch(self, rom): ...
15+
def write_scratch(self, rom, buf) -> None: ...
16+
def read_temp(self, rom): ...

0 commit comments

Comments
 (0)