summaryrefslogtreecommitdiff
path: root/docs
AgeCommit message (Collapse)Author
2022-07-20extmod/modussl_mbedtls: Implement cert_reqs and cadata arguments.Carlosgg
Add cert_reqs and cadata keyword-args to ssl.wrap_socket() and ssl.CERT_NONE, ssl.CERT_OPTIONAL, ssl.CERT_REQUIRED constants to allow certificate validation. CPython doesn't accept cadata in ssl.wrap_socket(), but it does in SSLContext.load_verify_locations(), so we use this name to at least match the same name in load_verify_locations(). Add docs for these new arguments, as well as docs for the existing server_hostname argument which is important for certificate validation. Tests are added as well. Signed-off-by: Carlos Gil <carlosgilglez@gmail.com>
2022-07-18shared/readline: Use MP_REGISTER_ROOT_POINTER().David Lechner
This uses MP_REGISTER_ROOT_POINTER() to register the readline_history root pointer array used by shared/readline.c and removes the registration from all mpconfigport.h files. This also required adding a new MICROPY_READLINE_HISTORY_SIZE config option since not all ports used the same sized array. Signed-off-by: David Lechner <david@pybricks.com>
2022-07-05esp32,esp8266: Rename WLAN dhcp_hostname config to hostname.IhorNehrutsa
But retain old name for backwards compatibility.
2022-06-24docs/library/bluetooth: Add link to aioble.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-06-24extmod/uasyncio: Implement stream read(-1) to read all data up to EOF.Damien George
Fixes issue #6355. Signed-off-by: Damien George <damien@micropython.org>
2022-06-23esp32/modesp32: Add wake_on_ulp() so ULP can wake CPU from deepsleep.Christian Walther
Add esp32.wake_on_ulp() to give access to esp_sleep_enable_ulp_wakeup(), which is needed to allow the ULP co-processor to wake the main CPU from deep sleep.
2022-06-21docs/library/uasyncio: Consistently use "uasyncio" instead of "asyncio".Luiz Brandao
2022-06-21docs/library/machine: Add note on interrupts being critical to system.Patrick Joy
2022-06-21docs: Set LaTeX engine to XeLaTeX for PDF generation.Stewart C. Russell
Also added to suggested packages list for PDF build. See comment in Sphinx project for (some) details: https://github.com/sphinx-doc/sphinx/pull/5693#pullrequestreview-180444650
2022-06-21docs/library: Remove unnecessary "pyb." prefix on class names.Damien George
Otherwise these classes are refered to with a double prefix, like pyb.pyb.ADC. Signed-off-by: Damien George <damien@micropython.org>
2022-06-21docs/library/pyb.Timer: Document `brk` argument and its constants.Howard Lovatt
2022-06-21extmod/modbtree: Use buffer protocol for keys/values.David Lechner
This changes the btree implementation to use the buffer protocol for reading key/values in all methods. `str` and `bytes` objects are not the only bytes-like objects that could be used. Documentation and tests are also updated. Addresses issue #8748. Signed-off-by: David Lechner <david@pybricks.com>
2022-06-21extmod/extmod.mk: Separate out extmod file list from py.mk to extmod.mk.David Lechner
This separates extmod source files from `py.mk`. Previously, `py.mk` assumed that every consumer of the py/ directory also wanted to include extmod/. However, this is not the case. For example, building mpy-cross uses py/ but doesn't need extmod/. This commit moves all extmod-specific items from `py.mk` to `extmod.mk` and explicitly includes `extmod.mk` in ports that use it. Signed-off-by: David Lechner <david@pybricks.com>
2022-06-17docs: Update to use new WLAN argument names for ssid/security/key.iabdalkader
Addresses issue #8083.
2022-06-17zephyr: Upgrade to Zephyr v3.1.0.Maureen Helm
Updates the Zephyr port build instructions and CI to use the latest Zephyr release tag. Tested on frdm_k64f. Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-06-17all: Bump version to 1.19.1.v1.19.1Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-06-16all: Bump version to 1.19.v1.19Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-06-14docs: Update Raspberry Pi URLs from .org to .com.Andrew Scheller
2022-06-10docs/reference/mpyfiles: Update .mpy description to match latest format.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-06-07all: Rename MICROPY_PY_WIZNET5K to MICROPY_PY_NETWORK_WIZNET5K.Damien George
To match MICROPY_PY_NETWORK_CYW43 and MICROPY_PY_NETWORK_NINAW10. Signed-off-by: Damien George <damien@micropython.org>
2022-06-02all: Remove third argument to MP_REGISTER_MODULE.Damien George
It's no longer needed because this macro is now processed after preprocessing the source code via cpp (in the qstr extraction stage), which means unused MP_REGISTER_MODULE's are filtered out by the preprocessor. Signed-off-by: Damien George <damien@micropython.org>
2022-05-27docs/reference/manifest: Add link to details about opt-level for freeze.Andrew Leech
2022-05-27docs/mimxrt: Move the pinout tables to a separate document.robert-hh
This shortens the quickref. Also change the note about the hardware SPI frequeny limits.
2022-05-27docs/mimxrt: Add i.MX RT1015 to general.rst, and a few clarifications.robert-hh
2022-05-24unix: Implement `-X realtime` command-line option on macOS.David Lechner
This adds a new command line option to the unix port `-X realtime` to enable realtime priority on threads. This enables high precision timers for applications that need more accurate timers. Related docs: https://developer.apple.com/library/archive/technotes/tn2169/_index.html Fixes issue #8621. Signed-off-by: David Lechner <david@pybricks.com>
2022-05-23py/dynruntime.mk: Add basic support for armv6m architecture.Damien George
The examples/natmod features0 and features1 examples now build and run on ARMv6-M platforms. More complicated examples are not yet supported because the compiler emits references to built-in functions like __aeabi_uidiv. Signed-off-by: Damien George <damien@micropython.org>
2022-05-18py/parse: Allow all constant objects to be used in "X = const(o)".Damien George
Now that constant tuples are supported in the parser, eg (1, True, "str"), it's a small step to allow anything that is a constant to be used with the pattern: from micropython import const X = const(obj) This commit makes the required changes to allow the following types of constants: from micropython import const _INT = const(123) _FLOAT = const(1.2) _COMPLEX = const(3.4j) _STR = const("str") _BYTES = const(b"bytes") _TUPLE = const((_INT, _STR, _BYTES)) _TUPLE2 = const((None, False, True, ..., (), _TUPLE)) Prior to this, only integers could be used in const(...). Signed-off-by: Damien George <damien@micropython.org>
2022-05-17docs/reference/mpyfiles: Remove docs about mpy flags and qstr win size.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-05-03docs/renesas-ra: Remove unused image files.Takeo Takahashi
Signed-off-by: Takeo Takahashi <takeo.takahashi.xv@renesas.com>
2022-04-29docs: Update files for renesas-ra port.Takeo Takahashi
Signed-off-by: Takeo Takahashi <takeo.takahashi.xv@renesas.com>
2022-04-29docs/renesas-ra: Add renesas-ra docs files.Takeo Takahashi
Signed-off-by: Takeo Takahashi <takeo.takahashi.xv@renesas.com>
2022-04-28py/modsys: Introduce sys.implementation._machine constant.Damien George
This contains a string useful for identifying the underlying machine. This string is kept consistent with the second part of the REPL banner via the new config option MICROPY_BANNER_MACHINE. This makes os.uname() more or less redundant, as all the information in os.uname() is now available in the sys module. Signed-off-by: Damien George <damien@micropython.org>
2022-04-28py/modsys: Rename sys.implementation.mpy to sys.implementation._mpy.Damien George
Per CPython docs, non-standard attributes must begin with an underscore. Signed-off-by: Damien George <damien@micropython.org>
2022-04-22docs/library/network.WLAN: Add "txpower" to list of known WLAN configs.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-04-15docs/reference: Update constrained docs now that tuples can be const.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-04-11docs/differences: Update Python 3.5 diff, with optional listen backlog.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-04-11tools/mpremote: Add option to mount cmd to allow "unsafe" symlinks.Rob Knegjens
Specifying the option `--unsafe-links` (or `-l`) to `mpremote mount` will allow symlinks to be followed in the local directory that point outside of the base directory path. For the unsafe case the `path_check()` method of `PyboardCommand` still checks for a common path but without expanding symlinks. While this check is currently redundant, it makes the purpose of the method clearer for possible future uses or extensions.
2022-04-04docs/reference/mpremote: Add details about mount usage over soft reboot.Andrew Leech
2022-04-04drivers/codec: Add driver for the WM8960 codec.robert-hh
This codec is assembled for the MIMXRT1xxx_DEV boards and available for WM8960 breakout boards as well. The driver itself has been tested as working with the MIMXRT boards and a Sparkfun WM6890 breakout board. It implements the initialization, basic methods and some enhanced methods like 3D, ALC, soft-mute and deemphasis.
2022-04-04docs: Add quickref and docs for mimxrt, including network.LAN docs.robert-hh
2022-04-02docs/library/pyb.CAN: Update CAN docs to match revised API.iabdalkader
2022-03-31py/runtime: Allow multiple *args in a function call.David Lechner
This is a partial implementation of PEP 448 to allow unpacking multiple star args in a function or method call. This is implemented by changing the emitted bytecodes so that both positional args and star args are stored as positional args. A bitmap is added to indicate if an argument at a given position is a positional argument or a star arg. In the generated code, this new bitmap takes the place of the old star arg. It is stored as a small int, so this means only the first N arguments can be star args where N is the number of bits in a small int. The runtime is modified to interpret this new bytecode format while still trying to perform as few memory reallocations as possible. Signed-off-by: David Lechner <david@pybricks.com>
2022-03-30mixmrt/machine_i2s: Add I2S protocol support.MikeTeachman
This commit adds support for machine.I2S on the mimxrt port. The I2S API is consistent with the existing stm32, esp32, and rp2 implementations. I2S features: - controller transmit and controller receive - 16-bit and 32-bit sample sizes - mono and stereo formats - sampling frequencies from 8kHz to 48kHz - 3 modes of operation: - blocking - non-blocking with callback - uasyncio - configurable internal buffer - optional MCK Tested with the following development boards: - MIMXRT1010_EVK, MIMXRT1015_EVK, MIMXRT1020_EVK, MIMXRT1050_EVK - Teensy 4.0, Teensy 4.1 - Olimex RT1010 - Seeed ARCH MIX Tested with the following I2S hardware peripherals: - UDA1334 - GY-SPH0645LM4H - WM8960 codec on board the MIMXRT boards and separate breakout board - INMP441 - PCM5102 - SGTL5000 on the Teensy audio shield Signed-off-by: Mike Teachman <mike.teachman@gmail.com>
2022-03-29docs/library/machine.I2S: Clarify what rate refers to.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-21esp32/modesp32: Add new gpio_deep_sleep_hold function.Jonathan Hogg
Add a new function to control whether held pins will retain their function through deep-sleep. Also document this function and explain how to use this in quickref to retain pin configuration during deep-sleep.
2022-03-21esp32/machine_pin: Add new hold keyword argument and remove PULL_HOLD.Jonathan Hogg
The current pull=Pin.PULL_HOLD argument doesn't make a lot of sense in the context of what it actually does vs what the ESP32 quickref document says it does. This commit removes PULL_HOLD and adds a new hold=True|False keyword argument to Pin()/Pin.init(). Setting this to True will cause the ESP32 to lock the configuration of the pin – including direction, output value, drive strength, pull-up/-down – such that it can't be accidentally changed and will be retained through a watchdog or internal reset. Fixes issue #8283, and see also #8284.
2022-03-21docs/esp32/quickref: Refine deep-sleep power-saving notes.Jonathan Hogg
This attempts to better explain how pull-ups and pull-downs operate in deep-sleep mode.
2022-03-10py/modsys: Add optional mutable attributes sys.ps1/ps2 and use them.Damien George
This allows customising the REPL prompt strings. Signed-off-by: Damien George <damien@micropython.org>
2022-03-10py/modsys: Add optional sys.tracebacklimit attribute.Damien George
With behaviour as per CPython. Signed-off-by: Damien George <damien@micropython.org>
2022-03-07docs/library/machine.Pin: Update to use preferred DRIVE_x constants.Jonathan Hogg
Update documents with new common names for the drive strength constants.