summaryrefslogtreecommitdiff
path: root/docs
AgeCommit message (Collapse)Author
2023-08-23stm32/subghz: Add STM32WL55 subghz radio interface to stm module.Angus Gratton
This is the minimum C interface to allow a modem driver to be built in Python. Interface is simple, with the intention that the micropython-lib driver is the main (only) consumer of it. Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-08-15esp32: Enable automatic Python heap growth.Angus Gratton
Via MICROPY_GC_SPLIT_HEAP_AUTO feature flag added in previous commit. Tested on ESP32 GENERIC_SPIRAM and GENERIC_S3 configurations, with some worst-case allocation patterns and the standard test suite. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-08-05docs/develop/gettingstarted: Update ARM package list.Elecia White
Signed-off-by: Elecia White <elecia@logicalelegance.com>
2023-08-04docs/develop/gettingstarted: Clarify submodule initialization.Rene Straub
When building for a specific board this must be specified in make submodules. I.e. make BOARD=STM32F769DISC submodules. Signed-off-by: Rene Straub <rene@see5.ch>
2023-07-21docs/library/deflate: Add docs for deflate.DeflateIO.Jim Mussared
Also update zlib & gzip docs to describe the micropython-lib modules. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-07-13docs/esp32/quickref: Add LAN example for WT32-ETH01 version 1.4.Elvis Pfutzenreuter
This board requires slightly different configuration to work. It is important to hard reset (cycle power) if you try to initialize LAN and it fails, before trying again with new parameters. Discussion: https://github.com/orgs/micropython/discussions/11446 AliExpress purchase link: https://pt.aliexpress.com/item/1005002023196214.html Signed-off-by: Elvis Pfutzenreuter <epxx@epxx.co>
2023-06-26docs/library/ssl: Add documentation for SSLContext.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-06-23docs/esp32: Update esp32 docs based on IDF v5 changes.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-06-19docs: Rename uasyncio to asyncio.Jim Mussared
This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-08docs/library/index: Update docs after umodule rename.Jim Mussared
- Update guide for extending built-in modules. - Remove any last trace of umodule in other docs. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-08all: Rename UMODULE to MODULE in preprocessor/Makefile vars.Jim Mussared
This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-08py/builtinimport: Remove weak links.Jim Mussared
In order to keep "import umodule" working, the existing mechanism is replaced with a simple fallback to drop the "u". This makes importing of built-ins no longer touch the filesystem, which makes a typical built-in import take ~0.15ms rather than 3-5ms. (Weak links were added in c14a81662c1df812c0c6b4299f97966302f16477) This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-06samd/boards: Rename flash pins consistently for QSPI and SPI.robert-hh
For SAMD21 devices, the board flash signals must be named in pins.csv as FLASH_MOSI, FLASH_MISO, FLASH_SCK, FLASH_CS for creating the SPI object. And rename the QSPI pins to QSPI_xxxx instead of FLASH_xxx. Signed-off-by: robert-hh <robert@hammelrath.com>
2023-06-02docs/reference/mpremote.rst: Extend the mpremote guide.Jim Mussared
Changes in this commit: - Add a extra detail to each of the commands. - Add more about handling options and arguments. - Include shortcut commands that behave like real commands to the command list (e.g. bootloader, rtc). - Add extra information and reword to address common misconceptions, in particular how commands chain together. - Add additional examples showing some more interesting combinations. - Add descriptions to each of the examples. - Add pipx installation instructions. - Describe how user-configuration works. This work was sponsored by Google Season of Docs. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-02docs/reference/packages: Add GitHub repo to package example dependency.Jonas Scharpf
Signed-off-by: Jonas Scharpf <jonas@brainelectronics.de>
2023-06-01docs/library/index: Update built-in extension docs.Jim Mussared
- Make the docs match the new behavior which only allows certain modules to be extended. - List the modules that currently have the u-prefix. - Add a note about the sys.path method for forcing a built-in import. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-01docs/samd: Add the pin-out for the Adafruit Metro M4 Airlift board.robert-hh
Signed-off-by: robert-hh <robert@hammelrath.com>
2023-06-01docs/mimxrt: Add the pin-out for the Adafruit Metro M7 board.robert-hh
Signed-off-by: robert-hh <robert@hammelrath.com>
2023-05-23docs/reference/speed_python: Remove 4-arg limit for viper.Jim Mussared
This limit was removed in a676b5acf6ee9c17926cf9786370d30a077d99c0. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-05-23samd/machine_uart: Add support for UART hardware flow control.robert-hh
By specifying rts=pin(x) and/or cts=Pin(x) in the constructor. The pad numbers for the UART pins are fix in this case: TX must be at pad 0, RX at pad 1, RTS at pad 2 and CTS at pad 3. repr(uart) shows the pin names for rts and cts, if set. In case of a RX overflow, the rx interrupt will be disabled instead of just discarding the data. That allows RTS to act. If RTS is inactive, still 2 bytes can be buffered in the FIFO. Signed-off-by: robert-hh <robert@hammelrath.com>
2023-05-22tools/mpremote: Add repl option to escape non-printable characters.Damien George
This commit adds the "--escape-non-printable" option to the repl command. When specified the REPL console will escape non-printable characters, printing them as their hex value in square brackets. This escaping behaviour was previously the default and only behaviour, but it is now opt-in. As part of this change, the speed of echoing device data to the console is improved by by reading and writing in chunks. Signed-off-by: Damien George <damien@micropython.org>
2023-05-19esp32/esp32_ulp: Enable FSM ULP for S2 and S3 chips.patrick
This commit enables the ULP for the S2 and S3 chips. Note this is the FSM (Finite State Machine) ULP. Signed-off-by: Patrick Joy <patrick@joytech.com.au>
2023-05-19docs/develop/porting: Add missing code to example main.c and Makefile.marble
These two missing lines caused the build process to fail when implementing the tutorial example port. Signed-off-by: marble <git@computer-in.love>
2023-05-19docs/library/espnow: Update espnow docs for WLAN.config(pm=x) options.glenn20
Update docs/library/espnow.rst to add: - guidance on using WLAN.config(pm=WLAN.PM_NONE) for reliable espnow performance while also connected to a wifi access point; - guidance on receiving encrypted messages; - correction for default value of "encrypt" parameter (add_peer()); - guidance on use of ESPNow.irq(): recommand users readout all messages in the buffer each time the callback is called. Signed-off-by: Glenn Moloney <glenn.moloney@gmail.com>
2023-05-18rp2: Make rp2_state_machine_exec accept integers.Adam Green
Currently rp2.StateMachine.exec(instr_in) requires that the instr_in parameter be a string representing the PIO assembly language instruction to be encoded by rp2.asm_pio_encode(). This commit allows the parameter to also be of integral type. This is useful if the exec() method is being called often where the use of pre-encoded machine code is desireable. This commit still supports calls like: sm.exec("set(0, 1)") It also now supports calls like: # Performed once earlier, maybe in __init__() assembled_instr = rp2.asm_pio_encode("out(y, 8)", 0) # Performed multiple times later as the PIO state machine is # configured for its next run. sm.exec(assembled_instr) The existing examples/rp2/pio_exec.py and examples/rp2/pio_pwm.py that exercise the rp2.StateMachine.exec() method still work with this change. Signed-off-by: Adam Green <adamgrym@yahoo.com>
2023-05-11docs/reference/mpyfiles: Add release info on v6.1.David Lechner
This documents when MPY v6.1 was released. Also add some clarification on how the version is encoded in the header. Signed-off-by: David Lechner <david@pybricks.com>
2023-05-06esp32,esp8266: Add support to set/get power saving mode of WLAN.glenn20
For esp32 and esp8266 this commit adds: - a 'pm' option to WLAN.config() to set/get the wifi power saving mode; and - PM_NONE, PM_PERFORMANCE and PM_POWERSAVE constants to the WLAN class. This API should be general enough to use with all WLAN drivers. Documentation is also added.
2023-05-04docs/samd: Make use of pin names more consistent in examples.robert-hh
This keeps up with the changed Pin naming scheme.
2023-05-04rp2/machine_pwm: Add support for inverting a PWM channel output.robert-hh
Using the invert=True|False keyword option with the constructor or init().
2023-05-04docs: Update the PWM examples based on recent API improvements.robert-hh
This adds the freq and duty_u16 keyword settings to the constructor, and sometimes other details in the PWM section. For mimxrt a clarification regarding the PWM invert argument was added, and for rp2 a few words were spent on PWM output pairs of a channel/slice.
2023-05-04samd/machine_pwm: Add init() method to PWM and simplify the PWM code.robert-hh
The PWM.init() method has been added. Calling init() without arguments restarts a PWM channel stopped with deinit(). Otherwise single parameters except for "device=n" can be changed again. The device can only be specified once, either in the constructor or the first init() call. Also simplify get_pwm_config() and get_adc_config(), and shrink the PWM object.
2023-05-02all: Fix strings with backslash by using raw string literals.Christian Clauss
2023-05-01esp32,esp8266: Add support for the Espressif ESP-NOW protocol.Glenn Moloney
ESP-NOW is a proprietary wireless communication protocol which supports connectionless communication between ESP32 and ESP8266 devices, using vendor specific WiFi frames. This commit adds support for this protocol through a new `espnow` module. This commit builds on original work done by @nickzoic, @shawwwn and with contributions from @zoland. Features include: - Use of (extended) ring buffers in py/ringbuf.[ch] for robust IO. - Signal strength (RSSI) monitoring. - Core support in `_espnow` C module, extended by `espnow.py` module. - Asyncio support via `aioespnow.py` module (separate to this commit). - Docs provided at `docs/library/espnow.rst`. Methods available in espnow.ESPNow class are: - active(True/False) - config(): set rx buffer size, read timeout and tx rate - recv()/irecv()/recvinto() to read incoming messages from peers - send() to send messages to peer devices - any() to test if a message is ready to read - irq() to set callback for received messages - stats() returns transfer stats: (tx_pkts, tx_pkt_responses, tx_failures, rx_pkts, lost_rx_pkts) - add_peer(mac, ...) registers a peer before sending messages - get_peer(mac) returns peer info: (mac, lmk, channel, ifidx, encrypt) - mod_peer(mac, ...) changes peer info parameters - get_peers() returns all peer info tuples - peers_table supports RSSI signal monitoring for received messages: {peer1: [rssi, time_ms], peer2: [rssi, time_ms], ...} ESP8266 is a pared down version of the ESP32 ESPNow support due to code size restrictions and differences in the low-level API. See docs for details. Also included is a test suite in tests/multi_espnow. This tests basic espnow data transfer, multiple transfers, various message sizes, encrypted messages (pmk and lmk), and asyncio support. Initial work is from https://github.com/micropython/micropython/pull/4115. Initial import of code is from: https://github.com/nickzoic/micropython/tree/espnow-4115.
2023-05-01docs/reference: Remove double 'are' in glossary.algonell
2023-04-27all: Fix spelling mistakes based on codespell check.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-04-27renesas-ra: Change MICROPY_HW_BOARD_NAME definition to product name.Takeo Takahashi
Changes in this commit: - Change MICROPY_HW_BOARD_NAME definition to match the product name. - Rename board folder's name to match the product name style. - Change related files like Makefile, document descriptions, test cases, CI and tools. Signed-off-by: Takeo Takahashi <takeo.takahashi.xv@renesas.com>
2023-04-26LICENSE,docs: Update copyright year range to include 2023.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-04-26extmod/btstack: Include value handle in client read/write events.Jim Mussared
This replaces the previous pending operation queue (that used to also be shared with pending server notify/indicate ops) with a single pending operation per connection. This allows the value handle to be correctly passed to the Python-level events. Also re-structure GATT client event handling to simplify the packet handler functions. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-26extmod/modbluetooth: Merge gatts_notify/indicate implementation.Jim Mussared
Makes gatts_notify and gatts_indicate work in the same way: by default they send the DB value, but you can manually override the payload. In other words, makes gatts_indicate work the same as gatts_notify. Note: This removes support for queuing notifications and indications on btstack when the ACL buffer is full. This functionality will be reimplemented in a future commit. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-21rp2/machine_i2c: Add timeout parameter for machine.I2C().David (Pololu)
This commit adds support for the `timeout` keyword argument to machine.I2C on the rp2 port, following how it's done on other ports. The main motivation here is avoid the interpreter crashing due to infinite loops when SDA is stuck low, which is quite common if the board gets reset while reading from an I2C device. A default timeout of 50ms is chosen because it's consistent with: - Commit a707fe50b085ec83722106609f6fd219faf9f030 which used a timeout of 50,000us for zero-length writes on the rp2 port. - The machine.SoftI2C class which uses 50,000us as the default timeout. - The stm32 port's hardware I2C, which uses 50,000us for I2C_POLL_DEFAULT_TIMEOUT_US. This commit also fixes the default timeout on the esp32 port to be consistent with the above, and updates the documentation for machine.I2C to document this keyword argument.
2023-03-09rp2/modrp2: Disable other core, shorten delay to 8us in bootsel_button.David Grayson
This function seems to work fine in multi-core applications now. The delay is now in units of microseconds instead of depending on the clock speed, and is adjustable by board configuration headers. Also added documentation.
2023-03-01docs/library/network: Update docs for network.country, network.hostname.Jim Mussared
Also marks wlan.config(hostname) as deprecated. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-02-21samd/mcu: Implement a hardware seed for the SAMD21 random module.robert-hh
By using the phase jitter between the DFLL48M clock and the FDPLL96M clock. Even if both use the same reference source, they have a different jitter. SysTick is driven by FDPLL96M, the us counter by DFLL48M. As a random source, the us counter is read out on every SysTick and the value is used to accumulate a simple multiply, add and xor register. According to tests it creates about 30 bit random bit-flips per second. That mechanism will pass quite a few RNG tests, has a suitable frequency distribution and serves better than just the time after boot to seed the PRNG.
2023-01-19docs/zephyr/quickref: Fix zsensor module usage examples.enriquezgarc
Signed-off-by: enriquezgarc <enriquezgarcia.external@infineon.com>
2023-01-19docs/reference/constrained: Add missing heap-dump symbols to mem_info().Chris Overgaauw
2023-01-19docs/library/machine.Timer: Add freq argument to machine.Timer.LiaoJingyi_winY7kp
Based on and tested on the rp2 port. Signed-off-by: Liao Jingyi <liaojingyi2@gmail> Signed-off-by: Damien George <damien@micropython.org>
2023-01-18docs/esp32/quickref: Add docs for the LAN interface constructor.robert-hh
Incorporating PR #7356.
2023-01-13docs/library/socket: Use correct sockaddr variable name.Dorukyum
Signed-off-by: Dorukyum <doruk.ak@hotmail.com>
2023-01-12docs/library/rp2.StateMachine: Expand put() documentation.Paul Warren
Document that put() can also accept arrays/bytearrays as values. Fixes issue #10465. Signed-off-by: Paul Warren <pdw@ex-parrot.com>
2023-01-12docs/rp2: Make LED have exactly 50% duty cycle in PIO 1Hz example.Stig Bjørlykke
This ensures the same number of cycles are used for LED on and LED off in the PIO 1Hz example. It's also possible to swap the first set() and the irq() to avoid using an extra instruction, but this tutorial is a good example of how to calculate the cycles. Signed-off-by: Stig Bjørlykke <stig@bjorlykke.org>