summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-06-27docs: Move all ports docs to the single ToC.Paul Sokolovsky
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-26drivers/onewire: Enable pull-up when init'ing the 1-wire pin.Damien George
A previous version of the 1-wire driver (which was recently replaced by the current one) had this behaviour and it allows to create a 1-wire bus without any external pull-up resistors.
2017-06-26stmhal/boards/stm32f405.ld: Increase FLASH_TEXT to end of 1MiB flash.Damien George
And and FLASH_FS, and use "K" values instead of hex numbers for lengths. The increase of FLASH_TEXT is to allow more frozen bytecode for a particular user's project. It's not used for anything else.
2017-06-26README: Improve description of precompiled bytecode; mention mpy-cross.Damien George
2017-06-26docs/library/gc: Fix grammar and improve readability of gc.threshold().Damien George
2017-06-26docs/esp8266/tutorial/intro: Fix some grammatical typos.Damien George
2017-06-26esp8266/machine_rtc: Use correct arithmetic for aligning RTC mem len.Damien George
2017-06-26tests: Auto detect floating point capabilites of the target.Damien George
The floating-point precision of the target is detected (0, 30, 32 or 64) and only those tests which can run on the target will be run.
2017-06-26py/mpconfig.h: Remove spaces in "Micro Python" and remove blank line.Damien George
2017-06-26docs/ref/speed_python: Update and make more hardware-neutral.Paul Sokolovsky
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-26docs/network: Use markup adhering to the latest docs conventions.Paul Sokolovsky
2017-06-25docs/machine*: Use markup adhering to the latest docs conventions.Paul Sokolovsky
2017-06-25docs/lcd160cr: Group related constants together. Use full sentences.Paul Sokolovsky
Per the latest docs conventions.
2017-06-25docs/conf.py: Set default_role = 'any'.Paul Sokolovsky
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-25docs/utime: Use markup adhering to the latest conventions.Paul Sokolovsky
2017-06-25docs/lcd160cr: Use markup adhering to the latest conventions.Paul Sokolovsky
2017-06-25CODECONVENTIONS: docs: Markup for None/True/False.Paul Sokolovsky
Based on what CPython uses. However, Read The Docs theme styles this markup in very stand-out way, so we may think what to do about it.
2017-06-25docs/btree: Use markup adhering to the latest conventions.Paul Sokolovsky
2017-06-25CODECONVENTIONS: Start to describe docs conventions.Paul Sokolovsky
2017-06-24docs/builtins: List builtin exceptions.Paul Sokolovsky
If for nothing else, then at least to cross-reference them.
2017-06-24esp8266/README: Make "Documentation" a top-level section.Paul Sokolovsky
2017-06-24README: Mention support for bytecode and frozen bytecode.Paul Sokolovsky
2017-06-24extmod/moduzlib: decompress: Remove stale "(void)n_args".Paul Sokolovsky
n_args is now actually used in this function.
2017-06-24docs/gc: Document gc.threshold() function.Paul Sokolovsky
2017-06-24docs/gc: Mark mem_alloc()/mem_free() as uPy-specific.Paul Sokolovsky
2017-06-24docs/conf.py: Include 3 levels of ToC in latexpdf output.Paul Sokolovsky
Instead of default 2. 3 are required to access description of individual library modules.
2017-06-23docs/esp8266/tutorial/intro: Sphinx requires blank lines around literal blocks.Paul Sokolovsky
At least, Sphinx 1.3.6.
2017-06-23docs/esp8266/tutorial/intro: Discourage use of 512kb firmwares.Paul Sokolovsky
This follows similar warnings in other parts of docs.
2017-06-23docs/license: Update copyright year.Paul Sokolovsky
2017-06-23tests/connect_nonblock: Refactor towards real net_hosted test.Paul Sokolovsky
In the future, a special runner for such tests will import each test and call test() function with an address of test server to use.
2017-06-23tests/net_inet: Move tests which don't require full Internet to net_hosted.Paul Sokolovsky
The idea is that these tests can be run with just a test server running on a test host, with device under test connecting to it, instead of requiring Internet connection for testing. Such setup is however WIP, and some tests in net_hosted/ are so far written to connect to Internet, as there're not test server written yet. This is expected to evolve over time.
2017-06-23esp8266: Enable MICROPY_ENABLE_FINALISER.Paul Sokolovsky
GC finalization should be enabled for modlwip, or it may lead to GC problems with socket objects. This decreases usable heap size from 36288 to 35968 (-320) bytes.
2017-06-22esp8266: Move mp_hal_pin_open_drain from esp_mphal.c to machine_pin.c.Damien George
It belongs with the other pin config functions in machine_pin.c. Also, esp_mphal.c is put in iRAM so this change saves about 300 bytes of iRAM (and mp_hal_pin_open_drain is not a time critical function so doesn't need to be in iRAM).
2017-06-22stmhal/modules: Provide sym-link to onewire.py driver.Damien George
2017-06-22esp8266: Reinstate 1-wire scripts by sym-linking to drivers/onewire/.Damien George
No changes have been made to the code, the files just moved.
2017-06-22drivers/onewire: Move onewire.py, ds18x20.py from esp8266 to drivers.Damien George
These drivers can now be used by any port (so long as that port has the _onewire driver from extmod/modonewire.c). These drivers replace the existing 1-wire and DS18X20 drivers in the drivers/onewire directory. The existing ones were pyboard-specific and not very efficient nor minimal (although the 1-wire driver was written in pure Python it only worked at large enough CPU frequency). This commit brings backwards incompatible API changes to the existing 1-wire drivers. User code should be converted to use the new drivers, or check out the old version of the code and keep a local copy (it should continue to work unchanged).
2017-06-22stmhal: Make available the _onewire module, for low-level bus control.Damien George
2017-06-22stmhal: Add "quiet timing" enter/exit functions.Damien George
They disable all interrupts except for SysTick and are useful for doing certain low-level timing operations.
2017-06-22extmmod/modonewire: Rename public module to mp_module_onewire.Damien George
This follows naming scheme of other modules in extmod.
2017-06-22extmod: Move modonewire.c from esp8266 to extmod directory.Damien George
It's now generic enough to be used by any port.
2017-06-22esp8266/modonewire: Make timings static and remove onewire.timings func.Damien George
The 1-wire bus is defined with fixed timings so there should be no need to change them dynamically at runtime. Making the timings fixed saves about 270 bytes of code and 20 bytes of RAM.
2017-06-22esp8266/modonewire: Move low-level 1-wire bus code to modonewire.c.Damien George
The reason it was separated is so that the low-level code could be put in iRAM, for timing reasons. But: 1. Tests show that it's not necessary to have this code in iRAM for it to function correctly, and taking it out of iRAM reclaims some of that precious resource. Furthermore, even though these functions were in iRAM there were some functions that it called (eg pin get/set functions) which were not in iRAM, so partially defeated the purpose of putting the 1-wire code in iRAM. 2. It's easier to reuse this 1-wire code in other ports if it's in a single file. 3. If it turns out that certain code does need to be in iRAM then one can use the MP_FASTCODE macro to do that.
2017-06-22py/compile: Optimise emitter label indices to save a word of heap.Damien George
Previous to this patch, a label with value "0" was used to indicate an invalid label, but that meant a wasted word (at slot 0) in the array of label offsets. This patch adjusts the label indices so the first one starts at 0, and the maximum value indicates an invalid label.
2017-06-22tests/basics: Add tests for for-else statement.Damien George
2017-06-22py/compile: Fix bug with break/continue in else of optimised for-range.Damien George
This patch fixes a bug whereby the Python stack was not correctly reset if there was a break/continue statement in the else black of an optimised for-range loop. For example, in the following code the "j" variable from the inner for loop was not being popped off the Python stack: for i in range(4): for j in range(4): pass else: continue This is now fixed with this patch.
2017-06-21tests/net_inet: Add tests for accept and connect in nonblocking mode.Damien George
Some of these tests don't require an Internet connection, but here is a good place to put them for now.
2017-06-21tests/net_inet/test_tls_sites.py: Integration test for SSL connections.Paul Sokolovsky
This attempts to bootstrap network tests for MicroPython. This commits sets test/net_inet/ as place for tests which require access to wide Internet. They aren't intended to be run as part of the main testsuite, instead to be run manually on demand. test_tls_sites.py in particular check that it's possible to establish SSL/TLS connection to select sites on the Internet: few references ones, plus those for which problems were reported, and resolved.
2017-06-20esp8266: Make onewire module and support code usable by other ports.Damien George
2017-06-20cc3200: Initialise variable to zero to prevent compiler warnings.Damien George
2017-06-20cc3200: Make non-zero socket timeout work with connect/accept/send.Damien George
The CC3100 only allows to set a timeout for receiving data, not for accept, connect or send. But it can set non-blocking for all these operations and this patch uses that feature to implement socket timeout in terms of non- blocking behaviour combined with a loop.