Skip to content

Commit d326236

Browse files
committed
TUTORIAL.md, auart.py: Add timeout value.
1 parent db9977d commit d326236

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

v3/as_demos/auart.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Test of uasyncio stream I/O using UART
22
# Author: Peter Hinch
3-
# Copyright Peter Hinch 2017-2020 Released under the MIT license
3+
# Copyright Peter Hinch 2017-2022 Released under the MIT license
44
# Link X1 and X2 to test.
55

66
import uasyncio as asyncio
77
from machine import UART
8-
uart = UART(4, 9600)
8+
uart = UART(4, 9600, timeout=0)
99

1010
async def sender():
1111
swriter = asyncio.StreamWriter(uart, {})

v3/docs/TUTORIAL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2053,7 +2053,7 @@ demonstrates concurrent I/O on one UART. To run, link Pyboard pins X1 and X2
20532053
```python
20542054
import uasyncio as asyncio
20552055
from machine import UART
2056-
uart = UART(4, 9600)
2056+
uart = UART(4, 9600, timeout=0) # timeout=0 prevents blocking at low baudrates
20572057

20582058
async def sender():
20592059
swriter = asyncio.StreamWriter(uart, {})

0 commit comments

Comments
 (0)