summaryrefslogtreecommitdiff
path: root/docs/library
AgeCommit message (Collapse)Author
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/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-17docs: Update to use new WLAN argument names for ssid/security/key.iabdalkader
Addresses issue #8083.
2022-06-14docs: Update Raspberry Pi URLs from .org to .com.Andrew Scheller
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-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-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-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-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.
2022-03-07docs/library/esp32.rst: Mark esp32.Partition as not taking kw args.Damien George
Fixes issue #8380. Signed-off-by: Damien George <damien@micropython.org>
2022-03-07docs/library/machine.UART.rst: Add details for `invert` parameter.Jan
2022-02-22esp32/esp32_partition: Add support for specifying block_size.Damien George
To support filesystems that use a block size different from the native erase-page size. Signed-off-by: Damien George <damien@micropython.org>
2022-02-09docs/library/uasyncio.rst: Fix description of ThreadSafeFlag.wait.Lars Kellogg-Stedman
When a task waits on a ThreadSafeFlag (and the wait method returns), the flag is immediately reset. This was not clear in the documentation, which appeared to copy the description of the wait method from the Event class. Signed-off-by: Lars Kellogg-Stedman <lars@oddbit.com>
2022-02-09docs/library/machine.Pin.rst: Document defaults for Pin.init.Jos Verlinde
2022-02-09docs/library/pyb.SPI.rst: Document default for prescaler argument.Jos Verlinde
To prevent "non-default argument follows default argument" errors.
2022-02-09docs/library/esp.rst: Document the osdebug function.Jos Verlinde
2022-02-09docs/library/machine.WDT.rst: Use correct case for WDT.feed.Jos Verlinde
2022-02-09docs/library/machine.SPI.rst: Add class constant SoftSPI.MSB and .LSB.Jos Verlinde
2022-02-09docs/library/pyb.DAC.rst: Add DAC class constants.Jos Verlinde
2022-02-09docs/library/pyb.rst: Add pyb.hid_mouse and pyb.hid_keyboard constants.Jos Verlinde
2022-02-09docs/library/pyb.Timer.rst: Add pyb.Timer class constants.Jos Verlinde
2022-02-09docs/library/socket.rst: Document socket as a class.Jos Verlinde
Following CPython: https://bugs.python.org/issue45772
2022-02-09docs: Use the correct * keyword-only notation.Jos Verlinde
2022-02-09docs/library/collections.rst: Use class for deque and OrderedDict.Jos Verlinde
2022-01-27stm32/pin: Change remaining uses of "af" to "alt".Damien George
The keyword "af" has been deprecated for some time and "alt" should be used instead (but "af" still works). Signed-off-by: Damien George <damien@micropython.org>
2022-01-23extmod/modubinascii: Add newline keyword to b2a_base64 function.Christian Decker
This allows encoding things (eg a Basic-Auth header for a request) without slicing the \n from the string, which allocates additional memory. Co-authored-by: David Lechner <david@lechnology.com>
2022-01-21docs/library: Specify additional ADC methods and new ADCBlock class.Damien George
The new ADC methods are: init(), read_uv() and block(). The new ADCBlock class has methods: init() and connect(). See related discussions in #3943, #4213. Signed-off-by: Damien George <damien@micropython.org>
2022-01-21extmod/machine_i2c: Increase default SoftI2C timeout to 50ms.Damien George
Some devices, eg BNO055, can stretch SCL for a long time, so make the default large to accommodate them. 50ms matches the current default for stm32 hardware I2C . Signed-off-by: Damien George <damien@micropython.org>
2022-01-14esp32/machine_bitstream: Reinstate bitstream bit-bang implementation.Damien George
The bit-bang implementation was replaced with the RMT implementation in 599b61c08687ca077e3b0e115d5b76affcc673ca. This commit brings back that bit-bang code, and allows it to be selected via the new static method: esp32.RMT.bitstream_channel(None) The bit-bang implementation may be useful if the RMT needs to be used for something else, or if bit-banging is more stable in certain applications. Signed-off-by: Damien George <damien@micropython.org>
2021-12-18docs/library/sys.rst: Add note about '.frozen' as an entry in sys.path.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-12-15docs: Remove trailing spaces and convert tabs to spaces.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-12-03esp32/machine_pwm: Implement duty_u16() and duty_ns() PWM methods.IhorNehrutsa
The methods duty_u16() and duty_ns() are implemented to match the existing docs. The duty will remain the same when the frequency is changed. Standard ESP32 as well as S2, S3 and C3 are supported. Thanks to @kdschlosser for the fix for rounding in resolution calculation. Documentation is updated and examples expanded for esp32, including the quickref and tutorial. Additional notes are added to the machine.PWM docs regarding limitations of hardware PWM.
2021-12-01extmod/modbluetooth: Support gap_connect(None) to cancel a connection.Jonathan Hogg
Allow cancellation of in-progress peripheral connections.
2021-11-30docs/library/machine.Pin.rst: Add Pin.ANALOG mode constant.Scott Armitage
2021-11-30docs/library/machine.Timer.rst: Document `period` and `callback` args.Michael Buesch
Signed-off-by: Michael Buesch <m@bues.ch>
2021-11-30docs/library/machine.SPI.rst: Add example SPI usage.Michael Buesch
Signed-off-by: Michael Buesch <m@bues.ch>
2021-11-30docs/library/machine.Timer.rst: Document 'id' as positional-only arg.Michael Buesch
Signed-off-by: Michael Buesch <m@bues.ch>
2021-11-30docs/library/uasyncio.rst: Detail exception behaviour in cancel/timeout.Peter Hinch
2021-11-19docs/library/sys.rst: Add docs for sys.settrace.NitiKaur