Skip to content

Commit 1fc16fb

Browse files
committed
Documentation updates.
1 parent 3cff4de commit 1fc16fb

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

FASTPOLL.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
# A modified version of uasyncio
1+
# An experimental modified version of uasyncio
22

33
This document describes a "priority" version of uasyncio. Its purpose is to
44
provide a simple priority mechanism to facilitate the design of applications
55
with improved millisecond-level timing accuracy and reduced scheduling latency.
66

7-
I remain hopeful that uasyncio will mature natively to support fast I/O
8-
polling: if this occurs I plan to deprecate this solution. See
9-
[this thread](https://github.com/micropython/micropython/pull/3836#issuecomment-397317408)
10-
and [this one](https://github.com/micropython/micropython/issues/2664).
7+
I am hopeful that uasyncio will support fast I/O polling and have a
8+
[PR](https://github.com/micropython/micropython-lib/pull/287) in place to
9+
implement this. If this (or other solution) is implemented I will deprecate
10+
this module as the I/O mechanism is inherently more efficient with polling
11+
implemented in C.
1112

1213
V0.3 Feb 2018. A single module designed to work with the official `uasyncio`
1314
library. This requires `uasyncio` V2.0 which requires firmware dated

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@ This GitHub repository consists of the following parts:
2121
* [A modified uasyncio](./FASTPOLL.md) This incorporates a simple priority
2222
mechanism. With suitable application design this improves the rate at which
2323
devices can be polled and improves the accuracy of time delays. Also provides
24-
for low priority tasks which are only scheduled when normal tasks are paused.
25-
NOTE: this requires uasyncio V2.0.
24+
for low priority tasks which are only scheduled when normal tasks are paused.
25+
NOTE1: this requires uasyncio V2.0.
26+
NOTE2: I have a PR in place which, if accepted, will largely supersede this
27+
with a faster and more efficient way of handling fast I/O. This modified
28+
version should be regarded as "experimental". It may stop being supported.
2629
* [Communication between devices](./syncom_as/README.md) Enables MicroPython
2730
boards to communicate without using a UART. Primarily intended to enable a
2831
a Pyboard-like device to achieve bidirectional communication with an ESP8266.

TUTORIAL.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -908,11 +908,9 @@ comes from the `Lock` class:
908908
If the `async with` has an `as variable` clause the variable receives the
909909
value returned by `__aenter__`.
910910

911-
Note there is currently a bug in the implementation whereby if an explicit
912-
`return` is issued within an `async with` block, the `__aexit__` method
913-
is not called. The solution is to design the code so that in all cases it runs
914-
to completion. The error appears to be in [PEP492](https://www.python.org/dev/peps/pep-0492/).
915-
See [this issue](https://github.com/micropython/micropython/issues/3153).
911+
There was a bug in the implementation whereby if an explicit `return` was issued
912+
within an `async with` block, the `__aexit__` method was not called. This was
913+
fixed as of 27th June 2018 [ref](https://github.com/micropython/micropython/pull/3890).
916914

917915
###### [Contents](./TUTORIAL.md#contents)
918916

@@ -1269,11 +1267,14 @@ All devices must provide an `ioctl` method which polls the hardware to
12691267
determine its ready status. A typical example for a read/write driver is:
12701268

12711269
```python
1270+
import io
12721271
MP_STREAM_POLL_RD = const(1)
12731272
MP_STREAM_POLL_WR = const(4)
12741273
MP_STREAM_POLL = const(3)
12751274
MP_STREAM_ERROR = const(-1)
12761275

1276+
class MyIO(io.IOBase):
1277+
# Methods omitted
12771278
def ioctl(self, req, arg): # see ports/stm32/uart.c
12781279
ret = MP_STREAM_ERROR
12791280
if req == MP_STREAM_POLL:

0 commit comments

Comments
 (0)