Skip to content

Commit 08492a6

Browse files
committed
Add v1.22.0 stubs for rp2 PIMORONI_PICOLIPO_16MB
Signed-off-by: Jos Verlinde <[email protected]>
1 parent a48816c commit 08492a6

File tree

263 files changed

+21615
-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.

263 files changed

+21615
-0
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
"""
2+
Asynchronous I/O scheduler for writing concurrent code.
3+
4+
MicroPython module: https://docs.micropython.org/en/v1.22.0/library/asyncio.html
5+
6+
CPython module:
7+
`asyncio `<https://docs.python.org/3.8/library/asyncio.html>
8+
9+
Example::
10+
11+
import asyncio
12+
13+
async def blink(led, period_ms):
14+
while True:
15+
led.on()
16+
await asyncio.sleep_ms(5)
17+
led.off()
18+
await asyncio.sleep_ms(period_ms)
19+
20+
async def main(led1, led2):
21+
asyncio.create_task(blink(led1, 700))
22+
asyncio.create_task(blink(led2, 400))
23+
await asyncio.sleep_ms(10_000)
24+
25+
# Running on a pyboard
26+
from pyb import LED
27+
asyncio.run(main(LED(1), LED(2)))
28+
29+
# Running on a generic board
30+
from machine import Pin
31+
asyncio.run(main(Pin(1), Pin(2)))
32+
33+
Core functions
34+
--------------
35+
36+
---
37+
Module: '_asyncio' on micropython-v1.22.0-rp2-PIMORONI_PICOLIPO_16MB
38+
"""
39+
# MCU: {'family': 'micropython', 'version': '1.22.0', 'build': '', 'ver': 'v1.22.0', 'port': 'rp2', 'board': 'PIMORONI_PICOLIPO_16MB', 'cpu': 'RP2040', 'mpy': 'v6.2', 'arch': 'armv6m'}
40+
# Stubber: v1.16.2
41+
from _typeshed import Incomplete
42+
from typing import Any, Coroutine, List, Tuple
43+
44+
45+
class TaskQueue:
46+
def push(self, *args, **kwargs) -> Incomplete:
47+
...
48+
49+
def peek(self, *args, **kwargs) -> Incomplete:
50+
...
51+
52+
def remove(self, *args, **kwargs) -> Incomplete:
53+
...
54+
55+
def pop(self, *args, **kwargs) -> Incomplete:
56+
...
57+
58+
def __init__(self, *argv, **kwargs) -> None:
59+
...
60+
61+
62+
class Task:
63+
"""
64+
This object wraps a coroutine into a running task. Tasks can be waited on
65+
using ``await task``, which will wait for the task to complete and return
66+
the return value of the task.
67+
68+
Tasks should not be created directly, rather use `create_task` to create them.
69+
"""
70+
71+
def __init__(self, *argv, **kwargs) -> None:
72+
...
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
"""
2+
Asynchronous I/O scheduler for writing concurrent code.
3+
4+
MicroPython module: https://docs.micropython.org/en/v1.22.0/library/asyncio.html
5+
6+
CPython module:
7+
`asyncio `<https://docs.python.org/3.8/library/asyncio.html>
8+
9+
Example::
10+
11+
import asyncio
12+
13+
async def blink(led, period_ms):
14+
while True:
15+
led.on()
16+
await asyncio.sleep_ms(5)
17+
led.off()
18+
await asyncio.sleep_ms(period_ms)
19+
20+
async def main(led1, led2):
21+
asyncio.create_task(blink(led1, 700))
22+
asyncio.create_task(blink(led2, 400))
23+
await asyncio.sleep_ms(10_000)
24+
25+
# Running on a pyboard
26+
from pyb import LED
27+
asyncio.run(main(LED(1), LED(2)))
28+
29+
# Running on a generic board
30+
from machine import Pin
31+
asyncio.run(main(Pin(1), Pin(2)))
32+
33+
Core functions
34+
--------------
35+
"""
36+
from _typeshed import Incomplete, Incomplete as Incomplete
37+
from typing import Any, Coroutine, List, Tuple
38+
39+
class TaskQueue:
40+
def push(self, *args, **kwargs) -> Incomplete: ...
41+
def peek(self, *args, **kwargs) -> Incomplete: ...
42+
def remove(self, *args, **kwargs) -> Incomplete: ...
43+
def pop(self, *args, **kwargs) -> Incomplete: ...
44+
def __init__(self, *argv, **kwargs) -> None: ...
45+
46+
class Task:
47+
"""
48+
This object wraps a coroutine into a running task. Tasks can be waited on
49+
using ``await task``, which will wait for the task to complete and return
50+
the return value of the task.
51+
52+
Tasks should not be created directly, rather use `create_task` to create them.
53+
"""
54+
55+
def __init__(self, *argv, **kwargs) -> None: ...
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
"""
2+
Module: '_boot_fat' on micropython-v1.22.0-rp2-PIMORONI_PICOLIPO_16MB
3+
"""
4+
# MCU: {'family': 'micropython', 'version': '1.22.0', 'build': '', 'ver': 'v1.22.0', 'port': 'rp2', 'board': 'PIMORONI_PICOLIPO_16MB', 'cpu': 'RP2040', 'mpy': 'v6.2', 'arch': 'armv6m'}
5+
# Stubber: v1.16.2
6+
from _typeshed import Incomplete
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from _typeshed import Incomplete as Incomplete
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
"""
2+
Module: '_onewire' on micropython-v1.22.0-rp2-PIMORONI_PICOLIPO_16MB
3+
"""
4+
# MCU: {'family': 'micropython', 'version': '1.22.0', 'build': '', 'ver': 'v1.22.0', 'port': 'rp2', 'board': 'PIMORONI_PICOLIPO_16MB', 'cpu': 'RP2040', 'mpy': 'v6.2', 'arch': 'armv6m'}
5+
# Stubber: v1.16.2
6+
from _typeshed import Incomplete
7+
8+
9+
def reset(*args, **kwargs) -> Incomplete:
10+
...
11+
12+
13+
def writebyte(*args, **kwargs) -> Incomplete:
14+
...
15+
16+
17+
def writebit(*args, **kwargs) -> Incomplete:
18+
...
19+
20+
21+
def crc8(*args, **kwargs) -> Incomplete:
22+
...
23+
24+
25+
def readbyte(*args, **kwargs) -> Incomplete:
26+
...
27+
28+
29+
def readbit(*args, **kwargs) -> Incomplete:
30+
...
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from _typeshed import Incomplete as Incomplete
2+
3+
def reset(*args, **kwargs) -> Incomplete: ...
4+
def writebyte(*args, **kwargs) -> Incomplete: ...
5+
def writebit(*args, **kwargs) -> Incomplete: ...
6+
def crc8(*args, **kwargs) -> Incomplete: ...
7+
def readbyte(*args, **kwargs) -> Incomplete: ...
8+
def readbit(*args, **kwargs) -> Incomplete: ...

0 commit comments

Comments
 (0)