summaryrefslogtreecommitdiff
path: root/docs/library
AgeCommit message (Collapse)Author
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
2021-11-19docs/library/rp2.rst: Update function asm_pio_encode to add sideset_opt.oli
2021-11-17docs/library/framebuf.rst: Adjust dimensions in example.Sebastian Wicki
This commit swaps the dimensions of the `framebuffer.FrameBuffer` in the docs example from 10x100 to 100x10 pixels to avoid clipping. This is done to better fit the subsequent example code, which writes text of size 96x8 followed by a 96x1 horizontal line. The y coordinate of the horizontal line is also adjusted such that it is drawn inside of the new canvas bounds.
2021-10-26extmod/modbluetooth: Add connection interval to gap_connect.Jim Mussared
This forwards through directly to the NimBLE and BTStack connect functions. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-10-14docs/library/stm.rst: Document the stm module.NitiKaur
2021-10-13docs/library/random.rst: Document the random module.NitiKaur
2021-10-13docs/rp2: Add reference for PIO assembly instructions, and PIO tutorial.NitiKaur
2021-09-13docs/library/machine.I2S.rst: Specify that I2S.shift args are kw-only.Peter Hinch
2021-09-10docs/library/bluetooth.rst: Update incorrect link to gatts_write.Matt Trentini
2021-09-10docs/library/os.rst: Clarify littlefs requirements for block erase.Peter Hinch
2021-08-30docs/library: Fix usage of :term: for frozen module reference.Fernando
Signed-off-by: Fernando <fepegar@gmail.com>
2021-08-25extmod/modframebuf: Enable blit between different formats via a palette.Peter Hinch
This achieves a substantial performance improvement when rendering glyphs to color displays, the benefit increasing proportional to the number of pixels in the glyph.
2021-08-19docs: Add docs for machine.bitstream and neopixel module.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-08-17docs/library/network.rst: Simplify socket import.Jim Mussared
Replace `import socket as socket` with `import socket`. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-08-17docs/library/builtins.rst: Add module title.Jim Mussared
This fixes the rendering on library/index.rst. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-08-14extmod/modbluetooth: Add send_update arg to gatts_write.Jim Mussared
This allows the write to trigger a notification or indication, but only to subscribed clients. This is different to gatts_notify/gatts_indicate, which will unconditionally notify/indicate. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-08-13docs/library/index.rst: Clarify module naming and purpose.Jim Mussared
Adds section about extending built-in modules from Python. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-08-13docs: Replace ufoo with foo in all docs.Jim Mussared
Anywhere a module is mentioned, use its "non-u" name for consistency. The "import module" vs "import umodule" is something of a FAQ, and this commit intends to help clear that up. As a first approximation MicroPython is Python, and so imports should work the same as Python and use the same name, to a first approximation. The u-version of a module is a detail that can be learned later on, when the user wants to understand more and have finer control over importing. Existing Python code should just work, as much as it is possible to do that within the constraints of embedded systems, and the MicroPython documentation should match the idiomatic way to write Python code. With universal weak links for modules (via MICROPY_MODULE_WEAK_LINKS) users can consistently use "import foo" across all ports (with the exception of the minimal ports). And the ability to override/extend via "foo.py" continues to work well. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-08-13docs: Rename ufoo.rst to foo.rst.Jim Mussared
This is a simple rename of the files, no content changes (other than updating index.rst to use the new paths) Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-08-13docs/library/zephyr: Add libraries specific to the Zephyr port.Julia Hathaway
Includes documentation for Zephyr specific modules (zephyr and zsensor), classes (DiskAccess and FlashArea), and functions. Signed-off-by: Julia Hathaway <julia.hathaway@nxp.com>
2021-08-07docs/library/machine.I2S.rst: Fix use of sd pin in examples.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-08-07extmod/modujson: Add support for dump/dumps separators keyword-argument.Peter Züger
Optionally enabled via MICROPY_PY_UJSON_SEPARATORS. Enabled by default. For dump, make sure mp_get_stream_raise is called after mod_ujson_separators since CPython does it in this order (if both separators and stream are invalid, separators will raise an exception first). Add separators argument in the docs as well. Signed-off-by: Peter Züger <zueger.peter@icloud.com> Signed-off-by: Damien George <damien@micropython.org>
2021-08-07esp8266,esp32: Include hidden networks in WLAN.scan results.Damien George
Addresses issues #2697 and #5329. Signed-off-by: Damien George <damien@micropython.org>
2021-08-04esp32/machine_uart: Add flow kw-arg to enable hardware flow control.Will Sowerbutts
This enables optional support for the hardware UART to use the RTS and/or CTS pins for flow control. The new "flow" constructor keyword specifies a bitmask of RTS and/or CTS. This matches the interface used by machine.UART on stm32 and rp2. Previously on ESP32 it was possible to specify which pins to use for the RTS and CTS signals, but hardware flow control was never functional: CTS was not checked before transmitting bytes, and RTS was always driven high (signalling no buffer space available). With this patch, CTS and RTS both operate as expected. This also includes an update to the machine.UART documentation. Signed-off-by: Will Sowerbutts <will@sowerbutts.com>
2021-07-22docs/library/uasyncio.rst: Document stream readexactly() method.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-07-22docs/library/utime.rst: Clarify behaviour and precision of sleep ms/us.Damien George
This description is based on the existing bare-metal ports implementations. Signed-off-by: Damien George <damien@micropython.org>
2021-07-18docs: Replace master/slave with controller/peripheral in I2C and SPI.David P
See https://www.oshwa.org/a-resolution-to-redefine-spi-signal-names
2021-07-06docs/library: Warn that ustruct doesn't handle spaces in format strings.Tom McDermott
And also add a test to capture the CPython difference.
2021-07-05esp32,stm32: Add new machine.I2S class for I2S protocol support.Mike Teachman
This commit adds I2S protocol support for the esp32 and stm32 ports, via a new machine.I2S class. It builds on the stm32 work of blmorris, #1361. Features include: - a consistent I2S API across the esp32 and stm32 ports - I2S configurations supported: - master transmit and master receive - 16-bit and 32-bit sample sizes - mono and stereo formats - sampling frequency - 3 modes of operation: - blocking - non-blocking with callback - uasyncio - internal ring buffer size can be tuned - documentation for Pyboards and esp32-based boards - tested on the following development boards: - Pyboard D SF2W - Pyboard V1.1 - ESP32 with SPIRAM - ESP32 Signed-off-by: Mike Teachman <mike.teachman@gmail.com>
2021-07-01docs/library: Document new esp32.RMT features and fix wait_done.Jonathan Hogg
Add new API for specifying the idle level and TX carrier output level, and new write_pulses modes of operation. Also fix wait_done documentation which was inverted and wrong about timing.
2021-06-23stm32/usb: Make irq's default trigger enable all events.Damien George
Following how other .irq() methods work on other objects. Signed-off-by: Damien George <damien@micropython.org>
2021-06-17docs/esp32: Document WLAN "reconnects" config option.Thomas Wenrich
2021-06-15extmod/uasyncio: Add readinto() method to Stream class.Mike Teachman
With docs and a multi-test using TCP server/client. This method is a MicroPython extension, although there is discussion of adding it to CPython: https://bugs.python.org/issue41305 Signed-off-by: Mike Teachman <mike.teachman@gmail.com>
2021-06-12docs/library/machine.RTC.rst: Document datetime method and fix ex code.Peter Hinch
This is the minimum change to fix the example code so it actually runs on the majority of ports.
2021-06-10stm32/usb: Add USB_VCP.irq method, to set a callback on USB data RX.Damien George
Usage: usb = pyb.USB_VCP() usb.irq(lambda u:print(u, u.read()), usb.IRQ_RX) Signed-off-by: Damien George <damien@micropython.org>
2021-05-20all: Replace busses with buses.Mike Causer
"buses" is the widely accepted plural form of "bus".
2021-05-20docs/library/pyb.Pin.rst: Update the arguments for Pin.init().Andrew Leech
Add details for Pin.init() value and alt arguments.
2021-05-18docs/library: Add a blank line to fix formatting for ussl docs.Brett Cannon
2021-05-18docs/library: Clarify what type of algorithm is implemented in heapq.Brett Cannon
2021-05-12docs/library/rp2.rst: Fix typo overriden->overridden.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-05-08docs/library: Add initial API reference for rp2 module and its classes.Tim Radvan
All the method signatures from rp2_pio.c and friends have been taken and converted to RST format, then explanatory notes added for each signature. Signed-off-by: Tim Radvan <tim@tjvr.org>