Skip to content

Commit 9ca0e68

Browse files
authored
Merge branch 'main' into wio_add_pin_assign
2 parents 11a9372 + 8b89681 commit 9ca0e68

File tree

153 files changed

+4596
-2528
lines changed

Some content is hidden

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

153 files changed

+4596
-2528
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ jobs:
209209
- "clue_nrf52840_express"
210210
- "cp32-m4"
211211
- "cp_sapling_m0"
212+
- "cp_sapling_m0_revb"
212213
- "cp_sapling_m0_spiflash"
213214
- "datalore_ip_m4"
214215
- "datum_distance"

devices/ble_hci/common-hal/_bleio/PacketBuffer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ mp_int_t common_hal_bleio_packet_buffer_get_outgoing_packet_length(bleio_packet_
245245
bleio_connection_internal_t *connection = bleio_conn_handle_to_connection(self->conn_handle);
246246
if (connection) {
247247
return MIN(MIN(common_hal_bleio_connection_get_max_packet_length(connection),
248-
self->max_packet_size),
249-
self->characteristic->max_length);
248+
self->max_packet_size),
249+
self->characteristic->max_length);
250250
}
251251
}
252252
// There's no current connection, so we don't know the MTU, and

docs/design_guide.rst

Lines changed: 85 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,34 @@ Module description
238238
After the license comment::
239239

240240
"""
241-
`<module name>` - <Short description>
241+
`<module name>`
242242
=================================================
243-
<Longer description.>
243+
244+
<Longer description>
245+
246+
* Author(s):
247+
248+
Implementation Notes
249+
--------------------
250+
251+
252+
**Hardware:**
253+
254+
* Adafruit `Device Description
255+
<hyperlink>`_ (Product ID: <Product Number>)
256+
257+
**Software and Dependencies:**
258+
259+
* Adafruit CircuitPython firmware for the supported boards:
260+
https://circuitpython.org/downloads
261+
* Adafruit's Bus Device library:
262+
https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
263+
* Adafruit's Register library:
264+
https://github.com/adafruit/Adafruit_CircuitPython_Register
265+
244266
"""
245267

268+
246269
Class description
247270
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
248271

@@ -269,6 +292,58 @@ Renders as:
269292
:param ~busio.I2C i2c_bus: The I2C bus the DS3231 is connected to.
270293
:param int address: The I2C address of the device. Defaults to :const:`0x40`
271294

295+
296+
Documenting Parameters
297+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
298+
Although there are different ways to document class and functions definitions in Python,
299+
the following is the prevalent method of documenting parameters
300+
for CircuitPython libraries. When documenting class parameters you should use the
301+
following structure:
302+
303+
.. code-block:: sh
304+
305+
:param param_type param_name: Parameter_description
306+
307+
308+
param_type
309+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
310+
The type of the parameter. This could be among other `int`, `float`, `str` `bool`, etc.
311+
To document an object in the CircuitPython domain, you need to include a ``~`` before the
312+
definition as shown in the following example:
313+
314+
.. code-block:: sh
315+
316+
:param ~busio.I2C i2c_bus: The I2C bus the DS3231 is connected to.
317+
318+
319+
To include references to CircuitPython modules, cookiecutter creates an entry in the
320+
intersphinx_mapping section in the ``conf.py`` file located within the ``docs`` directory.
321+
To add different types outside CircuitPython you need to include them in the intersphinx_mapping::
322+
323+
324+
intersphinx_mapping = {
325+
"python": ("https://docs.python.org/3.4", None),
326+
"BusDevice":("https://circuitpython.readthedocs.io/projects/busdevice/en/latest/", None,),
327+
"CircuitPython": ("https://circuitpython.readthedocs.io/en/latest/", None),
328+
}
329+
330+
The intersphinx_mapping above includes references to Python, BusDevice and CircuitPython
331+
Documentation
332+
333+
334+
param_name
335+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
336+
Parameter name used in the class or method definition
337+
338+
339+
Parameter_description
340+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
341+
Parameter description. When the parameter defaults to a particular value, it is good
342+
practice to include the default::
343+
344+
:param int pitch: Pitch value for the servo. Defaults to :const:`4500`
345+
346+
272347
Attributes
273348
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
274349

@@ -383,6 +458,14 @@ Renders as:
383458

384459
:param float degrees: Degrees to turn right
385460

461+
Documentation References to other Libraries
462+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
463+
When you need to make references to documentation in other libraries you should refer the class using single
464+
backticks ``:class:`~adafruit_motor.servo.Servo```. You must also add the reference in the ``conf.py`` file in the
465+
``intersphinx_mapping section`` by adding a new entry::
466+
467+
"adafruit_motor": ("https://circuitpython.readthedocs.io/projects/motor/en/latest/", None,),
468+
386469
Use BusDevice
387470
--------------------------------------------------------------------------------
388471

locale/ID.po

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ msgstr ""
66
"Project-Id-Version: PACKAGE VERSION\n"
77
"Report-Msgid-Bugs-To: \n"
88
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
9-
"PO-Revision-Date: 2021-04-07 12:23+0000\n"
9+
"PO-Revision-Date: 2021-04-28 16:11+0000\n"
1010
"Last-Translator: Reza Almanda <[email protected]>\n"
1111
"Language-Team: LANGUAGE <[email protected]>\n"
1212
"Language: ID\n"
1313
"MIME-Version: 1.0\n"
1414
"Content-Type: text/plain; charset=UTF-8\n"
1515
"Content-Transfer-Encoding: 8bit\n"
1616
"Plural-Forms: nplurals=1; plural=0;\n"
17-
"X-Generator: Weblate 4.6-dev\n"
17+
"X-Generator: Weblate 4.7-dev\n"
1818

1919
#: main.c
2020
msgid ""
@@ -698,6 +698,7 @@ msgstr ""
698698
"digunakan"
699699

700700
#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c
701+
#: ports/nrf/common-hal/alarm/pin/PinAlarm.c
701702
msgid "Cannot wake on pin edge. Only level."
702703
msgstr ""
703704

@@ -1307,7 +1308,8 @@ msgstr "Fase tidak valid"
13071308
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
13081309
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
13091310
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
1310-
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
1311+
#: ports/esp32s2/common-hal/touchio/TouchIn.c
1312+
#: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c
13111313
#: shared-module/rgbmatrix/RGBMatrix.c
13121314
msgid "Invalid pin"
13131315
msgstr "Pin tidak valid"
@@ -1662,11 +1664,11 @@ msgstr "Hanya 8 atau 16 bit mono dengan "
16621664

16631665
#: ports/esp32s2/common-hal/wifi/__init__.c
16641666
msgid "Only IPv4 addresses supported"
1665-
msgstr ""
1667+
msgstr "Hanya alamat IPv4 yang didukung"
16661668

16671669
#: ports/esp32s2/common-hal/socketpool/SocketPool.c
16681670
msgid "Only IPv4 sockets supported"
1669-
msgstr ""
1671+
msgstr "Hanysa socket IPv4 yang didukung"
16701672

16711673
#: shared-module/displayio/OnDiskBitmap.c
16721674
#, c-format
@@ -1690,6 +1692,7 @@ msgid "Only one TouchAlarm can be set in deep sleep."
16901692
msgstr ""
16911693

16921694
#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c
1695+
#: ports/nrf/common-hal/alarm/time/TimeAlarm.c
16931696
msgid "Only one alarm.time alarm can be set."
16941697
msgstr ""
16951698

@@ -1707,15 +1710,15 @@ msgstr ""
17071710

17081711
#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c
17091712
msgid "Operation timed out"
1710-
msgstr ""
1713+
msgstr "Waktu habis"
17111714

17121715
#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c
17131716
msgid "Out of memory"
1714-
msgstr ""
1717+
msgstr "Kehabisan memori"
17151718

17161719
#: ports/esp32s2/common-hal/socketpool/SocketPool.c
17171720
msgid "Out of sockets"
1718-
msgstr ""
1721+
msgstr "Kehabisan socket"
17191722

17201723
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
17211724
msgid "Out-buffer elements must be <= 4 bytes long"
@@ -1761,7 +1764,7 @@ msgstr "ParallelBus belum didukung"
17611764

17621765
#: ports/esp32s2/common-hal/audiobusio/__init__.c
17631766
msgid "Peripheral in use"
1764-
msgstr ""
1767+
msgstr "Periferal sedang digunakan"
17651768

17661769
#: py/moduerrno.c
17671770
msgid "Permission denied"
@@ -1773,7 +1776,7 @@ msgstr ""
17731776

17741777
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
17751778
msgid "Pin count too large"
1776-
msgstr ""
1779+
msgstr "Jumlah pin terlalu besar"
17771780

17781781
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c
17791782
#: ports/cxd56/common-hal/analogio/AnalogIn.c
@@ -1815,7 +1818,7 @@ msgstr ""
18151818

18161819
#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c
18171820
msgid "Pins must be sequential"
1818-
msgstr ""
1821+
msgstr "Pin harus berurutan"
18191822

18201823
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
18211824
msgid "Pins must share PWM slice"
@@ -4239,11 +4242,11 @@ msgstr ""
42394242

42404243
#: ports/esp32s2/common-hal/wifi/Radio.c
42414244
msgid "wifi is not enabled"
4242-
msgstr ""
4245+
msgstr "wifi tidak diaktifkan"
42434246

42444247
#: shared-bindings/_bleio/Adapter.c
42454248
msgid "window must be <= interval"
4246-
msgstr ""
4249+
msgstr "jendela harus <= interval"
42474250

42484251
#: extmod/ulab/code/numpy/numerical/numerical.c
42494252
msgid "wrong axis index"

locale/circuitpython.pot

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,7 @@ msgid "Cannot vary frequency on a timer that is already in use"
681681
msgstr ""
682682

683683
#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c
684+
#: ports/nrf/common-hal/alarm/pin/PinAlarm.c
684685
msgid "Cannot wake on pin edge. Only level."
685686
msgstr ""
686687

@@ -1285,7 +1286,8 @@ msgstr ""
12851286
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
12861287
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
12871288
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
1288-
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
1289+
#: ports/esp32s2/common-hal/touchio/TouchIn.c
1290+
#: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c
12891291
#: shared-module/rgbmatrix/RGBMatrix.c
12901292
msgid "Invalid pin"
12911293
msgstr ""
@@ -1663,6 +1665,7 @@ msgid "Only one TouchAlarm can be set in deep sleep."
16631665
msgstr ""
16641666

16651667
#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c
1668+
#: ports/nrf/common-hal/alarm/time/TimeAlarm.c
16661669
msgid "Only one alarm.time alarm can be set."
16671670
msgstr ""
16681671

locale/cs.po

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,7 @@ msgid "Cannot vary frequency on a timer that is already in use"
684684
msgstr ""
685685

686686
#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c
687+
#: ports/nrf/common-hal/alarm/pin/PinAlarm.c
687688
msgid "Cannot wake on pin edge. Only level."
688689
msgstr ""
689690

@@ -1288,7 +1289,8 @@ msgstr ""
12881289
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
12891290
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
12901291
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
1291-
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
1292+
#: ports/esp32s2/common-hal/touchio/TouchIn.c
1293+
#: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c
12921294
#: shared-module/rgbmatrix/RGBMatrix.c
12931295
msgid "Invalid pin"
12941296
msgstr ""
@@ -1666,6 +1668,7 @@ msgid "Only one TouchAlarm can be set in deep sleep."
16661668
msgstr ""
16671669

16681670
#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c
1671+
#: ports/nrf/common-hal/alarm/time/TimeAlarm.c
16691672
msgid "Only one alarm.time alarm can be set."
16701673
msgstr ""
16711674

locale/de_DE.po

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,7 @@ msgstr ""
694694
"Die Frequenz eines bereits verwendeten Timers kann nicht variiert werden"
695695

696696
#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c
697+
#: ports/nrf/common-hal/alarm/pin/PinAlarm.c
697698
msgid "Cannot wake on pin edge. Only level."
698699
msgstr "Kann nicht auf Flanke wecken, nur auf Level."
699700

@@ -1308,7 +1309,8 @@ msgstr "Ungültige Phase"
13081309
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
13091310
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
13101311
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
1311-
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
1312+
#: ports/esp32s2/common-hal/touchio/TouchIn.c
1313+
#: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c
13121314
#: shared-module/rgbmatrix/RGBMatrix.c
13131315
msgid "Invalid pin"
13141316
msgstr "Ungültiger Pin"
@@ -1693,6 +1695,7 @@ msgid "Only one TouchAlarm can be set in deep sleep."
16931695
msgstr ""
16941696

16951697
#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c
1698+
#: ports/nrf/common-hal/alarm/time/TimeAlarm.c
16961699
msgid "Only one alarm.time alarm can be set."
16971700
msgstr ""
16981701

locale/el.po

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,7 @@ msgid "Cannot vary frequency on a timer that is already in use"
681681
msgstr ""
682682

683683
#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c
684+
#: ports/nrf/common-hal/alarm/pin/PinAlarm.c
684685
msgid "Cannot wake on pin edge. Only level."
685686
msgstr ""
686687

@@ -1285,7 +1286,8 @@ msgstr ""
12851286
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
12861287
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
12871288
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
1288-
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
1289+
#: ports/esp32s2/common-hal/touchio/TouchIn.c
1290+
#: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c
12891291
#: shared-module/rgbmatrix/RGBMatrix.c
12901292
msgid "Invalid pin"
12911293
msgstr ""
@@ -1663,6 +1665,7 @@ msgid "Only one TouchAlarm can be set in deep sleep."
16631665
msgstr ""
16641666

16651667
#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c
1668+
#: ports/nrf/common-hal/alarm/time/TimeAlarm.c
16661669
msgid "Only one alarm.time alarm can be set."
16671670
msgstr ""
16681671

locale/en_GB.po

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,7 @@ msgid "Cannot vary frequency on a timer that is already in use"
692692
msgstr "Cannot vary frequency on a timer that is already in use"
693693

694694
#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c
695+
#: ports/nrf/common-hal/alarm/pin/PinAlarm.c
695696
msgid "Cannot wake on pin edge. Only level."
696697
msgstr "Cannot wake on pin edge. Only level."
697698

@@ -1302,7 +1303,8 @@ msgstr "Invalid phase"
13021303
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
13031304
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
13041305
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
1305-
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
1306+
#: ports/esp32s2/common-hal/touchio/TouchIn.c
1307+
#: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c
13061308
#: shared-module/rgbmatrix/RGBMatrix.c
13071309
msgid "Invalid pin"
13081310
msgstr "Invalid pin"
@@ -1684,6 +1686,7 @@ msgid "Only one TouchAlarm can be set in deep sleep."
16841686
msgstr "Only one TouchAlarm can be set in deep sleep."
16851687

16861688
#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c
1689+
#: ports/nrf/common-hal/alarm/time/TimeAlarm.c
16871690
msgid "Only one alarm.time alarm can be set."
16881691
msgstr "Only one alarm.time alarm can be set."
16891692

0 commit comments

Comments
 (0)