Commit a58713a8 authored by Damien George's avatar Damien George
Browse files

docs: Cleanup and update some docs.

parent c7da7838
class USB_VCP --- USB virtual comm port
=======================================
class USB_VCP -- USB virtual comm port
======================================
The USB_VCP class allows creation of an object representing the USB
virtual comm port. It can be used to read and write data over USB to
......
......@@ -160,7 +160,6 @@ Classes
pyb.I2C.rst
pyb.LCD.rst
pyb.LED.rst
pyb.PinAF.rst
pyb.Pin.rst
pyb.RTC.rst
pyb.Servo.rst
......
:mod:`select` --- Provides select function to wait for events on a stream
=========================================================================
:mod:`select` -- Provides select function to wait for events on a stream
========================================================================
.. module:: select
:synopsis: Provides select function to wait for events on a stream
This module provides the select function.
Pyboard specifics
-----------------
Polling is an efficient way of waiting for read/write activity on multiple
objects. Current objects that support polling are: :class:`pyb.UART`,
:class:`pyb.USB_VCP`.
Functions
---------
.. function:: poll()
Create an instance of the Poll class.
.. function:: select(rlist, wlist, xlist[, timeout])
Wait for activity on a set of objects.
class Poll
----------
.. _class: Poll
class ``Poll``
--------------
Methods
-------
~~~~~~~
.. method:: poll.modify(obj, eventmask)
.. method:: poll.register(obj[, eventmask])
Register ``obj`` for polling. ``eventmask`` is 1 for read, 2 for
write, 3 for read-write.
.. method:: poll.poll([timeout])
.. method:: poll.unregister(obj)
Timeout is in milliseconds.
Unregister ``obj`` from polling.
.. method:: poll.register(obj[, eventmask])
.. method:: poll.modify(obj, eventmask)
Modify the ``eventmask`` for ``obj``.
.. method:: poll.unregister(obj)
.. method:: poll.poll([timeout])
Wait for one of the registered objects to become ready.
Timeout is in milliseconds.
:mod:`sys` --- system specific functions
========================================
:mod:`sys` -- system specific functions
=======================================
.. module:: sys
:synopsis: system specific functions
Functions
---------
......@@ -14,7 +12,6 @@ Functions
Raise a ``SystemExit`` exception. If an argument is given, it is the
value given to ``SystemExit``.
Constants
---------
......
:mod:`time` --- time related functions
======================================
:mod:`time` -- time related functions
=====================================
.. module:: time
:synopsis: time related functions
......@@ -7,7 +7,6 @@
The ``time`` module provides functions for getting the current time and date,
and for sleeping.
Functions
---------
......@@ -16,14 +15,15 @@ Functions
Convert a time expressed in seconds since Jan 1, 2000 into an 8-tuple which
contains: (year, month, mday, hour, minute, second, weekday, yearday)
If secs is not provided or None, then the current time from the RTC is used.
year includes the century (for example 2014)
month is 1-12
mday is 1-31
hour is 0-23
minute is 0-59
second is 0-59
weekday is 0-6 for Mon-Sun.
yearday is 1-366
year includes the century (for example 2014).
* month is 1-12
* mday is 1-31
* hour is 0-23
* minute is 0-59
* second is 0-59
* weekday is 0-6 for Mon-Sun
* yearday is 1-366
.. function:: mktime()
......
:mod:`uheapq` --- heap queue algorithm
======================================
:mod:`uheapq` -- heap queue algorithm
=====================================
.. module:: uheapq
:synopsis: heap queue algorithm
......
:mod:`ujson` --- JSON encoding and decoding
===========================================
:mod:`ujson` -- JSON encoding and decoding
==========================================
.. module:: ujson
:synopsis: JSON encoding and decoding
......
:mod:`usocket` --- socket module
================================
:mod:`usocket` -- socket module
===============================
.. module:: usocket
:synopsis: socket module
Socket functionality.
Functions
---------
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment