Skip to content

Commit 36dcf51

Browse files
authored
Merge branch 'micropython:master' into esp32_bitstream
2 parents 141cf39 + 5d12df5 commit 36dcf51

File tree

287 files changed

+5877
-780
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

287 files changed

+5877
-780
lines changed

.github/workflows/ports_zephyr.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,26 @@ jobs:
3030
docker-images: false
3131
swap-storage: false
3232
- uses: actions/checkout@v4
33+
- id: versions
34+
name: Read Zephyr version
35+
run: source tools/ci.sh && echo "ZEPHYR=$ZEPHYR_VERSION" | tee "$GITHUB_OUTPUT"
36+
- name: Cached Zephyr Workspace
37+
id: cache_workspace
38+
uses: actions/cache@v4
39+
with:
40+
# note that the Zephyr CI docker image is 15GB. At time of writing
41+
# GitHub caches are limited to 10GB total for a project. So we only
42+
# cache the "workspace"
43+
path: ./zephyrproject
44+
key: zephyr-workspace-${{ steps.versions.outputs.ZEPHYR }}
45+
- name: ccache
46+
uses: hendrikmuhs/[email protected]
47+
with:
48+
key: zephyr
3349
- name: Install packages
3450
run: source tools/ci.sh && ci_zephyr_setup
3551
- name: Install Zephyr
52+
if: steps.cache_workspace.outputs.cache-hit != 'true'
3653
run: source tools/ci.sh && ci_zephyr_install
3754
- name: Build
3855
run: source tools/ci.sh && ci_zephyr_build

docs/develop/natmod.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ options for the ``ARCH`` variable, see below):
3939
* ``armv7emsp`` (ARM Thumb 2, single precision float, eg Cortex-M4F, Cortex-M7)
4040
* ``armv7emdp`` (ARM Thumb 2, double precision float, eg Cortex-M7)
4141
* ``xtensa`` (non-windowed, eg ESP8266)
42-
* ``xtensawin`` (windowed with window size 8, eg ESP32)
42+
* ``xtensawin`` (windowed with window size 8, eg ESP32, ESP32S3)
43+
* ``rv32imc`` (RISC-V 32 bits with compressed instructions, eg ESP32C3, ESP32C6)
4344

4445
When compiling and linking the native .mpy file the architecture must be chosen
4546
and the corresponding file can only be imported on that architecture. For more
@@ -172,7 +173,7 @@ The file ``Makefile`` contains:
172173
# Source files (.c or .py)
173174
SRC = factorial.c
174175
175-
# Architecture to build for (x86, x64, armv6m, armv7m, xtensa, xtensawin)
176+
# Architecture to build for (x86, x64, armv6m, armv7m, xtensa, xtensawin, rv32imc)
176177
ARCH = x64
177178
178179
# Include to get the rules for compiling and linking the module

docs/esp32/quickref.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,9 @@ See :ref:`machine.RTC <machine.RTC>` ::
577577
from machine import RTC
578578

579579
rtc = RTC()
580-
rtc.datetime((2017, 8, 23, 1, 12, 48, 0, 0)) # set a specific date and time
580+
rtc.datetime((2017, 8, 23, 0, 1, 12, 48, 0)) # set a specific date and
581+
# time, eg. 2017/8/23 1:12:48
582+
# the day-of-week value is ignored
581583
rtc.datetime() # get date and time
582584

583585
WDT (Watchdog timer)

docs/esp8266/quickref.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,9 @@ See :ref:`machine.RTC <machine.RTC>` ::
284284
from machine import RTC
285285

286286
rtc = RTC()
287-
rtc.datetime((2017, 8, 23, 1, 12, 48, 0, 0)) # set a specific date and time
287+
rtc.datetime((2017, 8, 23, 0, 1, 12, 48, 0)) # set a specific date and
288+
# time, eg. 2017/8/23 1:12:48
289+
# the day-of-week value is ignored
288290
rtc.datetime() # get date and time
289291

290292
# synchronize with ntp

docs/library/machine.RTC.rst

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,21 @@ Methods
4242

4343
Initialise the RTC. Datetime is a tuple of the form:
4444

45-
``(year, month, day[, hour[, minute[, second[, microsecond[, tzinfo]]]]])``
45+
``(year, month, day, hour, minute, second, microsecond, tzinfo)``
46+
47+
All eight arguments must be present. The ``microsecond`` and ``tzinfo``
48+
values are currently ignored but might be used in the future.
49+
50+
Availability: CC3200, ESP32, MIMXRT, SAMD. The rtc.init() method on
51+
the stm32 and renesas-ra ports just (re-)starts the RTC and does not
52+
accept arguments.
4653

4754
.. method:: RTC.now()
4855

4956
Get get the current datetime tuple.
5057

58+
Availability: WiPy.
59+
5160
.. method:: RTC.deinit()
5261

5362
Resets the RTC to the time of January 1, 2015 and starts running it again.
@@ -62,10 +71,13 @@ Methods
6271

6372
Get the number of milliseconds left before the alarm expires.
6473

65-
.. method:: RTC.cancel(alarm_id=0)
74+
.. method:: RTC.alarm_cancel(alarm_id=0)
6675

6776
Cancel a running alarm.
6877

78+
The mimxrt port also exposes this function as ``RTC.cancel(alarm_id=0)``, but this is
79+
scheduled to be removed in MicroPython 2.0.
80+
6981
.. method:: RTC.irq(*, trigger, handler=None, wake=machine.IDLE)
7082

7183
Create an irq object triggered by a real time clock alarm.

docs/library/machine.USBDevice.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
class USBDevice -- USB Device driver
55
====================================
66

7-
.. note:: ``machine.USBDevice`` is currently only supported on the rp2 and samd
8-
ports.
7+
.. note:: ``machine.USBDevice`` is currently only supported for esp32, rp2 and
8+
samd ports. Native USB support is also required, and not every board
9+
supports native USB.
910

1011
USBDevice provides a low-level Python API for implementing USB device functions using
1112
Python code.

docs/mimxrt/quickref.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,9 @@ See :ref:`machine.RTC <machine.RTC>`::
429429
from machine import RTC
430430

431431
rtc = RTC()
432-
rtc.datetime((2017, 8, 23, 1, 12, 48, 0, 0)) # set a specific date and time
432+
rtc.datetime((2017, 8, 23, 0, 1, 12, 48, 0)) # set a specific date and
433+
# time, eg. 2017/8/23 1:12:48
434+
# the day-of-week value is ignored
433435
rtc.datetime() # get date and time
434436
rtc.now() # return date and time in CPython format.
435437

docs/pyboard/quickref.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ See :ref:`pyb.RTC <pyb.RTC>` ::
138138
from pyb import RTC
139139

140140
rtc = RTC()
141-
rtc.datetime((2017, 8, 23, 1, 12, 48, 0, 0)) # set a specific date and time
141+
rtc.datetime((2017, 8, 23, 0, 1, 12, 48, 0)) # set a specific date and
142+
# time, eg. 2017/8/23 1:12:48
143+
# the day-of-week value is ignored
142144
rtc.datetime() # get date and time
143145

144146
PWM (pulse width modulation)

docs/renesas-ra/quickref.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,9 @@ See :ref:`machine.RTC <machine.RTC>` ::
206206
from machine import RTC
207207

208208
rtc = RTC()
209-
rtc.datetime((2017, 8, 23, 1, 12, 48, 0, 0)) # set a specific date and time
210-
# time, eg 2017/8/23 1:12:48
209+
rtc.datetime((2017, 8, 23, 0, 1, 12, 48, 0)) # set a specific date and
210+
# time, eg. 2017/8/23 1:12:48
211+
# the day-of-week value is ignored
211212
rtc.datetime() # get date and time
212213

213214
Following functions are not supported at the present::

docs/rp2/quickref.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,9 @@ See :ref:`machine.RTC <machine.RTC>` ::
310310
from machine import RTC
311311

312312
rtc = RTC()
313-
rtc.datetime((2017, 8, 23, 2, 12, 48, 0, 0)) # set a specific date and
313+
rtc.datetime((2017, 8, 23, 0, 1, 12, 48, 0)) # set a specific date and
314314
# time, eg. 2017/8/23 1:12:48
315+
# the day-of-week value is ignored
315316
rtc.datetime() # get date and time
316317

317318
WDT (Watchdog timer)

0 commit comments

Comments
 (0)