summaryrefslogtreecommitdiffstatshomepage
path: root/docs/library/micropython.rst
Commit message (Collapse)AuthorAge
* py/objringio: Add micropython.RingIO() interface for general use.Andrew Leech2024-09-19
| | | | | | | | | | | | This commit adds a new `RingIO` type which exposes the internal ring-buffer code for general use in Python programs. It has the stream interface making it similar to `StringIO` and `BytesIO`, except `RingIO` has a fixed buffer size and is automatically safe when reads and writes are in different threads or an IRQ. This new type is enabled at the "extra features" ROM level. Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
* py/scheduler: Only run callbacks on the main thread if GIL is disabled.Angus Gratton2024-09-19
| | | | | | | | | | Otherwise it's very difficult to reason about thread safety in a scheduler callback, as it can run at any time on any thread - including racing against any bytecode operation on any thread. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
* docs/library/micropython: Fix spelling of compiler.Laurens Valk2022-08-26
| | | | Signed-off-by: Laurens Valk <laurens@pybricks.com>
* docs: Fix Sphinx 3.x warnings, and enable warnings-as-errors on build.David Lechner2020-06-05
| | | | | | | | | This enables warnings as errors and fixes all current errors, namely: - reference to terms in the glossary must now be explicit (:term:) - method overloads must not be declared as a separate method or must use :noindex: - 2 cases where `` should have been used instead of `
* py/modmicropython: Add heap_locked function to test state of heap.Andrew Leech2020-03-11
| | | | | | | | | | This commit adds micropython.heap_locked() which returns the current lock-depth of the heap, and can be used by Python code to check if the heap is locked or not. This new function is configured via MICROPY_PY_MICROPYTHON_HEAP_LOCKED and is disabled by default. This commit also changes the return value of micropython.heap_unlock() so it returns the current lock-depth as well.
* py/scheduler: Rename sched_stack to sched_queue.Jim Mussared2019-07-17
| | | | | | Behaviour was changed from stack to queue in 8977c7eb581f5d06500edb1ea29aea5cbda04f28, and this updates variable names to match. Also updates other references (docs, error messages).
* lib/utils/pyexec: Forcefully unlock the heap if locked and REPL active.Damien George2018-10-13
| | | | | | | Otherwise there is really nothing that can be done, it can't be unlocked by the user because there is no way to allocate memory to execute the unlock. See issue #4205 and #4209.
* docs/library/micropython: Describe optimisation levels for opt_level().Damien George2018-03-05
|
* docs: Add notes on heap allocation caused by bound method refs.Peter Hinch2017-11-23
|
* docs/library/micropython: Fix typo in RST formatting.Damien George2017-08-29
|
* docs/{micropython,sys,uos}: Use markup adhering to the latest docs conventions.Paul Sokolovsky2017-06-28
|
* docs/library/micropython: Document the newer micropython functions.Damien George2017-05-18
|
* docs/library/micropython: Deconditionalize.Paul Sokolovsky2017-04-16
|
* docs: Add initial draft documentation for the WiPy.Daniel Campora2015-06-10
| | | | This makes all common files "port-aware" using the .. only directive.
* docs: Change "Micro Python" to "MicroPython" in all places in docs.Damien George2015-06-04
|
* docs: Add additional example/note for Timer's callback usage.Ivan Pejić2015-03-30
| | | | | Add example: using named function for the Timer's callback. Add note: improving traceback inside interrupt timers.
* docs: Provide initial documentation for micropython module.Damien George2015-03-30