Skip to content

Feature/optional i2c bus #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 110 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
70b95d8
samd/machine_dac: Fix SAMD51 DAC for two channels.
graeme-winter Mar 23, 2023
c69f0e4
samd/samd_qspiflash: Correct QSPI baud calculation.
ziceva Oct 19, 2023
865a4c8
esp32: Add support for IDF v5.4.
IhorNehrutsa Jan 21, 2025
a4ab847
py/persistentcode: Initialize prelude_ptr to prevent compiler warning.
IhorNehrutsa Jan 21, 2025
7b3f189
tests/basics/nanbox_smallint.py: Fix incorrect use of int() in test.
jepler Feb 9, 2024
13b13d1
py/parsenum: Throw an exception for invalid int literals like "01".
jepler Jan 4, 2024
bfc0d7b
py/emitnative: Optimise Viper register offset load/stores on Xtensa.
agatti Jan 23, 2025
40585ea
py/emitnative: Emit shorter exception handler entry code on RV32.
agatti Jan 23, 2025
55ca3fd
py/emitnative: Optimise Viper immediate offset load/stores on Xtensa.
agatti Jan 24, 2025
0d46e45
tools/mpremote: Avoid initial blocking read in read_until().
hmaerki Jan 26, 2025
03fe9c5
tools/mpremote: Introduce timeout_overall for read_until().
hmaerki Jan 27, 2025
f29bd5a
extmod/modlwip: Fix incorrect peer address for IPv6.
greezybacon Jan 19, 2025
ec527a1
esp32: Disable component manager when running 'make submodules'.
projectgus Jan 14, 2025
43e3ab6
esp32: Don't add TinyUSB files to an ECHO_SUBMODULES build.
projectgus Jan 14, 2025
22353e9
py/mkrules: Add GIT_SUBMODULES_FAIL_IF_EMPTY flag for CMake ports.
projectgus Jan 14, 2025
abb13b1
extmod/lwip-include: Factor common lwIP config into lwipopts_common.h.
dpgeorge Jan 25, 2025
bfb1bee
py/parsenumbase: Favor clarity of code over manual optimisation.
jepler Jan 27, 2025
195bf05
tests: Add a test for SSL socket memory leaks.
projectgus Oct 15, 2024
97f444b
extmod/mbedtls: Try GC before failing to setup socket on esp32, unix.
projectgus Jan 28, 2025
d642cce
unix: Use the bare metal mbedTLS config in the coverage buiid.
projectgus Oct 16, 2024
8a2ff2c
py/gc: Split out running finalizers to a separate pass.
projectgus Dec 3, 2024
40e1c11
py/gc: Allow gc_free from inside a gc_sweep finalizer.
projectgus Dec 3, 2024
4bcbe88
py: Add optional support for recursive mutexes, use for gc mutex.
projectgus Dec 10, 2024
3bfedd0
rp2: Migrate to the new mp_thread_recursive_mutex_t.
projectgus Dec 10, 2024
fd0e529
unix: Add recursive mutex support.
projectgus Jan 9, 2025
990f50f
py/gc: Reorder static functions for clarity.
projectgus Jan 28, 2025
112f657
stm32/eth: Make ETH DMA buffer attributes configurable.
kwagyeman Jan 24, 2025
55ae597
rp2/modmachine: Make lightsleep preserve SLEEP_EN0 and SLEEP_EN1.
cpottle9 Dec 29, 2024
81ab49a
tests/ports/rp2: Add test for SLEEP_ENx registers over lightsleep.
dpgeorge Jan 23, 2025
3699cf5
rp2/rp2_flash: Workaround multicore lockout not being reset.
MichaelBell Jan 21, 2025
4bed77c
esp8266/network_wlan: Make WLAN.config('channel') use wifi_get_channel.
glenn20 May 19, 2023
b1e6c2b
esp8266/network_wlan: Make WLAN.config(channel=x) use wifi_set_channel.
glenn20 Jun 26, 2023
921f19f
tests/multi_wlan: Remove esp8266 port workaround.
projectgus Feb 4, 2025
71e8b27
esp32/README: Fix board in octal-SPIRAM example make command.
eggfly Dec 23, 2024
b603fa3
py/mkrules.mk: Reset USER_C_MODULES when building mpy-cross dependency.
pi-anl Feb 3, 2025
dfd1d69
tests/run-natmodtests.py: Autodetect the test target architecture.
agatti Jan 24, 2025
ca3090a
qemu/Makefile: Fix shell interpolation for automated natmod tests.
agatti Jan 24, 2025
f594c6f
tools/ci.sh: Add natmod tests for QEMU/Arm.
agatti Jan 24, 2025
e37d498
py/emitnative: Mark condition code tables as const.
agatti Feb 3, 2025
44a7731
py/emitnative: Load and store words just once for Viper code.
agatti Feb 3, 2025
3044675
samd/boards: Add generic SAMD21x18 board definitions.
robert-hh Jan 23, 2025
9ced693
samd/boards: Add generic SAMD51x19 board definitions.
robert-hh Jan 23, 2025
6b2e359
samd/boards: Add generic SAMD51x20 board definitions.
robert-hh Jan 23, 2025
ff9c6da
samd/Makefile: Add support for board variants.
robert-hh Jan 23, 2025
6cbe145
samd/boards: Add support for the Adafruit QT Py board.
robert-hh Jan 23, 2025
36a0a83
samd/boards: Add support for the Adafruit NeoKey Trinkey board.
robert-hh Jan 23, 2025
a84143d
docs/samd/pinout: Add pinout for Adafruit NeoKey Trinkey and QT Py.
robert-hh Jan 23, 2025
e44a2c6
docs/samd/pinout: Add pinout for the Generic SAMD board types.
robert-hh Jan 23, 2025
e176fea
mimxrt/irq: Add CSI IRQ.
iabdalkader Jan 25, 2025
67ebc53
mimxrt/machine_rtc: Fix build with new SDKs.
iabdalkader Jan 25, 2025
d76733d
mimxrt/mpconfigport: Remove hard-coded CMSIS header.
iabdalkader Jan 25, 2025
9d0a5ac
esp32/boards: Enable I2S on ESP32C3 boards.
StrayCatNZ Jan 2, 2025
0662c55
rp2/rp2_pio: Add side_pindir support for PIO.
magy00 Dec 31, 2024
b2ce9b6
rp2/boards: Add SparkFun IoT Node LoRaWAN board.
sfe-SparkFro Dec 4, 2024
e574f68
mimxrt: Add support for a UF2 bootloader.
robert-hh Oct 3, 2024
b251aec
mimxrt/hal: Update the LUT and re-enable PAGEPROGRAM_QUAD.
robert-hh Oct 5, 2024
2a80d5c
mimxrt/flash: Swap the order of disabling IRQ and disabling the cache.
robert-hh Jan 26, 2025
9eb9451
mimxrt/boards: Update the deploy instructions for the UF2 bootloader.
robert-hh Oct 7, 2024
d40849d
mimxrt/boards: Add flash configuration constants to mpconfigboard.mk.
robert-hh Feb 3, 2025
0a433a0
mimxrt/hal: Set the flexspi flash CLK frequency on boot.
robert-hh Feb 4, 2025
2f646f9
mimxrt: Add optional MSC support.
iabdalkader Nov 29, 2024
cb41750
mimxrt/boards: Reduce stack size for 1011 and 1015 MCUs.
iabdalkader Feb 7, 2025
752c167
tools/ci.sh: Build MIMXRT1060_EVK with MSC enabled as part of mimxrt CI.
iabdalkader Feb 7, 2025
11c9656
tools/mpremote: Support mip install from package.json on local fs.
glenn20 Sep 19, 2023
b11ba39
rp2/modules: Fix memory leak and logic bug in handling of _pio_funcs.
nludban Jan 25, 2025
12dd9cb
docs/esp32: Add documentation for SPI Ethernet devices on esp32 port.
projectgus Jan 29, 2025
bab0998
docs: Note which ports have default or optional network.PPP support.
projectgus Jan 28, 2025
0a55f1f
docs/reference: Add strings vs bytes to speed optimisation tips.
projectgus Feb 4, 2025
3b62524
docs/library/espnow: Clarify usage of the "rate" configuration key.
agatti Feb 10, 2025
372ecfe
tests/run-tests.py: Give more information when CPython crashes.
dpgeorge Jan 20, 2025
62e821c
py/objcode: Factor code object out into its own file.
dpgeorge Jan 19, 2025
ceb8ba6
py/objfun: Implement function.__code__ and function constructor.
dpgeorge Jan 20, 2025
a11ba77
py/persistentcode: Add mp_raw_code_save_fun_to_bytes.
dpgeorge Jul 17, 2024
c3a18d7
extmod/modmarshal: Add new marshal module.
dpgeorge Jan 20, 2025
e40a3fd
docs/library/marshal: Document the marshal module.
dpgeorge Jan 22, 2025
30acb16
extmod/vfs_rom: Remove ability to create VfsRom from an address.
dpgeorge Jan 3, 2025
1a67d72
tools/pyboard.py: Make get_time use machine.RTC instead of pyb.RTC.
rufusclark Aug 5, 2024
b675c87
esp32/machine_sdcard: Fix invalid result of SDCard.read/writeblocks.
projectgus Feb 5, 2025
842e361
renesas-ra/Makefile: Remove id_code section from binary file generation.
iabdalkader Dec 11, 2024
aef6705
extmod/lwip-include: Increase number of lwIP timers when mDNS enabled.
tpwrules Jan 22, 2025
321b30c
extmod/modtls_mbedtls: Wire in support for DTLS.
keenanjohnson Feb 13, 2025
8987b39
tests/multi_net: Add test for DTLS server and client.
dpgeorge Feb 13, 2025
71df9d0
rp2: Fix build failure if threads are disabled.
projectgus Feb 11, 2025
516709b
py/mkrules.cmake: Support passing CFLAGS_EXTRA in environment variable.
projectgus Feb 11, 2025
1034b17
tools/ci.sh: Build the W5100S_EVB_PICO board with no threads.
projectgus Feb 11, 2025
6425c9e
esp32: Remove unneeded "memory.h" header file.
agatti Feb 13, 2025
1e3cce1
mimxrt/boards/ADAFRUIT_METRO_M7: Reduce flash freq to 100MHz.
robert-hh Feb 20, 2025
4364d94
mimxrt/hal/flexspi_nor_flash: Fix typo in comment about frequency.
robert-hh Feb 20, 2025
2992e34
tools/mpremote: Add support for relative urls in package.json files.
glenn20 Sep 19, 2023
7e9d19e
github/workflows: Stop using ubuntu-20.04.
dpgeorge Feb 12, 2025
8b1ed44
github/workflows: Include the Python version in the ESP-IDF cache key.
projectgus Feb 12, 2025
5e206fd
all: Upgrade codespell to v2.4.1.
cclauss Feb 18, 2025
3f0dd13
docs: Fix double 'the' in documentation.
rxwb Feb 24, 2025
dc2fcfc
all: Upgrade to ruff v0.9.6.
cclauss Feb 18, 2025
8ce7a58
tests: Four typos in tests directory.
cclauss Feb 25, 2025
731f7ad
stm32/sdcard: Fix unchecked uint32_t overflow in SD card driver.
projectgus Feb 18, 2025
78728dc
stm32/sdcard: Drop the pyb.SDCard timeout from 60 to 30 seconds.
projectgus Feb 18, 2025
e3101ce
qemu/boards/SABRELITE: Increase MicroPython heap to 160k.
dpgeorge Feb 25, 2025
14ba32b
extmod/vfs_rom: Add bounds checking for all filesystem accesses.
dpgeorge Feb 24, 2025
dc2c33b
py/emitinlinerv32: Fix compilation with ESP-IDF v5.2 and later.
agatti Jan 4, 2025
8633abc
py/emitinlinerv32: Reduce the footprint of compiled code.
agatti Jan 4, 2025
50fab08
py/emitinlinextensa: Simplify register name lookup.
agatti Jan 28, 2025
5fdd249
py/parsenum: Reduce code footprint of mp_parse_num_float.
yoctopuce Jan 30, 2025
86526e9
tools/mpremote: Optimise readline support in mount.
pi-anl Feb 26, 2025
71c7c03
tools/mpremote/tests: Add test for RemoteFile.readline.
dpgeorge Feb 26, 2025
13b0237
lib/pico-sdk: Update to version 2.1.1.
dpgeorge Feb 19, 2025
9939b6c
rp2/boards/MACHDYNE_WERKZEUG: Add support for Machdyne Werkzeug.
machdyne Dec 20, 2024
cad62c2
rp2/boards/SPARKFUN_XRP_CONTROLLER_BETA: Add SparkFun XRP Controller.
sfe-SparkFro Feb 18, 2025
bb4ec88
rp2/machine_i2c: Make I2C bus ID arg optional with default.
malcolm-sparkfun Jan 24, 2025
c143eb5
esp32/machine_i2c: Make I2C bus ID arg optional with default.
malcolm-sparkfun Jan 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ jobs:
steps:
- uses: actions/checkout@v4
# codespell version should be kept in sync with .pre-commit-config.yml
- run: pip install --user codespell==2.2.6 tomli
- run: pip install --user codespell==2.4.1 tomli
- run: codespell

2 changes: 1 addition & 1 deletion .github/workflows/mpy_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ concurrency:

jobs:
test:
runs-on: ubuntu-20.04 # use 20.04 to get python2
runs-on: ubuntu-22.04 # use 22.04 to get python2
steps:
- uses: actions/checkout@v4
- name: Install packages
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ports_esp32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ jobs:
ci_func: # names are functions in ci.sh
- esp32_build_cmod_spiram_s2
- esp32_build_s3_c3
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- id: idf_ver
name: Read the ESP-IDF version
run: source tools/ci.sh && echo "IDF_VER=$IDF_VER" | tee "$GITHUB_OUTPUT"
name: Read the ESP-IDF version (including Python version)
run: source tools/ci.sh && echo "IDF_VER=${IDF_VER}-py${PYTHON_VER}" | tee "$GITHUB_OUTPUT"

- name: Cached ESP-IDF install
id: cache_esp_idf
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ports_mimxrt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ concurrency:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
defaults:
run:
working-directory: 'micropython repo' # test build with space in path
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ports_nrf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ concurrency:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install packages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ports_renesas-ra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ concurrency:

jobs:
build_renesas_ra_board:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install packages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ports_stm32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- stm32_pyb_build
- stm32_nucleo_build
- stm32_misc_build
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install packages
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ports_unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
run: tests/run-tests.py --print-failures

coverage_32bit:
runs-on: ubuntu-20.04 # use 20.04 to get libffi-dev:i386
runs-on: ubuntu-22.04 # use 22.04 to get libffi-dev:i386
steps:
- uses: actions/checkout@v4
- name: Install packages
Expand All @@ -116,7 +116,7 @@ jobs:
run: tests/run-tests.py --print-failures

nanbox:
runs-on: ubuntu-20.04 # use 20.04 to get python2, and libffi-dev:i386
runs-on: ubuntu-22.04 # use 22.04 to get python2, and libffi-dev:i386
steps:
- uses: actions/checkout@v4
- name: Install packages
Expand All @@ -142,7 +142,7 @@ jobs:
run: tests/run-tests.py --print-failures

stackless_clang:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install packages
Expand All @@ -156,7 +156,7 @@ jobs:
run: tests/run-tests.py --print-failures

float_clang:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install packages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ jobs:
steps:
- uses: actions/checkout@v4
# ruff version should be kept in sync with .pre-commit-config.yaml
- run: pip install --user ruff==0.1.3
- run: pipx install ruff==0.9.6
- run: ruff check --output-format=github .
- run: ruff format --diff .
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ repos:
stages: [commit-msg]
- repo: https://github.com/charliermarsh/ruff-pre-commit
# Version should be kept in sync with .github/workflows/ruff.yml
rev: v0.1.3
rev: v0.9.6
hooks:
- id: ruff
- id: ruff-format
- repo: https://github.com/codespell-project/codespell
# Version should be kept in sync with .github/workflows/codespell.yml
rev: v2.2.6
rev: v2.4.1
hooks:
- id: codespell
name: Spellcheck for changed files (codespell)
Expand Down
110 changes: 96 additions & 14 deletions docs/esp32/quickref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,20 @@ calling ``wlan.config(reconnects=n)``, where n are the number of desired reconne
attempts (0 means it won't retry, -1 will restore the default behaviour of trying
to reconnect forever).

.. _esp32_network_lan:

LAN
^^^

To use the wired interfaces via :class:`network.LAN` one has to specify the pins
and mode ::
Built-in MAC (original ESP32)
"""""""""""""""""""""""""""""

The original ESP32 SoC has a built-in Ethernet MAC. Using this MAC requires an
external Ethernet PHY to be wired to the chip's EMAC pins. Most of the EMAC pin
assignments are fixed, consult the ESP32 datasheet for details.

If the PHY is connected, the internal Ethernet MAC can be configured via
the :class:`network.LAN` constructor::

import network

Expand All @@ -134,20 +143,33 @@ and mode ::
lan.ipconfig('addr4') # get the interface's IPv4 addresses


The keyword arguments for the constructor defining the PHY type and interface are:
Required keyword arguments for the constructor:

- ``mdc`` and ``mdio`` - :class:`machine.Pin` objects (or integers) specifying
the MDC and MDIO pins.
- ``phy_type`` - Select the PHY device type. Supported devices are
``PHY_LAN8710``, ``PHY_LAN8720``, ``PHY_IP101``, ``PHY_RTL8201``,
``PHY_DP83848``, ``PHY_KSZ8041`` and ``PHY_KSZ8081``. These values are all
constants defined in the ``network`` module.
- ``phy_addr`` - The address number of the PHY device. Must be an integer in the
range 0x00 to 0x1f, inclusive. Common values are ``0`` and ``1``.

All of the above keyword arguments must be present to configure the interface.

Optional keyword arguments:

- mdc=pin-object # set the mdc and mdio pins.
- mdio=pin-object
- reset=pin-object # set the reset pin of the PHY device.
- power=pin-object # set the pin which switches the power of the PHY device.
- phy_type=<type> # Select the PHY device type. Supported devices are PHY_LAN8710,
PHY_LAN8720, PH_IP101, PHY_RTL8201, PHY_DP83848 and PHY_KSZ8041
- phy_addr=number # The address number of the PHY device.
- ref_clk_mode=mode # Defines, whether the ref_clk at the ESP32 is an input
or output. Suitable values are Pin.IN and Pin.OUT.
- ref_clk=pin-object # defines the Pin used for ref_clk.
- ``reset`` - :class:`machine.Pin` object (or integer) specifying the PHY reset pin.
- ``power`` - :class:`machine.Pin` object (or integer) specifying a pin which
switches the power of the PHY device.
- ``ref_clk`` - :class:`machine.Pin` object (or integer) specifying the pin used
for the EMAC ``ref_clk`` signal. If not specified, the board default is used
(typically GPIO 0, but may be different if a particular board has Ethernet.)
- ``ref_clk_mode`` - Defines whether the EMAC ``ref_clk`` pin of the ESP32
should be an input or an output. Suitable values are ``machine.Pin.IN`` and
``machine.Pin.OUT``. If not specified, the board default is used
(typically input, but may be different if a particular board has Ethernet.)

These are working configurations for LAN interfaces of popular boards::
These are working configurations for LAN interfaces of some popular ESP32 boards::

# Olimex ESP32-GATEWAY: power controlled by Pin(5)
# Olimex ESP32 PoE and ESP32-PoE ISO: power controlled by Pin(12)
Expand All @@ -172,6 +194,66 @@ These are working configurations for LAN interfaces of popular boards::
lan = network.LAN(id=0, mdc=Pin(23), mdio=Pin(18), power=Pin(5),
phy_type=network.PHY_IP101, phy_addr=1)


.. _esp32_spi_ethernet:

SPI Ethernet Interface
""""""""""""""""""""""

All ESP32 SoCs support external SPI Ethernet interface chips. These are Ethernet
interfaces that connect via a SPI bus, rather than an Ethernet RMII interface.

.. note:: The only exception is the ESP32 ``d2wd`` variant, where this feature is disabled
to save code size.

SPI Ethernet uses the same :class:`network.LAN` constructor, with a different
set of keyword arguments::

import machine, network

spi = machine.SPI(1, sck=SCK_PIN, mosi=MOSI_PIN, miso=MISO_PIN)
lan = network.LAN(spi=spi, cs=CS_PIN, ...) # Set the pin and mode configuration
lan.active(True) # activate the interface
lan.ipconfig('addr4') # get the interface's IPv4 addresses

Required keyword arguments for the constructor:

- ``spi`` - Should be a :class:`machine.SPI` object configured for this
connection. Note that any clock speed configured on the SPI object is ignored,
the SPI Ethernet clock speed is configured at compile time.
- ``cs`` - :class:`machine.Pin` object (or integer) specifying the CS pin
connected to the interface.
- ``int`` - :class:`machine.Pin` object (or integer) specifying the INT pin
connected to the interface.
- ``phy_type`` - Select the SPI Ethernet interface type. Supported devices are
``PHY_KSZ8851SNL``, ``PHY_DM9051``, ``PHY_W5500``. These values are all
constants defined in the ``network`` module.
- ``phy_addr`` - The address number of the PHY device. Must be an integer in the
range 0x00 to 0x1f, inclusive. This is usually ``0`` for SPI Ethernet devices.

All of the above keyword arguments must be present to configure the interface.

Optional keyword arguments for the constructor:

- ``reset`` - :class:`machine.Pin` object (or integer) specifying the SPI Ethernet
interface reset pin.
- ``power`` - :class:`machine.Pin` object (or integer) specifying a pin which
switches the power of the SPI Ethernet interface.

Here is a sample configuration for a WIZNet W5500 chip connected to pins on
an ESP32-S3 development board::

import machine, network
from machine import Pin, SPI

spi = SPI(1, sck=Pin(12), mosi=Pin(13), miso=Pin(14))
lan = network.LAN(spi=spi, phy_type=network.PHY_W5500, phy_addr=0,
cs=Pin(10), int=Pin(11))

.. note:: WIZnet W5500 Ethernet is also supported on some other MicroPython
ports, but using a :ref:`different software interface
<network.WIZNET5K>`.

Delay and timing
----------------

Expand Down
2 changes: 1 addition & 1 deletion docs/esp8266/tutorial/repl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ browser. The latest versions of Firefox and Chrome are supported.

For your convenience, WebREPL client is hosted at
`<http://micropython.org/webrepl>`__. Alternatively, you can install it
locally from the the GitHub repository
locally from the GitHub repository
`<https://github.com/micropython/webrepl>`__.

Before connecting to WebREPL, you should set a password and enable it via
Expand Down
4 changes: 4 additions & 0 deletions docs/library/array.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ Classes
array are given by *iterable*. If it is not provided, an empty
array is created.

In addition to the methods below, array objects also implement the buffer
protocol. This means the contents of the entire array can be accessed as raw
bytes via a `memoryview` or other interfaces which use this protocol.

.. method:: append(val)

Append new element *val* to the end of array, growing it.
Expand Down
4 changes: 4 additions & 0 deletions docs/library/builtins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Functions and types

.. class:: bytearray()

|see_cpython| `python:bytearray`.

.. class:: bytes()

|see_cpython| `python:bytes`.
Expand Down Expand Up @@ -104,6 +106,8 @@ Functions and types

.. class:: memoryview()

|see_cpython| `python:memoryview`.

.. function:: min()

.. function:: next()
Expand Down
8 changes: 5 additions & 3 deletions docs/library/espnow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,13 @@ Configuration
wait forever. The timeout can also be provided as arg to
`recv()`/`irecv()`/`recvinto()`.

*rate*: (ESP32 only, IDF>=4.3.0 only) Set the transmission speed for
*rate*: (ESP32 only) Set the transmission speed for
ESPNow packets. Must be set to a number from the allowed numeric values
in `enum wifi_phy_rate_t
<https://docs.espressif.com/projects/esp-idf/en/v4.4.1/esp32/
api-reference/network/esp_wifi.html#_CPPv415wifi_phy_rate_t>`_.
<https://docs.espressif.com/projects/esp-idf/en/v5.2.3/esp32/
api-reference/network/esp_wifi.html#_CPPv415wifi_phy_rate_t>`_. This
parameter is actually *write-only* due to ESP-IDF not providing any
means for querying the radio interface's rate parameter.

.. data:: Returns:

Expand Down
2 changes: 1 addition & 1 deletion docs/library/framebuf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Drawing text

.. method:: FrameBuffer.text(s, x, y[, c])

Write text to the FrameBuffer using the the coordinates as the upper-left
Write text to the FrameBuffer using the coordinates as the upper-left
corner of the text. The color of the text can be defined by the optional
argument but is otherwise a default value of 1. All characters have
dimensions of 8x8 pixels and there is currently no way to change the font.
Expand Down
1 change: 1 addition & 0 deletions docs/library/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ library.
heapq.rst
io.rst
json.rst
marshal.rst
math.rst
os.rst
platform.rst
Expand Down
2 changes: 1 addition & 1 deletion docs/library/machine.UART.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Methods

- *pins* is a 4 or 2 item list indicating the TX, RX, RTS and CTS pins (in that order).
Any of the pins can be None if one wants the UART to operate with limited functionality.
If the RTS pin is given the the RX pin must be given as well. The same applies to CTS.
If the RTS pin is given the RX pin must be given as well. The same applies to CTS.
When no pins are given, then the default set of TX and RX pins is taken, and hardware
flow control will be disabled. If *pins* is ``None``, no pin assignment will be made.

Expand Down
28 changes: 28 additions & 0 deletions docs/library/marshal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
:mod:`marshal` -- Python object serialization
=============================================

.. module:: marshal
:synopsis: Convert Python objects to and from a binary format

|see_cpython_module| :mod:`python:marshal`.

This module implements conversion between Python objects and a binary format.
The format is specific to MicroPython but does not depend on the machine
architecture, so the data can be transferred and used on a different MicroPython
instance, as long as the version of the binary data matches (it's currently
versioned as the mpy file version, see :ref:`mpy_files`).

Functions
---------

.. function:: dumps(value, /)

Convert the given *value* to binary format and return a corresponding ``bytes``
object.

Currently, code objects are the only supported values that can be converted.

.. function:: loads(data, /)

Convert the given bytes-like *data* to its corresponding Python object, and
return it.
Loading
Loading