Commit Graph

639 Commits

Author SHA1 Message Date
Peter Hinch da1c80d850 docs/reference/isr_rules.rst Add tutorial on use of micropython.schedule(). 2017-09-09 16:05:24 +03:00
Damien George 4a93801c12 all: Update Makefiles and others to build with new ports/ dir layout.
Also renames "stmhal" to "stm32" in documentation and everywhere else.
2017-09-06 14:09:13 +10:00
Damien George fe6f0354f6 docs/library/micropython: Fix typo in RST formatting. 2017-08-29 16:53:30 +10:00
Damien George e30ba2f1c7 docs/library: Add description of "index" parameter to uos.dupterm(). 2017-08-29 16:50:28 +10:00
Paul Sokolovsky d5336ba136 docs/machine.Signal: Improve style/grammar and add usage example. 2017-08-29 00:08:40 +03:00
Paul Sokolovsky c5c095690f docs/library/network: Fix ref to "socket" module (should be "usocket"). 2017-08-28 14:00:16 +03:00
Paul Sokolovsky 358a7ba014 docs: More xrefs to "MicroPython port" in glossary. 2017-08-28 13:51:05 +03:00
Damien George b84268d49c docs/pyboard/tutorial: Add "timeout=0" to UART in pass-through example.
Without this the pass-through will pause for 1 second at each character.
2017-08-23 17:01:43 +10:00
Damien George 1f78e7a431 docs: Bump version to 1.9.2. 2017-08-23 11:46:35 +10:00
Paul Sokolovsky 64a3c52f66 docs: Consistently link to micropython-lib in glossary. 2017-08-22 09:33:31 +03:00
Paul Sokolovsky 387a8d26f9 docs/glossary: Fix typos in micropython-lib paragraph. 2017-08-20 10:44:02 +03:00
Paul Sokolovsky 46583e9057 docs/glossary: Elaborate on possible MicroPython port differences.
State that this doc describes generic, "core" MicroPython functionality,
any particular port may diverge in both directions, by both omitting
some functionality, and adding more, both cases described outside the
generic documentation.
2017-08-20 10:11:44 +03:00
Paul Sokolovsky 3f91570483 docs/library/usocket: Describe complete information on address formats.
Describe that the only portable way to deal with addresses is by using
getaddrinfo(). Describe that some ports may support tuple addresses using
"socket" module (vs "usocket" of native MicroPython).
2017-08-20 09:49:12 +03:00
Paul Sokolovsky ccaad53270 docs/library/usocket: Move socket.error to its own section.
It's too minor a point to start the module description with it.
2017-08-20 09:04:48 +03:00
Alex Robbins 0aa1d3f447 docs/library/ubinascii: Update base64 docs.
This clarifies return values and the handling of invalid (e.g. newline)
characters.

Encoding conforms to RFC 3548, but decoding does not, as it ignores invalid
characters in base64 input. Instead, it conforms to MIME handling of base64
(RFC 2045).

Note that CPython doesn't document handling of invalid characters in
a2b_base64() docs:
https://docs.python.org/3/library/binascii.html#binascii.a2b_base64 , so
we specify it more explicitly than it, based on CPython's actual behavior
(with which MicroPython now compliant).
2017-08-17 09:25:51 +03:00
Javier Candeira c127ace28a docs/library/machine.RTC.rst: Fix typo. 2017-08-14 15:42:25 +10:00
Matthew Brener d003daee06 docs/esp8266/tutorial: Fix typo, "its" to "it's" in powerctrl.rst. 2017-07-24 10:33:03 +10:00
Paul Sokolovsky 205c368fa1 eps8266/general: Fix typo in recent example. 2017-07-21 12:08:18 +03:00
Peter Hinch 6ede921731 eps8266/general: Add known issue of WiFi RX buffers overflow. 2017-07-21 10:19:17 +03:00
Piotr Maliński 8c9e22c127 docs/pyboard/tutorial/amp_skin: Add example for playing large WAV files. 2017-07-21 16:52:16 +10:00
Alexander Steffen c9a48eb464 docs,teensy: Use the name MicroPython consistently in documentation 2017-07-15 11:44:32 +02:00
Paul Sokolovsky 503cf3d097 docs/uzlib: Update description of decompress() and mention DecompIO. 2017-07-04 02:32:42 +03:00
Damien George 3c62577ee9 docs/pyboard: Move info about using Windows from topindex to general. 2017-07-03 15:31:41 +10:00
Patrick O'Leary 45b127e7ac docs/esp8266/general.rst: Fix name of NTP module.
The simple NTP client module is named "ntptime.py".
2017-07-02 20:02:19 -05:00
Paul Sokolovsky ffb13cc633 docs/uerrno: Document "uerrno" module. 2017-07-03 00:55:09 +03:00
Paul Sokolovsky 4f23c5d587 docs/pyboard: Move hardware info into General Info chapter.
This makes top-level ToC of the pyboard docs consistent with other ports
(consisting of 3 chapters: QuickRef, General Info, and Tutorial).

Also, some other minor tweaks applied, like local ToC for General Info and
headings mentioning pyboard.
2017-07-02 19:23:23 +03:00
Paul Sokolovsky e467949a4a docs/*_index: Drop "Indices and tables" pseudo-section.
This pseudo-section causes artifacts with latexpdf generation (almost
empty page with list containing literal "genindex", "modeindex", "search"
items). For HTML docs, these sections can be accessed from "home" page.
2017-07-02 19:18:51 +03:00
Paul Sokolovsky 90c1d54464 docs/conf.py: Set "version" and "release" to the same value.
We don't use alpha/beta/RC, so for us version and release should be the
same, or it leads to confusion (for example, current, 1.9.1 docs are
marked as 1.9 at places).
2017-07-02 15:50:22 +03:00
Paul Sokolovsky a6af1a1d9c docs/replace.inc: Add |see_cpython|, to xref individual symbols from CPython.
The idea is to use it for each symbol in builtins.rst.
2017-07-02 15:43:12 +03:00
Paul Sokolovsky 465d84b7e7 docs/library: Add CPython docs xref to each pertinent module.
Cross-reference text/link is implemented as RST substitution, so easy to
consistently.
2017-07-02 15:37:31 +03:00
Paul Sokolovsky ebce7984c6 docs/conf.py: Add file for global replacements definition.
The idea is to allow to define a kind of "macros" for repeatitive text,
so all occurrances can be updated in one place. Unfortunately, RST doesn't
support replacements with arguments, which limits usefulness of them and
should be taken into account.
2017-07-02 15:15:31 +03:00
Paul Sokolovsky 5f0c56bcf1 docs/conf.py: Switch to "new" format of intersphinx_mapping.
As described at
http://www.sphinx-doc.org/en/stable/ext/intersphinx.html#confval-intersphinx_mapping

This will allow to explicitly refer to CPython docs for cross-references.
2017-07-02 14:35:52 +03:00
Damien George 7e14f99c26 docs/topindex.html: Fix typo in "Glossary" heading. 2017-07-02 21:29:06 +10:00
Paul Sokolovsky d0797fbc18 docs: Add glossary.
We have enough terms or references throughout the docs which may be not
immediately clear or have some important nuances. Referencing terms in
gloassary is the best way to deal with that.
2017-07-02 13:47:35 +03:00
Paul Sokolovsky d80ecad03f docs/ure: Elaborate doc, update markup to the latest conventions. 2017-07-02 02:01:47 +03:00
Paul Sokolovsky d42bb58c33 docs/builtins: Add AssertionError, SyntaxError, ZeroDivisionError.
Also, update heading of 1st sections to "Functions and types".
2017-07-01 22:20:49 +03:00
Paul Sokolovsky 8b7d311595 reference/index: Rewrite introduction paragraph to avoid confusion.
The old intro talked about "differences", but there were hardly any
sections describing differences, mostly MicroPython specific features.
On the other hand, we now have real "differences" chapter, though it's
mostly concerned with stdlib differences.

So, try to avoid confusion by changing wording and linking to the other
chapters and contrasting them with what is described in "MicroPython
language".
2017-07-01 22:09:40 +03:00
Paul Sokolovsky 50eea26145 docs/differences/index_template: Use consistent heading casing.
And in our case, "consistent" is where each word in the heading is *not*
capitalized.
2017-07-01 21:15:43 +03:00
Damien George f585526c80 docs: Move topindex.html to templates/ subdir.
Later versions of jinja2 need it to be in this subdir, and earlier versions
work with it here as well.
2017-07-01 20:30:35 +03:00
Paul Sokolovsky ef47dee4bf docs/conf.py: Add .venv dir to exclude_patterns.
It's useful to try different Sphinx versions using virtualenv/venv, so
exclude a common venv dir name from Sphinx processing.
2017-07-01 20:01:05 +03:00
Paul Sokolovsky e334b6b6d2 docs/constrained: Use markup adhering to the latest docs conventions. 2017-07-01 19:28:55 +03:00
Paul Sokolovsky 871a45dd0c docs/{uselect,ussl,ustruct}: Use markup adhering to latest docs conventions. 2017-06-30 14:50:52 +03:00
Damien George f2babeaeda docs/topindex.html: Remove link to wipy.io, it's no longer available. 2017-06-30 18:57:26 +10:00
Paul Sokolovsky 1942f0ceef docs/{framebuf,usocket}: Use markup adhering to the latest docs conventions. 2017-06-29 02:22:14 +03:00
Paul Sokolovsky f8ac28964d docs/{micropython,sys,uos}: Use markup adhering to the latest docs conventions. 2017-06-28 00:37:47 +03:00
Paul Sokolovsky fbd252b77c docs/{esp,pyb,ubinascii}: Use markup adhering to the latest docs conventions. 2017-06-27 00:38:05 +03:00
Paul Sokolovsky 748f493f33 docs: Move all ports docs to the single ToC.
Previously, only "selected chapters" were shown in left-pane ToC (of
Read The Docs theme). These chapters were selected out of order. The
rest of chapters were hidden beyond "Documentation Contents" pseudo-
chapter. This arguably led only to confusion, as many people probably
never tried to open that pseudo-chapter, and those who did, were
confused. Such organization is even worse for PDF output, causing
chapters go in mix-mashed order.

So, instead move to single clean ToC. This will allow readers of HTML
to have access to any doc content at their fingertips (and straight
before their eyes), and will allow to finally have clean PDF docs.
2017-06-27 00:34:27 +03:00
Damien George 7a4694fc4e docs/library/gc: Fix grammar and improve readability of gc.threshold(). 2017-06-26 15:25:51 +10:00
Damien George 0a54b6dce9 docs/esp8266/tutorial/intro: Fix some grammatical typos. 2017-06-26 15:12:48 +10:00
Paul Sokolovsky a926119099 docs/ref/speed_python: Update and make more hardware-neutral.
Move hardware-specific optimizations to the very end of document, and
add visible note that it gives an example for Pyboard. Remove references
to specific hardware technologies, so the doc can be more naturally
used across ports. Various markup updates to adhere to the latest
docs conventions.
2017-06-26 01:11:17 +03:00
Paul Sokolovsky dd16e21562 docs/network: Use markup adhering to the latest docs conventions. 2017-06-26 00:37:30 +03:00
Paul Sokolovsky 7c0e1f1a08 docs/machine*: Use markup adhering to the latest docs conventions. 2017-06-25 13:30:29 +03:00
Paul Sokolovsky cfce7d784e docs/lcd160cr: Group related constants together. Use full sentences.
Per the latest docs conventions.
2017-06-25 13:28:23 +03:00
Paul Sokolovsky ba33c544bb docs/conf.py: Set default_role = 'any'.
This causes `symbol` syntax to be equivalent to :any:`symbol`, which is
in turn the easiest way to cross-reference an arbitrary symbol in the
docs:

http://www.sphinx-doc.org/en/stable/markup/inline.html#role-any

:any: requires at least Sphinx 1.3 (for reference, Ubuntu 16.03 ships
with 1.3.6, the latest 1.6.3).

Any many of our docs, `symbol` is misused to specify arguments to
functions, etc. Refactoring that is in progress. (CODECONVENTIONS
already specify proper syntax for both arguments and xrefs, based
on CPython conventions).
2017-06-25 00:57:44 +03:00
Paul Sokolovsky 6f87b03e3c docs/utime: Use markup adhering to the latest conventions. 2017-06-25 00:54:38 +03:00
Paul Sokolovsky 1e31d4bdf6 docs/lcd160cr: Use markup adhering to the latest conventions. 2017-06-25 00:46:07 +03:00
Paul Sokolovsky 7f2bc83dbc docs/btree: Use markup adhering to the latest conventions. 2017-06-25 00:17:18 +03:00
Paul Sokolovsky bc790b5145 docs/builtins: List builtin exceptions.
If for nothing else, then at least to cross-reference them.
2017-06-24 23:45:38 +03:00
Paul Sokolovsky c4e3a03fa5 docs/gc: Document gc.threshold() function. 2017-06-24 13:35:41 +03:00
Paul Sokolovsky 4cdddfed8e docs/gc: Mark mem_alloc()/mem_free() as uPy-specific. 2017-06-24 13:12:09 +03:00
Paul Sokolovsky b50659e137 docs/conf.py: Include 3 levels of ToC in latexpdf output.
Instead of default 2. 3 are required to access description of individual
library modules.
2017-06-24 00:25:29 +03:00
Paul Sokolovsky beb94b6efc docs/esp8266/tutorial/intro: Sphinx requires blank lines around literal blocks.
At least, Sphinx 1.3.6.
2017-06-23 22:04:33 +03:00
Paul Sokolovsky 51668dffaa docs/esp8266/tutorial/intro: Discourage use of 512kb firmwares.
This follows similar warnings in other parts of docs.
2017-06-23 22:00:40 +03:00
Paul Sokolovsky 6201e84812 docs/license: Update copyright year. 2017-06-23 21:48:27 +03:00
Paul Sokolovsky 94696973a0 docs/select: Rename to uselect, to match the actual module name.
Also, add ipoll() documentation and markup changes to comply with CPython
usage.
2017-06-16 11:28:06 +03:00
Damien George fd860dc552 stmhal: Add .value() method to Switch object, to mirror Pin and Signal. 2017-06-15 17:34:51 +10:00
Paul Sokolovsky 08c73d9734 docs/btree: Typo/wording fixes. 2017-06-11 18:23:13 +03:00
Paul Sokolovsky 6ca086a89a docs/btree: Add hints about opening db file and need to flush db. 2017-06-11 17:44:11 +03:00
Damien George 869cdcfdfc docs: Bump version to 1.9.1. 2017-06-11 23:04:00 +10:00
Paul Sokolovsky cd64b3082e docs/network: First step to describe standard network class interface.
This adds description of implied AbstractNIC base class, which should be
"subclasses" and implemented by a particular network device class.

This is just an initial step in that direction, the API and description
will be elabotated further.
2017-06-04 21:25:23 +03:00
Paul Sokolovsky f245f5d7cc docs/machine: Sort machine classes in logical order, not alphabetically.
The list starts with the simplest functionality - GPIO, proceeds to
communication interfaces (UART, SPI, I2C), the to time(r) related
things, then everything else.
2017-06-03 14:50:54 +03:00
Paul Sokolovsky e91b1cdae3 docs/uos: Move cc3200 port legacy VFS mounting functions to its ref doc.
This patch also unconditionalizes uos.dupterm(), though exact interface
and semantics is yet to be defined.
2017-06-03 14:19:53 +03:00
Paul Sokolovsky 1ce44f3046 docs/uos: Deconditionalize, remove minor port-specific details.
For a couple of ports, there was information which directory is set
as current after boot. This information doesn't belong to "uos" module,
and is moved to boards' references (which actually already contained
information on which directory is chosen for boot, even if without
explicit mentioning that it becomes current directory, which is now
done).
2017-06-03 13:51:13 +03:00
Paul Sokolovsky 92206a78ae docs/network: Move confusingly-named cc3200 Server class to its reference.
cc3200 port has network.Server class to control behavior of builtin
Telnet/FTP server of that port.
2017-06-03 13:34:28 +03:00
Paul Sokolovsky 22ca5390f7 docs/esp8266/quickref: Polish Pin.on()/off() examples. 2017-06-02 21:08:23 +03:00
Paul Sokolovsky 272a5d95e0 docs/esp8266: Consistently replace Pin.high/low methods with .on/off. 2017-05-30 07:36:25 +03:00
Paul Sokolovsky d5b8825d5f docs/machine.Pin: Add on() and off() methods. 2017-05-29 20:56:13 +03:00
Paul Sokolovsky 3496d9e4bd docs/machine.Pin: Remove out_value() method.
This method isn't implemented in any port. It seemed to have originated
in cc3200 port, but actually never was implemented there either. In
general case, it's impossible to implement this method (for example, for
a perfect GPO, which has only output latch without any feedback look
into a CPU).
2017-05-29 20:51:30 +03:00
Ville Skyttä ca16c38210 various: Spelling fixes 2017-05-29 11:36:05 +03:00
Damien George 825460a093 docs: Bump version to 1.9. 2017-05-26 19:07:37 +10:00
Paul Sokolovsky 3ebd67fc09 library/machine.Pin: Remove .id() method and .board class attr.
Both aren't part of generic Hardware API: It's impossible to implement
.id() method in a generic case (e.g., when Pin is instantiated by the
underlying OS/RTOS). .board attribute is an obvious space hog which
instead can be implemented on Python level if needed.
2017-05-21 15:50:16 +03:00
Damien George 436d97b3f9 docs/library/machine.UART: Update and improve uart.any() docs. 2017-05-19 15:48:22 +10:00
Damien George d007351b33 docs/library/micropython: Document the newer micropython functions. 2017-05-18 00:25:09 +10:00
Damien George f351c6db5e drivers/display/lcd160cr: Fix get_line method and enhance screen_dump.
The docs are updated and describe the new behaviour of these methods.
2017-05-17 19:53:13 +10:00
Damien George e4a53570d0 docs: Change single occurrence of "Micropython" to "MicroPython". 2017-05-17 12:38:33 +10:00
Paul Sokolovsky d5713c8618 docs/library/index: Add important summary of the intro section as warning.
To make them harder to miss.
2017-05-15 00:26:44 +03:00
Paul Sokolovsky 0ba136fbe9 docs/machine.Signal: Add initial draft description of Signal class. 2017-05-14 23:12:06 +03:00
Paul Sokolovsky c19f07bd52 docs/machine.Pin: There's no toggle() method in MicroPython hardware API.
May be a port-specific method, not portable, not part of the official
specification.
2017-05-14 22:52:16 +03:00
Damien George 6d221fe284 docs/library/uos: Add description of uos.ilistdir() function. 2017-05-10 12:44:21 +10:00
Damien George 29b26f3922 docs/library/machine.SPI: Fix formatting of bullet list to stop warning. 2017-04-18 15:40:04 +10:00
Damien George 850f79e552 docs/library/machine.I2C: Remove WiPy-specific return values.
cc3200 has been updated to conform to the API and now returns None.
2017-04-18 15:39:27 +10:00
Damien George daa5ba5629 docs/esp8266/quickref: Add links from quickref page to machine classes. 2017-04-18 15:28:18 +10:00
Damien George d4675e7674 docs/library/machine.*: Add cross-reference label to individual classes. 2017-04-18 15:27:37 +10:00
Damien George 1f1a03d0c3 docs/library/machine.I2C: Deconditionalise all methods.
The cc3200 port is now similar enough to the standard machine.I2C API so
that all conditionals can be removed.
2017-04-18 15:04:51 +10:00
Damien George c49b265389 docs/wipy/general: Add section about specifics of I2C implementation. 2017-04-18 15:04:30 +10:00
Damien George 27f0862550 docs/wipy/quickref: Update reference for change to I2C API. 2017-04-18 13:20:07 +10:00
Damien George fabaa61437 docs/library/machine.UART: Remove pyboard-specific section.
stmhal doesn't have a machine.UART class so this section is not needed.
2017-04-18 12:13:51 +10:00
Paul Sokolovsky a78703f188 docs/library/machine: Typo fix in machine_callbacks section. 2017-04-16 10:14:05 +03:00
Paul Sokolovsky 9ef6bb5480 docs/machine: Move machine.main() misnomer to wipy's known issues. 2017-04-16 10:12:01 +03:00
Paul Sokolovsky a8ece0358f docs/machine.UART: Deconditionalize normal methods. 2017-04-16 09:54:55 +03:00