Skip to content

Commit

Permalink
Merge branch 'micropython:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
echo-lalia authored Mar 28, 2024
2 parents 2c90e92 + 628a37e commit 1bf72fd
Show file tree
Hide file tree
Showing 269 changed files with 8,729 additions and 940 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/biome.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: JavaScript code lint and formatting with Biome

on: [push, pull_request]

jobs:
eslint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Biome
uses: biomejs/setup-biome@v2
with:
version: 1.5.3
- name: Run Biome
run: biome ci --indent-style=space --indent-width=4 tests/ ports/webassembly
1 change: 1 addition & 0 deletions .github/workflows/ports_stm32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
ci_func: # names are functions in ci.sh
- stm32_pyb_build
- stm32_nucleo_build
- stm32_misc_build
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
Expand Down
11 changes: 10 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
url = https://github.com/lwip-tcpip/lwip.git
[submodule "lib/berkeley-db-1.xx"]
path = lib/berkeley-db-1.xx
url = https://github.com/pfalcon/berkeley-db-1.xx
url = https://github.com/micropython/berkeley-db-1.xx
[submodule "lib/stm32lib"]
path = lib/stm32lib
url = https://github.com/micropython/stm32lib
Expand Down Expand Up @@ -59,3 +59,12 @@
[submodule "lib/protobuf-c"]
path = lib/protobuf-c
url = https://github.com/protobuf-c/protobuf-c.git
[submodule "lib/open-amp"]
path = lib/open-amp
url = https://github.com/OpenAMP/open-amp.git
[submodule "lib/libmetal"]
path = lib/libmetal
url = https://github.com/OpenAMP/libmetal.git
[submodule "lib/arduino-lib"]
path = lib/arduino-lib
url = https://github.com/arduino/arduino-lib-mpy.git
2 changes: 2 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,14 @@ used during the build process and is not part of the compiled source code.
/cmsis (BSD-3-clause)
/crypto-algorithms (NONE)
/libhydrogen (ISC)
/libmetal (BSD-3-clause)
/littlefs (BSD-3-clause)
/lwip (BSD-3-clause)
/mynewt-nimble (Apache-2.0)
/nrfx (BSD-3-clause)
/nxp_driver (BSD-3-Clause)
/oofatfs (BSD-1-clause)
/open-amp (BSD-3-clause)
/pico-sdk (BSD-3-clause)
/re15 (BSD-3-clause)
/stm32lib (BSD-3-clause)
Expand Down
31 changes: 26 additions & 5 deletions docs/library/collections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,47 @@ Classes
appends and pops from either side of the deque. New deques are created
using the following arguments:

- *iterable* must be the empty tuple, and the new deque is created empty.
- *iterable* is an iterable used to populate the deque when it is
created. It can be an empty tuple or list to create a deque that
is initially empty.

- *maxlen* must be specified and the deque will be bounded to this
maximum length. Once the deque is full, any new items added will
discard items from the opposite end.

- The optional *flags* can be 1 to check for overflow when adding items.

As well as supporting `bool` and `len`, deque objects have the following
methods:
Deque objects support `bool`, `len`, iteration and subscript load and store.
They also have the following methods:

.. method:: deque.append(x)

Add *x* to the right side of the deque.
Raises IndexError if overflow checking is enabled and there is no more room left.
Raises ``IndexError`` if overflow checking is enabled and there is
no more room in the queue.

.. method:: deque.appendleft(x)

Add *x* to the left side of the deque.
Raises ``IndexError`` if overflow checking is enabled and there is
no more room in the queue.

.. method:: deque.pop()

Remove and return an item from the right side of the deque.
Raises ``IndexError`` if no items are present.

.. method:: deque.popleft()

Remove and return an item from the left side of the deque.
Raises IndexError if no items are present.
Raises ``IndexError`` if no items are present.

.. method:: deque.extend(iterable)

Extend the deque by appending all the items from *iterable* to
the right of the deque.
Raises ``IndexError`` if overflow checking is enabled and there is
no more room in the deque.

.. function:: namedtuple(name, fields)

Expand Down
1 change: 1 addition & 0 deletions docs/library/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ the following libraries.
micropython.rst
neopixel.rst
network.rst
openamp.rst
uctypes.rst
vfs.rst

Expand Down
15 changes: 15 additions & 0 deletions docs/library/machine.RTC.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,21 @@ Methods
- ``wake`` specifies the sleep mode from where this interrupt can wake
up the system.

.. method:: RTC.memory([data])

``RTC.memory(data)`` will write *data* to the RTC memory, where *data* is any
object which supports the buffer protocol (including `bytes`, `bytearray`,
`memoryview` and `array.array`). ``RTC.memory()`` reads RTC memory and returns
a `bytes` object.

Data written to RTC user memory is persistent across restarts, including
`machine.soft_reset()` and `machine.deepsleep()`.

The maximum length of RTC user memory is 2048 bytes by default on esp32,
and 492 bytes on esp8266.

Availability: esp32, esp8266 ports.

Constants
---------

Expand Down
Loading

0 comments on commit 1bf72fd

Please sign in to comment.