Merge remote-tracking branch 'origin/main' into audioout-esp32

This commit is contained in:
Jeff Epler 2021-01-07 14:11:14 -06:00
commit 30c6dd3f76
62 changed files with 981 additions and 369 deletions

@ -1 +1 @@
Subproject commit aa7e741530df471d206a4a321823a37a913a0eb8
Subproject commit c4b06e419f3d515478b05bb8ce03ebdb29cddec4

@ -1 +1 @@
Subproject commit 41f7a3530d4cacdbf668399d3a015ea29c7e169b
Subproject commit 8bb1210eebed4846dae7e76ff1db86a010b132bc

@ -1 +1 @@
Subproject commit 209edd164eb640a8ced561a54505792fc99a67b9
Subproject commit ce30b04a3c8e557d48a0607ddcb25272b196a433

@ -1 +1 @@
Subproject commit 5d81a9ea822a85e46be4a512ac44abf21e77d816
Subproject commit 4f5dc66d50e43ca8d413ab0d86c125a7a13d394f

@ -1 +1 @@
Subproject commit 01f3f6674b4493ba29b857e0f43deb69975736ec
Subproject commit fce466bd2bb70ca86b79e5cb36bbaca00afacfd1

@ -1 +1 @@
Subproject commit 9fe8f314c032cee89b9ad7697d61e9cba76431ff
Subproject commit bea5d4a347aeece71a421ee292551264e3bf7ae2

@ -1 +1 @@
Subproject commit f1cc47f024b27e670b9bf2a51c89e32f93c1b957
Subproject commit fee951908cc5f1ba7db5edd2537fade09d626730

@ -1 +1 @@
Subproject commit 434e5b5346cb0a1a9eb15989b00278be87cb2ff1
Subproject commit 608291801ce7112b280d32518de79993cc80963a

@ -1 +1 @@
Subproject commit cfffc233784961929d722ea4e9acfe5786790609
Subproject commit 4696e07638eff28392b57162d2a70e20473e97b7

@ -1 +1 @@
Subproject commit 6143ec2a96a6d218041e9cab5968de26702d7bbf
Subproject commit dd7cc167c528a94a9feed81f9c52b5d372f68258

@ -1 +1 @@
Subproject commit 53902152c674b0ba31536b50291f7ddd28960f47
Subproject commit c070f6e8dbc37757cbcb444269c6cd6a4b676647

@ -1 +1 @@
Subproject commit 88738da275a83acabb14b7140d1c79b33cdc7b02
Subproject commit 9d91ec849efb5fbc3d26d350a75a61f15d19bc48

View File

@ -5,8 +5,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
"PO-Revision-Date: 2020-10-10 23:51+0000\n"
"POT-Creation-Date: 2020-12-22 22:54+0530\n"
"PO-Revision-Date: 2020-12-30 22:25+0000\n"
"Last-Translator: oon arfiandwi <oon.arfiandwi@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: ID\n"
@ -14,13 +14,15 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 4.3-dev\n"
"X-Generator: Weblate 4.4.1-dev\n"
#: main.c
msgid ""
"\n"
"Code done running.\n"
msgstr ""
"\n"
"Kode selesai beroperasi.\n"
#: main.c
msgid ""
@ -62,7 +64,7 @@ msgstr "pin alamat %d dan pin rgb %d menunjukkan tinggi %d, bukan %d"
#: ports/atmel-samd/common-hal/sdioio/SDCard.c
msgid "%q failure: %d"
msgstr ""
msgstr "%q gagal: %d"
#: shared-bindings/microcontroller/Pin.c
msgid "%q in use"
@ -78,7 +80,7 @@ msgstr "%q indeks di luar batas"
#: py/obj.c
msgid "%q indices must be integers, not %q"
msgstr ""
msgstr "%q indeks harus bilangan bulat, bukan %q"
#: shared-bindings/vectorio/Polygon.c
msgid "%q list must be a list"
@ -86,7 +88,7 @@ msgstr "daftar %q harus berupa daftar"
#: shared-bindings/memorymonitor/AllocationAlarm.c
msgid "%q must be >= 0"
msgstr ""
msgstr "%q harus >= 0"
#: shared-bindings/_bleio/CharacteristicBuffer.c
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
@ -102,7 +104,7 @@ msgstr "%q harus berupa tuple dengan panjang 2"
#: shared-bindings/canio/Match.c
msgid "%q out of range"
msgstr ""
msgstr "%q di luar jangkauan"
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
msgid "%q pin invalid"
@ -126,23 +128,23 @@ msgstr ""
#: py/proto.c
msgid "'%q' object does not support '%q'"
msgstr ""
msgstr "Objek '%q' tidak mendukung '%q'"
#: py/obj.c
msgid "'%q' object does not support item assignment"
msgstr ""
msgstr "Objek '%q' tidak mendukung penugasan item"
#: py/obj.c
msgid "'%q' object does not support item deletion"
msgstr ""
msgstr "Objek '%q' tidak mendukung penghapusan item"
#: py/runtime.c
msgid "'%q' object has no attribute '%q'"
msgstr ""
msgstr "Objek '%q' tidak memiliki atribut '%q'"
#: py/runtime.c
msgid "'%q' object is not an iterator"
msgstr ""
msgstr "Objek '%q' bukan merupakan iterator"
#: py/objtype.c py/runtime.c
msgid "'%q' object is not callable"
@ -150,7 +152,7 @@ msgstr ""
#: py/runtime.c
msgid "'%q' object is not iterable"
msgstr ""
msgstr "Objek '%q' tidak dapat diulang"
#: py/obj.c
msgid "'%q' object is not subscriptable"
@ -224,7 +226,7 @@ msgstr "'await' diluar fungsi"
#: py/compile.c
msgid "'await', 'async for' or 'async with' outside async function"
msgstr ""
msgstr "'await', 'async for' atau 'async with' di luar fungsi async"
#: py/compile.c
msgid "'break' outside loop"
@ -256,7 +258,7 @@ msgstr "'return' diluar fungsi"
#: py/compile.c
msgid "'yield from' inside async function"
msgstr ""
msgstr "'yield from' di dalam fungsi async"
#: py/compile.c
msgid "'yield' outside function"
@ -285,7 +287,7 @@ msgstr "Sebuah channel hardware interrupt sedang digunakan"
#: ports/esp32s2/common-hal/analogio/AnalogIn.c
msgid "ADC2 is being used by WiFi"
msgstr ""
msgstr "ADC2 sedang digunakan oleh WiFi"
#: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c
#, c-format
@ -308,13 +310,13 @@ msgstr "Semua perangkat I2C sedang digunakan"
#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
msgid "All PCNT units in use"
msgstr ""
msgstr "Semua unit PCNT sedang digunakan"
#: ports/atmel-samd/common-hal/canio/Listener.c
#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "All RX FIFOs in use"
msgstr ""
msgstr "Semua RX FIFO sedang digunakan"
#: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c
msgid "All SPI peripherals are in use"
@ -1188,6 +1190,7 @@ msgstr "Fase tidak valid"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
@ -1512,6 +1515,10 @@ msgstr ""
msgid "Only one alarm.time alarm can be set."
msgstr ""
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "Only one alarm.touch alarm can be set."
msgstr ""
#: shared-module/displayio/ColorConverter.c
msgid "Only one color can be transparent at a time"
msgstr ""
@ -1825,18 +1832,21 @@ msgid ""
"enough power for the whole circuit and press reset (after ejecting "
"CIRCUITPY).\n"
msgstr ""
"Kekuatan mikrokontroler menurun. Pastikan catu daya Anda menyediakan\n"
"daya yang cukup untuk seluruh rangkaian dan tekan reset (setelah "
"mengeluarkan CIRCUITPY).\n"
#: shared-module/audiomixer/MixerVoice.c
msgid "The sample's bits_per_sample does not match the mixer's"
msgstr ""
msgstr "Sampel bits_per_sampel tidak cocok dengan mixer"
#: shared-module/audiomixer/MixerVoice.c
msgid "The sample's channel count does not match the mixer's"
msgstr ""
msgstr "Jumlah saluran sampel tidak cocok dengan mixer"
#: shared-module/audiomixer/MixerVoice.c
msgid "The sample's sample rate does not match the mixer's"
msgstr ""
msgstr "Tingkat sampel dari sampel tidak cocok dengan mixer"
#: shared-module/audiomixer/MixerVoice.c
msgid "The sample's signedness does not match the mixer's"
@ -1848,15 +1858,15 @@ msgstr ""
#: shared-bindings/displayio/TileGrid.c shared-module/displayio/TileGrid.c
msgid "Tile index out of bounds"
msgstr ""
msgstr "Indeks ubin di luar batas"
#: shared-bindings/displayio/TileGrid.c
msgid "Tile value out of bounds"
msgstr ""
msgstr "Nilai ubin di luar batas"
#: shared-bindings/displayio/TileGrid.c
msgid "Tile width must exactly divide bitmap width"
msgstr ""
msgstr "Lebar ubin harus persis membagi lebar bitmap"
#: shared-bindings/alarm/time/TimeAlarm.c
msgid "Time is in the past."
@ -1882,15 +1892,20 @@ msgstr "Terlalu banyak channel dalam sampel"
#: shared-module/displayio/__init__.c
msgid "Too many display busses"
msgstr ""
msgstr "Terlalu banyak tampilan bus"
#: shared-module/displayio/__init__.c
msgid "Too many displays"
msgstr ""
msgstr "Terlalu banyak tampilan"
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
msgid "Total data to write is larger than outgoing_packet_length"
msgstr ""
"Total data yang akan ditulis lebih besar daripada outgoing_packet_length"
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "TouchAlarm not available in light sleep"
msgstr ""
#: py/obj.c
msgid "Traceback (most recent call last):\n"
@ -1898,35 +1913,35 @@ msgstr ""
#: shared-bindings/time/__init__.c
msgid "Tuple or struct_time argument required"
msgstr ""
msgstr "Diperlukan argumen Tuple atau struct_time"
#: ports/stm/common-hal/busio/UART.c
msgid "UART Buffer allocation error"
msgstr ""
msgstr "Kesalahan alokasi Buffer UART"
#: ports/stm/common-hal/busio/UART.c
msgid "UART De-init error"
msgstr ""
msgstr "Kesalahan UART De-init"
#: ports/stm/common-hal/busio/UART.c
msgid "UART Init Error"
msgstr ""
msgstr "Kesalahan Init UART"
#: ports/stm/common-hal/busio/UART.c
msgid "UART Re-init error"
msgstr ""
msgstr "Kesalahan Re-init UART"
#: ports/stm/common-hal/busio/UART.c
msgid "UART write error"
msgstr ""
msgstr "Kesalahan penulisan UART"
#: shared-module/usb_hid/Device.c
msgid "USB Busy"
msgstr ""
msgstr "USB Sibuk"
#: shared-module/usb_hid/Device.c
msgid "USB Error"
msgstr ""
msgstr "Kesalahan USB"
#: shared-bindings/_bleio/UUID.c
msgid "UUID integer value must be 0-0xffff"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-12-29 16:31-0600\n"
"POT-Creation-Date: 2021-01-07 14:11-0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -1184,6 +1184,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
@ -1514,6 +1515,10 @@ msgstr ""
msgid "Only one alarm.time alarm can be set."
msgstr ""
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "Only one alarm.touch alarm can be set."
msgstr ""
#: shared-module/displayio/ColorConverter.c
msgid "Only one color can be transparent at a time"
msgstr ""
@ -2551,6 +2556,10 @@ msgstr ""
msgid "data must be of equal length"
msgstr ""
#: extmod/ulab/code/ndarray.c
msgid "data type not understood"
msgstr ""
#: py/parsenum.c
msgid "decimal numbers not supported"
msgstr ""
@ -2861,7 +2870,7 @@ msgid "input and output shapes are not compatible"
msgstr ""
#: extmod/ulab/code/ulab_create.c
msgid "input argument must be an integer or a 2-tuple"
msgid "input argument must be an integer, a tuple, or a list"
msgstr ""
#: extmod/ulab/code/fft/fft.c
@ -3104,6 +3113,10 @@ msgstr ""
msgid "maxiter should be > 0"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
msgid "median argument must be an ndarray"
msgstr ""
#: py/runtime.c
#, c-format
msgid "memory allocation failed, allocating %u bytes"
@ -3333,10 +3346,6 @@ msgstr ""
msgid "operation is implemented for 1D Boolean arrays only"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
msgid "operation is not implemented for flattened array"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
msgid "operation is not implemented on ndarrays"
msgstr ""
@ -3680,6 +3689,10 @@ msgstr ""
msgid "too many arguments provided with the given format"
msgstr ""
#: extmod/ulab/code/ulab_create.c
msgid "too many dimensions"
msgstr ""
#: extmod/ulab/code/ndarray.c
msgid "too many indices"
msgstr ""
@ -3689,6 +3702,10 @@ msgstr ""
msgid "too many values to unpack (expected %d)"
msgstr ""
#: extmod/ulab/code/approx/approx.c
msgid "trapz is defined for 1D arrays"
msgstr ""
#: extmod/ulab/code/approx/approx.c
msgid "trapz is defined for 1D arrays of equal length"
msgstr ""
@ -3697,10 +3714,6 @@ msgstr ""
msgid "trigger level must be 0 or 1"
msgstr ""
#: extmod/ulab/code/linalg/linalg.c
msgid "tuple index out of range"
msgstr ""
#: py/obj.c
msgid "tuple/list has wrong length"
msgstr ""

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
"POT-Creation-Date: 2020-12-22 22:54+0530\n"
"PO-Revision-Date: 2020-12-04 18:33+0000\n"
"Last-Translator: vkuthan <vit.kuthan@seznam.cz>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -1172,6 +1172,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
@ -1490,6 +1491,10 @@ msgstr ""
msgid "Only one alarm.time alarm can be set."
msgstr ""
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "Only one alarm.touch alarm can be set."
msgstr ""
#: shared-module/displayio/ColorConverter.c
msgid "Only one color can be transparent at a time"
msgstr ""
@ -1860,6 +1865,10 @@ msgstr ""
msgid "Total data to write is larger than outgoing_packet_length"
msgstr ""
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "TouchAlarm not available in light sleep"
msgstr ""
#: py/obj.c
msgid "Traceback (most recent call last):\n"
msgstr ""

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
"POT-Creation-Date: 2020-12-22 22:54+0530\n"
"PO-Revision-Date: 2020-11-26 03:11+0000\n"
"Last-Translator: Daniel Bravo Darriba <bravodarriba@gmail.com>\n"
"Language: de_DE\n"
@ -1187,6 +1187,7 @@ msgstr "Ungültige Phase"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
@ -1513,6 +1514,10 @@ msgstr ""
msgid "Only one alarm.time alarm can be set."
msgstr ""
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "Only one alarm.touch alarm can be set."
msgstr ""
#: shared-module/displayio/ColorConverter.c
msgid "Only one color can be transparent at a time"
msgstr ""
@ -1900,6 +1905,10 @@ msgstr ""
"Die Gesamtzahl der zu schreibenden Daten ist größer als "
"outgoing_packet_length"
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "TouchAlarm not available in light sleep"
msgstr ""
#: py/obj.c
msgid "Traceback (most recent call last):\n"
msgstr "Zurückverfolgung (jüngste Aufforderung zuletzt):\n"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
"POT-Creation-Date: 2020-12-22 22:54+0530\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
@ -1169,6 +1169,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
@ -1487,6 +1488,10 @@ msgstr ""
msgid "Only one alarm.time alarm can be set."
msgstr ""
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "Only one alarm.touch alarm can be set."
msgstr ""
#: shared-module/displayio/ColorConverter.c
msgid "Only one color can be transparent at a time"
msgstr ""
@ -1857,6 +1862,10 @@ msgstr ""
msgid "Total data to write is larger than outgoing_packet_length"
msgstr ""
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "TouchAlarm not available in light sleep"
msgstr ""
#: py/obj.c
msgid "Traceback (most recent call last):\n"
msgstr ""

View File

@ -7,16 +7,16 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
"PO-Revision-Date: 2020-11-27 18:34+0000\n"
"Last-Translator: Iván Montiel Cardona <ivan_montiel2013@hotmail.com>\n"
"POT-Creation-Date: 2020-12-22 22:54+0530\n"
"PO-Revision-Date: 2020-12-30 22:25+0000\n"
"Last-Translator: Hugo Dahl <hugo@code-jedi.com>\n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.4-dev\n"
"X-Generator: Weblate 4.4.1-dev\n"
#: main.c
msgid ""
@ -1190,6 +1190,7 @@ msgstr "Fase inválida"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
@ -1236,7 +1237,7 @@ msgstr "Modo de ejecución inválido."
#: shared-module/_bleio/Attribute.c
msgid "Invalid security_mode"
msgstr "Modo de seguridad no válido"
msgstr "'security_mode' no válido"
#: shared-bindings/audiomixer/Mixer.c
msgid "Invalid voice"
@ -1276,7 +1277,7 @@ msgstr "Length debe ser un int"
#: py/objslice.c
msgid "Length must be non-negative"
msgstr "Longitud no deberia ser negativa"
msgstr "Length no deberia ser negativa"
#: shared-module/bitbangio/SPI.c
msgid "MISO pin init failed."
@ -1514,6 +1515,10 @@ msgstr ""
msgid "Only one alarm.time alarm can be set."
msgstr ""
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "Only one alarm.touch alarm can be set."
msgstr ""
#: shared-module/displayio/ColorConverter.c
msgid "Only one color can be transparent at a time"
msgstr "Solo un color puede ser transparente a la vez"
@ -1907,6 +1912,10 @@ msgid "Total data to write is larger than outgoing_packet_length"
msgstr ""
"Los datos totales a escribir son más grandes que outgoing_packet_length"
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "TouchAlarm not available in light sleep"
msgstr ""
#: py/obj.c
msgid "Traceback (most recent call last):\n"
msgstr "Traceback (ultima llamada reciente):\n"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
"POT-Creation-Date: 2020-12-22 22:54+0530\n"
"PO-Revision-Date: 2018-12-20 22:15-0800\n"
"Last-Translator: Timothy <me@timothygarcia.ca>\n"
"Language-Team: fil\n"
@ -1184,6 +1184,7 @@ msgstr "Mali ang phase"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
@ -1505,6 +1506,10 @@ msgstr ""
msgid "Only one alarm.time alarm can be set."
msgstr ""
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "Only one alarm.touch alarm can be set."
msgstr ""
#: shared-module/displayio/ColorConverter.c
msgid "Only one color can be transparent at a time"
msgstr ""
@ -1877,6 +1882,10 @@ msgstr ""
msgid "Total data to write is larger than outgoing_packet_length"
msgstr ""
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "TouchAlarm not available in light sleep"
msgstr ""
#: py/obj.c
msgid "Traceback (most recent call last):\n"
msgstr "Traceback (pinakahuling huling tawag): \n"

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
"POT-Creation-Date: 2020-12-22 22:54+0530\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
@ -1169,6 +1169,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
@ -1487,6 +1488,10 @@ msgstr ""
msgid "Only one alarm.time alarm can be set."
msgstr ""
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "Only one alarm.touch alarm can be set."
msgstr ""
#: shared-module/displayio/ColorConverter.c
msgid "Only one color can be transparent at a time"
msgstr ""
@ -1857,6 +1862,10 @@ msgstr ""
msgid "Total data to write is larger than outgoing_packet_length"
msgstr ""
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "TouchAlarm not available in light sleep"
msgstr ""
#: py/obj.c
msgid "Traceback (most recent call last):\n"
msgstr ""

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
"POT-Creation-Date: 2020-12-22 22:54+0530\n"
"PO-Revision-Date: 2018-10-02 16:27+0200\n"
"Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n"
"Language-Team: \n"
@ -1186,6 +1186,7 @@ msgstr "Fase non valida"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
@ -1510,6 +1511,10 @@ msgstr ""
msgid "Only one alarm.time alarm can be set."
msgstr ""
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "Only one alarm.touch alarm can be set."
msgstr ""
#: shared-module/displayio/ColorConverter.c
msgid "Only one color can be transparent at a time"
msgstr ""
@ -1889,6 +1894,10 @@ msgstr "Troppi schermi"
msgid "Total data to write is larger than outgoing_packet_length"
msgstr ""
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "TouchAlarm not available in light sleep"
msgstr ""
#: py/obj.c
msgid "Traceback (most recent call last):\n"
msgstr "Traceback (chiamata più recente per ultima):\n"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
"POT-Creation-Date: 2020-12-22 22:54+0530\n"
"PO-Revision-Date: 2020-11-27 18:34+0000\n"
"Last-Translator: sporeball <sporeballdev@gmail.com>\n"
"Language-Team: none\n"
@ -1182,6 +1182,7 @@ msgstr "不正なphase"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
@ -1502,6 +1503,10 @@ msgstr ""
msgid "Only one alarm.time alarm can be set."
msgstr ""
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "Only one alarm.touch alarm can be set."
msgstr ""
#: shared-module/displayio/ColorConverter.c
msgid "Only one color can be transparent at a time"
msgstr ""
@ -1879,6 +1884,10 @@ msgstr ""
msgid "Total data to write is larger than outgoing_packet_length"
msgstr ""
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "TouchAlarm not available in light sleep"
msgstr ""
#: py/obj.c
msgid "Traceback (most recent call last):\n"
msgstr "トレースバック(最新の呼び出しが末尾):\n"

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
"POT-Creation-Date: 2020-12-22 22:54+0530\n"
"PO-Revision-Date: 2020-10-05 12:12+0000\n"
"Last-Translator: Michal Čihař <michal@cihar.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -1172,6 +1172,7 @@ msgstr "단계가 잘못되었습니다"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
@ -1490,6 +1491,10 @@ msgstr ""
msgid "Only one alarm.time alarm can be set."
msgstr ""
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "Only one alarm.touch alarm can be set."
msgstr ""
#: shared-module/displayio/ColorConverter.c
msgid "Only one color can be transparent at a time"
msgstr ""
@ -1860,6 +1865,10 @@ msgstr ""
msgid "Total data to write is larger than outgoing_packet_length"
msgstr ""
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "TouchAlarm not available in light sleep"
msgstr ""
#: py/obj.c
msgid "Traceback (most recent call last):\n"
msgstr ""

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
"POT-Creation-Date: 2020-12-22 22:54+0530\n"
"PO-Revision-Date: 2020-12-23 20:14+0000\n"
"Last-Translator: _fonzlate <vooralfred@gmail.com>\n"
"Language-Team: none\n"
@ -1183,6 +1183,7 @@ msgstr "Ongeldige fase"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
@ -1507,6 +1508,10 @@ msgstr ""
msgid "Only one alarm.time alarm can be set."
msgstr "Slechts één alarm.time alarm kan worden ingesteld."
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "Only one alarm.touch alarm can be set."
msgstr ""
#: shared-module/displayio/ColorConverter.c
msgid "Only one color can be transparent at a time"
msgstr "Er kan maar één kleur per keer transparant zijn"
@ -1899,6 +1904,10 @@ msgstr "Teveel beeldschermen"
msgid "Total data to write is larger than outgoing_packet_length"
msgstr "Totale data om te schrijven is groter dan outgoing_packet_length"
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "TouchAlarm not available in light sleep"
msgstr ""
#: py/obj.c
msgid "Traceback (most recent call last):\n"
msgstr "Traceback (meest recente call laatst):\n"

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
"POT-Creation-Date: 2020-12-22 22:54+0530\n"
"PO-Revision-Date: 2020-12-02 20:29+0000\n"
"Last-Translator: Maciej Stankiewicz <tawezik@gmail.com>\n"
"Language-Team: pl\n"
@ -1182,6 +1182,7 @@ msgstr "Zła faza"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
@ -1501,6 +1502,10 @@ msgstr ""
msgid "Only one alarm.time alarm can be set."
msgstr ""
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "Only one alarm.touch alarm can be set."
msgstr ""
#: shared-module/displayio/ColorConverter.c
msgid "Only one color can be transparent at a time"
msgstr "W danym momencie przezroczysty może być tylko jeden kolor"
@ -1871,6 +1876,10 @@ msgstr "Zbyt wiele wyświetlaczy"
msgid "Total data to write is larger than outgoing_packet_length"
msgstr ""
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "TouchAlarm not available in light sleep"
msgstr ""
#: py/obj.c
msgid "Traceback (most recent call last):\n"
msgstr "Ślad wyjątku (najnowsze wywołanie na końcu):\n"

View File

@ -5,8 +5,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
"PO-Revision-Date: 2020-12-29 16:08+0000\n"
"POT-Creation-Date: 2020-12-22 22:54+0530\n"
"PO-Revision-Date: 2021-01-01 04:29+0000\n"
"Last-Translator: Wellington Terumi Uemura <wellingtonuemura@gmail.com>\n"
"Language-Team: \n"
"Language: pt_BR\n"
@ -1199,6 +1199,7 @@ msgstr "Fase Inválida"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
@ -1522,6 +1523,10 @@ msgstr ""
msgid "Only one alarm.time alarm can be set."
msgstr "Apenas um alarme alarm.time pode ser definido."
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "Only one alarm.touch alarm can be set."
msgstr "Apenas um alarme alarm.touch pode ser definido."
#: shared-module/displayio/ColorConverter.c
msgid "Only one color can be transparent at a time"
msgstr "Apenas uma cor pode ser transparente de cada vez"
@ -1922,6 +1927,10 @@ msgid "Total data to write is larger than outgoing_packet_length"
msgstr ""
"O total dos dados que serão gravados é maior que outgoing_packet_length"
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "TouchAlarm not available in light sleep"
msgstr "O TouchAlarm não está disponívle no modo light sleep"
#: py/obj.c
msgid "Traceback (most recent call last):\n"
msgstr "Traceback (a última chamada mais recente):\n"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
"POT-Creation-Date: 2020-12-22 22:54+0530\n"
"PO-Revision-Date: 2020-12-28 17:59+0000\n"
"Last-Translator: Jonny Bergdahl <jonny@bergdahl.it>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -1182,6 +1182,7 @@ msgstr "Ogiltig fas"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
@ -1506,6 +1507,10 @@ msgstr ""
msgid "Only one alarm.time alarm can be set."
msgstr "Endast ett alarm.time kan ställas in."
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "Only one alarm.touch alarm can be set."
msgstr ""
#: shared-module/displayio/ColorConverter.c
msgid "Only one color can be transparent at a time"
msgstr "Bara en färg kan vara genomskinlig i taget"
@ -1897,6 +1902,10 @@ msgstr "För många displayer"
msgid "Total data to write is larger than outgoing_packet_length"
msgstr "Total data som ska skrivas är större än outgoing_packet_length"
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "TouchAlarm not available in light sleep"
msgstr ""
#: py/obj.c
msgid "Traceback (most recent call last):\n"
msgstr "Traceback (senaste anrop):\n"

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: circuitpython-cn\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-12-23 23:04-0500\n"
"POT-Creation-Date: 2020-12-22 22:54+0530\n"
"PO-Revision-Date: 2020-11-19 01:28+0000\n"
"Last-Translator: hexthat <hexthat@gmail.com>\n"
"Language-Team: Chinese Hanyu Pinyin\n"
@ -1180,6 +1180,7 @@ msgstr "Jiēduàn wúxiào"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
@ -1503,6 +1504,10 @@ msgstr ""
msgid "Only one alarm.time alarm can be set."
msgstr ""
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "Only one alarm.touch alarm can be set."
msgstr ""
#: shared-module/displayio/ColorConverter.c
msgid "Only one color can be transparent at a time"
msgstr "Yīcì zhǐ néng yǒuyī zhǒng yánsè shì tòumíng de"
@ -1887,6 +1892,10 @@ msgstr "Xiǎnshì tài duō"
msgid "Total data to write is larger than outgoing_packet_length"
msgstr "Yào xiě rù de zǒng shùjù dàyú outgoing_packet_length"
#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c
msgid "TouchAlarm not available in light sleep"
msgstr ""
#: py/obj.c
msgid "Traceback (most recent call last):\n"
msgstr "Traceback (Zuìjìn yīcì dǎ diànhuà):\n"

2
main.c
View File

@ -157,7 +157,7 @@ STATIC void start_mp(supervisor_allocation* heap) {
#if CIRCUITPY_ALARM
// Record which alarm woke us up, if any. An object may be created so the heap must be functional.
alarm_save_wakeup_alarm();
alarm_save_wake_alarm();
// Reset alarm module only after we retrieved the wakeup alarm.
alarm_reset();
#endif

View File

@ -22,6 +22,7 @@ CIRCUITPY_GAMEPAD = 1
CIRCUITPY_BUSDEVICE = 1
# Include these Python libraries in firmware.
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SD
#FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_ADXL34x

View File

@ -20,6 +20,7 @@ CIRCUITPY_GAMEPAD = 0
CFLAGS_INLINE_LIMIT = 50
# Include these Python libraries in firmware.
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Crickit
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Motor
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel

View File

@ -28,4 +28,5 @@ CFLAGS_INLINE_LIMIT = 35
SUPEROPT_GC = 0
# Include these Python libraries in firmware.
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_RFM69

View File

@ -29,4 +29,5 @@ CFLAGS_INLINE_LIMIT = 35
SUPEROPT_GC = 0
# Include these Python libraries in firmware.
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_RFM9x

View File

@ -27,6 +27,7 @@ CFLAGS_INLINE_LIMIT = 55
SUPEROPT_GC = 0
# Include these Python libraries in firmware.
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel

View File

@ -15,3 +15,6 @@ LONGINT_IMPL = MPZ
CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_BITBANG_APA102 = 1
#Include these Python libraries in firmware.
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DotStar

View File

@ -21,6 +21,7 @@ CIRCUITPY_GAMEPAD = 0
CIRCUITPY_RGBMATRIX = 0
CIRCUITPY_PS2IO = 0
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SD

View File

@ -21,6 +21,7 @@ CIRCUITPY_GAMEPAD = 0
CIRCUITPY_RGBMATRIX = 0
CIRCUITPY_PS2IO = 0
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SD

View File

@ -13,4 +13,5 @@ LONGINT_IMPL = MPZ
CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_USTACK = 1
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel

View File

@ -24,3 +24,4 @@ CIRCUITPY_TOUCHIO=0
CIRCUITPY_BUSDEVICE=1
# Include these Python libraries in firmware.
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice

View File

@ -27,4 +27,5 @@ CIRCUITPY_COUNTIO=0
CIRCUITPY_BUSDEVICE=1
# Include these Python libraries in firmware.
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SD

View File

@ -194,6 +194,7 @@ SRC_C += \
lib/utils/sys_stdio_mphal.c \
lib/netutils/netutils.c \
peripherals/timer.c \
peripherals/touch.c \
peripherals/pcnt.c \
peripherals/pins.c \
peripherals/rmt.c \

View File

@ -7,7 +7,7 @@ This port adds the ESP32-S2 line of modules from Espressif to Circuitpython. ESP
- **bindings/** contains some required bindings to the ESP-IDF for exceptions and memory.
- **boards/** contains the configuration files for each development board and breakout available on the port.
- **common-hal/** contains the port-specific module implementations, used by shared-module and shared-bindings.
- **esp-idf/** contains the Espressif IoT development framework installation, includign all the drivers for the port.
- **esp-idf/** contains the Espressif IoT development framework installation, including all the drivers for the port.
- **modules/** contains information specific to certain ESP32-S2 hardware modules, such as the pins used for flash and RAM on the WROVER and WROOM.
- **peripherals/** contains peripheral setup files and peripheral mapping information, sorted by family and sub-variant. Most files in this directory can be generated with the python scripts in **tools/**.
- **supervisor/** contains port-specific implementations of internal flash, serial and USB, as well as the **port.c** file, which initializes the port at startup.

View File

@ -30,7 +30,6 @@
#define MICROPY_HW_MCU_NAME "ESP32S2"
#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0)
#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n")
#define AUTORESET_DELAY_MS 500

View File

@ -9,9 +9,9 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO18) },
{ MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO18) },
{ MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) },
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO13) },
{ MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO13) },
{ MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) },
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO14) },
{ MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO14) },
{ MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) },
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO12) },
@ -82,18 +82,16 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO11) },
{ MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_GPIO11) },
{ MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_GPIO40) }, // MTDO
{ MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_GPIO45) },
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) }, // Blue LED
{ MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_GPIO40) }, // APA102
{ MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_GPIO45) }, // APA102
{ MP_ROM_QSTR(MP_QSTR_LDO2), MP_ROM_PTR(&pin_GPIO21) },
{ MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) },
{ MP_ROM_QSTR(MP_QSTR_LDO2), MP_ROM_PTR(&pin_GPIO21) }, // Second LDO Enable control
{ MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, // Second LDO Enable control
{ MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) },
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) },
{ MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) },
{ MP_ROM_QSTR(MP_QSTR_AMB), MP_ROM_PTR(&pin_GPIO4) },
{ MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, // Ambient Light Sensor
{ MP_ROM_QSTR(MP_QSTR_AMB), MP_ROM_PTR(&pin_GPIO4) }, // Ambient Light Sensor
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },

View File

@ -36,3 +36,13 @@
// #define MICROPY_HW_APA102_MOSI (&pin_GPIO40)
// #define MICROPY_HW_APA102_SCK (&pin_GPIO45)
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO38)
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO33)
#define DEFAULT_SPI_BUS_SCK (&pin_GPIO36)
#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35)
#define DEFAULT_SPI_BUS_MISO (&pin_GPIO37)
#define DEFAULT_UART_BUS_RX (&pin_GPIO44)
#define DEFAULT_UART_BUS_TX (&pin_GPIO43)

View File

@ -9,10 +9,9 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO18) },
{ MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO18) },
{ MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) },
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO13) },
{ MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO13) },
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) },
{ MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) },
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO14) },
{ MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO14) },
{ MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) },
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO12) },
@ -26,7 +25,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO5) },
{ MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_GPIO5) },
{ MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) },
{ MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) },
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) },
{ MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO36) },
@ -83,17 +82,16 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO11) },
{ MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_GPIO11) },
{ MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_GPIO40) }, // MTDO
{ MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_GPIO45) },
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) }, // Blue LED
{ MP_ROM_QSTR(MP_QSTR_LDO2), MP_ROM_PTR(&pin_GPIO21) },
{ MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) },
{ MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_GPIO40) }, // APA102
{ MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_GPIO45) }, // APA102
{ MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) },
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) },
{ MP_ROM_QSTR(MP_QSTR_LDO2), MP_ROM_PTR(&pin_GPIO21) }, // Second LDO Enable control
{ MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, // Second LDO Enable control
{ MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) },
{ MP_ROM_QSTR(MP_QSTR_AMB), MP_ROM_PTR(&pin_GPIO4) },
{ MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, // Ambient Light Sensor
{ MP_ROM_QSTR(MP_QSTR_AMB), MP_ROM_PTR(&pin_GPIO4) }, // Ambient Light Sensor
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },

View File

@ -31,11 +31,13 @@
#include "py/runtime.h"
#include "shared-bindings/alarm/__init__.h"
#include "shared-bindings/alarm/pin/PinAlarm.h"
#include "shared-bindings/alarm/SleepMemory.h"
#include "shared-bindings/alarm/pin/PinAlarm.h"
#include "shared-bindings/alarm/time/TimeAlarm.h"
#include "shared-bindings/microcontroller/__init__.h"
#include "shared-bindings/alarm/touch/TouchAlarm.h"
#include "shared-bindings/wifi/__init__.h"
#include "shared-bindings/microcontroller/__init__.h"
#include "supervisor/port.h"
#include "supervisor/shared/workflow.h"
@ -53,20 +55,23 @@ const alarm_sleep_memory_obj_t alarm_sleep_memory_obj = {
};
void alarm_reset(void) {
alarm_time_timealarm_reset();
alarm_pin_pinalarm_reset();
alarm_sleep_memory_reset();
alarm_pin_pinalarm_reset();
alarm_time_timealarm_reset();
alarm_touch_touchalarm_reset();
esp_sleep_disable_wakeup_source(ESP_SLEEP_WAKEUP_ALL);
}
STATIC esp_sleep_wakeup_cause_t _get_wakeup_cause(void) {
if (alarm_time_timealarm_woke_us_up()) {
return ESP_SLEEP_WAKEUP_TIMER;
}
if (alarm_pin_pinalarm_woke_us_up()) {
return ESP_SLEEP_WAKEUP_GPIO;
}
if (alarm_time_timealarm_woke_us_up()) {
return ESP_SLEEP_WAKEUP_TIMER;
}
if (alarm_touch_touchalarm_woke_us_up()) {
return ESP_SLEEP_WAKEUP_TOUCHPAD;
}
return esp_sleep_get_wakeup_cause();
}
@ -88,8 +93,7 @@ STATIC mp_obj_t _get_wake_alarm(size_t n_alarms, const mp_obj_t *alarms) {
}
case ESP_SLEEP_WAKEUP_TOUCHPAD:
// TODO: implement TouchIO
// Wake up from touch on pad, esp_sleep_get_touchpad_wakeup_status()
return alarm_touch_touchalarm_get_wakeup_alarm(n_alarms, alarms);
break;
case ESP_SLEEP_WAKEUP_UNDEFINED:
@ -108,6 +112,7 @@ mp_obj_t common_hal_alarm_get_wake_alarm(void) {
STATIC void _setup_sleep_alarms(bool deep_sleep, size_t n_alarms, const mp_obj_t *alarms) {
alarm_pin_pinalarm_set_alarms(deep_sleep, n_alarms, alarms);
alarm_time_timealarm_set_alarms(deep_sleep, n_alarms, alarms);
alarm_touch_touchalarm_set_alarm(deep_sleep, n_alarms, alarms);
}
STATIC void _idle_until_alarm(void) {
@ -116,9 +121,9 @@ STATIC void _idle_until_alarm(void) {
RUN_BACKGROUND_TASKS;
// Allow ctrl-C interrupt.
if (alarm_woken_from_sleep()) {
alarm_save_wake_alarm();
return;
}
port_idle_until_interrupt();
}
}
@ -144,6 +149,7 @@ void common_hal_alarm_set_deep_sleep_alarms(size_t n_alarms, const mp_obj_t *ala
void NORETURN alarm_enter_deep_sleep(void) {
alarm_pin_pinalarm_prepare_for_deep_sleep();
alarm_touch_touchalarm_prepare_for_deep_sleep();
// The ESP-IDF caches the deep sleep settings and applies them before sleep.
// We don't need to worry about resetting them in the interim.
esp_deep_sleep_start();

View File

@ -0,0 +1,153 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 microDev
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "shared-bindings/alarm/touch/TouchAlarm.h"
#include "shared-bindings/microcontroller/__init__.h"
#include "esp_sleep.h"
#include "peripherals/touch.h"
#include "supervisor/esp_port.h"
static volatile bool woke_up = false;
static touch_pad_t touch_channel = TOUCH_PAD_MAX;
void common_hal_alarm_touch_touchalarm_construct(alarm_touch_touchalarm_obj_t *self, const mcu_pin_obj_t *pin) {
if (pin->touch_channel == TOUCH_PAD_MAX) {
mp_raise_ValueError(translate("Invalid pin"));
}
claim_pin(pin);
self->pin = pin;
}
mp_obj_t alarm_touch_touchalarm_get_wakeup_alarm(const size_t n_alarms, const mp_obj_t *alarms) {
// First, check to see if we match any given alarms.
for (size_t i = 0; i < n_alarms; i++) {
if (MP_OBJ_IS_TYPE(alarms[i], &alarm_touch_touchalarm_type)) {
return alarms[i];
}
}
alarm_touch_touchalarm_obj_t *alarm = m_new_obj(alarm_touch_touchalarm_obj_t);
alarm->base.type = &alarm_touch_touchalarm_type;
alarm->pin = NULL;
// Map the pin number back to a pin object.
for (size_t i = 0; i < mcu_pin_globals.map.used; i++) {
const mcu_pin_obj_t* pin_obj = MP_OBJ_TO_PTR(mcu_pin_globals.map.table[i].value);
if (pin_obj->touch_channel == touch_channel) {
alarm->pin = mcu_pin_globals.map.table[i].value;
break;
}
}
return alarm;
}
// This is used to wake the main CircuitPython task.
void touch_interrupt(void *arg) {
(void) arg;
woke_up = true;
BaseType_t task_wakeup;
vTaskNotifyGiveFromISR(circuitpython_task, &task_wakeup);
if (task_wakeup) {
portYIELD_FROM_ISR();
}
}
void alarm_touch_touchalarm_set_alarm(const bool deep_sleep, const size_t n_alarms, const mp_obj_t *alarms) {
bool touch_alarm_set = false;
alarm_touch_touchalarm_obj_t *touch_alarm = MP_OBJ_NULL;
for (size_t i = 0; i < n_alarms; i++) {
if (MP_OBJ_IS_TYPE(alarms[i], &alarm_touch_touchalarm_type)) {
if (!touch_alarm_set) {
touch_alarm = MP_OBJ_TO_PTR(alarms[i]);
touch_alarm_set = true;
} else {
mp_raise_ValueError(translate("Only one alarm.touch alarm can be set."));
}
}
}
if (!touch_alarm_set) {
return;
}
touch_channel = touch_alarm->pin->touch_channel;
// configure interrupt for pretend to deep sleep
// this will be disabled if we actually deep sleep
// intialize touchpad
peripherals_touch_reset();
peripherals_touch_never_reset(true);
peripherals_touch_init(touch_channel);
// wait for touch data to reset
mp_hal_delay_ms(10);
// configure trigger threshold
uint32_t touch_value;
touch_pad_read_benchmark(touch_channel, &touch_value);
touch_pad_set_thresh(touch_channel, touch_value * 0.1); //10%
// configure touch interrupt
touch_pad_timeout_set(true, SOC_TOUCH_PAD_THRESHOLD_MAX);
touch_pad_isr_register(touch_interrupt, NULL, TOUCH_PAD_INTR_MASK_ALL);
touch_pad_intr_enable(TOUCH_PAD_INTR_MASK_ACTIVE | TOUCH_PAD_INTR_MASK_INACTIVE | TOUCH_PAD_INTR_MASK_TIMEOUT);
}
void alarm_touch_touchalarm_prepare_for_deep_sleep(void) {
// intialize touchpad
peripherals_touch_never_reset(false);
peripherals_touch_reset();
peripherals_touch_init(touch_channel);
// configure touchpad for sleep
touch_pad_sleep_channel_enable(touch_channel, true);
touch_pad_sleep_channel_enable_proximity(touch_channel, false);
// wait for touch data to reset
mp_hal_delay_ms(10);
// configure trigger threshold
uint32_t touch_value;
touch_pad_sleep_channel_read_smooth(touch_channel, &touch_value);
touch_pad_sleep_set_threshold(touch_channel, touch_value * 0.1); //10%
// enable touchpad wakeup
esp_sleep_enable_touchpad_wakeup();
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON);
}
bool alarm_touch_touchalarm_woke_us_up(void) {
return woke_up;
}
void alarm_touch_touchalarm_reset(void) {
woke_up = false;
touch_channel = TOUCH_PAD_MAX;
peripherals_touch_never_reset(false);
}

View File

@ -0,0 +1,46 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 microDev
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef MICROPY_INCLUDED_COMMON_HAL_ALARM_TOUCH_TOUCHALARM_H
#define MICROPY_INCLUDED_COMMON_HAL_ALARM_TOUCH_TOUCHALARM_H
#include "py/obj.h"
#include "common-hal/microcontroller/Pin.h"
typedef struct {
mp_obj_base_t base;
const mcu_pin_obj_t *pin;
} alarm_touch_touchalarm_obj_t;
// Find the alarm object that caused us to wake up or create an equivalent one.
mp_obj_t alarm_touch_touchalarm_get_wakeup_alarm(const size_t n_alarms, const mp_obj_t *alarms);
// Check for the wake up alarm from pretend deep sleep.
void alarm_touch_touchalarm_set_alarm(const bool deep_sleep, const size_t n_alarms, const mp_obj_t *alarms);
void alarm_touch_touchalarm_prepare_for_deep_sleep(void);
bool alarm_touch_touchalarm_woke_us_up(void);
void alarm_touch_touchalarm_reset(void);
#endif // MICROPY_INCLUDED_COMMON_HAL_ALARM_TOUCH_TOUCHALARM_H

View File

@ -27,20 +27,11 @@
#include "shared-bindings/touchio/TouchIn.h"
#include "py/runtime.h"
#include "driver/touch_pad.h"
bool touch_inited = false;
void touchin_reset(void) {
if (touch_inited) {
touch_pad_deinit();
touch_inited = false;
}
}
#include "peripherals/touch.h"
static uint16_t get_raw_reading(touchio_touchin_obj_t *self) {
uint32_t touch_value;
touch_pad_read_raw_data((touch_pad_t)self->pin->touch_channel, &touch_value);
touch_pad_read_raw_data(self->pin->touch_channel, &touch_value);
if (touch_value > UINT16_MAX) {
return UINT16_MAX;
}
@ -54,21 +45,12 @@ void common_hal_touchio_touchin_construct(touchio_touchin_obj_t* self,
}
claim_pin(pin);
if (!touch_inited) {
touch_pad_init();
touch_pad_set_fsm_mode(TOUCH_FSM_MODE_TIMER);
touch_pad_fsm_start();
touch_inited = true;
}
// initialize touchpad
peripherals_touch_init(pin->touch_channel);
touch_pad_config((touch_pad_t)pin->touch_channel);
// wait for "raw data" to reset
// wait for touch data to reset
mp_hal_delay_ms(10);
// Initial values for pins will vary, depending on what peripherals the pins
// share on-chip.
// Set a "touched" threshold not too far above the initial value.
// For simple finger touch, the values may vary as much as a factor of two,
// but for touches using fruit or other objects, the difference is much less.

View File

@ -27,9 +27,8 @@
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_TOUCHIO_TOUCHIN_H
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_TOUCHIO_TOUCHIN_H
#include "common-hal/microcontroller/Pin.h"
#include "py/obj.h"
#include "common-hal/microcontroller/Pin.h"
typedef struct {
mp_obj_base_t base;
@ -37,6 +36,4 @@ typedef struct {
uint16_t threshold;
} touchio_touchin_obj_t;
void touchin_reset(void);
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_TOUCHIO_TOUCHIN_H

View File

@ -44,7 +44,7 @@ typedef struct {
gpio_num_t number;
uint8_t adc_index:2;
uint8_t adc_channel:6;
uint8_t touch_channel;
touch_pad_t touch_channel;
} mcu_pin_obj_t;
extern const mcu_pin_obj_t pin_GPIO0;

View File

@ -0,0 +1,53 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 microDev
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "components/soc/include/hal/gpio_types.h"
// above include fixes build error in idf@v4.2
#include "peripherals/touch.h"
static bool touch_inited = false;
static bool touch_never_reset = false;
void peripherals_touch_reset(void) {
if (touch_inited && !touch_never_reset) {
touch_pad_deinit();
touch_inited = false;
}
}
void peripherals_touch_never_reset(const bool enable) {
touch_never_reset = enable;
}
void peripherals_touch_init(const touch_pad_t touchpad) {
if (!touch_inited) {
touch_pad_init();
touch_pad_set_fsm_mode(TOUCH_FSM_MODE_TIMER);
touch_pad_fsm_start();
touch_inited = true;
}
touch_pad_config(touchpad);
}

View File

@ -0,0 +1,36 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 microDev
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef MICROPY_INCLUDED_ESP32S2_PERIPHERALS_TOUCH_HANDLER_H
#define MICROPY_INCLUDED_ESP32S2_PERIPHERALS_TOUCH_HANDLER_H
#include "driver/touch_pad.h"
extern void peripherals_touch_reset(void);
extern void peripherals_touch_never_reset(const bool enable);
extern void peripherals_touch_init(const touch_pad_t touchpad);
#endif // MICROPY_INCLUDED_ESP32S2_PERIPHERALS_TOUCH_HANDLER_H

View File

@ -45,7 +45,6 @@
#include "common-hal/ps2io/Ps2.h"
#include "common-hal/pulseio/PulseIn.h"
#include "common-hal/pwmio/PWMOut.h"
#include "common-hal/touchio/TouchIn.h"
#include "common-hal/watchdog/WatchDogTimer.h"
#include "common-hal/wifi/__init__.h"
#include "supervisor/memory.h"
@ -55,6 +54,7 @@
#include "peripherals/rmt.h"
#include "peripherals/pcnt.h"
#include "peripherals/timer.h"
#include "peripherals/touch.h"
#include "components/esp_rom/include/esp32s2/rom/ets_sys.h"
#include "components/heap/include/esp_heap_caps.h"
#include "components/xtensa/include/esp_debug_helpers.h"
@ -198,7 +198,7 @@ void reset_port(void) {
#endif
#if CIRCUITPY_TOUCHIO_USE_NATIVE
touchin_reset();
peripherals_touch_reset();
#endif
#if CIRCUITPY_WATCHDOG

View File

@ -311,6 +311,7 @@ SRC_COMMON_HAL_ALL = \
alarm/__init__.c \
alarm/pin/PinAlarm.c \
alarm/time/TimeAlarm.c \
alarm/touch/TouchAlarm.c \
analogio/AnalogIn.c \
analogio/AnalogOut.c \
analogio/__init__.c \

View File

@ -185,7 +185,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(pixelbuf_pixelbuf_get_brightness_obj, pixelbuf_pixelbu
STATIC mp_obj_t pixelbuf_pixelbuf_obj_set_brightness(mp_obj_t self_in, mp_obj_t value) {
mp_float_t brightness = mp_obj_float_get(value);
mp_float_t brightness = mp_obj_get_float(value);
if (brightness > 1) {
brightness = 1;
} else if (brightness < 0) {

View File

@ -32,6 +32,7 @@
#include "shared-bindings/alarm/SleepMemory.h"
#include "shared-bindings/alarm/pin/PinAlarm.h"
#include "shared-bindings/alarm/time/TimeAlarm.h"
#include "shared-bindings/alarm/touch/TouchAlarm.h"
#include "shared-bindings/supervisor/Runtime.h"
#include "shared-bindings/time/__init__.h"
#include "supervisor/shared/autoreload.h"
@ -72,7 +73,8 @@
void validate_objs_are_alarms(size_t n_args, const mp_obj_t *objs) {
for (size_t i = 0; i < n_args; i++) {
if (MP_OBJ_IS_TYPE(objs[i], &alarm_pin_pinalarm_type) ||
MP_OBJ_IS_TYPE(objs[i], &alarm_time_timealarm_type)) {
MP_OBJ_IS_TYPE(objs[i], &alarm_time_timealarm_type) ||
MP_OBJ_IS_TYPE(objs[i], &alarm_touch_touchalarm_type)) {
continue;
}
mp_raise_TypeError_varg(translate("Expected an alarm"));
@ -182,6 +184,18 @@ STATIC const mp_obj_module_t alarm_time_module = {
.globals = (mp_obj_dict_t*)&alarm_time_globals,
};
STATIC const mp_map_elem_t alarm_touch_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_touch) },
{ MP_ROM_QSTR(MP_QSTR_TouchAlarm), MP_OBJ_FROM_PTR(&alarm_touch_touchalarm_type) },
};
STATIC MP_DEFINE_CONST_DICT(alarm_touch_globals, alarm_touch_globals_table);
STATIC const mp_obj_module_t alarm_touch_module = {
.base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&alarm_touch_globals,
};
// The module table is mutable because .wake_alarm is a mutable attribute.
STATIC mp_map_elem_t alarm_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_alarm) },
@ -195,6 +209,7 @@ STATIC mp_map_elem_t alarm_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_pin), MP_OBJ_FROM_PTR(&alarm_pin_module) },
{ MP_ROM_QSTR(MP_QSTR_time), MP_OBJ_FROM_PTR(&alarm_time_module) },
{ MP_ROM_QSTR(MP_QSTR_touch), MP_OBJ_FROM_PTR(&alarm_touch_module) },
{ MP_ROM_QSTR(MP_QSTR_SleepMemory), MP_OBJ_FROM_PTR(&alarm_sleep_memory_type) },
{ MP_ROM_QSTR(MP_QSTR_sleep_memory), MP_OBJ_FROM_PTR(&alarm_sleep_memory_obj) },
@ -212,21 +227,17 @@ mp_obj_t alarm_get_wake_alarm(void) {
}
}
STATIC void alarm_set_wake_alarm(mp_obj_t alarm) {
// Initialize .wake_alarm value.
void alarm_save_wake_alarm(void) {
// Equivalent of:
// alarm.wake_alarm = alarm
mp_map_elem_t *elem =
mp_map_lookup(&alarm_module_globals.map, MP_ROM_QSTR(MP_QSTR_wake_alarm), MP_MAP_LOOKUP);
if (elem) {
elem->value = alarm;
elem->value = common_hal_alarm_get_wake_alarm();
}
}
// Initialize .wake_alarm value.
void alarm_save_wakeup_alarm(void) {
alarm_set_wake_alarm(common_hal_alarm_get_wake_alarm());
}
const mp_obj_module_t alarm_module = {
.base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&alarm_module_globals,

View File

@ -50,7 +50,7 @@ extern void common_hal_alarm_gc_collect(void);
extern mp_obj_t common_hal_alarm_get_wake_alarm(void);
// Used by wake-up code.
void alarm_save_wakeup_alarm(void);
void alarm_save_wake_alarm(void);
// True if an alarm is alerting. This is most useful for pretend deep sleep.

View File

@ -0,0 +1,91 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 microDev
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "shared-bindings/alarm/touch/TouchAlarm.h"
#include "shared-bindings/board/__init__.h"
#include "py/objproperty.h"
//| class TouchAlarm:
//| """Trigger an alarm when touch is detected."""
//|
//| def __init__(self, *pin: microcontroller.Pin) -> None:
//| """Create an alarm that will be triggered when the given pin is touched.
//| The alarm is not active until it is passed to an `alarm`-enabling function, such as
//| `alarm.light_sleep_until_alarms()` or `alarm.exit_and_deep_sleep_until_alarms()`.
//|
//| :param microcontroller.Pin pin: The pin to monitor. On some ports, the choice of pin
//| may be limited due to hardware restrictions, particularly for deep-sleep alarms.
//| """
//| ...
//|
STATIC mp_obj_t alarm_touch_touchalarm_make_new(const mp_obj_type_t *type,
mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
alarm_touch_touchalarm_obj_t *self = m_new_obj(alarm_touch_touchalarm_obj_t);
self->base.type = &alarm_touch_touchalarm_type;
enum { ARG_pin };
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_pin, MP_ARG_REQUIRED | MP_ARG_OBJ },
};
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
const mcu_pin_obj_t *pin = validate_obj_is_free_pin(args[ARG_pin].u_obj);
common_hal_alarm_touch_touchalarm_construct(self, pin);
return MP_OBJ_FROM_PTR(self);
}
//| pin: microcontroller.Pin
//| """The trigger pin."""
//|
STATIC mp_obj_t alarm_touch_touchalarm_obj_get_pin(mp_obj_t self_in) {
alarm_touch_touchalarm_obj_t *self = MP_OBJ_TO_PTR(self_in);
return MP_OBJ_FROM_PTR(self->pin);
}
MP_DEFINE_CONST_FUN_OBJ_1(alarm_touch_touchalarm_get_pin_obj, alarm_touch_touchalarm_obj_get_pin);
const mp_obj_property_t alarm_touch_touchalarm_pin_obj = {
.base.type = &mp_type_property,
.proxy = {(mp_obj_t)&alarm_touch_touchalarm_get_pin_obj,
(mp_obj_t)&mp_const_none_obj,
(mp_obj_t)&mp_const_none_obj},
};
STATIC const mp_rom_map_elem_t alarm_touch_touchalarm_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_pin), MP_ROM_PTR(&alarm_touch_touchalarm_pin_obj) },
};
STATIC MP_DEFINE_CONST_DICT(alarm_touch_touchalarm_locals_dict, alarm_touch_touchalarm_locals_dict_table);
const mp_obj_type_t alarm_touch_touchalarm_type = {
{ &mp_type_type },
.name = MP_QSTR_TouchAlarm,
.make_new = alarm_touch_touchalarm_make_new,
.locals_dict = (mp_obj_t)&alarm_touch_touchalarm_locals_dict,
};

View File

@ -0,0 +1,40 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 microDev
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_ALARM_TOUCH_TOUCHALARM_H
#define MICROPY_INCLUDED_SHARED_BINDINGS_ALARM_TOUCH_TOUCHALARM_H
#include "py/obj.h"
#include "py/runtime.h"
#include "common-hal/microcontroller/Pin.h"
#include "common-hal/alarm/touch/TouchAlarm.h"
extern const mp_obj_type_t alarm_touch_touchalarm_type;
extern void common_hal_alarm_touch_touchalarm_construct(alarm_touch_touchalarm_obj_t *self, const mcu_pin_obj_t *pin);
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_ALARM_TOUCH_TOUCHALARM_H