Skip to content

Commit 173922f

Browse files
committed
docs: update
closes #21
1 parent ddbdc48 commit 173922f

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

documentation/api.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
asyncio
66
=======
77

8-
.. module:: serial.aio
8+
.. module:: serial_asyncio
99

1010
.. warning:: This implementation is currently in an experimental state. Use
1111
at your own risk.
1212

1313
Experimental asyncio support is available for Python 3.4 and newer. The module
14-
:mod:`serial.aio` provides a :class:`asyncio.Transport`:
14+
:mod:`serial_asyncio` provides a :class:`asyncio.Transport`:
1515
``SerialTransport``.
1616

1717

@@ -45,7 +45,7 @@ Example::
4545
asyncio.get_event_loop().stop()
4646

4747
loop = asyncio.get_event_loop()
48-
coro = serial.aio.create_serial_connection(loop, Output, '/dev/ttyUSB0', baudrate=115200)
48+
coro = serial_asyncio.create_serial_connection(loop, Output, '/dev/ttyUSB0', baudrate=115200)
4949
loop.run_until_complete(coro)
5050
loop.run_forever()
5151
loop.close()

documentation/shortintro.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ Short introduction
44

55
Example::
66

7+
import asyncio
8+
import serial_asyncio
9+
710
class Output(asyncio.Protocol):
811
def connection_made(self, transport):
912
self.transport = transport
@@ -29,7 +32,7 @@ Example::
2932
print('resume writing')
3033

3134
loop = asyncio.get_event_loop()
32-
coro = create_serial_connection(loop, Output, '/dev/ttyUSB0', baudrate=115200)
35+
coro = serial_asyncio.create_serial_connection(loop, Output, '/dev/ttyUSB0', baudrate=115200)
3336
loop.run_until_complete(coro)
3437
loop.run_forever()
3538
loop.close()

0 commit comments

Comments
 (0)