Skip to content

Commit 42f4065

Browse files
committed
Merge remote-tracking branch 'adafruit/main' into merge_1.13
2 parents 71d2536 + ebf9dcb commit 42f4065

File tree

178 files changed

+3125
-8252
lines changed

Some content is hidden

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

178 files changed

+3125
-8252
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
run: |
3838
sudo apt-get update
3939
sudo apt-get install -y eatmydata
40-
sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64 latexmk texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra
40+
sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64 latexmk texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra gcc-aarch64-linux-gnu
4141
pip install -r requirements-dev.txt
4242
- name: Versions
4343
run: |
@@ -84,6 +84,12 @@ jobs:
8484
- name: Native mpy Tests
8585
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests -j1 --mpy-cross-flags='-mcache-lookup-bc' --via-mpy --emit native -d basics float micropython
8686
working-directory: tests
87+
- name: Build mpy-cross.static-aarch64
88+
run: make -C mpy-cross -j2 -f Makefile.static-aarch64
89+
- uses: actions/upload-artifact@v2
90+
with:
91+
name: mpy-cross.static-aarch64
92+
path: mpy-cross/mpy-cross.static-aarch64
8793
- name: Build mpy-cross.static-raspbian
8894
run: make -C mpy-cross -j2 -f Makefile.static-raspbian
8995
- uses: actions/upload-artifact@v2
@@ -104,6 +110,7 @@ jobs:
104110
path: mpy-cross/mpy-cross.static.exe
105111
- name: Upload stubs and mpy-cross builds to S3
106112
run: |
113+
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static-aarch64 s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-aarch64-${{ env.CP_VERSION }} --no-progress --region us-east-1
107114
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static-raspbian s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-raspbian-${{ env.CP_VERSION }} --no-progress --region us-east-1
108115
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-amd64-linux-${{ env.CP_VERSION }} --no-progress --region us-east-1
109116
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static.exe s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-x64-windows-${{ env.CP_VERSION }}.exe --no-progress --region us-east-1
@@ -229,7 +236,6 @@ jobs:
229236
- "feather_mimxrt1011"
230237
- "feather_mimxrt1062"
231238
- "feather_nrf52840_express"
232-
- "feather_radiofruit_zigbee"
233239
- "feather_stm32f405_express"
234240
- "fluff_m0"
235241
- "gemma_m0"

WEBUSB_README.md

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -62,33 +62,4 @@ The tinyusb examples already include a "WebUSB serial" example.
6262
Basically, this feature was ported into CircuitPython by pulling code snippets out of the
6363
tinyusb example, and putting them where they best belonged in the CircuitPython codebase.
6464

65-
There was one complication:
66-
67-
tinyusb uses C preprocessor macros to define things like USB descriptors.
68-
69-
CircuitPython uses a Python program (tools/gen_usb_descriptor.py) to create USB descriptors (etc.)
70-
using "helper objects" from another repo (adafruit_usb_descriptor). This means some of the example
71-
code had to be adapted to the new programing model, and gen_usb_descriptor gained new command-line
72-
options to control the generated code.
73-
74-
The generated files go into the "build" directory, look for autogen_usb_descriptor.c and
75-
genhdr/autogen_usb_descriptor.h.
76-
77-
78-
Also worth pointing out - the re-use of the CDC connect/disconnect mechanism is not actually part
79-
of the WebUSB standard, it's more of "common idiom". We make use of it here because we need to know
80-
when we should be paying attention to the WebUSB serial interface, and when we should ignore it..
81-
82-
## Possible future work areas
83-
84-
The current code uses the existing Python infrastructure to create the Interface descriptor, but
85-
simply outputs the code snippets from the original tinyusb demo code to create the WEBUSB_URL,
86-
BOS, and MS_OS_20 descriptors. I suppose additional work could be done to add these to the
87-
adafruit_usb_descriptor project, and then gen_usb_descriptor.py could be modified to make use
88-
of them.
89-
90-
Program gen_usb_descriptor.py creates objects for most interface types, regardless of whether or
91-
not they are actually enabled. This increases the size of a generated string table. I made the
92-
new vendor-interface-related code not do this (because some of the ARM platforms would no longer
93-
build), but I did not go back and do this for the other interface types (CDC, MIDI, HID, etc.)
94-
Some FLASH savings are probably possible if this is done.
65+
### TODO: This needs to be reworked for dynamic USB descriptors.

docs/design_guide.rst

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,15 +251,17 @@ After the license comment::
251251

252252
**Hardware:**
253253

254-
* Adafruit `Device Description
254+
* `Adafruit Device Description
255255
<hyperlink>`_ (Product ID: <Product Number>)
256256

257257
**Software and Dependencies:**
258258

259259
* Adafruit CircuitPython firmware for the supported boards:
260260
https://circuitpython.org/downloads
261+
261262
* Adafruit's Bus Device library:
262263
https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
264+
263265
* Adafruit's Register library:
264266
https://github.com/adafruit/Adafruit_CircuitPython_Register
265267

@@ -525,6 +527,50 @@ SPI Example
525527
spi.readinto(self.buf)
526528
return self.buf[0]
527529
530+
531+
532+
Class documentation example template
533+
--------------------------------------------------------------------------------
534+
When documenting classes, you should use the following template to illustrate basic usage.
535+
It is similar with the simpletest example, however this will display the information in the Read The Docs
536+
documentation.
537+
The advantage of using this template is it makes the documentation consistent across the libraries.
538+
539+
This is an example for a AHT20 temperature sensor. Include the following after the class parameter:
540+
541+
542+
.. code-block:: python
543+
544+
"""
545+
546+
**Quickstart: Importing and using the AHT10/AHT20 temperature sensor**
547+
548+
Here is an example of using the :class:`AHTx0` class.
549+
First you will need to import the libraries to use the sensor
550+
551+
.. code-block:: python
552+
553+
import board
554+
import adafruit_ahtx0
555+
556+
Once this is done you can define your `board.I2C` object and define your sensor object
557+
558+
.. code-block:: python
559+
560+
i2c = board.I2C() # uses board.SCL and board.SDA
561+
aht = adafruit_ahtx0.AHTx0(i2c)
562+
563+
Now you have access to the temperature and humidity using
564+
the :attr:`temperature` and :attr:`relative_humidity` attributes
565+
566+
.. code-block:: python
567+
568+
temperature = aht.temperature
569+
relative_humidity = aht.relative_humidity
570+
571+
"""
572+
573+
528574
Use composition
529575
--------------------------------------------------------------------------------
530576

docs/shared_bindings_matrix.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ def get_settings_from_makefile(port_dir, board_name):
155155

156156
settings = {}
157157
for line in contents.stdout.split('\n'):
158-
m = re.match(r'^([A-Z][A-Z0-9_]*) = (.*)$', line)
158+
# Handle both = and := definitions.
159+
m = re.match(r'^([A-Z][A-Z0-9_]*) :?= (.*)$', line)
159160
if m:
160161
settings[m.group(1)] = m.group(2)
161162

locale/ID.po

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ msgstr "Semua channel event sedang digunakan"
357357
msgid "All state machines in use"
358358
msgstr ""
359359

360-
#: ports/atmel-samd/audio_dma.c ports/atmel-samd/common-hal/audiobusio/PDMIn.c
360+
#: ports/atmel-samd/audio_dma.c
361361
msgid "All sync event channels in use"
362362
msgstr "Semua channel event yang disinkronisasi sedang digunakan"
363363

@@ -448,6 +448,10 @@ msgstr ""
448448
msgid "Attempted heap allocation when VM not running."
449449
msgstr ""
450450

451+
#: shared-bindings/wifi/Radio.c
452+
msgid "AuthMode.OPEN is not used with password"
453+
msgstr ""
454+
451455
#: shared-bindings/wifi/Radio.c
452456
msgid "Authentication failure"
453457
msgstr ""
@@ -754,6 +758,10 @@ msgid ""
754758
msgstr ""
755759
"Koneksi telah terputus dan tidak dapat lagi digunakan. Buat koneksi baru."
756760

761+
#: py/persistentcode.c
762+
msgid "Corrupt .mpy file"
763+
msgstr "File .mpy rusak"
764+
757765
#: ports/cxd56/common-hal/camera/Camera.c
758766
msgid "Could not initialize Camera"
759767
msgstr ""
@@ -1215,6 +1223,10 @@ msgstr ""
12151223
msgid "Invalid ADC Unit value"
12161224
msgstr "Nilai Unit ADC tidak valid"
12171225

1226+
#: ports/esp32s2/common-hal/wifi/Radio.c
1227+
msgid "Invalid AuthMode"
1228+
msgstr ""
1229+
12181230
#: shared-module/displayio/OnDiskBitmap.c
12191231
msgid "Invalid BMP file"
12201232
msgstr "File BMP tidak valid"
@@ -1488,7 +1500,7 @@ msgstr ""
14881500
msgid "NVS Error"
14891501
msgstr ""
14901502

1491-
#: py/parse.c
1503+
#: py/qstr.c
14921504
msgid "Name too long"
14931505
msgstr "Nama terlalu panjang"
14941506

@@ -2156,14 +2168,6 @@ msgstr ""
21562168
msgid "Timeout is too long: Maximum timeout length is %d seconds"
21572169
msgstr ""
21582170

2159-
#: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c
2160-
msgid "Timeout waiting for DRDY"
2161-
msgstr ""
2162-
2163-
#: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c
2164-
msgid "Timeout waiting for VSYNC"
2165-
msgstr ""
2166-
21672171
#: supervisor/shared/safe_mode.c
21682172
msgid "To exit, please reset the board without "
21692173
msgstr "Untuk keluar, silahkan reset board tanpa "
@@ -2577,10 +2581,6 @@ msgstr ""
25772581
msgid "buttons must be digitalio.DigitalInOut"
25782582
msgstr ""
25792583

2580-
#: py/vm.c
2581-
msgid "byte code not implemented"
2582-
msgstr ""
2583-
25842584
#: shared-bindings/_pixelbuf/PixelBuf.c
25852585
msgid "byteorder is not a string"
25862586
msgstr ""
@@ -2687,10 +2687,6 @@ msgstr ""
26872687
msgid "can't load with '%q' index"
26882688
msgstr ""
26892689

2690-
#: py/objgenerator.c
2691-
msgid "can't pend throw to just-started generator"
2692-
msgstr ""
2693-
26942690
#: py/objgenerator.c
26952691
msgid "can't send non-None value to a just-started generator"
26962692
msgstr ""
@@ -3042,6 +3038,10 @@ msgstr ""
30423038
msgid "float too big"
30433039
msgstr ""
30443040

3041+
#: py/nativeglue.c
3042+
msgid "float unsupported"
3043+
msgstr ""
3044+
30453045
#: shared-bindings/_stage/Text.c
30463046
msgid "font must be 2048 bytes long"
30473047
msgstr ""
@@ -3110,7 +3110,7 @@ msgstr ""
31103110
msgid "generator ignored GeneratorExit"
31113111
msgstr ""
31123112

3113-
#: py/objgenerator.c
3113+
#: py/objgenerator.c py/runtime.c
31143114
msgid "generator raised StopIteration"
31153115
msgstr ""
31163116

@@ -3130,6 +3130,10 @@ msgstr "identifier didefinisi ulang sebagai global"
31303130
msgid "identifier redefined as nonlocal"
31313131
msgstr "identifier didefinisi ulang sebagai nonlocal"
31323132

3133+
#: py/compile.c
3134+
msgid "import * not at module level"
3135+
msgstr ""
3136+
31333137
#: py/persistentcode.c
31343138
msgid "incompatible .mpy file"
31353139
msgstr ""
@@ -3274,10 +3278,6 @@ msgstr ""
32743278
msgid "invalid decorator"
32753279
msgstr ""
32763280

3277-
#: extmod/uos_dupterm.c
3278-
msgid "invalid dupterm index"
3279-
msgstr "indeks dupterm tidak valid"
3280-
32813281
#: shared-bindings/bitmaptools/__init__.c
32823282
#, c-format
32833283
msgid "invalid element size %d for bits_per_pixel %d\n"
@@ -3672,6 +3672,10 @@ msgstr ""
36723672
msgid "only slices with step=1 (aka None) are supported"
36733673
msgstr ""
36743674

3675+
#: py/vm.c
3676+
msgid "opcode"
3677+
msgstr ""
3678+
36753679
#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare/compare.c
36763680
#: extmod/ulab/code/numpy/vector/vector.c
36773681
msgid "operands could not be broadcast together"
@@ -3891,7 +3895,7 @@ msgid "sampling rate out of range"
38913895
msgstr "nilai sampling keluar dari jangkauan"
38923896

38933897
#: py/modmicropython.c
3894-
msgid "schedule stack full"
3898+
msgid "schedule queue full"
38953899
msgstr ""
38963900

38973901
#: lib/utils/pyexec.c py/builtinimport.c
@@ -4309,8 +4313,8 @@ msgstr "zi harus berjenis float"
43094313
msgid "zi must be of shape (n_section, 2)"
43104314
msgstr ""
43114315

4312-
#~ msgid "Corrupt .mpy file"
4313-
#~ msgstr "File .mpy rusak"
4316+
#~ msgid "invalid dupterm index"
4317+
#~ msgstr "indeks dupterm tidak valid"
43144318

43154319
#~ msgid "Corrupt raw code"
43164320
#~ msgstr "Kode raw rusak"

0 commit comments

Comments
 (0)