merge from upstream; complicated webusb merge
This commit is contained in:
commit
f0564b4986
|
@ -208,6 +208,7 @@ jobs:
|
||||||
- "datum_imu"
|
- "datum_imu"
|
||||||
- "datum_light"
|
- "datum_light"
|
||||||
- "datum_weather"
|
- "datum_weather"
|
||||||
|
- "dynalora_usb"
|
||||||
- "dynossat_edu_eps"
|
- "dynossat_edu_eps"
|
||||||
- "dynossat_edu_obc"
|
- "dynossat_edu_obc"
|
||||||
- "electronut_labs_blip"
|
- "electronut_labs_blip"
|
||||||
|
|
|
@ -0,0 +1,94 @@
|
||||||
|
<!--
|
||||||
|
SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
|
||||||
|
|
||||||
|
SPDX-License-Identifier: MIT
|
||||||
|
-->
|
||||||
|
|
||||||
|
# WebUSB Serial Support
|
||||||
|
|
||||||
|
To date, this has only been tested on one port (esp32s2), on one board (espressif_kaluga_1).
|
||||||
|
|
||||||
|
## What it does
|
||||||
|
|
||||||
|
If you have ever used CircuitPython on a platform with a graphical LCD display, you have probably
|
||||||
|
already seen multiple "consoles" in use (although the LCD console is "output only").
|
||||||
|
|
||||||
|
New compile-time option CIRCUITPY_USB_VENDOR enables an additional "console" that can be used in
|
||||||
|
parallel with the original (CDC) serial console.
|
||||||
|
|
||||||
|
Web pages that support the WebUSB standard can connect to the "vendor" interface and activate
|
||||||
|
this WebUSB serial console at any time.
|
||||||
|
|
||||||
|
You can type into either console, and CircuitPython output is sent to all active consoles.
|
||||||
|
|
||||||
|
One example of a web page you can use to test drive this feature can be found at:
|
||||||
|
|
||||||
|
https://adafruit.github.io/Adafruit_TinyUSB_Arduino/examples/webusb-serial/index.html
|
||||||
|
|
||||||
|
## How to enable
|
||||||
|
|
||||||
|
Update your platform's mpconfigboard.mk file to enable and disable specific types of USB interfaces.
|
||||||
|
|
||||||
|
CIRCUITPY_USB_HID = xxx
|
||||||
|
CIRCUITPY_USB_MIDI = xxx
|
||||||
|
CIRCUITPY_USB_VENDOR = xxx
|
||||||
|
|
||||||
|
On at least some of the hardware platforms, the maximum number of USB endpoints is fixed.
|
||||||
|
For example, on the ESP32S2, you must pick only one of the above 3 interfaces to be enabled.
|
||||||
|
|
||||||
|
Original espressif_kaluga_1 mpconfigboard.mk settings:
|
||||||
|
|
||||||
|
CIRCUITPY_USB_HID = 1
|
||||||
|
CIRCUITPY_USB_MIDI = 0
|
||||||
|
CIRCUITPY_USB_VENDOR = 0
|
||||||
|
|
||||||
|
Settings to enable WebUSB instead:
|
||||||
|
|
||||||
|
CIRCUITPY_USB_HID = 0
|
||||||
|
CIRCUITPY_USB_MIDI = 0
|
||||||
|
CIRCUITPY_USB_VENDOR = 1
|
||||||
|
|
||||||
|
Notice that to enable VENDOR on ESP32-S2, we had to give up HID. There may be platforms that can have both, or even all three.
|
||||||
|
|
||||||
|
## Implementation Notes
|
||||||
|
|
||||||
|
CircuitPython uses the tinyusb library.
|
||||||
|
|
||||||
|
The tinyusb library already has support for WebUSB serial.
|
||||||
|
The tinyusb examples already include a "WebUSB serial" example.
|
||||||
|
|
||||||
|
Sidenote - The use of the term "vendor" instead of "WebUSB" was done to match tinyusb.
|
||||||
|
|
||||||
|
Basically, this feature was ported into CircuitPython by pulling code snippets out of the
|
||||||
|
tinyusb example, and putting them where they best belonged in the CircuitPython codebase.
|
||||||
|
|
||||||
|
There was one complication:
|
||||||
|
|
||||||
|
tinyusb uses C preprocessor macros to define things like USB descriptors.
|
||||||
|
|
||||||
|
CircuitPython uses a Python program (tools/gen_usb_descriptor.py) to create USB descriptors (etc.)
|
||||||
|
using "helper objects" from another repo (adafruit_usb_descriptor). This means some of the example
|
||||||
|
code had to be adapted to the new programing model, and gen_usb_descriptor gained new command-line
|
||||||
|
options to control the generated code.
|
||||||
|
|
||||||
|
The generated files go into the "build" directory, look for autogen_usb_descriptor.c and
|
||||||
|
genhdr/autogen_usb_descriptor.h.
|
||||||
|
|
||||||
|
|
||||||
|
Also worth pointing out - the re-use of the CDC connect/disconnect mechanism is not actually part
|
||||||
|
of the WebUSB standard, it's more of "common idiom". We make use of it here because we need to know
|
||||||
|
when we should be paying attention to the WebUSB serial interface, and when we should ignore it..
|
||||||
|
|
||||||
|
## Possible future work areas
|
||||||
|
|
||||||
|
The current code uses the existing Python infrastructure to create the Interface descriptor, but
|
||||||
|
simply outputs the code snippets from the original tinyusb demo code to create the WEBUSB_URL,
|
||||||
|
BOS, and MS_OS_20 descriptors. I suppose additional work could be done to add these to the
|
||||||
|
adafruit_usb_descriptor project, and then gen_usb_descriptor.py could be modified to make use
|
||||||
|
of them.
|
||||||
|
|
||||||
|
Program gen_usb_descriptor.py creates objects for most interface types, regardless of whether or
|
||||||
|
not they are actually enabled. This increases the size of a generated string table. I made the
|
||||||
|
new vendor-interface-related code not do this (because some of the ARM platforms would no longer
|
||||||
|
build), but I did not go back and do this for the other interface types (CDC, MIDI, HID, etc.)
|
||||||
|
Some FLASH savings are probably possible if this is done.
|
|
@ -46,6 +46,7 @@ Full Table of Contents
|
||||||
../BUILDING
|
../BUILDING
|
||||||
../CODE_OF_CONDUCT
|
../CODE_OF_CONDUCT
|
||||||
../license.rst
|
../license.rst
|
||||||
|
../WEBUSB_README
|
||||||
|
|
||||||
Indices and tables
|
Indices and tables
|
||||||
==================
|
==================
|
||||||
|
|
50
locale/ID.po
50
locale/ID.po
|
@ -642,6 +642,10 @@ msgstr ""
|
||||||
"Tidak dapat melakukan reset ke bootloader karena tidak ada bootloader yang "
|
"Tidak dapat melakukan reset ke bootloader karena tidak ada bootloader yang "
|
||||||
"terisi"
|
"terisi"
|
||||||
|
|
||||||
|
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
||||||
|
msgid "Cannot set socket options"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-bindings/digitalio/DigitalInOut.c
|
#: shared-bindings/digitalio/DigitalInOut.c
|
||||||
msgid "Cannot set value when direction is input."
|
msgid "Cannot set value when direction is input."
|
||||||
msgstr "Tidak dapat menetapkan nilai saat arah input."
|
msgstr "Tidak dapat menetapkan nilai saat arah input."
|
||||||
|
@ -884,7 +888,7 @@ msgstr "Channel EXTINT sedang digunakan"
|
||||||
msgid "Error in regex"
|
msgid "Error in regex"
|
||||||
msgstr "Error pada regex"
|
msgstr "Error pada regex"
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "Error: Failure to bind"
|
msgid "Error: Failure to bind"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -943,7 +947,7 @@ msgstr "FFT didefinisikan hanya untuk ndarrays"
|
||||||
msgid "FFT is implemented for linear arrays only"
|
msgid "FFT is implemented for linear arrays only"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
msgid "Failed SSL handshake"
|
msgid "Failed SSL handshake"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1316,7 +1320,7 @@ msgstr "security_mode tidak valid"
|
||||||
msgid "Invalid size"
|
msgid "Invalid size"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLContext.c
|
||||||
msgid "Invalid socket for TLS"
|
msgid "Invalid socket for TLS"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1324,10 +1328,6 @@ msgstr ""
|
||||||
msgid "Invalid state"
|
msgid "Invalid state"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Invalid use of TLS Socket"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: shared-bindings/audiomixer/Mixer.c
|
#: shared-bindings/audiomixer/Mixer.c
|
||||||
msgid "Invalid voice"
|
msgid "Invalid voice"
|
||||||
msgstr "Suara tidak valid"
|
msgstr "Suara tidak valid"
|
||||||
|
@ -1344,10 +1344,6 @@ msgstr "File wave tidak valid"
|
||||||
msgid "Invalid word/bit length"
|
msgid "Invalid word/bit length"
|
||||||
msgstr "Panjang kata/bit tidak valid"
|
msgstr "Panjang kata/bit tidak valid"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Issue setting SO_REUSEADDR"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: shared-bindings/aesio/aes.c
|
#: shared-bindings/aesio/aes.c
|
||||||
msgid "Key must be 16, 24, or 32 bytes long"
|
msgid "Key must be 16, 24, or 32 bytes long"
|
||||||
msgstr "Panjang kunci harus 16, 24, atau 32 byte"
|
msgstr "Panjang kunci harus 16, 24, atau 32 byte"
|
||||||
|
@ -1560,6 +1556,12 @@ msgstr ""
|
||||||
msgid "No out in program"
|
msgid "No out in program"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
||||||
|
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
||||||
|
#: ports/raspberrypi/common-hal/busio/I2C.c
|
||||||
|
msgid "No pull up found on SDA or SCL; check your wiring"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-module/touchio/TouchIn.c
|
#: shared-module/touchio/TouchIn.c
|
||||||
msgid "No pulldown on pin; 1Mohm recommended"
|
msgid "No pulldown on pin; 1Mohm recommended"
|
||||||
msgstr "Tidak ada pull-down pada pin; 1Mohm direkomendasikan"
|
msgstr "Tidak ada pull-down pada pin; 1Mohm direkomendasikan"
|
||||||
|
@ -1674,7 +1676,7 @@ msgstr ""
|
||||||
msgid "Out of memory"
|
msgid "Out of memory"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/socketpool/SocketPool.c
|
||||||
msgid "Out of sockets"
|
msgid "Out of sockets"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1825,6 +1827,10 @@ msgstr "Kesalahan DeInit RNG"
|
||||||
msgid "RNG Init Error"
|
msgid "RNG Init Error"
|
||||||
msgstr "Kesalahan Init RNG"
|
msgstr "Kesalahan Init RNG"
|
||||||
|
|
||||||
|
#: ports/nrf/common-hal/busio/UART.c
|
||||||
|
msgid "RS485 Not yet supported on this device"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/busio/UART.c
|
#: ports/esp32s2/common-hal/busio/UART.c
|
||||||
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
||||||
msgid "RS485 inversion specified when not in RS485 mode"
|
msgid "RS485 inversion specified when not in RS485 mode"
|
||||||
|
@ -1832,6 +1838,7 @@ msgstr "Pembalikan RS485 ditentukan saat tidak dalam mode RS485"
|
||||||
|
|
||||||
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
||||||
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
||||||
|
#: ports/raspberrypi/common-hal/rtc/RTC.c
|
||||||
msgid "RTC calibration is not supported on this board"
|
msgid "RTC calibration is not supported on this board"
|
||||||
msgstr "Kalibrasi RTC tidak didukung pada board ini"
|
msgstr "Kalibrasi RTC tidak didukung pada board ini"
|
||||||
|
|
||||||
|
@ -1840,7 +1847,7 @@ msgid "RTC is not supported on this board"
|
||||||
msgstr "RTC tidak didukung di board ini"
|
msgstr "RTC tidak didukung di board ini"
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
||||||
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
|
#: ports/stm/common-hal/busio/UART.c
|
||||||
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
||||||
msgstr "RTS/CTS/RS485 Belum didukung pada perangkat ini"
|
msgstr "RTS/CTS/RS485 Belum didukung pada perangkat ini"
|
||||||
|
|
||||||
|
@ -1898,12 +1905,6 @@ msgstr ""
|
||||||
msgid "SD card CSD format not supported"
|
msgid "SD card CSD format not supported"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
|
||||||
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
|
||||||
#: ports/raspberrypi/common-hal/busio/I2C.c
|
|
||||||
msgid "SDA or SCL needs a pull up"
|
|
||||||
msgstr "SDA atau SCL membutuhkan pull up"
|
|
||||||
|
|
||||||
#: ports/stm/common-hal/sdioio/SDCard.c
|
#: ports/stm/common-hal/sdioio/SDCard.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "SDIO GetCardInfo Error %d"
|
msgid "SDIO GetCardInfo Error %d"
|
||||||
|
@ -2203,7 +2204,7 @@ msgstr ""
|
||||||
msgid "Unexpected nrfx uuid type"
|
msgid "Unexpected nrfx uuid type"
|
||||||
msgstr "Tipe urf nrfx tak sesuai"
|
msgstr "Tipe urf nrfx tak sesuai"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unhandled ESP TLS error %d %d %x %d"
|
msgid "Unhandled ESP TLS error %d %d %x %d"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -2512,7 +2513,7 @@ msgstr ""
|
||||||
msgid "buffer too small"
|
msgid "buffer too small"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "buffer too small for requested bytes"
|
msgid "buffer too small for requested bytes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -3673,6 +3674,10 @@ msgstr "Muncul dari PulseIn yang kosong"
|
||||||
msgid "pop from empty %q"
|
msgid "pop from empty %q"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
|
msgid "port must be >= 0"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: py/objint_mpz.c
|
#: py/objint_mpz.c
|
||||||
msgid "pow() 3rd argument cannot be 0"
|
msgid "pow() 3rd argument cannot be 0"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -4202,6 +4207,9 @@ msgstr ""
|
||||||
msgid "zi must be of shape (n_section, 2)"
|
msgid "zi must be of shape (n_section, 2)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#~ msgid "SDA or SCL needs a pull up"
|
||||||
|
#~ msgstr "SDA atau SCL membutuhkan pull up"
|
||||||
|
|
||||||
#~ msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
|
#~ msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
|
||||||
#~ msgstr "pin alamat %d dan pin rgb %d menunjukkan tinggi %d, bukan %d"
|
#~ msgstr "pin alamat %d dan pin rgb %d menunjukkan tinggi %d, bukan %d"
|
||||||
|
|
||||||
|
|
|
@ -629,6 +629,10 @@ msgstr ""
|
||||||
msgid "Cannot reset into bootloader because no bootloader is present."
|
msgid "Cannot reset into bootloader because no bootloader is present."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
||||||
|
msgid "Cannot set socket options"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-bindings/digitalio/DigitalInOut.c
|
#: shared-bindings/digitalio/DigitalInOut.c
|
||||||
msgid "Cannot set value when direction is input."
|
msgid "Cannot set value when direction is input."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -865,7 +869,7 @@ msgstr ""
|
||||||
msgid "Error in regex"
|
msgid "Error in regex"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "Error: Failure to bind"
|
msgid "Error: Failure to bind"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -924,7 +928,7 @@ msgstr ""
|
||||||
msgid "FFT is implemented for linear arrays only"
|
msgid "FFT is implemented for linear arrays only"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
msgid "Failed SSL handshake"
|
msgid "Failed SSL handshake"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1295,7 +1299,7 @@ msgstr ""
|
||||||
msgid "Invalid size"
|
msgid "Invalid size"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLContext.c
|
||||||
msgid "Invalid socket for TLS"
|
msgid "Invalid socket for TLS"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1303,10 +1307,6 @@ msgstr ""
|
||||||
msgid "Invalid state"
|
msgid "Invalid state"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Invalid use of TLS Socket"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: shared-bindings/audiomixer/Mixer.c
|
#: shared-bindings/audiomixer/Mixer.c
|
||||||
msgid "Invalid voice"
|
msgid "Invalid voice"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1323,10 +1323,6 @@ msgstr ""
|
||||||
msgid "Invalid word/bit length"
|
msgid "Invalid word/bit length"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Issue setting SO_REUSEADDR"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: shared-bindings/aesio/aes.c
|
#: shared-bindings/aesio/aes.c
|
||||||
msgid "Key must be 16, 24, or 32 bytes long"
|
msgid "Key must be 16, 24, or 32 bytes long"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1539,6 +1535,12 @@ msgstr ""
|
||||||
msgid "No out in program"
|
msgid "No out in program"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
||||||
|
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
||||||
|
#: ports/raspberrypi/common-hal/busio/I2C.c
|
||||||
|
msgid "No pull up found on SDA or SCL; check your wiring"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-module/touchio/TouchIn.c
|
#: shared-module/touchio/TouchIn.c
|
||||||
msgid "No pulldown on pin; 1Mohm recommended"
|
msgid "No pulldown on pin; 1Mohm recommended"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1647,7 +1649,7 @@ msgstr ""
|
||||||
msgid "Out of memory"
|
msgid "Out of memory"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/socketpool/SocketPool.c
|
||||||
msgid "Out of sockets"
|
msgid "Out of sockets"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1870,12 +1872,6 @@ msgstr ""
|
||||||
msgid "SD card CSD format not supported"
|
msgid "SD card CSD format not supported"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
|
||||||
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
|
||||||
#: ports/raspberrypi/common-hal/busio/I2C.c
|
|
||||||
msgid "SDA or SCL needs a pull up"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ports/stm/common-hal/sdioio/SDCard.c
|
#: ports/stm/common-hal/sdioio/SDCard.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "SDIO GetCardInfo Error %d"
|
msgid "SDIO GetCardInfo Error %d"
|
||||||
|
@ -2167,7 +2163,7 @@ msgstr ""
|
||||||
msgid "Unexpected nrfx uuid type"
|
msgid "Unexpected nrfx uuid type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unhandled ESP TLS error %d %d %x %d"
|
msgid "Unhandled ESP TLS error %d %d %x %d"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -2466,7 +2462,7 @@ msgstr ""
|
||||||
msgid "buffer too small"
|
msgid "buffer too small"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "buffer too small for requested bytes"
|
msgid "buffer too small for requested bytes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -3626,6 +3622,10 @@ msgstr ""
|
||||||
msgid "pop from empty %q"
|
msgid "pop from empty %q"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
|
msgid "port must be >= 0"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: py/objint_mpz.c
|
#: py/objint_mpz.c
|
||||||
msgid "pow() 3rd argument cannot be 0"
|
msgid "pow() 3rd argument cannot be 0"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
47
locale/cs.po
47
locale/cs.po
|
@ -632,6 +632,10 @@ msgstr ""
|
||||||
msgid "Cannot reset into bootloader because no bootloader is present."
|
msgid "Cannot reset into bootloader because no bootloader is present."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
||||||
|
msgid "Cannot set socket options"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-bindings/digitalio/DigitalInOut.c
|
#: shared-bindings/digitalio/DigitalInOut.c
|
||||||
msgid "Cannot set value when direction is input."
|
msgid "Cannot set value when direction is input."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -868,7 +872,7 @@ msgstr ""
|
||||||
msgid "Error in regex"
|
msgid "Error in regex"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "Error: Failure to bind"
|
msgid "Error: Failure to bind"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -927,7 +931,7 @@ msgstr ""
|
||||||
msgid "FFT is implemented for linear arrays only"
|
msgid "FFT is implemented for linear arrays only"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
msgid "Failed SSL handshake"
|
msgid "Failed SSL handshake"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1298,7 +1302,7 @@ msgstr ""
|
||||||
msgid "Invalid size"
|
msgid "Invalid size"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLContext.c
|
||||||
msgid "Invalid socket for TLS"
|
msgid "Invalid socket for TLS"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1306,10 +1310,6 @@ msgstr ""
|
||||||
msgid "Invalid state"
|
msgid "Invalid state"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Invalid use of TLS Socket"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: shared-bindings/audiomixer/Mixer.c
|
#: shared-bindings/audiomixer/Mixer.c
|
||||||
msgid "Invalid voice"
|
msgid "Invalid voice"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1326,10 +1326,6 @@ msgstr ""
|
||||||
msgid "Invalid word/bit length"
|
msgid "Invalid word/bit length"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Issue setting SO_REUSEADDR"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: shared-bindings/aesio/aes.c
|
#: shared-bindings/aesio/aes.c
|
||||||
msgid "Key must be 16, 24, or 32 bytes long"
|
msgid "Key must be 16, 24, or 32 bytes long"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1542,6 +1538,12 @@ msgstr ""
|
||||||
msgid "No out in program"
|
msgid "No out in program"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
||||||
|
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
||||||
|
#: ports/raspberrypi/common-hal/busio/I2C.c
|
||||||
|
msgid "No pull up found on SDA or SCL; check your wiring"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-module/touchio/TouchIn.c
|
#: shared-module/touchio/TouchIn.c
|
||||||
msgid "No pulldown on pin; 1Mohm recommended"
|
msgid "No pulldown on pin; 1Mohm recommended"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1650,7 +1652,7 @@ msgstr ""
|
||||||
msgid "Out of memory"
|
msgid "Out of memory"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/socketpool/SocketPool.c
|
||||||
msgid "Out of sockets"
|
msgid "Out of sockets"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1796,6 +1798,10 @@ msgstr ""
|
||||||
msgid "RNG Init Error"
|
msgid "RNG Init Error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ports/nrf/common-hal/busio/UART.c
|
||||||
|
msgid "RS485 Not yet supported on this device"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/busio/UART.c
|
#: ports/esp32s2/common-hal/busio/UART.c
|
||||||
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
||||||
msgid "RS485 inversion specified when not in RS485 mode"
|
msgid "RS485 inversion specified when not in RS485 mode"
|
||||||
|
@ -1803,6 +1809,7 @@ msgstr ""
|
||||||
|
|
||||||
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
||||||
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
||||||
|
#: ports/raspberrypi/common-hal/rtc/RTC.c
|
||||||
msgid "RTC calibration is not supported on this board"
|
msgid "RTC calibration is not supported on this board"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1811,7 +1818,7 @@ msgid "RTC is not supported on this board"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
||||||
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
|
#: ports/stm/common-hal/busio/UART.c
|
||||||
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1868,12 +1875,6 @@ msgstr ""
|
||||||
msgid "SD card CSD format not supported"
|
msgid "SD card CSD format not supported"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
|
||||||
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
|
||||||
#: ports/raspberrypi/common-hal/busio/I2C.c
|
|
||||||
msgid "SDA or SCL needs a pull up"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ports/stm/common-hal/sdioio/SDCard.c
|
#: ports/stm/common-hal/sdioio/SDCard.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "SDIO GetCardInfo Error %d"
|
msgid "SDIO GetCardInfo Error %d"
|
||||||
|
@ -2165,7 +2166,7 @@ msgstr ""
|
||||||
msgid "Unexpected nrfx uuid type"
|
msgid "Unexpected nrfx uuid type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unhandled ESP TLS error %d %d %x %d"
|
msgid "Unhandled ESP TLS error %d %d %x %d"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -2464,7 +2465,7 @@ msgstr ""
|
||||||
msgid "buffer too small"
|
msgid "buffer too small"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "buffer too small for requested bytes"
|
msgid "buffer too small for requested bytes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -3624,6 +3625,10 @@ msgstr ""
|
||||||
msgid "pop from empty %q"
|
msgid "pop from empty %q"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
|
msgid "port must be >= 0"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: py/objint_mpz.c
|
#: py/objint_mpz.c
|
||||||
msgid "pow() 3rd argument cannot be 0"
|
msgid "pow() 3rd argument cannot be 0"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
108
locale/de_DE.po
108
locale/de_DE.po
|
@ -6,14 +6,14 @@ msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
||||||
"PO-Revision-Date: 2021-01-07 18:01+0000\n"
|
"PO-Revision-Date: 2021-02-05 15:41+0000\n"
|
||||||
"Last-Translator: Dennis Schweer <dennis.schweer@ruhr-uni-bochum.de>\n"
|
"Last-Translator: Jeff Epler <jepler@gmail.com>\n"
|
||||||
"Language: de_DE\n"
|
"Language: de_DE\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
"X-Generator: Weblate 4.4.1-dev\n"
|
"X-Generator: Weblate 4.5-dev\n"
|
||||||
|
|
||||||
#: main.c
|
#: main.c
|
||||||
msgid ""
|
msgid ""
|
||||||
|
@ -120,7 +120,8 @@ msgstr "%q sollte ein integer sein"
|
||||||
|
|
||||||
#: py/bc.c py/objnamedtuple.c
|
#: py/bc.c py/objnamedtuple.c
|
||||||
msgid "%q() takes %d positional arguments but %d were given"
|
msgid "%q() takes %d positional arguments but %d were given"
|
||||||
msgstr "%q() nimmt %d Argumente ohne Keyword an, aber es wurden %d angegeben"
|
msgstr ""
|
||||||
|
"%q() nimmt %d Argumente ohne Schlüsselwort an, aber es wurden %d angegeben"
|
||||||
|
|
||||||
#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c
|
#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c
|
||||||
#, c-format
|
#, c-format
|
||||||
|
@ -235,7 +236,7 @@ msgstr "'await' außerhalb einer Funktion"
|
||||||
|
|
||||||
#: py/compile.c
|
#: py/compile.c
|
||||||
msgid "'await', 'async for' or 'async with' outside async function"
|
msgid "'await', 'async for' or 'async with' outside async function"
|
||||||
msgstr ""
|
msgstr "'await', 'async for' oder 'async with' außerhalb einer async Funktion"
|
||||||
|
|
||||||
#: py/compile.c
|
#: py/compile.c
|
||||||
msgid "'break' outside loop"
|
msgid "'break' outside loop"
|
||||||
|
@ -267,7 +268,7 @@ msgstr "'return' außerhalb einer Funktion"
|
||||||
|
|
||||||
#: py/compile.c
|
#: py/compile.c
|
||||||
msgid "'yield from' inside async function"
|
msgid "'yield from' inside async function"
|
||||||
msgstr ""
|
msgstr "'yield from' innerhalb einer async Funktion"
|
||||||
|
|
||||||
#: py/compile.c
|
#: py/compile.c
|
||||||
msgid "'yield' outside function"
|
msgid "'yield' outside function"
|
||||||
|
@ -313,7 +314,7 @@ msgstr "Adresstyp außerhalb des zulässigen Bereichs"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/canio/CAN.c
|
#: ports/esp32s2/common-hal/canio/CAN.c
|
||||||
msgid "All CAN peripherals are in use"
|
msgid "All CAN peripherals are in use"
|
||||||
msgstr ""
|
msgstr "Alle CAN Schnittstellen sind in Benutzung"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
||||||
msgid "All I2C peripherals are in use"
|
msgid "All I2C peripherals are in use"
|
||||||
|
@ -329,7 +330,7 @@ msgstr "Alle PCNT Einheiten sind in Benutzung"
|
||||||
#: ports/esp32s2/common-hal/canio/Listener.c
|
#: ports/esp32s2/common-hal/canio/Listener.c
|
||||||
#: ports/stm/common-hal/canio/Listener.c
|
#: ports/stm/common-hal/canio/Listener.c
|
||||||
msgid "All RX FIFOs in use"
|
msgid "All RX FIFOs in use"
|
||||||
msgstr ""
|
msgstr "Alle RX FIFOs sind in Benutzung"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c
|
#: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c
|
||||||
msgid "All SPI peripherals are in use"
|
msgid "All SPI peripherals are in use"
|
||||||
|
@ -541,7 +542,7 @@ msgstr "Puffer zu groß und kann nicht reserviert werden"
|
||||||
#: shared-bindings/_bleio/PacketBuffer.c
|
#: shared-bindings/_bleio/PacketBuffer.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Buffer too short by %d bytes"
|
msgid "Buffer too short by %d bytes"
|
||||||
msgstr "Buffer um %d Bytes zu kurz"
|
msgstr "Puffer um %d Bytes zu kurz"
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
|
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
|
||||||
#: ports/esp32s2/common-hal/displayio/ParallelBus.c
|
#: ports/esp32s2/common-hal/displayio/ParallelBus.c
|
||||||
|
@ -638,6 +639,10 @@ msgstr "Kann '/' nicht remounten when USB aktiv ist."
|
||||||
msgid "Cannot reset into bootloader because no bootloader is present."
|
msgid "Cannot reset into bootloader because no bootloader is present."
|
||||||
msgstr "Reset zum bootloader nicht möglich da bootloader nicht vorhanden."
|
msgstr "Reset zum bootloader nicht möglich da bootloader nicht vorhanden."
|
||||||
|
|
||||||
|
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
||||||
|
msgid "Cannot set socket options"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-bindings/digitalio/DigitalInOut.c
|
#: shared-bindings/digitalio/DigitalInOut.c
|
||||||
msgid "Cannot set value when direction is input."
|
msgid "Cannot set value when direction is input."
|
||||||
msgstr "Der Wert kann nicht gesetzt werden, wenn die Richtung input ist."
|
msgstr "Der Wert kann nicht gesetzt werden, wenn die Richtung input ist."
|
||||||
|
@ -691,7 +696,7 @@ msgstr ""
|
||||||
|
|
||||||
#: supervisor/shared/safe_mode.c
|
#: supervisor/shared/safe_mode.c
|
||||||
msgid "CircuitPython was unable to allocate the heap.\n"
|
msgid "CircuitPython was unable to allocate the heap.\n"
|
||||||
msgstr ""
|
msgstr "CircuitPython war es nicht möglich heap-Speicher zu allozieren.\n"
|
||||||
|
|
||||||
#: shared-module/bitbangio/SPI.c
|
#: shared-module/bitbangio/SPI.c
|
||||||
msgid "Clock pin init failed."
|
msgid "Clock pin init failed."
|
||||||
|
@ -769,7 +774,7 @@ msgstr "PWM konnte nicht neu gestartet werden"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/neopixel_write/__init__.c
|
#: ports/esp32s2/common-hal/neopixel_write/__init__.c
|
||||||
msgid "Could not retrieve clock"
|
msgid "Could not retrieve clock"
|
||||||
msgstr ""
|
msgstr "Clock konnte nicht ermittelt werden"
|
||||||
|
|
||||||
#: shared-bindings/_bleio/Adapter.c
|
#: shared-bindings/_bleio/Adapter.c
|
||||||
msgid "Could not set address"
|
msgid "Could not set address"
|
||||||
|
@ -807,7 +812,7 @@ msgstr "Absturz in den HardFault_Handler."
|
||||||
|
|
||||||
#: ports/stm/common-hal/analogio/AnalogOut.c
|
#: ports/stm/common-hal/analogio/AnalogOut.c
|
||||||
msgid "DAC Channel Init Error"
|
msgid "DAC Channel Init Error"
|
||||||
msgstr "DAC Kanal Intialisierungs Fehler"
|
msgstr "DAC Kanal Initialisierungsfehler"
|
||||||
|
|
||||||
#: ports/stm/common-hal/analogio/AnalogOut.c
|
#: ports/stm/common-hal/analogio/AnalogOut.c
|
||||||
msgid "DAC Device Init Error"
|
msgid "DAC Device Init Error"
|
||||||
|
@ -880,7 +885,7 @@ msgstr "EXTINT Kanal ist schon in Benutzung"
|
||||||
msgid "Error in regex"
|
msgid "Error in regex"
|
||||||
msgstr "Fehler in regex"
|
msgstr "Fehler in regex"
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "Error: Failure to bind"
|
msgid "Error: Failure to bind"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -940,7 +945,7 @@ msgstr "FFT ist nur für ndarrays definiert"
|
||||||
msgid "FFT is implemented for linear arrays only"
|
msgid "FFT is implemented for linear arrays only"
|
||||||
msgstr "FFT ist nur für lineare Arrays implementiert"
|
msgstr "FFT ist nur für lineare Arrays implementiert"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
msgid "Failed SSL handshake"
|
msgid "Failed SSL handshake"
|
||||||
msgstr "SSL Handshake fehlgeschlagen"
|
msgstr "SSL Handshake fehlgeschlagen"
|
||||||
|
|
||||||
|
@ -973,7 +978,7 @@ msgstr "Zuweisung des Wifi Speichers ist fehlgeschlagen"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/wifi/ScannedNetworks.c
|
#: ports/esp32s2/common-hal/wifi/ScannedNetworks.c
|
||||||
msgid "Failed to allocate wifi scan memory"
|
msgid "Failed to allocate wifi scan memory"
|
||||||
msgstr ""
|
msgstr "Zuweisung des Wifi Scan Speichers ist fehlgeschlagen"
|
||||||
|
|
||||||
#: ports/nrf/common-hal/_bleio/Adapter.c
|
#: ports/nrf/common-hal/_bleio/Adapter.c
|
||||||
msgid "Failed to connect: internal error"
|
msgid "Failed to connect: internal error"
|
||||||
|
@ -989,7 +994,7 @@ msgstr "Wifi Initialisierung ist fehlgeschlagen"
|
||||||
|
|
||||||
#: shared-module/audiomp3/MP3Decoder.c
|
#: shared-module/audiomp3/MP3Decoder.c
|
||||||
msgid "Failed to parse MP3 file"
|
msgid "Failed to parse MP3 file"
|
||||||
msgstr "Parsen der MP3 Datei fehlgeschlagen"
|
msgstr "MP3-Datei konnte nicht analysiert werden"
|
||||||
|
|
||||||
#: ports/nrf/sd_mutex.c
|
#: ports/nrf/sd_mutex.c
|
||||||
#, c-format
|
#, c-format
|
||||||
|
@ -1012,7 +1017,7 @@ msgstr "Filter zu komplex"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/dualbank/__init__.c
|
#: ports/esp32s2/common-hal/dualbank/__init__.c
|
||||||
msgid "Firmware image is invalid"
|
msgid "Firmware image is invalid"
|
||||||
msgstr ""
|
msgstr "Firmware Image ist ungültig"
|
||||||
|
|
||||||
#: ports/cxd56/common-hal/camera/Camera.c
|
#: ports/cxd56/common-hal/camera/Camera.c
|
||||||
msgid "Format not supported"
|
msgid "Format not supported"
|
||||||
|
@ -1315,7 +1320,7 @@ msgstr "Ungültiger security_mode"
|
||||||
msgid "Invalid size"
|
msgid "Invalid size"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLContext.c
|
||||||
msgid "Invalid socket for TLS"
|
msgid "Invalid socket for TLS"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1323,10 +1328,6 @@ msgstr ""
|
||||||
msgid "Invalid state"
|
msgid "Invalid state"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Invalid use of TLS Socket"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: shared-bindings/audiomixer/Mixer.c
|
#: shared-bindings/audiomixer/Mixer.c
|
||||||
msgid "Invalid voice"
|
msgid "Invalid voice"
|
||||||
msgstr "Ungültige Stimme"
|
msgstr "Ungültige Stimme"
|
||||||
|
@ -1343,10 +1344,6 @@ msgstr "Ungültige wave Datei"
|
||||||
msgid "Invalid word/bit length"
|
msgid "Invalid word/bit length"
|
||||||
msgstr "Ungültige Wort- / Bitlänge"
|
msgstr "Ungültige Wort- / Bitlänge"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Issue setting SO_REUSEADDR"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: shared-bindings/aesio/aes.c
|
#: shared-bindings/aesio/aes.c
|
||||||
msgid "Key must be 16, 24, or 32 bytes long"
|
msgid "Key must be 16, 24, or 32 bytes long"
|
||||||
msgstr "Der Schlüssel muss 16, 24 oder 32 Byte lang sein"
|
msgstr "Der Schlüssel muss 16, 24 oder 32 Byte lang sein"
|
||||||
|
@ -1561,6 +1558,12 @@ msgstr ""
|
||||||
msgid "No out in program"
|
msgid "No out in program"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
||||||
|
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
||||||
|
#: ports/raspberrypi/common-hal/busio/I2C.c
|
||||||
|
msgid "No pull up found on SDA or SCL; check your wiring"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-module/touchio/TouchIn.c
|
#: shared-module/touchio/TouchIn.c
|
||||||
msgid "No pulldown on pin; 1Mohm recommended"
|
msgid "No pulldown on pin; 1Mohm recommended"
|
||||||
msgstr "Kein Pulldown Widerstand am Pin; 1Mohm wird vorgeschlagen"
|
msgstr "Kein Pulldown Widerstand am Pin; 1Mohm wird vorgeschlagen"
|
||||||
|
@ -1675,7 +1678,7 @@ msgstr ""
|
||||||
msgid "Out of memory"
|
msgid "Out of memory"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/socketpool/SocketPool.c
|
||||||
msgid "Out of sockets"
|
msgid "Out of sockets"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1824,6 +1827,10 @@ msgstr "RNG DeInit-Fehler"
|
||||||
msgid "RNG Init Error"
|
msgid "RNG Init Error"
|
||||||
msgstr "RNG Init Fehler"
|
msgstr "RNG Init Fehler"
|
||||||
|
|
||||||
|
#: ports/nrf/common-hal/busio/UART.c
|
||||||
|
msgid "RS485 Not yet supported on this device"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/busio/UART.c
|
#: ports/esp32s2/common-hal/busio/UART.c
|
||||||
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
||||||
msgid "RS485 inversion specified when not in RS485 mode"
|
msgid "RS485 inversion specified when not in RS485 mode"
|
||||||
|
@ -1831,6 +1838,7 @@ msgstr "RS485-Inversion angegeben, wenn nicht im RS485-Modus"
|
||||||
|
|
||||||
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
||||||
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
||||||
|
#: ports/raspberrypi/common-hal/rtc/RTC.c
|
||||||
msgid "RTC calibration is not supported on this board"
|
msgid "RTC calibration is not supported on this board"
|
||||||
msgstr "Die RTC-Kalibrierung wird auf diesem Board nicht unterstützt"
|
msgstr "Die RTC-Kalibrierung wird auf diesem Board nicht unterstützt"
|
||||||
|
|
||||||
|
@ -1839,7 +1847,7 @@ msgid "RTC is not supported on this board"
|
||||||
msgstr "Eine RTC wird auf diesem Board nicht unterstützt"
|
msgstr "Eine RTC wird auf diesem Board nicht unterstützt"
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
||||||
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
|
#: ports/stm/common-hal/busio/UART.c
|
||||||
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
||||||
msgstr "RTS / CTS / RS485 Wird von diesem Gerät noch nicht unterstützt"
|
msgstr "RTS / CTS / RS485 Wird von diesem Gerät noch nicht unterstützt"
|
||||||
|
|
||||||
|
@ -1896,12 +1904,6 @@ msgstr ""
|
||||||
msgid "SD card CSD format not supported"
|
msgid "SD card CSD format not supported"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
|
||||||
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
|
||||||
#: ports/raspberrypi/common-hal/busio/I2C.c
|
|
||||||
msgid "SDA or SCL needs a pull up"
|
|
||||||
msgstr "SDA oder SCL brauchen pull up"
|
|
||||||
|
|
||||||
#: ports/stm/common-hal/sdioio/SDCard.c
|
#: ports/stm/common-hal/sdioio/SDCard.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "SDIO GetCardInfo Error %d"
|
msgid "SDIO GetCardInfo Error %d"
|
||||||
|
@ -2207,7 +2209,7 @@ msgstr ""
|
||||||
msgid "Unexpected nrfx uuid type"
|
msgid "Unexpected nrfx uuid type"
|
||||||
msgstr "Unerwarteter nrfx uuid-Typ"
|
msgstr "Unerwarteter nrfx uuid-Typ"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unhandled ESP TLS error %d %d %x %d"
|
msgid "Unhandled ESP TLS error %d %d %x %d"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -2521,7 +2523,7 @@ msgstr "Puffersegmente müssen gleich lang sein"
|
||||||
msgid "buffer too small"
|
msgid "buffer too small"
|
||||||
msgstr "Der Puffer ist zu klein"
|
msgstr "Der Puffer ist zu klein"
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "buffer too small for requested bytes"
|
msgid "buffer too small for requested bytes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -2902,7 +2904,7 @@ msgstr "erwarte tuple/list"
|
||||||
|
|
||||||
#: py/modthread.c
|
#: py/modthread.c
|
||||||
msgid "expecting a dict for keyword args"
|
msgid "expecting a dict for keyword args"
|
||||||
msgstr "erwarte ein dict als Keyword-Argumente"
|
msgstr "erwarte ein dict als Schlüsselwort-Argumente"
|
||||||
|
|
||||||
#: py/compile.c
|
#: py/compile.c
|
||||||
msgid "expecting an assembler instruction"
|
msgid "expecting an assembler instruction"
|
||||||
|
@ -2922,11 +2924,11 @@ msgstr ""
|
||||||
|
|
||||||
#: py/argcheck.c
|
#: py/argcheck.c
|
||||||
msgid "extra keyword arguments given"
|
msgid "extra keyword arguments given"
|
||||||
msgstr "Es wurden zusätzliche Keyword-Argumente angegeben"
|
msgstr "Es wurden zusätzliche Schlüsselwort-Argumente angegeben"
|
||||||
|
|
||||||
#: py/argcheck.c
|
#: py/argcheck.c
|
||||||
msgid "extra positional arguments given"
|
msgid "extra positional arguments given"
|
||||||
msgstr "Es wurden zusätzliche Argumente ohne Keyword angegeben"
|
msgstr "Es wurden zusätzliche Argumente ohne Schlüsselwort angegeben"
|
||||||
|
|
||||||
#: py/parse.c
|
#: py/parse.c
|
||||||
msgid "f-string expression part cannot include a '#'"
|
msgid "f-string expression part cannot include a '#'"
|
||||||
|
@ -3007,7 +3009,7 @@ msgstr "voll"
|
||||||
|
|
||||||
#: py/argcheck.c
|
#: py/argcheck.c
|
||||||
msgid "function does not take keyword arguments"
|
msgid "function does not take keyword arguments"
|
||||||
msgstr "Funktion akzeptiert keine Keyword-Argumente"
|
msgstr "Funktion akzeptiert keine Schlüsselwort-Argumente"
|
||||||
|
|
||||||
#: py/argcheck.c
|
#: py/argcheck.c
|
||||||
#, c-format
|
#, c-format
|
||||||
|
@ -3029,26 +3031,27 @@ msgstr ""
|
||||||
#: py/argcheck.c
|
#: py/argcheck.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "function missing %d required positional arguments"
|
msgid "function missing %d required positional arguments"
|
||||||
msgstr "Funktion vermisst %d benötigte Argumente ohne Keyword"
|
msgstr "Funktion vermisst %d benötigte Argumente ohne Schlüsselwort"
|
||||||
|
|
||||||
#: py/bc.c
|
#: py/bc.c
|
||||||
msgid "function missing keyword-only argument"
|
msgid "function missing keyword-only argument"
|
||||||
msgstr "Funktion vermisst Keyword-only-Argument"
|
msgstr "Funktion vermisst Nur-Schlüsselwort-Argument"
|
||||||
|
|
||||||
#: py/bc.c
|
#: py/bc.c
|
||||||
msgid "function missing required keyword argument '%q'"
|
msgid "function missing required keyword argument '%q'"
|
||||||
msgstr "Funktion vermisst benötigtes Keyword-Argumente '%q'"
|
msgstr "Funktion vermisst benötigtes Schlüsselwort-Argumente '%q'"
|
||||||
|
|
||||||
#: py/bc.c
|
#: py/bc.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "function missing required positional argument #%d"
|
msgid "function missing required positional argument #%d"
|
||||||
msgstr "Funktion vermisst benötigtes Argumente ohne Keyword #%d"
|
msgstr "Funktion vermisst benötigtes Argumente ohne Schlüsselwort #%d"
|
||||||
|
|
||||||
#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c
|
#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "function takes %d positional arguments but %d were given"
|
msgid "function takes %d positional arguments but %d were given"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Funktion nimmt %d Argumente ohne Keyword an, aber es wurden %d angegeben"
|
"Funktion nimmt %d Argumente ohne Schlüsselwort an, aber es wurden %d "
|
||||||
|
"angegeben"
|
||||||
|
|
||||||
#: shared-bindings/time/__init__.c
|
#: shared-bindings/time/__init__.c
|
||||||
msgid "function takes exactly 9 arguments"
|
msgid "function takes exactly 9 arguments"
|
||||||
|
@ -3278,8 +3281,8 @@ msgstr ""
|
||||||
#: py/argcheck.c
|
#: py/argcheck.c
|
||||||
msgid "keyword argument(s) not yet implemented - use normal args instead"
|
msgid "keyword argument(s) not yet implemented - use normal args instead"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Keyword-Argument(e) noch nicht implementiert - verwenden Sie stattdessen "
|
"Schlüsselwort-Argument(e) noch nicht implementiert - verwenden Sie "
|
||||||
"normale Argumente"
|
"stattdessen normale Argumente"
|
||||||
|
|
||||||
#: py/bc.c
|
#: py/bc.c
|
||||||
msgid "keywords must be strings"
|
msgid "keywords must be strings"
|
||||||
|
@ -3704,6 +3707,10 @@ msgstr "pop von einem leeren PulseIn"
|
||||||
msgid "pop from empty %q"
|
msgid "pop from empty %q"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
|
msgid "port must be >= 0"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: py/objint_mpz.c
|
#: py/objint_mpz.c
|
||||||
msgid "pow() 3rd argument cannot be 0"
|
msgid "pow() 3rd argument cannot be 0"
|
||||||
msgstr "pow() drittes Argument darf nicht 0 sein"
|
msgstr "pow() drittes Argument darf nicht 0 sein"
|
||||||
|
@ -4069,11 +4076,11 @@ msgstr ""
|
||||||
|
|
||||||
#: py/bc.c
|
#: py/bc.c
|
||||||
msgid "unexpected keyword argument"
|
msgid "unexpected keyword argument"
|
||||||
msgstr "unerwartetes Keyword-Argument"
|
msgstr "unerwartetes Schlüsselwort-Argument"
|
||||||
|
|
||||||
#: py/bc.c py/objnamedtuple.c
|
#: py/bc.c py/objnamedtuple.c
|
||||||
msgid "unexpected keyword argument '%q'"
|
msgid "unexpected keyword argument '%q'"
|
||||||
msgstr "unerwartetes Keyword-Argument '%q'"
|
msgstr "unerwartetes Schlüsselwort-Argument '%q'"
|
||||||
|
|
||||||
#: py/lexer.c
|
#: py/lexer.c
|
||||||
msgid "unicode name escapes"
|
msgid "unicode name escapes"
|
||||||
|
@ -4239,6 +4246,9 @@ msgstr ""
|
||||||
msgid "zi must be of shape (n_section, 2)"
|
msgid "zi must be of shape (n_section, 2)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#~ msgid "SDA or SCL needs a pull up"
|
||||||
|
#~ msgstr "SDA oder SCL brauchen pull up"
|
||||||
|
|
||||||
#~ msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
|
#~ msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
#~ "%d Adress-Pins und %d rgb-Pins zeigen eine Höhe von %d, nicht von %d"
|
#~ "%d Adress-Pins und %d rgb-Pins zeigen eine Höhe von %d, nicht von %d"
|
||||||
|
|
47
locale/el.po
47
locale/el.po
|
@ -629,6 +629,10 @@ msgstr ""
|
||||||
msgid "Cannot reset into bootloader because no bootloader is present."
|
msgid "Cannot reset into bootloader because no bootloader is present."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
||||||
|
msgid "Cannot set socket options"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-bindings/digitalio/DigitalInOut.c
|
#: shared-bindings/digitalio/DigitalInOut.c
|
||||||
msgid "Cannot set value when direction is input."
|
msgid "Cannot set value when direction is input."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -865,7 +869,7 @@ msgstr ""
|
||||||
msgid "Error in regex"
|
msgid "Error in regex"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "Error: Failure to bind"
|
msgid "Error: Failure to bind"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -924,7 +928,7 @@ msgstr ""
|
||||||
msgid "FFT is implemented for linear arrays only"
|
msgid "FFT is implemented for linear arrays only"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
msgid "Failed SSL handshake"
|
msgid "Failed SSL handshake"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1295,7 +1299,7 @@ msgstr ""
|
||||||
msgid "Invalid size"
|
msgid "Invalid size"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLContext.c
|
||||||
msgid "Invalid socket for TLS"
|
msgid "Invalid socket for TLS"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1303,10 +1307,6 @@ msgstr ""
|
||||||
msgid "Invalid state"
|
msgid "Invalid state"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Invalid use of TLS Socket"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: shared-bindings/audiomixer/Mixer.c
|
#: shared-bindings/audiomixer/Mixer.c
|
||||||
msgid "Invalid voice"
|
msgid "Invalid voice"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1323,10 +1323,6 @@ msgstr ""
|
||||||
msgid "Invalid word/bit length"
|
msgid "Invalid word/bit length"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Issue setting SO_REUSEADDR"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: shared-bindings/aesio/aes.c
|
#: shared-bindings/aesio/aes.c
|
||||||
msgid "Key must be 16, 24, or 32 bytes long"
|
msgid "Key must be 16, 24, or 32 bytes long"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1539,6 +1535,12 @@ msgstr ""
|
||||||
msgid "No out in program"
|
msgid "No out in program"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
||||||
|
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
||||||
|
#: ports/raspberrypi/common-hal/busio/I2C.c
|
||||||
|
msgid "No pull up found on SDA or SCL; check your wiring"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-module/touchio/TouchIn.c
|
#: shared-module/touchio/TouchIn.c
|
||||||
msgid "No pulldown on pin; 1Mohm recommended"
|
msgid "No pulldown on pin; 1Mohm recommended"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1647,7 +1649,7 @@ msgstr ""
|
||||||
msgid "Out of memory"
|
msgid "Out of memory"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/socketpool/SocketPool.c
|
||||||
msgid "Out of sockets"
|
msgid "Out of sockets"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1793,6 +1795,10 @@ msgstr ""
|
||||||
msgid "RNG Init Error"
|
msgid "RNG Init Error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ports/nrf/common-hal/busio/UART.c
|
||||||
|
msgid "RS485 Not yet supported on this device"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/busio/UART.c
|
#: ports/esp32s2/common-hal/busio/UART.c
|
||||||
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
||||||
msgid "RS485 inversion specified when not in RS485 mode"
|
msgid "RS485 inversion specified when not in RS485 mode"
|
||||||
|
@ -1800,6 +1806,7 @@ msgstr ""
|
||||||
|
|
||||||
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
||||||
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
||||||
|
#: ports/raspberrypi/common-hal/rtc/RTC.c
|
||||||
msgid "RTC calibration is not supported on this board"
|
msgid "RTC calibration is not supported on this board"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1808,7 +1815,7 @@ msgid "RTC is not supported on this board"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
||||||
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
|
#: ports/stm/common-hal/busio/UART.c
|
||||||
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1865,12 +1872,6 @@ msgstr ""
|
||||||
msgid "SD card CSD format not supported"
|
msgid "SD card CSD format not supported"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
|
||||||
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
|
||||||
#: ports/raspberrypi/common-hal/busio/I2C.c
|
|
||||||
msgid "SDA or SCL needs a pull up"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ports/stm/common-hal/sdioio/SDCard.c
|
#: ports/stm/common-hal/sdioio/SDCard.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "SDIO GetCardInfo Error %d"
|
msgid "SDIO GetCardInfo Error %d"
|
||||||
|
@ -2162,7 +2163,7 @@ msgstr ""
|
||||||
msgid "Unexpected nrfx uuid type"
|
msgid "Unexpected nrfx uuid type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unhandled ESP TLS error %d %d %x %d"
|
msgid "Unhandled ESP TLS error %d %d %x %d"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -2461,7 +2462,7 @@ msgstr ""
|
||||||
msgid "buffer too small"
|
msgid "buffer too small"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "buffer too small for requested bytes"
|
msgid "buffer too small for requested bytes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -3621,6 +3622,10 @@ msgstr ""
|
||||||
msgid "pop from empty %q"
|
msgid "pop from empty %q"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
|
msgid "port must be >= 0"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: py/objint_mpz.c
|
#: py/objint_mpz.c
|
||||||
msgid "pow() 3rd argument cannot be 0"
|
msgid "pow() 3rd argument cannot be 0"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
76
locale/es.po
76
locale/es.po
|
@ -8,27 +8,31 @@ msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
||||||
"PO-Revision-Date: 2020-12-30 22:25+0000\n"
|
"PO-Revision-Date: 2021-02-08 21:21+0000\n"
|
||||||
"Last-Translator: Hugo Dahl <hugo@code-jedi.com>\n"
|
"Last-Translator: Alvaro Figueroa <alvaro@greencore.co.cr>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"Language: es\n"
|
"Language: es\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
"X-Generator: Weblate 4.4.1-dev\n"
|
"X-Generator: Weblate 4.5-dev\n"
|
||||||
|
|
||||||
#: main.c
|
#: main.c
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
"Code done running.\n"
|
"Code done running.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"\n"
|
||||||
|
"El código terminó de ejecutar.\n"
|
||||||
|
|
||||||
#: main.c
|
#: main.c
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
"Code stopped by auto-reload.\n"
|
"Code stopped by auto-reload.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"\n"
|
||||||
|
"El código fue detenido por el auto-reiniciado.\n"
|
||||||
|
|
||||||
#: supervisor/shared/safe_mode.c
|
#: supervisor/shared/safe_mode.c
|
||||||
msgid ""
|
msgid ""
|
||||||
|
@ -50,7 +54,7 @@ msgstr " Archivo \"%q\", línea %d"
|
||||||
|
|
||||||
#: py/builtinhelp.c
|
#: py/builtinhelp.c
|
||||||
msgid " is of type %q\n"
|
msgid " is of type %q\n"
|
||||||
msgstr ""
|
msgstr " es de tipo %q\n"
|
||||||
|
|
||||||
#: main.c
|
#: main.c
|
||||||
msgid " output:\n"
|
msgid " output:\n"
|
||||||
|
@ -126,7 +130,7 @@ msgstr "%q() toma %d argumentos posicionales pero %d fueron dados"
|
||||||
#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c
|
#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s error 0x%x"
|
msgid "%s error 0x%x"
|
||||||
msgstr ""
|
msgstr "%s error 0x%x"
|
||||||
|
|
||||||
#: py/argcheck.c
|
#: py/argcheck.c
|
||||||
msgid "'%q' argument required"
|
msgid "'%q' argument required"
|
||||||
|
@ -292,7 +296,7 @@ msgstr "pow() con 3 argumentos no soportado"
|
||||||
|
|
||||||
#: shared-module/msgpack/__init__.c
|
#: shared-module/msgpack/__init__.c
|
||||||
msgid "64 bit types"
|
msgid "64 bit types"
|
||||||
msgstr ""
|
msgstr "tipos de 64 bit"
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/countio/Counter.c
|
#: ports/atmel-samd/common-hal/countio/Counter.c
|
||||||
#: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c
|
#: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c
|
||||||
|
@ -346,7 +350,7 @@ msgstr "Todos los canales de eventos estan siendo usados"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
msgid "All state machines in use"
|
msgid "All state machines in use"
|
||||||
msgstr ""
|
msgstr "Todas las máquinas de estado en uso"
|
||||||
|
|
||||||
#: ports/atmel-samd/audio_dma.c ports/atmel-samd/common-hal/audiobusio/PDMIn.c
|
#: ports/atmel-samd/audio_dma.c ports/atmel-samd/common-hal/audiobusio/PDMIn.c
|
||||||
msgid "All sync event channels in use"
|
msgid "All sync event channels in use"
|
||||||
|
@ -567,7 +571,7 @@ msgstr "Los bloques CBC deben ser múltiplos de 16 bytes"
|
||||||
|
|
||||||
#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c
|
#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c
|
||||||
msgid "CRC or checksum was invalid"
|
msgid "CRC or checksum was invalid"
|
||||||
msgstr ""
|
msgstr "CRC o suma de comprobación inválida"
|
||||||
|
|
||||||
#: py/objtype.c
|
#: py/objtype.c
|
||||||
msgid "Call super().__init__() before accessing native object."
|
msgid "Call super().__init__() before accessing native object."
|
||||||
|
@ -642,6 +646,10 @@ msgstr "No se puede volver a montar '/' cuando el USB esta activo."
|
||||||
msgid "Cannot reset into bootloader because no bootloader is present."
|
msgid "Cannot reset into bootloader because no bootloader is present."
|
||||||
msgstr "No se puede reiniciar a bootloader porque no hay bootloader presente."
|
msgstr "No se puede reiniciar a bootloader porque no hay bootloader presente."
|
||||||
|
|
||||||
|
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
||||||
|
msgid "Cannot set socket options"
|
||||||
|
msgstr "No se pueden definir opciones para enchufe"
|
||||||
|
|
||||||
#: shared-bindings/digitalio/DigitalInOut.c
|
#: shared-bindings/digitalio/DigitalInOut.c
|
||||||
msgid "Cannot set value when direction is input."
|
msgid "Cannot set value when direction is input."
|
||||||
msgstr "No se puede asignar un valor cuando la dirección es input."
|
msgstr "No se puede asignar un valor cuando la dirección es input."
|
||||||
|
@ -882,7 +890,7 @@ msgstr "El canal EXTINT ya está siendo utilizado"
|
||||||
msgid "Error in regex"
|
msgid "Error in regex"
|
||||||
msgstr "Error en regex"
|
msgstr "Error en regex"
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "Error: Failure to bind"
|
msgid "Error: Failure to bind"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -941,7 +949,7 @@ msgstr "FFT se define solo para ndarrays"
|
||||||
msgid "FFT is implemented for linear arrays only"
|
msgid "FFT is implemented for linear arrays only"
|
||||||
msgstr "FFT solo esta implementado para arrays lineales"
|
msgstr "FFT solo esta implementado para arrays lineales"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
msgid "Failed SSL handshake"
|
msgid "Failed SSL handshake"
|
||||||
msgstr "Fallo en saludo SSL"
|
msgstr "Fallo en saludo SSL"
|
||||||
|
|
||||||
|
@ -1013,7 +1021,7 @@ msgstr "Filtros muy complejos"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/dualbank/__init__.c
|
#: ports/esp32s2/common-hal/dualbank/__init__.c
|
||||||
msgid "Firmware image is invalid"
|
msgid "Firmware image is invalid"
|
||||||
msgstr ""
|
msgstr "La imagen de firmware es inválida"
|
||||||
|
|
||||||
#: ports/cxd56/common-hal/camera/Camera.c
|
#: ports/cxd56/common-hal/camera/Camera.c
|
||||||
msgid "Format not supported"
|
msgid "Format not supported"
|
||||||
|
@ -1036,7 +1044,7 @@ msgstr "La función requiere lock"
|
||||||
|
|
||||||
#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c
|
#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c
|
||||||
msgid "Generic Failure"
|
msgid "Generic Failure"
|
||||||
msgstr ""
|
msgstr "Fallo Genérico"
|
||||||
|
|
||||||
#: shared-bindings/displayio/Display.c
|
#: shared-bindings/displayio/Display.c
|
||||||
#: shared-bindings/displayio/EPaperDisplay.c
|
#: shared-bindings/displayio/EPaperDisplay.c
|
||||||
|
@ -1072,7 +1080,7 @@ msgstr "I2C Error de inicio"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/busio/I2C.c
|
#: ports/raspberrypi/common-hal/busio/I2C.c
|
||||||
msgid "I2C peripheral in use"
|
msgid "I2C peripheral in use"
|
||||||
msgstr ""
|
msgstr "Dispositivo I2C en uso"
|
||||||
|
|
||||||
#: shared-bindings/audiobusio/I2SOut.c
|
#: shared-bindings/audiobusio/I2SOut.c
|
||||||
msgid "I2SOut not available"
|
msgid "I2SOut not available"
|
||||||
|
@ -1315,7 +1323,7 @@ msgstr "'security_mode' no válido"
|
||||||
msgid "Invalid size"
|
msgid "Invalid size"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLContext.c
|
||||||
msgid "Invalid socket for TLS"
|
msgid "Invalid socket for TLS"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1323,10 +1331,6 @@ msgstr ""
|
||||||
msgid "Invalid state"
|
msgid "Invalid state"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Invalid use of TLS Socket"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: shared-bindings/audiomixer/Mixer.c
|
#: shared-bindings/audiomixer/Mixer.c
|
||||||
msgid "Invalid voice"
|
msgid "Invalid voice"
|
||||||
msgstr "Voz inválida"
|
msgstr "Voz inválida"
|
||||||
|
@ -1343,10 +1347,6 @@ msgstr "Archivo wave inválido"
|
||||||
msgid "Invalid word/bit length"
|
msgid "Invalid word/bit length"
|
||||||
msgstr "Tamaño no válido de palabra/bit"
|
msgstr "Tamaño no válido de palabra/bit"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Issue setting SO_REUSEADDR"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: shared-bindings/aesio/aes.c
|
#: shared-bindings/aesio/aes.c
|
||||||
msgid "Key must be 16, 24, or 32 bytes long"
|
msgid "Key must be 16, 24, or 32 bytes long"
|
||||||
msgstr "La llave debe tener 16, 24 o 32 bytes de longitud"
|
msgstr "La llave debe tener 16, 24 o 32 bytes de longitud"
|
||||||
|
@ -1559,6 +1559,12 @@ msgstr "No hay una red con ese ssid"
|
||||||
msgid "No out in program"
|
msgid "No out in program"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
||||||
|
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
||||||
|
#: ports/raspberrypi/common-hal/busio/I2C.c
|
||||||
|
msgid "No pull up found on SDA or SCL; check your wiring"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-module/touchio/TouchIn.c
|
#: shared-module/touchio/TouchIn.c
|
||||||
msgid "No pulldown on pin; 1Mohm recommended"
|
msgid "No pulldown on pin; 1Mohm recommended"
|
||||||
msgstr "No hay pulldown en el pin; 1Mohm recomendado"
|
msgstr "No hay pulldown en el pin; 1Mohm recomendado"
|
||||||
|
@ -1673,7 +1679,7 @@ msgstr ""
|
||||||
msgid "Out of memory"
|
msgid "Out of memory"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/socketpool/SocketPool.c
|
||||||
msgid "Out of sockets"
|
msgid "Out of sockets"
|
||||||
msgstr "Se acabaron los enchufes"
|
msgstr "Se acabaron los enchufes"
|
||||||
|
|
||||||
|
@ -1828,6 +1834,10 @@ msgstr "Error de desinicialización de RNG"
|
||||||
msgid "RNG Init Error"
|
msgid "RNG Init Error"
|
||||||
msgstr "Error de inicialización de RNG"
|
msgstr "Error de inicialización de RNG"
|
||||||
|
|
||||||
|
#: ports/nrf/common-hal/busio/UART.c
|
||||||
|
msgid "RS485 Not yet supported on this device"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/busio/UART.c
|
#: ports/esp32s2/common-hal/busio/UART.c
|
||||||
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
||||||
msgid "RS485 inversion specified when not in RS485 mode"
|
msgid "RS485 inversion specified when not in RS485 mode"
|
||||||
|
@ -1835,6 +1845,7 @@ msgstr "Se especifica inversión de RS485 si no está en modo RS485"
|
||||||
|
|
||||||
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
||||||
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
||||||
|
#: ports/raspberrypi/common-hal/rtc/RTC.c
|
||||||
msgid "RTC calibration is not supported on this board"
|
msgid "RTC calibration is not supported on this board"
|
||||||
msgstr "Calibración de RTC no es soportada en esta placa"
|
msgstr "Calibración de RTC no es soportada en esta placa"
|
||||||
|
|
||||||
|
@ -1843,7 +1854,7 @@ msgid "RTC is not supported on this board"
|
||||||
msgstr "RTC no soportado en esta placa"
|
msgstr "RTC no soportado en esta placa"
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
||||||
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
|
#: ports/stm/common-hal/busio/UART.c
|
||||||
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
||||||
msgstr "Sin capacidad de RTS/CTS/RS485 para este dispositivo"
|
msgstr "Sin capacidad de RTS/CTS/RS485 para este dispositivo"
|
||||||
|
|
||||||
|
@ -1900,12 +1911,6 @@ msgstr "¡Corriendo en modo seguro! "
|
||||||
msgid "SD card CSD format not supported"
|
msgid "SD card CSD format not supported"
|
||||||
msgstr "Sin capacidad para formato CSD para tarjeta SD"
|
msgstr "Sin capacidad para formato CSD para tarjeta SD"
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
|
||||||
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
|
||||||
#: ports/raspberrypi/common-hal/busio/I2C.c
|
|
||||||
msgid "SDA or SCL needs a pull up"
|
|
||||||
msgstr "SDA o SCL necesitan una pull up"
|
|
||||||
|
|
||||||
#: ports/stm/common-hal/sdioio/SDCard.c
|
#: ports/stm/common-hal/sdioio/SDCard.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "SDIO GetCardInfo Error %d"
|
msgid "SDIO GetCardInfo Error %d"
|
||||||
|
@ -2211,7 +2216,7 @@ msgstr ""
|
||||||
msgid "Unexpected nrfx uuid type"
|
msgid "Unexpected nrfx uuid type"
|
||||||
msgstr "Tipo de uuid nrfx inesperado"
|
msgstr "Tipo de uuid nrfx inesperado"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unhandled ESP TLS error %d %d %x %d"
|
msgid "Unhandled ESP TLS error %d %d %x %d"
|
||||||
msgstr "Error no manejado de ESP TLS %d %d %x %d"
|
msgstr "Error no manejado de ESP TLS %d %d %x %d"
|
||||||
|
@ -2521,7 +2526,7 @@ msgstr "Las secciones del buffer necesitan tener longitud igual"
|
||||||
msgid "buffer too small"
|
msgid "buffer too small"
|
||||||
msgstr "buffer demasiado pequeño"
|
msgstr "buffer demasiado pequeño"
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "buffer too small for requested bytes"
|
msgid "buffer too small for requested bytes"
|
||||||
msgstr "búfer muy pequeño para los bytes solicitados"
|
msgstr "búfer muy pequeño para los bytes solicitados"
|
||||||
|
|
||||||
|
@ -3694,6 +3699,10 @@ msgstr "pop de un PulseIn vacío"
|
||||||
msgid "pop from empty %q"
|
msgid "pop from empty %q"
|
||||||
msgstr "pop desde %q vacía"
|
msgstr "pop desde %q vacía"
|
||||||
|
|
||||||
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
|
msgid "port must be >= 0"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: py/objint_mpz.c
|
#: py/objint_mpz.c
|
||||||
msgid "pow() 3rd argument cannot be 0"
|
msgid "pow() 3rd argument cannot be 0"
|
||||||
msgstr "el 3er argumento de pow() no puede ser 0"
|
msgstr "el 3er argumento de pow() no puede ser 0"
|
||||||
|
@ -4225,6 +4234,9 @@ msgstr "zi debe ser de tipo flotante"
|
||||||
msgid "zi must be of shape (n_section, 2)"
|
msgid "zi must be of shape (n_section, 2)"
|
||||||
msgstr "zi debe ser una forma (n_section,2)"
|
msgstr "zi debe ser una forma (n_section,2)"
|
||||||
|
|
||||||
|
#~ msgid "SDA or SCL needs a pull up"
|
||||||
|
#~ msgstr "SDA o SCL necesitan una pull up"
|
||||||
|
|
||||||
#~ msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
|
#~ msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
#~ "%d pines de dirección y %d pines rgb indican una altura de %d, no de %d"
|
#~ "%d pines de dirección y %d pines rgb indican una altura de %d, no de %d"
|
||||||
|
|
|
@ -636,6 +636,10 @@ msgstr "Hindi ma-remount '/' kapag aktibo ang USB."
|
||||||
msgid "Cannot reset into bootloader because no bootloader is present."
|
msgid "Cannot reset into bootloader because no bootloader is present."
|
||||||
msgstr "Hindi ma-reset sa bootloader dahil walang bootloader."
|
msgstr "Hindi ma-reset sa bootloader dahil walang bootloader."
|
||||||
|
|
||||||
|
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
||||||
|
msgid "Cannot set socket options"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-bindings/digitalio/DigitalInOut.c
|
#: shared-bindings/digitalio/DigitalInOut.c
|
||||||
msgid "Cannot set value when direction is input."
|
msgid "Cannot set value when direction is input."
|
||||||
msgstr "Hindi ma i-set ang value kapag ang direksyon ay input."
|
msgstr "Hindi ma i-set ang value kapag ang direksyon ay input."
|
||||||
|
@ -876,7 +880,7 @@ msgstr "Ginagamit na ang EXTINT channel"
|
||||||
msgid "Error in regex"
|
msgid "Error in regex"
|
||||||
msgstr "May pagkakamali sa REGEX"
|
msgstr "May pagkakamali sa REGEX"
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "Error: Failure to bind"
|
msgid "Error: Failure to bind"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -937,7 +941,7 @@ msgstr ""
|
||||||
msgid "FFT is implemented for linear arrays only"
|
msgid "FFT is implemented for linear arrays only"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
msgid "Failed SSL handshake"
|
msgid "Failed SSL handshake"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1310,7 +1314,7 @@ msgstr ""
|
||||||
msgid "Invalid size"
|
msgid "Invalid size"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLContext.c
|
||||||
msgid "Invalid socket for TLS"
|
msgid "Invalid socket for TLS"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1318,10 +1322,6 @@ msgstr ""
|
||||||
msgid "Invalid state"
|
msgid "Invalid state"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Invalid use of TLS Socket"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: shared-bindings/audiomixer/Mixer.c
|
#: shared-bindings/audiomixer/Mixer.c
|
||||||
msgid "Invalid voice"
|
msgid "Invalid voice"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1338,10 +1338,6 @@ msgstr "May hindi tama sa wave file"
|
||||||
msgid "Invalid word/bit length"
|
msgid "Invalid word/bit length"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Issue setting SO_REUSEADDR"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: shared-bindings/aesio/aes.c
|
#: shared-bindings/aesio/aes.c
|
||||||
msgid "Key must be 16, 24, or 32 bytes long"
|
msgid "Key must be 16, 24, or 32 bytes long"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1554,6 +1550,12 @@ msgstr ""
|
||||||
msgid "No out in program"
|
msgid "No out in program"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
||||||
|
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
||||||
|
#: ports/raspberrypi/common-hal/busio/I2C.c
|
||||||
|
msgid "No pull up found on SDA or SCL; check your wiring"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-module/touchio/TouchIn.c
|
#: shared-module/touchio/TouchIn.c
|
||||||
msgid "No pulldown on pin; 1Mohm recommended"
|
msgid "No pulldown on pin; 1Mohm recommended"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1665,7 +1667,7 @@ msgstr ""
|
||||||
msgid "Out of memory"
|
msgid "Out of memory"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/socketpool/SocketPool.c
|
||||||
msgid "Out of sockets"
|
msgid "Out of sockets"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1812,6 +1814,10 @@ msgstr ""
|
||||||
msgid "RNG Init Error"
|
msgid "RNG Init Error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ports/nrf/common-hal/busio/UART.c
|
||||||
|
msgid "RS485 Not yet supported on this device"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/busio/UART.c
|
#: ports/esp32s2/common-hal/busio/UART.c
|
||||||
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
||||||
msgid "RS485 inversion specified when not in RS485 mode"
|
msgid "RS485 inversion specified when not in RS485 mode"
|
||||||
|
@ -1819,6 +1825,7 @@ msgstr ""
|
||||||
|
|
||||||
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
||||||
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
||||||
|
#: ports/raspberrypi/common-hal/rtc/RTC.c
|
||||||
msgid "RTC calibration is not supported on this board"
|
msgid "RTC calibration is not supported on this board"
|
||||||
msgstr "RTC calibration ay hindi supportado ng board na ito"
|
msgstr "RTC calibration ay hindi supportado ng board na ito"
|
||||||
|
|
||||||
|
@ -1827,7 +1834,7 @@ msgid "RTC is not supported on this board"
|
||||||
msgstr "Hindi supportado ang RTC sa board na ito"
|
msgstr "Hindi supportado ang RTC sa board na ito"
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
||||||
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
|
#: ports/stm/common-hal/busio/UART.c
|
||||||
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1885,12 +1892,6 @@ msgstr ""
|
||||||
msgid "SD card CSD format not supported"
|
msgid "SD card CSD format not supported"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
|
||||||
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
|
||||||
#: ports/raspberrypi/common-hal/busio/I2C.c
|
|
||||||
msgid "SDA or SCL needs a pull up"
|
|
||||||
msgstr "Kailangan ng pull up resistors ang SDA o SCL"
|
|
||||||
|
|
||||||
#: ports/stm/common-hal/sdioio/SDCard.c
|
#: ports/stm/common-hal/sdioio/SDCard.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "SDIO GetCardInfo Error %d"
|
msgid "SDIO GetCardInfo Error %d"
|
||||||
|
@ -2183,7 +2184,7 @@ msgstr ""
|
||||||
msgid "Unexpected nrfx uuid type"
|
msgid "Unexpected nrfx uuid type"
|
||||||
msgstr "hindi inaasahang indent"
|
msgstr "hindi inaasahang indent"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unhandled ESP TLS error %d %d %x %d"
|
msgid "Unhandled ESP TLS error %d %d %x %d"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -2492,7 +2493,7 @@ msgstr "aarehas na haba dapat ang buffer slices"
|
||||||
msgid "buffer too small"
|
msgid "buffer too small"
|
||||||
msgstr "masyadong maliit ang buffer"
|
msgstr "masyadong maliit ang buffer"
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "buffer too small for requested bytes"
|
msgid "buffer too small for requested bytes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -3670,6 +3671,10 @@ msgstr "pop mula sa walang laman na PulseIn"
|
||||||
msgid "pop from empty %q"
|
msgid "pop from empty %q"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
|
msgid "port must be >= 0"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: py/objint_mpz.c
|
#: py/objint_mpz.c
|
||||||
msgid "pow() 3rd argument cannot be 0"
|
msgid "pow() 3rd argument cannot be 0"
|
||||||
msgstr "pow() 3rd argument ay hindi maaring 0"
|
msgstr "pow() 3rd argument ay hindi maaring 0"
|
||||||
|
@ -4204,6 +4209,9 @@ msgstr ""
|
||||||
msgid "zi must be of shape (n_section, 2)"
|
msgid "zi must be of shape (n_section, 2)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#~ msgid "SDA or SCL needs a pull up"
|
||||||
|
#~ msgstr "Kailangan ng pull up resistors ang SDA o SCL"
|
||||||
|
|
||||||
#~ msgid "tuple index out of range"
|
#~ msgid "tuple index out of range"
|
||||||
#~ msgstr "indeks ng tuple wala sa sakop"
|
#~ msgstr "indeks ng tuple wala sa sakop"
|
||||||
|
|
||||||
|
|
56
locale/fr.po
56
locale/fr.po
|
@ -654,6 +654,10 @@ msgid "Cannot reset into bootloader because no bootloader is present."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Ne peut être redémarré vers le bootloader car il n'y a pas de bootloader."
|
"Ne peut être redémarré vers le bootloader car il n'y a pas de bootloader."
|
||||||
|
|
||||||
|
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
||||||
|
msgid "Cannot set socket options"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-bindings/digitalio/DigitalInOut.c
|
#: shared-bindings/digitalio/DigitalInOut.c
|
||||||
msgid "Cannot set value when direction is input."
|
msgid "Cannot set value when direction is input."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -897,7 +901,7 @@ msgstr "Canal EXTINT déjà utilisé"
|
||||||
msgid "Error in regex"
|
msgid "Error in regex"
|
||||||
msgstr "Erreur dans l'expression régulière"
|
msgstr "Erreur dans l'expression régulière"
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "Error: Failure to bind"
|
msgid "Error: Failure to bind"
|
||||||
msgstr "Erreur : Impossible de lier"
|
msgstr "Erreur : Impossible de lier"
|
||||||
|
|
||||||
|
@ -957,7 +961,7 @@ msgstr "La FFT est définie uniquement pour les ndarrays"
|
||||||
msgid "FFT is implemented for linear arrays only"
|
msgid "FFT is implemented for linear arrays only"
|
||||||
msgstr "FFT n'est implémenté que pour les tableaux linéaires"
|
msgstr "FFT n'est implémenté que pour les tableaux linéaires"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
msgid "Failed SSL handshake"
|
msgid "Failed SSL handshake"
|
||||||
msgstr "Échec du handshake SSL"
|
msgstr "Échec du handshake SSL"
|
||||||
|
|
||||||
|
@ -1332,7 +1336,7 @@ msgstr "'security_mode' invalide"
|
||||||
msgid "Invalid size"
|
msgid "Invalid size"
|
||||||
msgstr "Taille invalide"
|
msgstr "Taille invalide"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLContext.c
|
||||||
msgid "Invalid socket for TLS"
|
msgid "Invalid socket for TLS"
|
||||||
msgstr "Socket non valide pour TLS"
|
msgstr "Socket non valide pour TLS"
|
||||||
|
|
||||||
|
@ -1340,10 +1344,6 @@ msgstr "Socket non valide pour TLS"
|
||||||
msgid "Invalid state"
|
msgid "Invalid state"
|
||||||
msgstr "État invalide"
|
msgstr "État invalide"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Invalid use of TLS Socket"
|
|
||||||
msgstr "Utilisation incorrecte de socket TLS"
|
|
||||||
|
|
||||||
#: shared-bindings/audiomixer/Mixer.c
|
#: shared-bindings/audiomixer/Mixer.c
|
||||||
msgid "Invalid voice"
|
msgid "Invalid voice"
|
||||||
msgstr "Voix invalide"
|
msgstr "Voix invalide"
|
||||||
|
@ -1360,10 +1360,6 @@ msgstr "Fichier WAVE invalide"
|
||||||
msgid "Invalid word/bit length"
|
msgid "Invalid word/bit length"
|
||||||
msgstr "Longueur de mot / bit invalide"
|
msgstr "Longueur de mot / bit invalide"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Issue setting SO_REUSEADDR"
|
|
||||||
msgstr "Problème en activant SO_REUSEADDR"
|
|
||||||
|
|
||||||
#: shared-bindings/aesio/aes.c
|
#: shared-bindings/aesio/aes.c
|
||||||
msgid "Key must be 16, 24, or 32 bytes long"
|
msgid "Key must be 16, 24, or 32 bytes long"
|
||||||
msgstr "La clé doit comporter 16, 24 ou 32 octets"
|
msgstr "La clé doit comporter 16, 24 ou 32 octets"
|
||||||
|
@ -1576,6 +1572,12 @@ msgstr "Aucun réseau avec ce ssid"
|
||||||
msgid "No out in program"
|
msgid "No out in program"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
||||||
|
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
||||||
|
#: ports/raspberrypi/common-hal/busio/I2C.c
|
||||||
|
msgid "No pull up found on SDA or SCL; check your wiring"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-module/touchio/TouchIn.c
|
#: shared-module/touchio/TouchIn.c
|
||||||
msgid "No pulldown on pin; 1Mohm recommended"
|
msgid "No pulldown on pin; 1Mohm recommended"
|
||||||
msgstr "Pas de pulldown sur la broche ; 1Mohm recommandé"
|
msgstr "Pas de pulldown sur la broche ; 1Mohm recommandé"
|
||||||
|
@ -1690,7 +1692,7 @@ msgstr "Timeout de l'opération"
|
||||||
msgid "Out of memory"
|
msgid "Out of memory"
|
||||||
msgstr "Hors de mémoire"
|
msgstr "Hors de mémoire"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/socketpool/SocketPool.c
|
||||||
msgid "Out of sockets"
|
msgid "Out of sockets"
|
||||||
msgstr "Plus de sockets"
|
msgstr "Plus de sockets"
|
||||||
|
|
||||||
|
@ -1850,6 +1852,10 @@ msgstr "Erreur de désinitiation du RNG (RNG DeInit)"
|
||||||
msgid "RNG Init Error"
|
msgid "RNG Init Error"
|
||||||
msgstr "Erreur d'initialisation du RNG (RNG Init)"
|
msgstr "Erreur d'initialisation du RNG (RNG Init)"
|
||||||
|
|
||||||
|
#: ports/nrf/common-hal/busio/UART.c
|
||||||
|
msgid "RS485 Not yet supported on this device"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/busio/UART.c
|
#: ports/esp32s2/common-hal/busio/UART.c
|
||||||
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
||||||
msgid "RS485 inversion specified when not in RS485 mode"
|
msgid "RS485 inversion specified when not in RS485 mode"
|
||||||
|
@ -1857,6 +1863,7 @@ msgstr "Inversion RS485 spécifiée sans être en mode RS485"
|
||||||
|
|
||||||
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
||||||
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
||||||
|
#: ports/raspberrypi/common-hal/rtc/RTC.c
|
||||||
msgid "RTC calibration is not supported on this board"
|
msgid "RTC calibration is not supported on this board"
|
||||||
msgstr "La calibration du RTC non supportée sur cette carte"
|
msgstr "La calibration du RTC non supportée sur cette carte"
|
||||||
|
|
||||||
|
@ -1865,7 +1872,7 @@ msgid "RTC is not supported on this board"
|
||||||
msgstr "RTC non supporté sur cette carte"
|
msgstr "RTC non supporté sur cette carte"
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
||||||
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
|
#: ports/stm/common-hal/busio/UART.c
|
||||||
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
||||||
msgstr "RTS / CTS / RS485 Pas encore supporté sur cet appareil"
|
msgstr "RTS / CTS / RS485 Pas encore supporté sur cet appareil"
|
||||||
|
|
||||||
|
@ -1922,12 +1929,6 @@ msgstr "Exécution en mode sécurisé! "
|
||||||
msgid "SD card CSD format not supported"
|
msgid "SD card CSD format not supported"
|
||||||
msgstr "Le format de carte SD CSD n'est pas supporté"
|
msgstr "Le format de carte SD CSD n'est pas supporté"
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
|
||||||
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
|
||||||
#: ports/raspberrypi/common-hal/busio/I2C.c
|
|
||||||
msgid "SDA or SCL needs a pull up"
|
|
||||||
msgstr "SDA ou SCL a besoin d'une résistance de tirage ('pull up')"
|
|
||||||
|
|
||||||
#: ports/stm/common-hal/sdioio/SDCard.c
|
#: ports/stm/common-hal/sdioio/SDCard.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "SDIO GetCardInfo Error %d"
|
msgid "SDIO GetCardInfo Error %d"
|
||||||
|
@ -2234,7 +2235,7 @@ msgstr "Écriture impossible vers sleep_memory."
|
||||||
msgid "Unexpected nrfx uuid type"
|
msgid "Unexpected nrfx uuid type"
|
||||||
msgstr "Type inattendu pour l'uuid nrfx"
|
msgstr "Type inattendu pour l'uuid nrfx"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unhandled ESP TLS error %d %d %x %d"
|
msgid "Unhandled ESP TLS error %d %d %x %d"
|
||||||
msgstr "Erreur ESP TLS non gérée %d %d %x %d"
|
msgstr "Erreur ESP TLS non gérée %d %d %x %d"
|
||||||
|
@ -2546,7 +2547,7 @@ msgstr "les tranches de tampon doivent être de longueurs égales"
|
||||||
msgid "buffer too small"
|
msgid "buffer too small"
|
||||||
msgstr "tampon trop petit"
|
msgstr "tampon trop petit"
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "buffer too small for requested bytes"
|
msgid "buffer too small for requested bytes"
|
||||||
msgstr "tampon trop petit pour le nombre d'octets demandé"
|
msgstr "tampon trop petit pour le nombre d'octets demandé"
|
||||||
|
|
||||||
|
@ -3731,6 +3732,10 @@ msgstr "'pop' d'une entrée PulseIn vide"
|
||||||
msgid "pop from empty %q"
|
msgid "pop from empty %q"
|
||||||
msgstr "pop sur %q vide"
|
msgstr "pop sur %q vide"
|
||||||
|
|
||||||
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
|
msgid "port must be >= 0"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: py/objint_mpz.c
|
#: py/objint_mpz.c
|
||||||
msgid "pow() 3rd argument cannot be 0"
|
msgid "pow() 3rd argument cannot be 0"
|
||||||
msgstr "le 3e argument de pow() ne peut être 0"
|
msgstr "le 3e argument de pow() ne peut être 0"
|
||||||
|
@ -4262,6 +4267,15 @@ msgstr "zi doit être de type float"
|
||||||
msgid "zi must be of shape (n_section, 2)"
|
msgid "zi must be of shape (n_section, 2)"
|
||||||
msgstr "zi doit être de forme (n_section, 2)"
|
msgstr "zi doit être de forme (n_section, 2)"
|
||||||
|
|
||||||
|
#~ msgid "SDA or SCL needs a pull up"
|
||||||
|
#~ msgstr "SDA ou SCL a besoin d'une résistance de tirage ('pull up')"
|
||||||
|
|
||||||
|
#~ msgid "Invalid use of TLS Socket"
|
||||||
|
#~ msgstr "Utilisation incorrecte de socket TLS"
|
||||||
|
|
||||||
|
#~ msgid "Issue setting SO_REUSEADDR"
|
||||||
|
#~ msgstr "Problème en activant SO_REUSEADDR"
|
||||||
|
|
||||||
#~ msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
|
#~ msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
#~ "Les broches d'adresse %d et les broches RVB %d indiquent une hauteur de "
|
#~ "Les broches d'adresse %d et les broches RVB %d indiquent une hauteur de "
|
||||||
|
|
47
locale/hi.po
47
locale/hi.po
|
@ -629,6 +629,10 @@ msgstr ""
|
||||||
msgid "Cannot reset into bootloader because no bootloader is present."
|
msgid "Cannot reset into bootloader because no bootloader is present."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
||||||
|
msgid "Cannot set socket options"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-bindings/digitalio/DigitalInOut.c
|
#: shared-bindings/digitalio/DigitalInOut.c
|
||||||
msgid "Cannot set value when direction is input."
|
msgid "Cannot set value when direction is input."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -865,7 +869,7 @@ msgstr ""
|
||||||
msgid "Error in regex"
|
msgid "Error in regex"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "Error: Failure to bind"
|
msgid "Error: Failure to bind"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -924,7 +928,7 @@ msgstr ""
|
||||||
msgid "FFT is implemented for linear arrays only"
|
msgid "FFT is implemented for linear arrays only"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
msgid "Failed SSL handshake"
|
msgid "Failed SSL handshake"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1295,7 +1299,7 @@ msgstr ""
|
||||||
msgid "Invalid size"
|
msgid "Invalid size"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLContext.c
|
||||||
msgid "Invalid socket for TLS"
|
msgid "Invalid socket for TLS"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1303,10 +1307,6 @@ msgstr ""
|
||||||
msgid "Invalid state"
|
msgid "Invalid state"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Invalid use of TLS Socket"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: shared-bindings/audiomixer/Mixer.c
|
#: shared-bindings/audiomixer/Mixer.c
|
||||||
msgid "Invalid voice"
|
msgid "Invalid voice"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1323,10 +1323,6 @@ msgstr ""
|
||||||
msgid "Invalid word/bit length"
|
msgid "Invalid word/bit length"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Issue setting SO_REUSEADDR"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: shared-bindings/aesio/aes.c
|
#: shared-bindings/aesio/aes.c
|
||||||
msgid "Key must be 16, 24, or 32 bytes long"
|
msgid "Key must be 16, 24, or 32 bytes long"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1539,6 +1535,12 @@ msgstr ""
|
||||||
msgid "No out in program"
|
msgid "No out in program"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
||||||
|
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
||||||
|
#: ports/raspberrypi/common-hal/busio/I2C.c
|
||||||
|
msgid "No pull up found on SDA or SCL; check your wiring"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-module/touchio/TouchIn.c
|
#: shared-module/touchio/TouchIn.c
|
||||||
msgid "No pulldown on pin; 1Mohm recommended"
|
msgid "No pulldown on pin; 1Mohm recommended"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1647,7 +1649,7 @@ msgstr ""
|
||||||
msgid "Out of memory"
|
msgid "Out of memory"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/socketpool/SocketPool.c
|
||||||
msgid "Out of sockets"
|
msgid "Out of sockets"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1793,6 +1795,10 @@ msgstr ""
|
||||||
msgid "RNG Init Error"
|
msgid "RNG Init Error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ports/nrf/common-hal/busio/UART.c
|
||||||
|
msgid "RS485 Not yet supported on this device"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/busio/UART.c
|
#: ports/esp32s2/common-hal/busio/UART.c
|
||||||
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
||||||
msgid "RS485 inversion specified when not in RS485 mode"
|
msgid "RS485 inversion specified when not in RS485 mode"
|
||||||
|
@ -1800,6 +1806,7 @@ msgstr ""
|
||||||
|
|
||||||
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
||||||
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
||||||
|
#: ports/raspberrypi/common-hal/rtc/RTC.c
|
||||||
msgid "RTC calibration is not supported on this board"
|
msgid "RTC calibration is not supported on this board"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1808,7 +1815,7 @@ msgid "RTC is not supported on this board"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
||||||
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
|
#: ports/stm/common-hal/busio/UART.c
|
||||||
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1865,12 +1872,6 @@ msgstr ""
|
||||||
msgid "SD card CSD format not supported"
|
msgid "SD card CSD format not supported"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
|
||||||
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
|
||||||
#: ports/raspberrypi/common-hal/busio/I2C.c
|
|
||||||
msgid "SDA or SCL needs a pull up"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ports/stm/common-hal/sdioio/SDCard.c
|
#: ports/stm/common-hal/sdioio/SDCard.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "SDIO GetCardInfo Error %d"
|
msgid "SDIO GetCardInfo Error %d"
|
||||||
|
@ -2162,7 +2163,7 @@ msgstr ""
|
||||||
msgid "Unexpected nrfx uuid type"
|
msgid "Unexpected nrfx uuid type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unhandled ESP TLS error %d %d %x %d"
|
msgid "Unhandled ESP TLS error %d %d %x %d"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -2461,7 +2462,7 @@ msgstr ""
|
||||||
msgid "buffer too small"
|
msgid "buffer too small"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "buffer too small for requested bytes"
|
msgid "buffer too small for requested bytes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -3621,6 +3622,10 @@ msgstr ""
|
||||||
msgid "pop from empty %q"
|
msgid "pop from empty %q"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
|
msgid "port must be >= 0"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: py/objint_mpz.c
|
#: py/objint_mpz.c
|
||||||
msgid "pow() 3rd argument cannot be 0"
|
msgid "pow() 3rd argument cannot be 0"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
|
@ -637,6 +637,10 @@ msgid "Cannot reset into bootloader because no bootloader is present."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Impossibile resettare nel bootloader poiché nessun bootloader è presente."
|
"Impossibile resettare nel bootloader poiché nessun bootloader è presente."
|
||||||
|
|
||||||
|
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
||||||
|
msgid "Cannot set socket options"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-bindings/digitalio/DigitalInOut.c
|
#: shared-bindings/digitalio/DigitalInOut.c
|
||||||
msgid "Cannot set value when direction is input."
|
msgid "Cannot set value when direction is input."
|
||||||
msgstr "non si può impostare un valore quando direzione è input"
|
msgstr "non si può impostare un valore quando direzione è input"
|
||||||
|
@ -876,7 +880,7 @@ msgstr "Canale EXTINT già in uso"
|
||||||
msgid "Error in regex"
|
msgid "Error in regex"
|
||||||
msgstr "Errore nella regex"
|
msgstr "Errore nella regex"
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "Error: Failure to bind"
|
msgid "Error: Failure to bind"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -937,7 +941,7 @@ msgstr ""
|
||||||
msgid "FFT is implemented for linear arrays only"
|
msgid "FFT is implemented for linear arrays only"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
msgid "Failed SSL handshake"
|
msgid "Failed SSL handshake"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1312,7 +1316,7 @@ msgstr ""
|
||||||
msgid "Invalid size"
|
msgid "Invalid size"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLContext.c
|
||||||
msgid "Invalid socket for TLS"
|
msgid "Invalid socket for TLS"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1320,10 +1324,6 @@ msgstr ""
|
||||||
msgid "Invalid state"
|
msgid "Invalid state"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Invalid use of TLS Socket"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: shared-bindings/audiomixer/Mixer.c
|
#: shared-bindings/audiomixer/Mixer.c
|
||||||
msgid "Invalid voice"
|
msgid "Invalid voice"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1341,10 +1341,6 @@ msgstr "File wave non valido"
|
||||||
msgid "Invalid word/bit length"
|
msgid "Invalid word/bit length"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Issue setting SO_REUSEADDR"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: shared-bindings/aesio/aes.c
|
#: shared-bindings/aesio/aes.c
|
||||||
msgid "Key must be 16, 24, or 32 bytes long"
|
msgid "Key must be 16, 24, or 32 bytes long"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1558,6 +1554,12 @@ msgstr ""
|
||||||
msgid "No out in program"
|
msgid "No out in program"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
||||||
|
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
||||||
|
#: ports/raspberrypi/common-hal/busio/I2C.c
|
||||||
|
msgid "No pull up found on SDA or SCL; check your wiring"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-module/touchio/TouchIn.c
|
#: shared-module/touchio/TouchIn.c
|
||||||
msgid "No pulldown on pin; 1Mohm recommended"
|
msgid "No pulldown on pin; 1Mohm recommended"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1670,7 +1672,7 @@ msgstr ""
|
||||||
msgid "Out of memory"
|
msgid "Out of memory"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/socketpool/SocketPool.c
|
||||||
msgid "Out of sockets"
|
msgid "Out of sockets"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1822,6 +1824,10 @@ msgstr ""
|
||||||
msgid "RNG Init Error"
|
msgid "RNG Init Error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ports/nrf/common-hal/busio/UART.c
|
||||||
|
msgid "RS485 Not yet supported on this device"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/busio/UART.c
|
#: ports/esp32s2/common-hal/busio/UART.c
|
||||||
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
||||||
msgid "RS485 inversion specified when not in RS485 mode"
|
msgid "RS485 inversion specified when not in RS485 mode"
|
||||||
|
@ -1829,6 +1835,7 @@ msgstr ""
|
||||||
|
|
||||||
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
||||||
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
||||||
|
#: ports/raspberrypi/common-hal/rtc/RTC.c
|
||||||
msgid "RTC calibration is not supported on this board"
|
msgid "RTC calibration is not supported on this board"
|
||||||
msgstr "calibrazione RTC non supportata su questa scheda"
|
msgstr "calibrazione RTC non supportata su questa scheda"
|
||||||
|
|
||||||
|
@ -1837,7 +1844,7 @@ msgid "RTC is not supported on this board"
|
||||||
msgstr "RTC non supportato su questa scheda"
|
msgstr "RTC non supportato su questa scheda"
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
||||||
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
|
#: ports/stm/common-hal/busio/UART.c
|
||||||
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1895,12 +1902,6 @@ msgstr ""
|
||||||
msgid "SD card CSD format not supported"
|
msgid "SD card CSD format not supported"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
|
||||||
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
|
||||||
#: ports/raspberrypi/common-hal/busio/I2C.c
|
|
||||||
msgid "SDA or SCL needs a pull up"
|
|
||||||
msgstr "SDA o SCL necessitano un pull-up"
|
|
||||||
|
|
||||||
#: ports/stm/common-hal/sdioio/SDCard.c
|
#: ports/stm/common-hal/sdioio/SDCard.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "SDIO GetCardInfo Error %d"
|
msgid "SDIO GetCardInfo Error %d"
|
||||||
|
@ -2195,7 +2196,7 @@ msgstr ""
|
||||||
msgid "Unexpected nrfx uuid type"
|
msgid "Unexpected nrfx uuid type"
|
||||||
msgstr "indentazione inaspettata"
|
msgstr "indentazione inaspettata"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unhandled ESP TLS error %d %d %x %d"
|
msgid "Unhandled ESP TLS error %d %d %x %d"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -2498,7 +2499,7 @@ msgstr "slice del buffer devono essere della stessa lunghezza"
|
||||||
msgid "buffer too small"
|
msgid "buffer too small"
|
||||||
msgstr "buffer troppo piccolo"
|
msgstr "buffer troppo piccolo"
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "buffer too small for requested bytes"
|
msgid "buffer too small for requested bytes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -3678,6 +3679,10 @@ msgstr "pop sun un PulseIn vuoto"
|
||||||
msgid "pop from empty %q"
|
msgid "pop from empty %q"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
|
msgid "port must be >= 0"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: py/objint_mpz.c
|
#: py/objint_mpz.c
|
||||||
msgid "pow() 3rd argument cannot be 0"
|
msgid "pow() 3rd argument cannot be 0"
|
||||||
msgstr "il terzo argomento di pow() non può essere 0"
|
msgstr "il terzo argomento di pow() non può essere 0"
|
||||||
|
@ -4212,6 +4217,9 @@ msgstr ""
|
||||||
msgid "zi must be of shape (n_section, 2)"
|
msgid "zi must be of shape (n_section, 2)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#~ msgid "SDA or SCL needs a pull up"
|
||||||
|
#~ msgstr "SDA o SCL necessitano un pull-up"
|
||||||
|
|
||||||
#~ msgid "tuple index out of range"
|
#~ msgid "tuple index out of range"
|
||||||
#~ msgstr "indice della tupla fuori intervallo"
|
#~ msgstr "indice della tupla fuori intervallo"
|
||||||
|
|
||||||
|
|
50
locale/ja.po
50
locale/ja.po
|
@ -638,6 +638,10 @@ msgstr "USBがアクティブの時に'/'を再マウントできません"
|
||||||
msgid "Cannot reset into bootloader because no bootloader is present."
|
msgid "Cannot reset into bootloader because no bootloader is present."
|
||||||
msgstr "ブートローダが存在しないためブートローダへとリセットできません"
|
msgstr "ブートローダが存在しないためブートローダへとリセットできません"
|
||||||
|
|
||||||
|
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
||||||
|
msgid "Cannot set socket options"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-bindings/digitalio/DigitalInOut.c
|
#: shared-bindings/digitalio/DigitalInOut.c
|
||||||
msgid "Cannot set value when direction is input."
|
msgid "Cannot set value when direction is input."
|
||||||
msgstr "方向がinputのときは値を設定できません"
|
msgstr "方向がinputのときは値を設定できません"
|
||||||
|
@ -876,7 +880,7 @@ msgstr "EXTINTチャネルはすでに使用されています"
|
||||||
msgid "Error in regex"
|
msgid "Error in regex"
|
||||||
msgstr "正規表現にエラーがあります"
|
msgstr "正規表現にエラーがあります"
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "Error: Failure to bind"
|
msgid "Error: Failure to bind"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -935,7 +939,7 @@ msgstr "FFTはndarrayでのみ使えます"
|
||||||
msgid "FFT is implemented for linear arrays only"
|
msgid "FFT is implemented for linear arrays only"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
msgid "Failed SSL handshake"
|
msgid "Failed SSL handshake"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1308,7 +1312,7 @@ msgstr "不正なsecurity_mode"
|
||||||
msgid "Invalid size"
|
msgid "Invalid size"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLContext.c
|
||||||
msgid "Invalid socket for TLS"
|
msgid "Invalid socket for TLS"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1316,10 +1320,6 @@ msgstr ""
|
||||||
msgid "Invalid state"
|
msgid "Invalid state"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Invalid use of TLS Socket"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: shared-bindings/audiomixer/Mixer.c
|
#: shared-bindings/audiomixer/Mixer.c
|
||||||
msgid "Invalid voice"
|
msgid "Invalid voice"
|
||||||
msgstr "不正なボイス"
|
msgstr "不正なボイス"
|
||||||
|
@ -1336,10 +1336,6 @@ msgstr "不正なwaveファイル"
|
||||||
msgid "Invalid word/bit length"
|
msgid "Invalid word/bit length"
|
||||||
msgstr "不正なワード/ビット長"
|
msgstr "不正なワード/ビット長"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Issue setting SO_REUSEADDR"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: shared-bindings/aesio/aes.c
|
#: shared-bindings/aesio/aes.c
|
||||||
msgid "Key must be 16, 24, or 32 bytes long"
|
msgid "Key must be 16, 24, or 32 bytes long"
|
||||||
msgstr "Keyの長さは、16, 24, 32バイトのいずれかでなければなりません"
|
msgstr "Keyの長さは、16, 24, 32バイトのいずれかでなければなりません"
|
||||||
|
@ -1552,6 +1548,12 @@ msgstr ""
|
||||||
msgid "No out in program"
|
msgid "No out in program"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
||||||
|
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
||||||
|
#: ports/raspberrypi/common-hal/busio/I2C.c
|
||||||
|
msgid "No pull up found on SDA or SCL; check your wiring"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-module/touchio/TouchIn.c
|
#: shared-module/touchio/TouchIn.c
|
||||||
msgid "No pulldown on pin; 1Mohm recommended"
|
msgid "No pulldown on pin; 1Mohm recommended"
|
||||||
msgstr "ピンにプルダウンがありません。1Mオーム推奨"
|
msgstr "ピンにプルダウンがありません。1Mオーム推奨"
|
||||||
|
@ -1662,7 +1664,7 @@ msgstr ""
|
||||||
msgid "Out of memory"
|
msgid "Out of memory"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/socketpool/SocketPool.c
|
||||||
msgid "Out of sockets"
|
msgid "Out of sockets"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1809,6 +1811,10 @@ msgstr "RNG解体エラー"
|
||||||
msgid "RNG Init Error"
|
msgid "RNG Init Error"
|
||||||
msgstr "乱数生成器の初期化エラー"
|
msgstr "乱数生成器の初期化エラー"
|
||||||
|
|
||||||
|
#: ports/nrf/common-hal/busio/UART.c
|
||||||
|
msgid "RS485 Not yet supported on this device"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/busio/UART.c
|
#: ports/esp32s2/common-hal/busio/UART.c
|
||||||
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
||||||
msgid "RS485 inversion specified when not in RS485 mode"
|
msgid "RS485 inversion specified when not in RS485 mode"
|
||||||
|
@ -1816,6 +1822,7 @@ msgstr ""
|
||||||
|
|
||||||
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
||||||
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
||||||
|
#: ports/raspberrypi/common-hal/rtc/RTC.c
|
||||||
msgid "RTC calibration is not supported on this board"
|
msgid "RTC calibration is not supported on this board"
|
||||||
msgstr "このボードはRTCのキャリブレーションに非対応"
|
msgstr "このボードはRTCのキャリブレーションに非対応"
|
||||||
|
|
||||||
|
@ -1824,7 +1831,7 @@ msgid "RTC is not supported on this board"
|
||||||
msgstr "このボードはRTCに対応していません"
|
msgstr "このボードはRTCに対応していません"
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
||||||
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
|
#: ports/stm/common-hal/busio/UART.c
|
||||||
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
||||||
msgstr "RTS/CTS/RS485はこのデバイスでは未対応"
|
msgstr "RTS/CTS/RS485はこのデバイスでは未対応"
|
||||||
|
|
||||||
|
@ -1881,12 +1888,6 @@ msgstr "セーフモードで実行中! "
|
||||||
msgid "SD card CSD format not supported"
|
msgid "SD card CSD format not supported"
|
||||||
msgstr "SDカードのCSDフォーマットは非対応"
|
msgstr "SDカードのCSDフォーマットは非対応"
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
|
||||||
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
|
||||||
#: ports/raspberrypi/common-hal/busio/I2C.c
|
|
||||||
msgid "SDA or SCL needs a pull up"
|
|
||||||
msgstr "SDAとSCLにプルアップが必要"
|
|
||||||
|
|
||||||
#: ports/stm/common-hal/sdioio/SDCard.c
|
#: ports/stm/common-hal/sdioio/SDCard.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "SDIO GetCardInfo Error %d"
|
msgid "SDIO GetCardInfo Error %d"
|
||||||
|
@ -2185,7 +2186,7 @@ msgstr ""
|
||||||
msgid "Unexpected nrfx uuid type"
|
msgid "Unexpected nrfx uuid type"
|
||||||
msgstr "想定されていないnrfx UUID型"
|
msgstr "想定されていないnrfx UUID型"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unhandled ESP TLS error %d %d %x %d"
|
msgid "Unhandled ESP TLS error %d %d %x %d"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -2484,7 +2485,7 @@ msgstr "バッファのスライスは同じ長さでなければなりません
|
||||||
msgid "buffer too small"
|
msgid "buffer too small"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "buffer too small for requested bytes"
|
msgid "buffer too small for requested bytes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -3651,6 +3652,10 @@ msgstr ""
|
||||||
msgid "pop from empty %q"
|
msgid "pop from empty %q"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
|
msgid "port must be >= 0"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: py/objint_mpz.c
|
#: py/objint_mpz.c
|
||||||
msgid "pow() 3rd argument cannot be 0"
|
msgid "pow() 3rd argument cannot be 0"
|
||||||
msgstr "pow()の3つ目の引数は0にできません"
|
msgstr "pow()の3つ目の引数は0にできません"
|
||||||
|
@ -4180,6 +4185,9 @@ msgstr "ziはfloat値でなければなりません"
|
||||||
msgid "zi must be of shape (n_section, 2)"
|
msgid "zi must be of shape (n_section, 2)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#~ msgid "SDA or SCL needs a pull up"
|
||||||
|
#~ msgstr "SDAとSCLにプルアップが必要"
|
||||||
|
|
||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
#~ "\n"
|
#~ "\n"
|
||||||
#~ "Code done running. Waiting for reload.\n"
|
#~ "Code done running. Waiting for reload.\n"
|
||||||
|
|
47
locale/ko.po
47
locale/ko.po
|
@ -632,6 +632,10 @@ msgstr ""
|
||||||
msgid "Cannot reset into bootloader because no bootloader is present."
|
msgid "Cannot reset into bootloader because no bootloader is present."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
||||||
|
msgid "Cannot set socket options"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-bindings/digitalio/DigitalInOut.c
|
#: shared-bindings/digitalio/DigitalInOut.c
|
||||||
msgid "Cannot set value when direction is input."
|
msgid "Cannot set value when direction is input."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -868,7 +872,7 @@ msgstr ""
|
||||||
msgid "Error in regex"
|
msgid "Error in regex"
|
||||||
msgstr "Regex에 오류가 있습니다."
|
msgstr "Regex에 오류가 있습니다."
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "Error: Failure to bind"
|
msgid "Error: Failure to bind"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -927,7 +931,7 @@ msgstr ""
|
||||||
msgid "FFT is implemented for linear arrays only"
|
msgid "FFT is implemented for linear arrays only"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
msgid "Failed SSL handshake"
|
msgid "Failed SSL handshake"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1298,7 +1302,7 @@ msgstr ""
|
||||||
msgid "Invalid size"
|
msgid "Invalid size"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLContext.c
|
||||||
msgid "Invalid socket for TLS"
|
msgid "Invalid socket for TLS"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1306,10 +1310,6 @@ msgstr ""
|
||||||
msgid "Invalid state"
|
msgid "Invalid state"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Invalid use of TLS Socket"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: shared-bindings/audiomixer/Mixer.c
|
#: shared-bindings/audiomixer/Mixer.c
|
||||||
msgid "Invalid voice"
|
msgid "Invalid voice"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1326,10 +1326,6 @@ msgstr ""
|
||||||
msgid "Invalid word/bit length"
|
msgid "Invalid word/bit length"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Issue setting SO_REUSEADDR"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: shared-bindings/aesio/aes.c
|
#: shared-bindings/aesio/aes.c
|
||||||
msgid "Key must be 16, 24, or 32 bytes long"
|
msgid "Key must be 16, 24, or 32 bytes long"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1542,6 +1538,12 @@ msgstr ""
|
||||||
msgid "No out in program"
|
msgid "No out in program"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
||||||
|
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
||||||
|
#: ports/raspberrypi/common-hal/busio/I2C.c
|
||||||
|
msgid "No pull up found on SDA or SCL; check your wiring"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-module/touchio/TouchIn.c
|
#: shared-module/touchio/TouchIn.c
|
||||||
msgid "No pulldown on pin; 1Mohm recommended"
|
msgid "No pulldown on pin; 1Mohm recommended"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1650,7 +1652,7 @@ msgstr ""
|
||||||
msgid "Out of memory"
|
msgid "Out of memory"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/socketpool/SocketPool.c
|
||||||
msgid "Out of sockets"
|
msgid "Out of sockets"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1796,6 +1798,10 @@ msgstr ""
|
||||||
msgid "RNG Init Error"
|
msgid "RNG Init Error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ports/nrf/common-hal/busio/UART.c
|
||||||
|
msgid "RS485 Not yet supported on this device"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/busio/UART.c
|
#: ports/esp32s2/common-hal/busio/UART.c
|
||||||
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
||||||
msgid "RS485 inversion specified when not in RS485 mode"
|
msgid "RS485 inversion specified when not in RS485 mode"
|
||||||
|
@ -1803,6 +1809,7 @@ msgstr ""
|
||||||
|
|
||||||
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
||||||
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
||||||
|
#: ports/raspberrypi/common-hal/rtc/RTC.c
|
||||||
msgid "RTC calibration is not supported on this board"
|
msgid "RTC calibration is not supported on this board"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1811,7 +1818,7 @@ msgid "RTC is not supported on this board"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
||||||
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
|
#: ports/stm/common-hal/busio/UART.c
|
||||||
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1868,12 +1875,6 @@ msgstr ""
|
||||||
msgid "SD card CSD format not supported"
|
msgid "SD card CSD format not supported"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
|
||||||
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
|
||||||
#: ports/raspberrypi/common-hal/busio/I2C.c
|
|
||||||
msgid "SDA or SCL needs a pull up"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ports/stm/common-hal/sdioio/SDCard.c
|
#: ports/stm/common-hal/sdioio/SDCard.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "SDIO GetCardInfo Error %d"
|
msgid "SDIO GetCardInfo Error %d"
|
||||||
|
@ -2166,7 +2167,7 @@ msgstr ""
|
||||||
msgid "Unexpected nrfx uuid type"
|
msgid "Unexpected nrfx uuid type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unhandled ESP TLS error %d %d %x %d"
|
msgid "Unhandled ESP TLS error %d %d %x %d"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -2465,7 +2466,7 @@ msgstr ""
|
||||||
msgid "buffer too small"
|
msgid "buffer too small"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "buffer too small for requested bytes"
|
msgid "buffer too small for requested bytes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -3625,6 +3626,10 @@ msgstr ""
|
||||||
msgid "pop from empty %q"
|
msgid "pop from empty %q"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
|
msgid "port must be >= 0"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: py/objint_mpz.c
|
#: py/objint_mpz.c
|
||||||
msgid "pow() 3rd argument cannot be 0"
|
msgid "pow() 3rd argument cannot be 0"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
50
locale/nl.po
50
locale/nl.po
|
@ -636,6 +636,10 @@ msgid "Cannot reset into bootloader because no bootloader is present."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Kan niet resetten naar bootloader omdat er geen bootloader aanwezig is."
|
"Kan niet resetten naar bootloader omdat er geen bootloader aanwezig is."
|
||||||
|
|
||||||
|
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
||||||
|
msgid "Cannot set socket options"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-bindings/digitalio/DigitalInOut.c
|
#: shared-bindings/digitalio/DigitalInOut.c
|
||||||
msgid "Cannot set value when direction is input."
|
msgid "Cannot set value when direction is input."
|
||||||
msgstr "Kan de waarde niet toewijzen als de richting input is."
|
msgstr "Kan de waarde niet toewijzen als de richting input is."
|
||||||
|
@ -876,7 +880,7 @@ msgstr "EXTINT kanaal al in gebruik"
|
||||||
msgid "Error in regex"
|
msgid "Error in regex"
|
||||||
msgstr "Fout in regex"
|
msgstr "Fout in regex"
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "Error: Failure to bind"
|
msgid "Error: Failure to bind"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -935,7 +939,7 @@ msgstr "FFT alleen voor ndarrays gedefineerd"
|
||||||
msgid "FFT is implemented for linear arrays only"
|
msgid "FFT is implemented for linear arrays only"
|
||||||
msgstr "FFT is alleen geïmplementeerd voor lineaire arrays"
|
msgstr "FFT is alleen geïmplementeerd voor lineaire arrays"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
msgid "Failed SSL handshake"
|
msgid "Failed SSL handshake"
|
||||||
msgstr "SSL handdruk mislukt"
|
msgstr "SSL handdruk mislukt"
|
||||||
|
|
||||||
|
@ -1309,7 +1313,7 @@ msgstr "Ongeldige security_mode"
|
||||||
msgid "Invalid size"
|
msgid "Invalid size"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLContext.c
|
||||||
msgid "Invalid socket for TLS"
|
msgid "Invalid socket for TLS"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1317,10 +1321,6 @@ msgstr ""
|
||||||
msgid "Invalid state"
|
msgid "Invalid state"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Invalid use of TLS Socket"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: shared-bindings/audiomixer/Mixer.c
|
#: shared-bindings/audiomixer/Mixer.c
|
||||||
msgid "Invalid voice"
|
msgid "Invalid voice"
|
||||||
msgstr "Ongeldige stem"
|
msgstr "Ongeldige stem"
|
||||||
|
@ -1337,10 +1337,6 @@ msgstr "Ongeldig wave bestand"
|
||||||
msgid "Invalid word/bit length"
|
msgid "Invalid word/bit length"
|
||||||
msgstr "Ongeldig woord/bit lengte"
|
msgstr "Ongeldig woord/bit lengte"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Issue setting SO_REUSEADDR"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: shared-bindings/aesio/aes.c
|
#: shared-bindings/aesio/aes.c
|
||||||
msgid "Key must be 16, 24, or 32 bytes long"
|
msgid "Key must be 16, 24, or 32 bytes long"
|
||||||
msgstr "Sleutel moet 16, 24, of 32 bytes lang zijn"
|
msgstr "Sleutel moet 16, 24, of 32 bytes lang zijn"
|
||||||
|
@ -1553,6 +1549,12 @@ msgstr "Geen netwerk met dat SSID gevonden"
|
||||||
msgid "No out in program"
|
msgid "No out in program"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
||||||
|
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
||||||
|
#: ports/raspberrypi/common-hal/busio/I2C.c
|
||||||
|
msgid "No pull up found on SDA or SCL; check your wiring"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-module/touchio/TouchIn.c
|
#: shared-module/touchio/TouchIn.c
|
||||||
msgid "No pulldown on pin; 1Mohm recommended"
|
msgid "No pulldown on pin; 1Mohm recommended"
|
||||||
msgstr "Geen pulldown op pin; 1MOhm aangeraden"
|
msgstr "Geen pulldown op pin; 1MOhm aangeraden"
|
||||||
|
@ -1667,7 +1669,7 @@ msgstr ""
|
||||||
msgid "Out of memory"
|
msgid "Out of memory"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/socketpool/SocketPool.c
|
||||||
msgid "Out of sockets"
|
msgid "Out of sockets"
|
||||||
msgstr "Geen sockets meer beschikbaar"
|
msgstr "Geen sockets meer beschikbaar"
|
||||||
|
|
||||||
|
@ -1825,6 +1827,10 @@ msgstr "RNG DeInit Fout"
|
||||||
msgid "RNG Init Error"
|
msgid "RNG Init Error"
|
||||||
msgstr "RNG Init Fout"
|
msgstr "RNG Init Fout"
|
||||||
|
|
||||||
|
#: ports/nrf/common-hal/busio/UART.c
|
||||||
|
msgid "RS485 Not yet supported on this device"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/busio/UART.c
|
#: ports/esp32s2/common-hal/busio/UART.c
|
||||||
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
||||||
msgid "RS485 inversion specified when not in RS485 mode"
|
msgid "RS485 inversion specified when not in RS485 mode"
|
||||||
|
@ -1832,6 +1838,7 @@ msgstr "RS485 inversie gespecificeerd terwijl niet in RS485 modus"
|
||||||
|
|
||||||
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
||||||
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
||||||
|
#: ports/raspberrypi/common-hal/rtc/RTC.c
|
||||||
msgid "RTC calibration is not supported on this board"
|
msgid "RTC calibration is not supported on this board"
|
||||||
msgstr "RTC calibratie niet ondersteund door dit board"
|
msgstr "RTC calibratie niet ondersteund door dit board"
|
||||||
|
|
||||||
|
@ -1840,7 +1847,7 @@ msgid "RTC is not supported on this board"
|
||||||
msgstr "RTC is niet ondersteund door dit board"
|
msgstr "RTC is niet ondersteund door dit board"
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
||||||
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
|
#: ports/stm/common-hal/busio/UART.c
|
||||||
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
||||||
msgstr "RTS/CTS/RS485 Nog niet ondersteund door dit apparaat"
|
msgstr "RTS/CTS/RS485 Nog niet ondersteund door dit apparaat"
|
||||||
|
|
||||||
|
@ -1897,12 +1904,6 @@ msgstr "Veilige modus wordt uitgevoerd! "
|
||||||
msgid "SD card CSD format not supported"
|
msgid "SD card CSD format not supported"
|
||||||
msgstr "SD kaart CSD formaat niet ondersteund"
|
msgstr "SD kaart CSD formaat niet ondersteund"
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
|
||||||
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
|
||||||
#: ports/raspberrypi/common-hal/busio/I2C.c
|
|
||||||
msgid "SDA or SCL needs a pull up"
|
|
||||||
msgstr "SDA of SCL hebben een pullup nodig"
|
|
||||||
|
|
||||||
#: ports/stm/common-hal/sdioio/SDCard.c
|
#: ports/stm/common-hal/sdioio/SDCard.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "SDIO GetCardInfo Error %d"
|
msgid "SDIO GetCardInfo Error %d"
|
||||||
|
@ -2204,7 +2205,7 @@ msgstr "Kan niet naar sleep_memory schrijven."
|
||||||
msgid "Unexpected nrfx uuid type"
|
msgid "Unexpected nrfx uuid type"
|
||||||
msgstr "Onverwacht mrfx uuid type"
|
msgstr "Onverwacht mrfx uuid type"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unhandled ESP TLS error %d %d %x %d"
|
msgid "Unhandled ESP TLS error %d %d %x %d"
|
||||||
msgstr "Niet behandelde ESP TLS fout %d %d %x %d"
|
msgstr "Niet behandelde ESP TLS fout %d %d %x %d"
|
||||||
|
@ -2514,7 +2515,7 @@ msgstr "buffer slices moeten van gelijke grootte zijn"
|
||||||
msgid "buffer too small"
|
msgid "buffer too small"
|
||||||
msgstr "buffer te klein"
|
msgstr "buffer te klein"
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "buffer too small for requested bytes"
|
msgid "buffer too small for requested bytes"
|
||||||
msgstr "buffer te klein voor gevraagde bytes"
|
msgstr "buffer te klein voor gevraagde bytes"
|
||||||
|
|
||||||
|
@ -3683,6 +3684,10 @@ msgstr "pop van een lege PulseIn"
|
||||||
msgid "pop from empty %q"
|
msgid "pop from empty %q"
|
||||||
msgstr "pop van een lege %q"
|
msgstr "pop van een lege %q"
|
||||||
|
|
||||||
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
|
msgid "port must be >= 0"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: py/objint_mpz.c
|
#: py/objint_mpz.c
|
||||||
msgid "pow() 3rd argument cannot be 0"
|
msgid "pow() 3rd argument cannot be 0"
|
||||||
msgstr "derde argument van pow() mag geen 0 zijn"
|
msgstr "derde argument van pow() mag geen 0 zijn"
|
||||||
|
@ -4213,6 +4218,9 @@ msgstr "zi moet van type float zijn"
|
||||||
msgid "zi must be of shape (n_section, 2)"
|
msgid "zi must be of shape (n_section, 2)"
|
||||||
msgstr "zi moet vorm (n_section, 2) hebben"
|
msgstr "zi moet vorm (n_section, 2) hebben"
|
||||||
|
|
||||||
|
#~ msgid "SDA or SCL needs a pull up"
|
||||||
|
#~ msgstr "SDA of SCL hebben een pullup nodig"
|
||||||
|
|
||||||
#~ msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
|
#~ msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
|
||||||
#~ msgstr "%d adres pins en %d RGB pins geven een hoogte van %d aan, niet %d"
|
#~ msgstr "%d adres pins en %d RGB pins geven een hoogte van %d aan, niet %d"
|
||||||
|
|
||||||
|
|
58
locale/pl.po
58
locale/pl.po
|
@ -7,7 +7,7 @@ msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
||||||
"PO-Revision-Date: 2021-01-27 01:31+0000\n"
|
"PO-Revision-Date: 2021-02-10 21:50+0000\n"
|
||||||
"Last-Translator: Maciej Stankiewicz <tawezik@gmail.com>\n"
|
"Last-Translator: Maciej Stankiewicz <tawezik@gmail.com>\n"
|
||||||
"Language-Team: pl\n"
|
"Language-Team: pl\n"
|
||||||
"Language: pl\n"
|
"Language: pl\n"
|
||||||
|
@ -636,6 +636,10 @@ msgstr "Nie można przemontować '/' gdy USB działa."
|
||||||
msgid "Cannot reset into bootloader because no bootloader is present."
|
msgid "Cannot reset into bootloader because no bootloader is present."
|
||||||
msgstr "Nie można zrestartować -- nie ma bootloadera."
|
msgstr "Nie można zrestartować -- nie ma bootloadera."
|
||||||
|
|
||||||
|
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
||||||
|
msgid "Cannot set socket options"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-bindings/digitalio/DigitalInOut.c
|
#: shared-bindings/digitalio/DigitalInOut.c
|
||||||
msgid "Cannot set value when direction is input."
|
msgid "Cannot set value when direction is input."
|
||||||
msgstr "Nie można ustawić wartości w trybie wejścia."
|
msgstr "Nie można ustawić wartości w trybie wejścia."
|
||||||
|
@ -876,7 +880,7 @@ msgstr "Kanał EXTINT w użyciu"
|
||||||
msgid "Error in regex"
|
msgid "Error in regex"
|
||||||
msgstr "Błąd w regex"
|
msgstr "Błąd w regex"
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "Error: Failure to bind"
|
msgid "Error: Failure to bind"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -935,7 +939,7 @@ msgstr ""
|
||||||
msgid "FFT is implemented for linear arrays only"
|
msgid "FFT is implemented for linear arrays only"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
msgid "Failed SSL handshake"
|
msgid "Failed SSL handshake"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1308,7 +1312,7 @@ msgstr "Nieprawidłowy security_mode"
|
||||||
msgid "Invalid size"
|
msgid "Invalid size"
|
||||||
msgstr "Nieprawidłowy rozmiar"
|
msgstr "Nieprawidłowy rozmiar"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLContext.c
|
||||||
msgid "Invalid socket for TLS"
|
msgid "Invalid socket for TLS"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1316,10 +1320,6 @@ msgstr ""
|
||||||
msgid "Invalid state"
|
msgid "Invalid state"
|
||||||
msgstr "Nieprawidłowy stan"
|
msgstr "Nieprawidłowy stan"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Invalid use of TLS Socket"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: shared-bindings/audiomixer/Mixer.c
|
#: shared-bindings/audiomixer/Mixer.c
|
||||||
msgid "Invalid voice"
|
msgid "Invalid voice"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1336,10 +1336,6 @@ msgstr "Zły plik wave"
|
||||||
msgid "Invalid word/bit length"
|
msgid "Invalid word/bit length"
|
||||||
msgstr "Niepoprawna długość słowa/bitu"
|
msgstr "Niepoprawna długość słowa/bitu"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Issue setting SO_REUSEADDR"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: shared-bindings/aesio/aes.c
|
#: shared-bindings/aesio/aes.c
|
||||||
msgid "Key must be 16, 24, or 32 bytes long"
|
msgid "Key must be 16, 24, or 32 bytes long"
|
||||||
msgstr "Klucz musi mieć długość 16, 24 lub 32 bajtów"
|
msgstr "Klucz musi mieć długość 16, 24 lub 32 bajtów"
|
||||||
|
@ -1553,6 +1549,12 @@ msgstr ""
|
||||||
msgid "No out in program"
|
msgid "No out in program"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
||||||
|
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
||||||
|
#: ports/raspberrypi/common-hal/busio/I2C.c
|
||||||
|
msgid "No pull up found on SDA or SCL; check your wiring"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: shared-module/touchio/TouchIn.c
|
#: shared-module/touchio/TouchIn.c
|
||||||
msgid "No pulldown on pin; 1Mohm recommended"
|
msgid "No pulldown on pin; 1Mohm recommended"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1661,7 +1663,7 @@ msgstr ""
|
||||||
msgid "Out of memory"
|
msgid "Out of memory"
|
||||||
msgstr "Brak pamięci"
|
msgstr "Brak pamięci"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/socketpool/SocketPool.c
|
||||||
msgid "Out of sockets"
|
msgid "Out of sockets"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1807,6 +1809,10 @@ msgstr ""
|
||||||
msgid "RNG Init Error"
|
msgid "RNG Init Error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ports/nrf/common-hal/busio/UART.c
|
||||||
|
msgid "RS485 Not yet supported on this device"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/busio/UART.c
|
#: ports/esp32s2/common-hal/busio/UART.c
|
||||||
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
||||||
msgid "RS485 inversion specified when not in RS485 mode"
|
msgid "RS485 inversion specified when not in RS485 mode"
|
||||||
|
@ -1814,6 +1820,7 @@ msgstr ""
|
||||||
|
|
||||||
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
||||||
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
||||||
|
#: ports/raspberrypi/common-hal/rtc/RTC.c
|
||||||
msgid "RTC calibration is not supported on this board"
|
msgid "RTC calibration is not supported on this board"
|
||||||
msgstr "Brak obsługi kalibracji RTC"
|
msgstr "Brak obsługi kalibracji RTC"
|
||||||
|
|
||||||
|
@ -1822,7 +1829,7 @@ msgid "RTC is not supported on this board"
|
||||||
msgstr "Brak obsługi RTC"
|
msgstr "Brak obsługi RTC"
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
||||||
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
|
#: ports/stm/common-hal/busio/UART.c
|
||||||
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1879,12 +1886,6 @@ msgstr ""
|
||||||
msgid "SD card CSD format not supported"
|
msgid "SD card CSD format not supported"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
|
||||||
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
|
||||||
#: ports/raspberrypi/common-hal/busio/I2C.c
|
|
||||||
msgid "SDA or SCL needs a pull up"
|
|
||||||
msgstr "SDA lub SCL wymagają podciągnięcia"
|
|
||||||
|
|
||||||
#: ports/stm/common-hal/sdioio/SDCard.c
|
#: ports/stm/common-hal/sdioio/SDCard.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "SDIO GetCardInfo Error %d"
|
msgid "SDIO GetCardInfo Error %d"
|
||||||
|
@ -2176,7 +2177,7 @@ msgstr ""
|
||||||
msgid "Unexpected nrfx uuid type"
|
msgid "Unexpected nrfx uuid type"
|
||||||
msgstr "Nieoczekiwany typ nrfx uuid"
|
msgstr "Nieoczekiwany typ nrfx uuid"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unhandled ESP TLS error %d %d %x %d"
|
msgid "Unhandled ESP TLS error %d %d %x %d"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -2481,7 +2482,7 @@ msgstr "fragmenty bufora muszą mieć tę samą długość"
|
||||||
msgid "buffer too small"
|
msgid "buffer too small"
|
||||||
msgstr "zbyt mały bufor"
|
msgstr "zbyt mały bufor"
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "buffer too small for requested bytes"
|
msgid "buffer too small for requested bytes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -3643,6 +3644,10 @@ msgstr "pop z pustego PulseIn"
|
||||||
msgid "pop from empty %q"
|
msgid "pop from empty %q"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
|
msgid "port must be >= 0"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: py/objint_mpz.c
|
#: py/objint_mpz.c
|
||||||
msgid "pow() 3rd argument cannot be 0"
|
msgid "pow() 3rd argument cannot be 0"
|
||||||
msgstr "trzeci argument pow() nie może być 0"
|
msgstr "trzeci argument pow() nie może być 0"
|
||||||
|
@ -4102,7 +4107,7 @@ msgstr ""
|
||||||
|
|
||||||
#: shared-bindings/rgbmatrix/RGBMatrix.c
|
#: shared-bindings/rgbmatrix/RGBMatrix.c
|
||||||
msgid "width must be greater than zero"
|
msgid "width must be greater than zero"
|
||||||
msgstr ""
|
msgstr "szerokość musi być większa niż zero"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/wifi/Radio.c
|
#: ports/esp32s2/common-hal/wifi/Radio.c
|
||||||
msgid "wifi is not enabled"
|
msgid "wifi is not enabled"
|
||||||
|
@ -4122,7 +4127,7 @@ msgstr ""
|
||||||
|
|
||||||
#: extmod/ulab/code/vector/vectorise.c
|
#: extmod/ulab/code/vector/vectorise.c
|
||||||
msgid "wrong input type"
|
msgid "wrong input type"
|
||||||
msgstr ""
|
msgstr "nieprawidłowy typ wejścia"
|
||||||
|
|
||||||
#: extmod/ulab/code/ulab_create.c py/objstr.c
|
#: extmod/ulab/code/ulab_create.c py/objstr.c
|
||||||
msgid "wrong number of arguments"
|
msgid "wrong number of arguments"
|
||||||
|
@ -4138,7 +4143,7 @@ msgstr "zły typ operandu"
|
||||||
|
|
||||||
#: extmod/ulab/code/vector/vectorise.c
|
#: extmod/ulab/code/vector/vectorise.c
|
||||||
msgid "wrong output type"
|
msgid "wrong output type"
|
||||||
msgstr ""
|
msgstr "nieprawidłowy typ wyjścia"
|
||||||
|
|
||||||
#: shared-module/displayio/Shape.c
|
#: shared-module/displayio/Shape.c
|
||||||
msgid "x value out of bounds"
|
msgid "x value out of bounds"
|
||||||
|
@ -4172,6 +4177,9 @@ msgstr ""
|
||||||
msgid "zi must be of shape (n_section, 2)"
|
msgid "zi must be of shape (n_section, 2)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#~ msgid "SDA or SCL needs a pull up"
|
||||||
|
#~ msgstr "SDA lub SCL wymagają podciągnięcia"
|
||||||
|
|
||||||
#~ msgid "tuple index out of range"
|
#~ msgid "tuple index out of range"
|
||||||
#~ msgstr "indeks krotki poza zakresem"
|
#~ msgstr "indeks krotki poza zakresem"
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
||||||
"PO-Revision-Date: 2021-02-01 17:50+0000\n"
|
"PO-Revision-Date: 2021-02-09 14:03+0000\n"
|
||||||
"Last-Translator: Wellington Terumi Uemura <wellingtonuemura@gmail.com>\n"
|
"Last-Translator: Wellington Terumi Uemura <wellingtonuemura@gmail.com>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"Language: pt_BR\n"
|
"Language: pt_BR\n"
|
||||||
|
@ -654,6 +654,10 @@ msgid "Cannot reset into bootloader because no bootloader is present."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Não é possível redefinir para o bootloader porque o mesmo não está presente."
|
"Não é possível redefinir para o bootloader porque o mesmo não está presente."
|
||||||
|
|
||||||
|
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
||||||
|
msgid "Cannot set socket options"
|
||||||
|
msgstr "Não foi possível definir as opções do socket"
|
||||||
|
|
||||||
#: shared-bindings/digitalio/DigitalInOut.c
|
#: shared-bindings/digitalio/DigitalInOut.c
|
||||||
msgid "Cannot set value when direction is input."
|
msgid "Cannot set value when direction is input."
|
||||||
msgstr "Não é possível definir o valor quando a direção é inserida."
|
msgstr "Não é possível definir o valor quando a direção é inserida."
|
||||||
|
@ -894,7 +898,7 @@ msgstr "Canal EXTINT em uso"
|
||||||
msgid "Error in regex"
|
msgid "Error in regex"
|
||||||
msgstr "Erro no regex"
|
msgstr "Erro no regex"
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "Error: Failure to bind"
|
msgid "Error: Failure to bind"
|
||||||
msgstr "Erro: Falha na vinculação"
|
msgstr "Erro: Falha na vinculação"
|
||||||
|
|
||||||
|
@ -953,7 +957,7 @@ msgstr "O FFT é definido apenas para ndarrays"
|
||||||
msgid "FFT is implemented for linear arrays only"
|
msgid "FFT is implemented for linear arrays only"
|
||||||
msgstr "O FFT é implementado apenas para matrizes lineares"
|
msgstr "O FFT é implementado apenas para matrizes lineares"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
msgid "Failed SSL handshake"
|
msgid "Failed SSL handshake"
|
||||||
msgstr "Houve uma falha no handshake do SSL"
|
msgstr "Houve uma falha no handshake do SSL"
|
||||||
|
|
||||||
|
@ -1327,7 +1331,7 @@ msgstr "O Security_mode é inválido"
|
||||||
msgid "Invalid size"
|
msgid "Invalid size"
|
||||||
msgstr "Tamanho inválido"
|
msgstr "Tamanho inválido"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLContext.c
|
||||||
msgid "Invalid socket for TLS"
|
msgid "Invalid socket for TLS"
|
||||||
msgstr "Soquete inválido para o TLS"
|
msgstr "Soquete inválido para o TLS"
|
||||||
|
|
||||||
|
@ -1335,10 +1339,6 @@ msgstr "Soquete inválido para o TLS"
|
||||||
msgid "Invalid state"
|
msgid "Invalid state"
|
||||||
msgstr "Estado inválido"
|
msgstr "Estado inválido"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Invalid use of TLS Socket"
|
|
||||||
msgstr "Uso inválido do soquete TLS"
|
|
||||||
|
|
||||||
#: shared-bindings/audiomixer/Mixer.c
|
#: shared-bindings/audiomixer/Mixer.c
|
||||||
msgid "Invalid voice"
|
msgid "Invalid voice"
|
||||||
msgstr "A voz é inválida"
|
msgstr "A voz é inválida"
|
||||||
|
@ -1355,10 +1355,6 @@ msgstr "Aqruivo de ondas inválido"
|
||||||
msgid "Invalid word/bit length"
|
msgid "Invalid word/bit length"
|
||||||
msgstr "O comprimento do bit/palavra são inválidos"
|
msgstr "O comprimento do bit/palavra são inválidos"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Issue setting SO_REUSEADDR"
|
|
||||||
msgstr "Problema na configuração do SO_REUSEADDR"
|
|
||||||
|
|
||||||
#: shared-bindings/aesio/aes.c
|
#: shared-bindings/aesio/aes.c
|
||||||
msgid "Key must be 16, 24, or 32 bytes long"
|
msgid "Key must be 16, 24, or 32 bytes long"
|
||||||
msgstr "A chave deve ter 16, 24 ou 32 bytes de comprimento"
|
msgstr "A chave deve ter 16, 24 ou 32 bytes de comprimento"
|
||||||
|
@ -1571,6 +1567,14 @@ msgstr "Não há rede com este ssid"
|
||||||
msgid "No out in program"
|
msgid "No out in program"
|
||||||
msgstr "Sem saída no programa"
|
msgstr "Sem saída no programa"
|
||||||
|
|
||||||
|
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
||||||
|
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
||||||
|
#: ports/raspberrypi/common-hal/busio/I2C.c
|
||||||
|
msgid "No pull up found on SDA or SCL; check your wiring"
|
||||||
|
msgstr ""
|
||||||
|
"Nenhum pull up foi encontrado no SDA ou no SCL; verifique o fio das suas "
|
||||||
|
"conexões"
|
||||||
|
|
||||||
#: shared-module/touchio/TouchIn.c
|
#: shared-module/touchio/TouchIn.c
|
||||||
msgid "No pulldown on pin; 1Mohm recommended"
|
msgid "No pulldown on pin; 1Mohm recommended"
|
||||||
msgstr "Não há pulldown no pino; É recomendável utilizar um resistor de 1M ohm"
|
msgstr "Não há pulldown no pino; É recomendável utilizar um resistor de 1M ohm"
|
||||||
|
@ -1684,7 +1688,7 @@ msgstr "A operação expirou"
|
||||||
msgid "Out of memory"
|
msgid "Out of memory"
|
||||||
msgstr "Sem memória"
|
msgstr "Sem memória"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/socketpool/SocketPool.c
|
||||||
msgid "Out of sockets"
|
msgid "Out of sockets"
|
||||||
msgstr "Sem soquetes"
|
msgstr "Sem soquetes"
|
||||||
|
|
||||||
|
@ -1846,6 +1850,10 @@ msgstr "Erro DeInit RNG"
|
||||||
msgid "RNG Init Error"
|
msgid "RNG Init Error"
|
||||||
msgstr "Houve um erro na inicialização do RNG"
|
msgstr "Houve um erro na inicialização do RNG"
|
||||||
|
|
||||||
|
#: ports/nrf/common-hal/busio/UART.c
|
||||||
|
msgid "RS485 Not yet supported on this device"
|
||||||
|
msgstr "Ainda não há suporte para o RS485 neste dispositivo"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/busio/UART.c
|
#: ports/esp32s2/common-hal/busio/UART.c
|
||||||
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
||||||
msgid "RS485 inversion specified when not in RS485 mode"
|
msgid "RS485 inversion specified when not in RS485 mode"
|
||||||
|
@ -1853,6 +1861,7 @@ msgstr "A definição da inversão do RS485 quando não está no modo RS485"
|
||||||
|
|
||||||
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
||||||
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
||||||
|
#: ports/raspberrypi/common-hal/rtc/RTC.c
|
||||||
msgid "RTC calibration is not supported on this board"
|
msgid "RTC calibration is not supported on this board"
|
||||||
msgstr "A calibração RTC não é suportada nesta placa"
|
msgstr "A calibração RTC não é suportada nesta placa"
|
||||||
|
|
||||||
|
@ -1861,7 +1870,7 @@ msgid "RTC is not supported on this board"
|
||||||
msgstr "O RTC não é suportado nesta placa"
|
msgstr "O RTC não é suportado nesta placa"
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
||||||
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
|
#: ports/stm/common-hal/busio/UART.c
|
||||||
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
||||||
msgstr "RTS/CTS/RS485 Ainda não é compatível neste dispositivo"
|
msgstr "RTS/CTS/RS485 Ainda não é compatível neste dispositivo"
|
||||||
|
|
||||||
|
@ -1918,12 +1927,6 @@ msgstr "Executando no modo de segurança! "
|
||||||
msgid "SD card CSD format not supported"
|
msgid "SD card CSD format not supported"
|
||||||
msgstr "O formato CSD do Cartão SD não é compatível"
|
msgstr "O formato CSD do Cartão SD não é compatível"
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
|
||||||
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
|
||||||
#: ports/raspberrypi/common-hal/busio/I2C.c
|
|
||||||
msgid "SDA or SCL needs a pull up"
|
|
||||||
msgstr "SDA ou SCL precisa de um pull up"
|
|
||||||
|
|
||||||
#: ports/stm/common-hal/sdioio/SDCard.c
|
#: ports/stm/common-hal/sdioio/SDCard.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "SDIO GetCardInfo Error %d"
|
msgid "SDIO GetCardInfo Error %d"
|
||||||
|
@ -2230,7 +2233,7 @@ msgstr "Não foi possível escrever no sleep_memory."
|
||||||
msgid "Unexpected nrfx uuid type"
|
msgid "Unexpected nrfx uuid type"
|
||||||
msgstr "Tipo uuid nrfx inesperado"
|
msgstr "Tipo uuid nrfx inesperado"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unhandled ESP TLS error %d %d %x %d"
|
msgid "Unhandled ESP TLS error %d %d %x %d"
|
||||||
msgstr "Erro não tratado do ESP TLS %d %d %x %d"
|
msgstr "Erro não tratado do ESP TLS %d %d %x %d"
|
||||||
|
@ -2541,7 +2544,7 @@ msgstr "as fatias do buffer devem ter o mesmo comprimento"
|
||||||
msgid "buffer too small"
|
msgid "buffer too small"
|
||||||
msgstr "o buffer é muito pequeno"
|
msgstr "o buffer é muito pequeno"
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "buffer too small for requested bytes"
|
msgid "buffer too small for requested bytes"
|
||||||
msgstr "o buffer é pequeno demais para os bytes requisitados"
|
msgstr "o buffer é pequeno demais para os bytes requisitados"
|
||||||
|
|
||||||
|
@ -3721,6 +3724,10 @@ msgstr "pop a partir de um PulseIn vazio"
|
||||||
msgid "pop from empty %q"
|
msgid "pop from empty %q"
|
||||||
msgstr "pop a partir do %q vazio"
|
msgstr "pop a partir do %q vazio"
|
||||||
|
|
||||||
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
|
msgid "port must be >= 0"
|
||||||
|
msgstr "a porta deve ser > = 0"
|
||||||
|
|
||||||
#: py/objint_mpz.c
|
#: py/objint_mpz.c
|
||||||
msgid "pow() 3rd argument cannot be 0"
|
msgid "pow() 3rd argument cannot be 0"
|
||||||
msgstr "O terceiro argumento pow() não pode ser 0"
|
msgstr "O terceiro argumento pow() não pode ser 0"
|
||||||
|
@ -4251,6 +4258,15 @@ msgstr "zi deve ser de um tipo float"
|
||||||
msgid "zi must be of shape (n_section, 2)"
|
msgid "zi must be of shape (n_section, 2)"
|
||||||
msgstr "zi deve estar na forma (n_section, 2)"
|
msgstr "zi deve estar na forma (n_section, 2)"
|
||||||
|
|
||||||
|
#~ msgid "SDA or SCL needs a pull up"
|
||||||
|
#~ msgstr "SDA ou SCL precisa de um pull up"
|
||||||
|
|
||||||
|
#~ msgid "Invalid use of TLS Socket"
|
||||||
|
#~ msgstr "Uso inválido do soquete TLS"
|
||||||
|
|
||||||
|
#~ msgid "Issue setting SO_REUSEADDR"
|
||||||
|
#~ msgstr "Problema na configuração do SO_REUSEADDR"
|
||||||
|
|
||||||
#~ msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
|
#~ msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
#~ "%d endereços dos pinos e %d pinos rgb indicam uma altura do %d, não %d"
|
#~ "%d endereços dos pinos e %d pinos rgb indicam uma altura do %d, não %d"
|
||||||
|
|
123
locale/sv.po
123
locale/sv.po
|
@ -6,7 +6,7 @@ msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
||||||
"PO-Revision-Date: 2021-01-25 19:32+0000\n"
|
"PO-Revision-Date: 2021-02-05 19:47+0000\n"
|
||||||
"Last-Translator: Jonny Bergdahl <jonny@bergdahl.it>\n"
|
"Last-Translator: Jonny Bergdahl <jonny@bergdahl.it>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
"Language: sv\n"
|
"Language: sv\n"
|
||||||
|
@ -68,6 +68,7 @@ msgstr "%%c kräver int eller char"
|
||||||
msgid ""
|
msgid ""
|
||||||
"%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d"
|
"%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"%d adresspinnar, %d rgb-stift och %d brickor anger en höjd på %d, inte %d"
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/sdioio/SDCard.c
|
#: ports/atmel-samd/common-hal/sdioio/SDCard.c
|
||||||
msgid "%q failure: %d"
|
msgid "%q failure: %d"
|
||||||
|
@ -348,7 +349,7 @@ msgstr "Alla händelsekanaler används"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
msgid "All state machines in use"
|
msgid "All state machines in use"
|
||||||
msgstr ""
|
msgstr "Alla tillståndsmaskiner används"
|
||||||
|
|
||||||
#: ports/atmel-samd/audio_dma.c ports/atmel-samd/common-hal/audiobusio/PDMIn.c
|
#: ports/atmel-samd/audio_dma.c ports/atmel-samd/common-hal/audiobusio/PDMIn.c
|
||||||
msgid "All sync event channels in use"
|
msgid "All sync event channels in use"
|
||||||
|
@ -641,6 +642,10 @@ msgid "Cannot reset into bootloader because no bootloader is present."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Det går inte att återställa till bootloader eftersom bootloader saknas."
|
"Det går inte att återställa till bootloader eftersom bootloader saknas."
|
||||||
|
|
||||||
|
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
||||||
|
msgid "Cannot set socket options"
|
||||||
|
msgstr "Det går inte att ange socketalternativ"
|
||||||
|
|
||||||
#: shared-bindings/digitalio/DigitalInOut.c
|
#: shared-bindings/digitalio/DigitalInOut.c
|
||||||
msgid "Cannot set value when direction is input."
|
msgid "Cannot set value when direction is input."
|
||||||
msgstr "Kan inte sätta värde när riktning är input."
|
msgstr "Kan inte sätta värde när riktning är input."
|
||||||
|
@ -825,7 +830,7 @@ msgstr "Datapinne 0 måste vara bytejusterad"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/displayio/ParallelBus.c
|
#: ports/esp32s2/common-hal/displayio/ParallelBus.c
|
||||||
msgid "Data 0 pin must be byte aligned."
|
msgid "Data 0 pin must be byte aligned."
|
||||||
msgstr ""
|
msgstr "Datapinne 0 måste vara byte-justerad."
|
||||||
|
|
||||||
#: shared-module/audiocore/WaveFile.c
|
#: shared-module/audiocore/WaveFile.c
|
||||||
msgid "Data chunk must follow fmt chunk"
|
msgid "Data chunk must follow fmt chunk"
|
||||||
|
@ -881,7 +886,7 @@ msgstr "EXTINT-kanalen används redan"
|
||||||
msgid "Error in regex"
|
msgid "Error in regex"
|
||||||
msgstr "Fel i regex"
|
msgstr "Fel i regex"
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "Error: Failure to bind"
|
msgid "Error: Failure to bind"
|
||||||
msgstr "Fel: Bind misslyckades"
|
msgstr "Fel: Bind misslyckades"
|
||||||
|
|
||||||
|
@ -940,7 +945,7 @@ msgstr "FFT är enbart definierade för ndarrays"
|
||||||
msgid "FFT is implemented for linear arrays only"
|
msgid "FFT is implemented for linear arrays only"
|
||||||
msgstr "FTT är enbart implementerad för linjära matriser"
|
msgstr "FTT är enbart implementerad för linjära matriser"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
msgid "Failed SSL handshake"
|
msgid "Failed SSL handshake"
|
||||||
msgstr "Misslyckad SSL-handskakning"
|
msgstr "Misslyckad SSL-handskakning"
|
||||||
|
|
||||||
|
@ -1070,7 +1075,7 @@ msgstr "I2C init-fel"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/busio/I2C.c
|
#: ports/raspberrypi/common-hal/busio/I2C.c
|
||||||
msgid "I2C peripheral in use"
|
msgid "I2C peripheral in use"
|
||||||
msgstr ""
|
msgstr "I2C-enhet används redan"
|
||||||
|
|
||||||
#: shared-bindings/audiobusio/I2SOut.c
|
#: shared-bindings/audiobusio/I2SOut.c
|
||||||
msgid "I2SOut not available"
|
msgid "I2SOut not available"
|
||||||
|
@ -1099,7 +1104,7 @@ msgstr "Fel buffertstorlek"
|
||||||
|
|
||||||
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
||||||
msgid "Init program size invalid"
|
msgid "Init program size invalid"
|
||||||
msgstr ""
|
msgstr "Storlek på init-program ogiltigt"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
|
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
|
||||||
msgid "Initialization failed due to lack of memory"
|
msgid "Initialization failed due to lack of memory"
|
||||||
|
@ -1116,27 +1121,27 @@ msgstr "Indata-/utdatafel"
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Instruction %d jumps on pin"
|
msgid "Instruction %d jumps on pin"
|
||||||
msgstr ""
|
msgstr "Instruktion %d hoppar på pinne"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Instruction %d shifts in more bits than pin count"
|
msgid "Instruction %d shifts in more bits than pin count"
|
||||||
msgstr ""
|
msgstr "Instruktion %d skiftar fler bitar än antalet pinnar"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Instruction %d shifts out more bits than pin count"
|
msgid "Instruction %d shifts out more bits than pin count"
|
||||||
msgstr ""
|
msgstr "Instruktion %d skiftar fler bitar än antal pinnar"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Instruction %d uses extra pin"
|
msgid "Instruction %d uses extra pin"
|
||||||
msgstr ""
|
msgstr "Instruktion %d använder extra pinne"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Instruction %d waits on input outside of count"
|
msgid "Instruction %d waits on input outside of count"
|
||||||
msgstr ""
|
msgstr "Instruktion %d väntar på inmatning utanför intervallet"
|
||||||
|
|
||||||
#: ports/nrf/common-hal/_bleio/__init__.c
|
#: ports/nrf/common-hal/_bleio/__init__.c
|
||||||
msgid "Insufficient authentication"
|
msgid "Insufficient authentication"
|
||||||
|
@ -1313,7 +1318,7 @@ msgstr "Ogiltigt säkerhetsläge"
|
||||||
msgid "Invalid size"
|
msgid "Invalid size"
|
||||||
msgstr "Ogiltig storlek"
|
msgstr "Ogiltig storlek"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLContext.c
|
||||||
msgid "Invalid socket for TLS"
|
msgid "Invalid socket for TLS"
|
||||||
msgstr "Ogiltig socket för TLS"
|
msgstr "Ogiltig socket för TLS"
|
||||||
|
|
||||||
|
@ -1321,10 +1326,6 @@ msgstr "Ogiltig socket för TLS"
|
||||||
msgid "Invalid state"
|
msgid "Invalid state"
|
||||||
msgstr "Ogiltigt tillstånd"
|
msgstr "Ogiltigt tillstånd"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Invalid use of TLS Socket"
|
|
||||||
msgstr "Ogiltig användning av TLS Socket"
|
|
||||||
|
|
||||||
#: shared-bindings/audiomixer/Mixer.c
|
#: shared-bindings/audiomixer/Mixer.c
|
||||||
msgid "Invalid voice"
|
msgid "Invalid voice"
|
||||||
msgstr "Ogiltig kanal"
|
msgstr "Ogiltig kanal"
|
||||||
|
@ -1341,10 +1342,6 @@ msgstr "Ogiltig wave-fil"
|
||||||
msgid "Invalid word/bit length"
|
msgid "Invalid word/bit length"
|
||||||
msgstr "Ogiltig word-/bitlängd"
|
msgstr "Ogiltig word-/bitlängd"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Issue setting SO_REUSEADDR"
|
|
||||||
msgstr "Misslyckades att sätta SO_REUSEADDR"
|
|
||||||
|
|
||||||
#: shared-bindings/aesio/aes.c
|
#: shared-bindings/aesio/aes.c
|
||||||
msgid "Key must be 16, 24, or 32 bytes long"
|
msgid "Key must be 16, 24, or 32 bytes long"
|
||||||
msgstr "Nyckeln måste vara 16, 24 eller 32 byte lång"
|
msgstr "Nyckeln måste vara 16, 24 eller 32 byte lång"
|
||||||
|
@ -1410,32 +1407,32 @@ msgstr "MISO- eller MOSI-pinne saknas"
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Missing first_in_pin. Instruction %d reads pin(s)"
|
msgid "Missing first_in_pin. Instruction %d reads pin(s)"
|
||||||
msgstr ""
|
msgstr "Saknad first_in_pin. Instruktion %d läser pinnar"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Missing first_in_pin. Instruction %d shifts in from pin(s)"
|
msgid "Missing first_in_pin. Instruction %d shifts in from pin(s)"
|
||||||
msgstr ""
|
msgstr "Saknad first_in_pin. Instruktion %d skiftar in från pinnar"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Missing first_in_pin. Instruction %d waits based on pin"
|
msgid "Missing first_in_pin. Instruction %d waits based on pin"
|
||||||
msgstr ""
|
msgstr "Saknad first_in_pin. Instruktion %d väntar baserat på pinne"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Missing first_out_pin. Instruction %d shifts out to pin(s)"
|
msgid "Missing first_out_pin. Instruction %d shifts out to pin(s)"
|
||||||
msgstr ""
|
msgstr "Saknad first_out_pin. Instruktion %d skiftar ut till pinnar"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Missing first_out_pin. Instruction %d writes pin(s)"
|
msgid "Missing first_out_pin. Instruction %d writes pin(s)"
|
||||||
msgstr ""
|
msgstr "Saknad first_out_pin. Instruktion %d skriver till pinnar"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Missing first_set_pin. Instruction %d sets pin(s)"
|
msgid "Missing first_set_pin. Instruction %d sets pin(s)"
|
||||||
msgstr ""
|
msgstr "Saknad first_set_pin. Instruktion %d sätter pinnar"
|
||||||
|
|
||||||
#: shared-bindings/displayio/Group.c
|
#: shared-bindings/displayio/Group.c
|
||||||
msgid "Must be a %q subclass."
|
msgid "Must be a %q subclass."
|
||||||
|
@ -1556,7 +1553,13 @@ msgstr "Inget nätverk med sådant ssid"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
msgid "No out in program"
|
msgid "No out in program"
|
||||||
msgstr ""
|
msgstr "Inget out i programmet"
|
||||||
|
|
||||||
|
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
||||||
|
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
||||||
|
#: ports/raspberrypi/common-hal/busio/I2C.c
|
||||||
|
msgid "No pull up found on SDA or SCL; check your wiring"
|
||||||
|
msgstr "Ingen pull-up hittades på SDA eller SCL; kontrollera inkopplingen"
|
||||||
|
|
||||||
#: shared-module/touchio/TouchIn.c
|
#: shared-module/touchio/TouchIn.c
|
||||||
msgid "No pulldown on pin; 1Mohm recommended"
|
msgid "No pulldown on pin; 1Mohm recommended"
|
||||||
|
@ -1617,7 +1620,7 @@ msgstr "Endast 8 eller 16 bitars mono med "
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
msgid "Only IN/OUT of up to 8 supported"
|
msgid "Only IN/OUT of up to 8 supported"
|
||||||
msgstr ""
|
msgstr "Endast IN/OUT på upp till 8 stöds"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/wifi/__init__.c
|
#: ports/esp32s2/common-hal/wifi/__init__.c
|
||||||
msgid "Only IPv4 addresses supported"
|
msgid "Only IPv4 addresses supported"
|
||||||
|
@ -1671,7 +1674,7 @@ msgstr "Åtgärden orsakade timeout"
|
||||||
msgid "Out of memory"
|
msgid "Out of memory"
|
||||||
msgstr "Slut på minne"
|
msgstr "Slut på minne"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/socketpool/SocketPool.c
|
||||||
msgid "Out of sockets"
|
msgid "Out of sockets"
|
||||||
msgstr "Slut på sockets"
|
msgstr "Slut på sockets"
|
||||||
|
|
||||||
|
@ -1711,11 +1714,11 @@ msgstr "Åtkomst nekad"
|
||||||
|
|
||||||
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
||||||
msgid "Pin count must be at least 1"
|
msgid "Pin count must be at least 1"
|
||||||
msgstr ""
|
msgstr "Antalet pinnar måste vara minst 1"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
msgid "Pin count too large"
|
msgid "Pin count too large"
|
||||||
msgstr ""
|
msgstr "Antal pinnar för stort"
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c
|
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c
|
||||||
#: ports/cxd56/common-hal/analogio/AnalogIn.c
|
#: ports/cxd56/common-hal/analogio/AnalogIn.c
|
||||||
|
@ -1794,23 +1797,23 @@ msgstr "Fingerar djup sömn tills larm, Ctrl-C eller filskrivning.\n"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
msgid "Program does IN without loading ISR"
|
msgid "Program does IN without loading ISR"
|
||||||
msgstr ""
|
msgstr "Program gör IN utan att ladda ISR"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
msgid "Program does OUT without loading OSR"
|
msgid "Program does OUT without loading OSR"
|
||||||
msgstr ""
|
msgstr "Program gör OUT utan att läsa in OSR"
|
||||||
|
|
||||||
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
||||||
msgid "Program must contain at least one 16-bit instruction."
|
msgid "Program must contain at least one 16-bit instruction."
|
||||||
msgstr ""
|
msgstr "Programmet måste innehålla minst en 16-bitars instruktion."
|
||||||
|
|
||||||
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
||||||
msgid "Program size invalid"
|
msgid "Program size invalid"
|
||||||
msgstr ""
|
msgstr "Programstorlek ogiltig"
|
||||||
|
|
||||||
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
||||||
msgid "Program too large"
|
msgid "Program too large"
|
||||||
msgstr ""
|
msgstr "Programmet är för stort"
|
||||||
|
|
||||||
#: shared-bindings/digitalio/DigitalInOut.c
|
#: shared-bindings/digitalio/DigitalInOut.c
|
||||||
msgid "Pull not used when direction is output."
|
msgid "Pull not used when direction is output."
|
||||||
|
@ -1818,7 +1821,7 @@ msgstr "Pull används inte när riktningen är output."
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c
|
#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c
|
||||||
msgid "RAISE mode is not implemented"
|
msgid "RAISE mode is not implemented"
|
||||||
msgstr ""
|
msgstr "RAISE-läge är inte implementerat"
|
||||||
|
|
||||||
#: ports/stm/common-hal/os/__init__.c
|
#: ports/stm/common-hal/os/__init__.c
|
||||||
msgid "RNG DeInit Error"
|
msgid "RNG DeInit Error"
|
||||||
|
@ -1828,6 +1831,10 @@ msgstr "RNG DeInit-fel"
|
||||||
msgid "RNG Init Error"
|
msgid "RNG Init Error"
|
||||||
msgstr "RNG Init-fel"
|
msgstr "RNG Init-fel"
|
||||||
|
|
||||||
|
#: ports/nrf/common-hal/busio/UART.c
|
||||||
|
msgid "RS485 Not yet supported on this device"
|
||||||
|
msgstr "RS485 stöds ännu inte på den här enheten"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/busio/UART.c
|
#: ports/esp32s2/common-hal/busio/UART.c
|
||||||
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
||||||
msgid "RS485 inversion specified when not in RS485 mode"
|
msgid "RS485 inversion specified when not in RS485 mode"
|
||||||
|
@ -1835,6 +1842,7 @@ msgstr "RS485-inversion specificerad när den inte är i RS485-läge"
|
||||||
|
|
||||||
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
||||||
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
||||||
|
#: ports/raspberrypi/common-hal/rtc/RTC.c
|
||||||
msgid "RTC calibration is not supported on this board"
|
msgid "RTC calibration is not supported on this board"
|
||||||
msgstr "RTC-kalibrering stöds inte av detta kort"
|
msgstr "RTC-kalibrering stöds inte av detta kort"
|
||||||
|
|
||||||
|
@ -1843,7 +1851,7 @@ msgid "RTC is not supported on this board"
|
||||||
msgstr "RTC stöds inte av detta kort"
|
msgstr "RTC stöds inte av detta kort"
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
||||||
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
|
#: ports/stm/common-hal/busio/UART.c
|
||||||
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
||||||
msgstr "RTS/CTS/RS485 Stöds ännu inte på den här enheten"
|
msgstr "RTS/CTS/RS485 Stöds ännu inte på den här enheten"
|
||||||
|
|
||||||
|
@ -1900,12 +1908,6 @@ msgstr "Kör i säkert läge! "
|
||||||
msgid "SD card CSD format not supported"
|
msgid "SD card CSD format not supported"
|
||||||
msgstr "SD-kort CSD-format stöds inte"
|
msgstr "SD-kort CSD-format stöds inte"
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
|
||||||
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
|
||||||
#: ports/raspberrypi/common-hal/busio/I2C.c
|
|
||||||
msgid "SDA or SCL needs a pull up"
|
|
||||||
msgstr "SDA eller SCL behöver en pullup"
|
|
||||||
|
|
||||||
#: ports/stm/common-hal/sdioio/SDCard.c
|
#: ports/stm/common-hal/sdioio/SDCard.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "SDIO GetCardInfo Error %d"
|
msgid "SDIO GetCardInfo Error %d"
|
||||||
|
@ -1926,7 +1928,7 @@ msgstr "SPI reinitialiseringsfel"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/busio/SPI.c
|
#: ports/raspberrypi/common-hal/busio/SPI.c
|
||||||
msgid "SPI peripheral in use"
|
msgid "SPI peripheral in use"
|
||||||
msgstr ""
|
msgstr "SPI-enhet används redan"
|
||||||
|
|
||||||
#: shared-bindings/audiomixer/Mixer.c
|
#: shared-bindings/audiomixer/Mixer.c
|
||||||
msgid "Sample rate must be positive"
|
msgid "Sample rate must be positive"
|
||||||
|
@ -1960,11 +1962,11 @@ msgstr "Serversidans kontext kan inte ha värdnamn"
|
||||||
|
|
||||||
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
||||||
msgid "Set pin count must be between 1 and 5"
|
msgid "Set pin count must be between 1 and 5"
|
||||||
msgstr ""
|
msgstr "Inställt antal pinnar måste vara mellan 1 och 5"
|
||||||
|
|
||||||
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
||||||
msgid "Side set pin count must be between 1 and 5"
|
msgid "Side set pin count must be between 1 and 5"
|
||||||
msgstr ""
|
msgstr "Sido-setets antal pinnar måste vara mellan 1 och 5"
|
||||||
|
|
||||||
#: ports/cxd56/common-hal/camera/Camera.c
|
#: ports/cxd56/common-hal/camera/Camera.c
|
||||||
msgid "Size not supported"
|
msgid "Size not supported"
|
||||||
|
@ -2142,7 +2144,7 @@ msgstr "UART reinit-fel"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/busio/UART.c
|
#: ports/raspberrypi/common-hal/busio/UART.c
|
||||||
msgid "UART not yet supported"
|
msgid "UART not yet supported"
|
||||||
msgstr ""
|
msgstr "UART stöds ännu inte"
|
||||||
|
|
||||||
#: ports/stm/common-hal/busio/UART.c
|
#: ports/stm/common-hal/busio/UART.c
|
||||||
msgid "UART write error"
|
msgid "UART write error"
|
||||||
|
@ -2207,7 +2209,7 @@ msgstr "Det gick inte att skriva till sleep_memory."
|
||||||
msgid "Unexpected nrfx uuid type"
|
msgid "Unexpected nrfx uuid type"
|
||||||
msgstr "Oväntad nrfx uuid-typ"
|
msgstr "Oväntad nrfx uuid-typ"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unhandled ESP TLS error %d %d %x %d"
|
msgid "Unhandled ESP TLS error %d %d %x %d"
|
||||||
msgstr "Ej hanterat ESP TLS-fel %d-%d-%x-%d"
|
msgstr "Ej hanterat ESP TLS-fel %d-%d-%x-%d"
|
||||||
|
@ -2514,7 +2516,7 @@ msgstr "buffertsegmenten måste vara lika långa"
|
||||||
msgid "buffer too small"
|
msgid "buffer too small"
|
||||||
msgstr "buffert för liten"
|
msgstr "buffert för liten"
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "buffer too small for requested bytes"
|
msgid "buffer too small for requested bytes"
|
||||||
msgstr "buffert för liten för begärd längd"
|
msgstr "buffert för liten för begärd längd"
|
||||||
|
|
||||||
|
@ -3683,6 +3685,10 @@ msgstr "pop från en tom PulseIn"
|
||||||
msgid "pop from empty %q"
|
msgid "pop from empty %q"
|
||||||
msgstr "pop från tom %q"
|
msgstr "pop från tom %q"
|
||||||
|
|
||||||
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
|
msgid "port must be >= 0"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: py/objint_mpz.c
|
#: py/objint_mpz.c
|
||||||
msgid "pow() 3rd argument cannot be 0"
|
msgid "pow() 3rd argument cannot be 0"
|
||||||
msgstr "pow() 3: e argument kan inte vara 0"
|
msgstr "pow() 3: e argument kan inte vara 0"
|
||||||
|
@ -3719,11 +3725,11 @@ msgstr "trycka båda knapparna vid uppstart.\n"
|
||||||
|
|
||||||
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
||||||
msgid "pull_threshold must be between 1 and 32"
|
msgid "pull_threshold must be between 1 and 32"
|
||||||
msgstr ""
|
msgstr "pull_threshold måste vara mellan 1 och 32"
|
||||||
|
|
||||||
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
||||||
msgid "push_threshold must be between 1 and 32"
|
msgid "push_threshold must be between 1 and 32"
|
||||||
msgstr ""
|
msgstr "push_threshold måste vara mellan 1 och 32"
|
||||||
|
|
||||||
#: extmod/modutimeq.c
|
#: extmod/modutimeq.c
|
||||||
msgid "queue overflow"
|
msgid "queue overflow"
|
||||||
|
@ -3922,7 +3928,7 @@ msgstr "tröskelvärdet måste ligga i intervallet 0-65536"
|
||||||
|
|
||||||
#: shared-bindings/rgbmatrix/RGBMatrix.c
|
#: shared-bindings/rgbmatrix/RGBMatrix.c
|
||||||
msgid "tile must be greater than zero"
|
msgid "tile must be greater than zero"
|
||||||
msgstr ""
|
msgstr "tile måste vara större än noll"
|
||||||
|
|
||||||
#: shared-bindings/time/__init__.c
|
#: shared-bindings/time/__init__.c
|
||||||
msgid "time.struct_time() takes a 9-sequence"
|
msgid "time.struct_time() takes a 9-sequence"
|
||||||
|
@ -4213,6 +4219,15 @@ msgstr "zi måste vara av typ float"
|
||||||
msgid "zi must be of shape (n_section, 2)"
|
msgid "zi must be of shape (n_section, 2)"
|
||||||
msgstr "zi måste vara i formen (n_section, 2)"
|
msgstr "zi måste vara i formen (n_section, 2)"
|
||||||
|
|
||||||
|
#~ msgid "SDA or SCL needs a pull up"
|
||||||
|
#~ msgstr "SDA eller SCL behöver en pullup"
|
||||||
|
|
||||||
|
#~ msgid "Invalid use of TLS Socket"
|
||||||
|
#~ msgstr "Ogiltig användning av TLS Socket"
|
||||||
|
|
||||||
|
#~ msgid "Issue setting SO_REUSEADDR"
|
||||||
|
#~ msgstr "Misslyckades att sätta SO_REUSEADDR"
|
||||||
|
|
||||||
#~ msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
|
#~ msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
|
||||||
#~ msgstr "%d adresspinnar och %d RGB-pinnar indikerar en höjd av %d, inte %d"
|
#~ msgstr "%d adresspinnar och %d RGB-pinnar indikerar en höjd av %d, inte %d"
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ msgstr ""
|
||||||
"Project-Id-Version: circuitpython-cn\n"
|
"Project-Id-Version: circuitpython-cn\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
||||||
"PO-Revision-Date: 2021-01-30 02:32+0000\n"
|
"PO-Revision-Date: 2021-02-09 14:03+0000\n"
|
||||||
"Last-Translator: hexthat <hexthat@gmail.com>\n"
|
"Last-Translator: hexthat <hexthat@gmail.com>\n"
|
||||||
"Language-Team: Chinese Hanyu Pinyin\n"
|
"Language-Team: Chinese Hanyu Pinyin\n"
|
||||||
"Language: zh_Latn_pinyin\n"
|
"Language: zh_Latn_pinyin\n"
|
||||||
|
@ -351,7 +351,7 @@ msgstr "Suǒyǒu shǐyòng de shìjiàn píndào"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
msgid "All state machines in use"
|
msgid "All state machines in use"
|
||||||
msgstr ""
|
msgstr "suǒ yǒu zhèng zài shǐ yòng de zhuàng tài jī"
|
||||||
|
|
||||||
#: ports/atmel-samd/audio_dma.c ports/atmel-samd/common-hal/audiobusio/PDMIn.c
|
#: ports/atmel-samd/audio_dma.c ports/atmel-samd/common-hal/audiobusio/PDMIn.c
|
||||||
msgid "All sync event channels in use"
|
msgid "All sync event channels in use"
|
||||||
|
@ -643,6 +643,10 @@ msgstr "USB jīhuó shí wúfǎ chóngxīn bǎng ding '/'."
|
||||||
msgid "Cannot reset into bootloader because no bootloader is present."
|
msgid "Cannot reset into bootloader because no bootloader is present."
|
||||||
msgstr "Wúfǎ chóng zhì wèi bootloader, yīnwèi méiyǒu bootloader cúnzài."
|
msgstr "Wúfǎ chóng zhì wèi bootloader, yīnwèi méiyǒu bootloader cúnzài."
|
||||||
|
|
||||||
|
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
||||||
|
msgid "Cannot set socket options"
|
||||||
|
msgstr "wú fǎ shè zhì tào jiē zì xuǎn xiàng"
|
||||||
|
|
||||||
#: shared-bindings/digitalio/DigitalInOut.c
|
#: shared-bindings/digitalio/DigitalInOut.c
|
||||||
msgid "Cannot set value when direction is input."
|
msgid "Cannot set value when direction is input."
|
||||||
msgstr "Dāng fāngxiàng xiàng nèi shí, bùnéng shèzhì gāi zhí."
|
msgstr "Dāng fāngxiàng xiàng nèi shí, bùnéng shèzhì gāi zhí."
|
||||||
|
@ -881,7 +885,7 @@ msgstr "EXTINT píndào yǐjīng shǐyòng"
|
||||||
msgid "Error in regex"
|
msgid "Error in regex"
|
||||||
msgstr "Zhèngzé biǎodá shì cuòwù"
|
msgstr "Zhèngzé biǎodá shì cuòwù"
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "Error: Failure to bind"
|
msgid "Error: Failure to bind"
|
||||||
msgstr "cuò wù: bǎng dìng shī bài"
|
msgstr "cuò wù: bǎng dìng shī bài"
|
||||||
|
|
||||||
|
@ -940,7 +944,7 @@ msgstr "FFT jǐn wéi ndarrays dìng yì"
|
||||||
msgid "FFT is implemented for linear arrays only"
|
msgid "FFT is implemented for linear arrays only"
|
||||||
msgstr "FFT jǐn shì yòng yú xiàn xìng zhèn liè"
|
msgstr "FFT jǐn shì yòng yú xiàn xìng zhèn liè"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
msgid "Failed SSL handshake"
|
msgid "Failed SSL handshake"
|
||||||
msgstr "SSL wòshǒu shībài"
|
msgstr "SSL wòshǒu shībài"
|
||||||
|
|
||||||
|
@ -1070,7 +1074,7 @@ msgstr "I2C chūshǐhuà cuòwù"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/busio/I2C.c
|
#: ports/raspberrypi/common-hal/busio/I2C.c
|
||||||
msgid "I2C peripheral in use"
|
msgid "I2C peripheral in use"
|
||||||
msgstr ""
|
msgstr "I2C wài shè zhèng zài shǐ yòng zhōng"
|
||||||
|
|
||||||
#: shared-bindings/audiobusio/I2SOut.c
|
#: shared-bindings/audiobusio/I2SOut.c
|
||||||
msgid "I2SOut not available"
|
msgid "I2SOut not available"
|
||||||
|
@ -1099,7 +1103,7 @@ msgstr "Huǎnchōng qū dàxiǎo bù zhèngquè"
|
||||||
|
|
||||||
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
||||||
msgid "Init program size invalid"
|
msgid "Init program size invalid"
|
||||||
msgstr ""
|
msgstr "Init chéng xù dà xiǎo wú xiào"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
|
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
|
||||||
msgid "Initialization failed due to lack of memory"
|
msgid "Initialization failed due to lack of memory"
|
||||||
|
@ -1116,27 +1120,27 @@ msgstr "Shūrù/shūchū cuòwù"
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Instruction %d jumps on pin"
|
msgid "Instruction %d jumps on pin"
|
||||||
msgstr ""
|
msgstr "zhǐ lìng %d zài yǐn jiǎo shàng tiào zhuǎn"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Instruction %d shifts in more bits than pin count"
|
msgid "Instruction %d shifts in more bits than pin count"
|
||||||
msgstr ""
|
msgstr "zhǐ lìng %d yí wèi chāo guò yǐn jiǎo jì shù"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Instruction %d shifts out more bits than pin count"
|
msgid "Instruction %d shifts out more bits than pin count"
|
||||||
msgstr ""
|
msgstr "zhǐ lìng %d yí chū de wèi bǐ yǐn jiǎo shù duō"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Instruction %d uses extra pin"
|
msgid "Instruction %d uses extra pin"
|
||||||
msgstr ""
|
msgstr "zhǐ lìng %d shǐ yòng é wài de yǐn jiǎo"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Instruction %d waits on input outside of count"
|
msgid "Instruction %d waits on input outside of count"
|
||||||
msgstr ""
|
msgstr "zhǐ lìng %d děng dài jì shù zhī wài de shū rù"
|
||||||
|
|
||||||
#: ports/nrf/common-hal/_bleio/__init__.c
|
#: ports/nrf/common-hal/_bleio/__init__.c
|
||||||
msgid "Insufficient authentication"
|
msgid "Insufficient authentication"
|
||||||
|
@ -1313,7 +1317,7 @@ msgstr "Ānquán móshì wúxiào"
|
||||||
msgid "Invalid size"
|
msgid "Invalid size"
|
||||||
msgstr "dà xiǎo wú xiào"
|
msgstr "dà xiǎo wú xiào"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLContext.c
|
||||||
msgid "Invalid socket for TLS"
|
msgid "Invalid socket for TLS"
|
||||||
msgstr "TLS de chā zuò wú xiào"
|
msgstr "TLS de chā zuò wú xiào"
|
||||||
|
|
||||||
|
@ -1321,10 +1325,6 @@ msgstr "TLS de chā zuò wú xiào"
|
||||||
msgid "Invalid state"
|
msgid "Invalid state"
|
||||||
msgstr "wú xiào zhuàng tài"
|
msgstr "wú xiào zhuàng tài"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Invalid use of TLS Socket"
|
|
||||||
msgstr "TLS tào jiē zì de wú xiào shǐ yòng"
|
|
||||||
|
|
||||||
#: shared-bindings/audiomixer/Mixer.c
|
#: shared-bindings/audiomixer/Mixer.c
|
||||||
msgid "Invalid voice"
|
msgid "Invalid voice"
|
||||||
msgstr "Yǔyīn wúxiào"
|
msgstr "Yǔyīn wúxiào"
|
||||||
|
@ -1341,10 +1341,6 @@ msgstr "Wúxiào de làng làngcháo wénjiàn"
|
||||||
msgid "Invalid word/bit length"
|
msgid "Invalid word/bit length"
|
||||||
msgstr "Wúxiào de zì/wèi chángdù"
|
msgstr "Wúxiào de zì/wèi chángdù"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
|
||||||
msgid "Issue setting SO_REUSEADDR"
|
|
||||||
msgstr "wèn tí shè zhì SO_REUSEADDR"
|
|
||||||
|
|
||||||
#: shared-bindings/aesio/aes.c
|
#: shared-bindings/aesio/aes.c
|
||||||
msgid "Key must be 16, 24, or 32 bytes long"
|
msgid "Key must be 16, 24, or 32 bytes long"
|
||||||
msgstr "mì yào bì xū wéi 16, 24 huò 32 zì jié cháng"
|
msgstr "mì yào bì xū wéi 16, 24 huò 32 zì jié cháng"
|
||||||
|
@ -1409,32 +1405,33 @@ msgstr "Quēshǎo MISO huò MOSI yǐn jiǎo"
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Missing first_in_pin. Instruction %d reads pin(s)"
|
msgid "Missing first_in_pin. Instruction %d reads pin(s)"
|
||||||
msgstr ""
|
msgstr "shǒu xiān zài yǐn jiǎo zhōng quē shī. zhǐ lìng %d dú qǔ yǐn jiǎo"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Missing first_in_pin. Instruction %d shifts in from pin(s)"
|
msgid "Missing first_in_pin. Instruction %d shifts in from pin(s)"
|
||||||
msgstr ""
|
msgstr "shǒu xiān zài yǐn jiǎo zhōng quē shī. zhǐ lìng %d cóng yǐn jiǎo yí wèi"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Missing first_in_pin. Instruction %d waits based on pin"
|
msgid "Missing first_in_pin. Instruction %d waits based on pin"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"shǒu xiān zài yǐn jiǎo zhōng quē shī. jī yú yǐn jiǎo de zhǐ lìng %d děng dài"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Missing first_out_pin. Instruction %d shifts out to pin(s)"
|
msgid "Missing first_out_pin. Instruction %d shifts out to pin(s)"
|
||||||
msgstr ""
|
msgstr "xiān lòu chū yǐn jiǎo. zhǐ lìng %d yí chū dào yǐn jiǎo"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Missing first_out_pin. Instruction %d writes pin(s)"
|
msgid "Missing first_out_pin. Instruction %d writes pin(s)"
|
||||||
msgstr ""
|
msgstr "xiān lòu chū yǐn jiǎo. zhǐ lìng %d xiě rù yǐn jiǎo"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Missing first_set_pin. Instruction %d sets pin(s)"
|
msgid "Missing first_set_pin. Instruction %d sets pin(s)"
|
||||||
msgstr ""
|
msgstr "quē shǎo dì yī zǔ yǐn jiǎo. zhǐ lìng %d shè zhì yǐn jiǎo"
|
||||||
|
|
||||||
#: shared-bindings/displayio/Group.c
|
#: shared-bindings/displayio/Group.c
|
||||||
msgid "Must be a %q subclass."
|
msgid "Must be a %q subclass."
|
||||||
|
@ -1555,7 +1552,13 @@ msgstr "Méiyǒu wǎngluò yǔ gāi ssid"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
msgid "No out in program"
|
msgid "No out in program"
|
||||||
msgstr ""
|
msgstr "chéng xù zhōng wèi tuì chū"
|
||||||
|
|
||||||
|
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
||||||
|
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
||||||
|
#: ports/raspberrypi/common-hal/busio/I2C.c
|
||||||
|
msgid "No pull up found on SDA or SCL; check your wiring"
|
||||||
|
msgstr "zài SDA huò SCL shàng wèi zhǎo dào shàng lā; jiǎn chá nín de xiàn lù"
|
||||||
|
|
||||||
#: shared-module/touchio/TouchIn.c
|
#: shared-module/touchio/TouchIn.c
|
||||||
msgid "No pulldown on pin; 1Mohm recommended"
|
msgid "No pulldown on pin; 1Mohm recommended"
|
||||||
|
@ -1615,7 +1618,7 @@ msgstr "Zhǐyǒu 8 huò 16 wèi dānwèi "
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
msgid "Only IN/OUT of up to 8 supported"
|
msgid "Only IN/OUT of up to 8 supported"
|
||||||
msgstr ""
|
msgstr "jǐn zhī chí zuì duō 8 gè IN/OUT"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/wifi/__init__.c
|
#: ports/esp32s2/common-hal/wifi/__init__.c
|
||||||
msgid "Only IPv4 addresses supported"
|
msgid "Only IPv4 addresses supported"
|
||||||
|
@ -1670,7 +1673,7 @@ msgstr "cāo zuò yǐ fēn shí"
|
||||||
msgid "Out of memory"
|
msgid "Out of memory"
|
||||||
msgstr "nèi cún bù zú"
|
msgstr "nèi cún bù zú"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/socketpool/SocketPool.c
|
||||||
msgid "Out of sockets"
|
msgid "Out of sockets"
|
||||||
msgstr "tào jiē zì wài"
|
msgstr "tào jiē zì wài"
|
||||||
|
|
||||||
|
@ -1709,11 +1712,11 @@ msgstr "Quánxiàn bèi jùjué"
|
||||||
|
|
||||||
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
||||||
msgid "Pin count must be at least 1"
|
msgid "Pin count must be at least 1"
|
||||||
msgstr ""
|
msgstr "yǐn jiǎo jì shù bì xū zhì shǎo wéi 1"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
msgid "Pin count too large"
|
msgid "Pin count too large"
|
||||||
msgstr ""
|
msgstr "yǐn jiǎo jì shù tài dà"
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c
|
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c
|
||||||
#: ports/cxd56/common-hal/analogio/AnalogIn.c
|
#: ports/cxd56/common-hal/analogio/AnalogIn.c
|
||||||
|
@ -1789,23 +1792,23 @@ msgstr ""
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
msgid "Program does IN without loading ISR"
|
msgid "Program does IN without loading ISR"
|
||||||
msgstr ""
|
msgstr "chéng xù zài bù jiā zǎi ISR de qíng kuàng xià wán chéng"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
|
||||||
msgid "Program does OUT without loading OSR"
|
msgid "Program does OUT without loading OSR"
|
||||||
msgstr ""
|
msgstr "chéng xù zài bù jiā zǎi Osr de qíng kuàng xià zhí xíng OUT"
|
||||||
|
|
||||||
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
||||||
msgid "Program must contain at least one 16-bit instruction."
|
msgid "Program must contain at least one 16-bit instruction."
|
||||||
msgstr ""
|
msgstr "chéng xù bì xū zhì shǎo bāo hán yí gè 16 wèi zhǐ lìng ."
|
||||||
|
|
||||||
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
||||||
msgid "Program size invalid"
|
msgid "Program size invalid"
|
||||||
msgstr ""
|
msgstr "chéng xù dà xiǎo wú xiào"
|
||||||
|
|
||||||
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
||||||
msgid "Program too large"
|
msgid "Program too large"
|
||||||
msgstr ""
|
msgstr "chéng xù tài dà"
|
||||||
|
|
||||||
#: shared-bindings/digitalio/DigitalInOut.c
|
#: shared-bindings/digitalio/DigitalInOut.c
|
||||||
msgid "Pull not used when direction is output."
|
msgid "Pull not used when direction is output."
|
||||||
|
@ -1813,7 +1816,7 @@ msgstr "Fāngxiàng shūchū shí Pull méiyǒu shǐyòng."
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c
|
#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c
|
||||||
msgid "RAISE mode is not implemented"
|
msgid "RAISE mode is not implemented"
|
||||||
msgstr ""
|
msgstr "wèi shí xiàn tí shēng mó shì"
|
||||||
|
|
||||||
#: ports/stm/common-hal/os/__init__.c
|
#: ports/stm/common-hal/os/__init__.c
|
||||||
msgid "RNG DeInit Error"
|
msgid "RNG DeInit Error"
|
||||||
|
@ -1823,6 +1826,10 @@ msgstr "RNG qǔxiāo chūshǐhuà cuòwù"
|
||||||
msgid "RNG Init Error"
|
msgid "RNG Init Error"
|
||||||
msgstr "RNG chūshǐhuà cuòwù"
|
msgstr "RNG chūshǐhuà cuòwù"
|
||||||
|
|
||||||
|
#: ports/nrf/common-hal/busio/UART.c
|
||||||
|
msgid "RS485 Not yet supported on this device"
|
||||||
|
msgstr "RS485 cǐ shè bèi shàng bù zhī chí"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/busio/UART.c
|
#: ports/esp32s2/common-hal/busio/UART.c
|
||||||
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
#: ports/mimxrt10xx/common-hal/busio/UART.c
|
||||||
msgid "RS485 inversion specified when not in RS485 mode"
|
msgid "RS485 inversion specified when not in RS485 mode"
|
||||||
|
@ -1830,6 +1837,7 @@ msgstr "Wèi chǔyú RS485 móshì shí zhǐdìngle RS485 fǎn zhuǎn"
|
||||||
|
|
||||||
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
|
||||||
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
|
||||||
|
#: ports/raspberrypi/common-hal/rtc/RTC.c
|
||||||
msgid "RTC calibration is not supported on this board"
|
msgid "RTC calibration is not supported on this board"
|
||||||
msgstr "Cǐ bǎn bù zhīchí RTC jiàozhǔn"
|
msgstr "Cǐ bǎn bù zhīchí RTC jiàozhǔn"
|
||||||
|
|
||||||
|
@ -1838,7 +1846,7 @@ msgid "RTC is not supported on this board"
|
||||||
msgstr "Cǐ bǎn bù zhīchí RTC"
|
msgstr "Cǐ bǎn bù zhīchí RTC"
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
|
||||||
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
|
#: ports/stm/common-hal/busio/UART.c
|
||||||
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
msgid "RTS/CTS/RS485 Not yet supported on this device"
|
||||||
msgstr "RTS/CTS/RS485 gāi shèbèi shàng bù zhīchí"
|
msgstr "RTS/CTS/RS485 gāi shèbèi shàng bù zhīchí"
|
||||||
|
|
||||||
|
@ -1895,12 +1903,6 @@ msgstr "Zài ānquán móshì xià yùnxíng! "
|
||||||
msgid "SD card CSD format not supported"
|
msgid "SD card CSD format not supported"
|
||||||
msgstr "Bù zhīchí SD kǎ CSD géshì"
|
msgstr "Bù zhīchí SD kǎ CSD géshì"
|
||||||
|
|
||||||
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
|
|
||||||
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
|
|
||||||
#: ports/raspberrypi/common-hal/busio/I2C.c
|
|
||||||
msgid "SDA or SCL needs a pull up"
|
|
||||||
msgstr "SDA huò SCL xūyào lādòng"
|
|
||||||
|
|
||||||
#: ports/stm/common-hal/sdioio/SDCard.c
|
#: ports/stm/common-hal/sdioio/SDCard.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "SDIO GetCardInfo Error %d"
|
msgid "SDIO GetCardInfo Error %d"
|
||||||
|
@ -1921,7 +1923,7 @@ msgstr "SPI chóngxīn chūshǐhuà cuòwù"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/busio/SPI.c
|
#: ports/raspberrypi/common-hal/busio/SPI.c
|
||||||
msgid "SPI peripheral in use"
|
msgid "SPI peripheral in use"
|
||||||
msgstr ""
|
msgstr "SPI wài shè zhèng zài shǐ yòng zhōng"
|
||||||
|
|
||||||
#: shared-bindings/audiomixer/Mixer.c
|
#: shared-bindings/audiomixer/Mixer.c
|
||||||
msgid "Sample rate must be positive"
|
msgid "Sample rate must be positive"
|
||||||
|
@ -1955,11 +1957,11 @@ msgstr "Fúwùqì duān shàngxiàwén bùnéng jùyǒu zhǔjī míng"
|
||||||
|
|
||||||
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
||||||
msgid "Set pin count must be between 1 and 5"
|
msgid "Set pin count must be between 1 and 5"
|
||||||
msgstr ""
|
msgstr "shè zhì yǐn jiǎo shù bì xū jiè yú 1 hé 5 zhī jiān"
|
||||||
|
|
||||||
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
||||||
msgid "Side set pin count must be between 1 and 5"
|
msgid "Side set pin count must be between 1 and 5"
|
||||||
msgstr ""
|
msgstr "cè miàn shè zhì yǐn jiǎo shù bì xū jiè yú 1 hé 5 zhī jiān"
|
||||||
|
|
||||||
#: ports/cxd56/common-hal/camera/Camera.c
|
#: ports/cxd56/common-hal/camera/Camera.c
|
||||||
msgid "Size not supported"
|
msgid "Size not supported"
|
||||||
|
@ -2136,7 +2138,7 @@ msgstr "UART chóngxīn chūshǐhuà cuòwù"
|
||||||
|
|
||||||
#: ports/raspberrypi/common-hal/busio/UART.c
|
#: ports/raspberrypi/common-hal/busio/UART.c
|
||||||
msgid "UART not yet supported"
|
msgid "UART not yet supported"
|
||||||
msgstr ""
|
msgstr "UART shàng wèi shòu zhī chí"
|
||||||
|
|
||||||
#: ports/stm/common-hal/busio/UART.c
|
#: ports/stm/common-hal/busio/UART.c
|
||||||
msgid "UART write error"
|
msgid "UART write error"
|
||||||
|
@ -2201,7 +2203,7 @@ msgstr "wú fǎ xiě rù sleep_memory。"
|
||||||
msgid "Unexpected nrfx uuid type"
|
msgid "Unexpected nrfx uuid type"
|
||||||
msgstr "Yìwài de nrfx uuid lèixíng"
|
msgstr "Yìwài de nrfx uuid lèixíng"
|
||||||
|
|
||||||
#: ports/esp32s2/common-hal/socketpool/Socket.c
|
#: ports/esp32s2/common-hal/ssl/SSLSocket.c
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unhandled ESP TLS error %d %d %x %d"
|
msgid "Unhandled ESP TLS error %d %d %x %d"
|
||||||
msgstr "Wèi chǔlǐ de ESP TLS cuòwù %d %d %x %d"
|
msgstr "Wèi chǔlǐ de ESP TLS cuòwù %d %d %x %d"
|
||||||
|
@ -2509,7 +2511,7 @@ msgstr "huǎnchōng qū qiēpiàn bìxū chángdù xiāngděng"
|
||||||
msgid "buffer too small"
|
msgid "buffer too small"
|
||||||
msgstr "huǎnchōng qū tài xiǎo"
|
msgstr "huǎnchōng qū tài xiǎo"
|
||||||
|
|
||||||
#: shared-bindings/socketpool/Socket.c
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
msgid "buffer too small for requested bytes"
|
msgid "buffer too small for requested bytes"
|
||||||
msgstr "huǎn chōng qū tài xiǎo, duì yú qǐng qiú de zì jié"
|
msgstr "huǎn chōng qū tài xiǎo, duì yú qǐng qiú de zì jié"
|
||||||
|
|
||||||
|
@ -3676,6 +3678,10 @@ msgstr "cóng kōng mài chōng tán chū"
|
||||||
msgid "pop from empty %q"
|
msgid "pop from empty %q"
|
||||||
msgstr "cóng kōng %q dànchū"
|
msgstr "cóng kōng %q dànchū"
|
||||||
|
|
||||||
|
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
|
||||||
|
msgid "port must be >= 0"
|
||||||
|
msgstr "duān kǒu bì xū wéi >= 0"
|
||||||
|
|
||||||
#: py/objint_mpz.c
|
#: py/objint_mpz.c
|
||||||
msgid "pow() 3rd argument cannot be 0"
|
msgid "pow() 3rd argument cannot be 0"
|
||||||
msgstr "pow() 3 cān shǔ bùnéng wéi 0"
|
msgstr "pow() 3 cān shǔ bùnéng wéi 0"
|
||||||
|
@ -3712,11 +3718,11 @@ msgstr "zài qǐdòng shí tóngshí àn xià liǎng gè ànniǔ.\n"
|
||||||
|
|
||||||
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
||||||
msgid "pull_threshold must be between 1 and 32"
|
msgid "pull_threshold must be between 1 and 32"
|
||||||
msgstr ""
|
msgstr "lā lì yù zhí bì xū jiè yú 1 hé 32 zhī jiān"
|
||||||
|
|
||||||
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
|
||||||
msgid "push_threshold must be between 1 and 32"
|
msgid "push_threshold must be between 1 and 32"
|
||||||
msgstr ""
|
msgstr "tuī sòng yù zhí bì xū jiè yú 1 hé 32 zhī jiān"
|
||||||
|
|
||||||
#: extmod/modutimeq.c
|
#: extmod/modutimeq.c
|
||||||
msgid "queue overflow"
|
msgid "queue overflow"
|
||||||
|
@ -4206,6 +4212,15 @@ msgstr "zi bìxū wèi fú diǎn xíng"
|
||||||
msgid "zi must be of shape (n_section, 2)"
|
msgid "zi must be of shape (n_section, 2)"
|
||||||
msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)"
|
msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)"
|
||||||
|
|
||||||
|
#~ msgid "SDA or SCL needs a pull up"
|
||||||
|
#~ msgstr "SDA huò SCL xūyào lādòng"
|
||||||
|
|
||||||
|
#~ msgid "Invalid use of TLS Socket"
|
||||||
|
#~ msgstr "TLS tào jiē zì de wú xiào shǐ yòng"
|
||||||
|
|
||||||
|
#~ msgid "Issue setting SO_REUSEADDR"
|
||||||
|
#~ msgstr "wèn tí shè zhì SO_REUSEADDR"
|
||||||
|
|
||||||
#~ msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
|
#~ msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
#~ "%d dìzhǐ yǐn jiǎo hé %d rgb yǐn jiǎo jiāng gāodù biǎoshì wèi %d, ér bùshì "
|
#~ "%d dìzhǐ yǐn jiǎo hé %d rgb yǐn jiǎo jiāng gāodù biǎoshì wèi %d, ér bùshì "
|
||||||
|
|
1
main.c
1
main.c
|
@ -184,6 +184,7 @@ STATIC void stop_mp(void) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
background_callback_reset();
|
background_callback_reset();
|
||||||
|
usb_background();
|
||||||
|
|
||||||
gc_deinit();
|
gc_deinit();
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,3 +11,4 @@ LONGINT_IMPL = NONE
|
||||||
CIRCUITPY_FULL_BUILD = 0
|
CIRCUITPY_FULL_BUILD = 0
|
||||||
|
|
||||||
SUPEROPT_GC = 0
|
SUPEROPT_GC = 0
|
||||||
|
SUPEROPT_VM = 0
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
/*
|
||||||
|
* This file is part of the MicroPython project, http://micropython.org/
|
||||||
|
*
|
||||||
|
* The MIT License (MIT)
|
||||||
|
*
|
||||||
|
* Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
|
||||||
|
*
|
||||||
|
* 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 "supervisor/board.h"
|
||||||
|
|
||||||
|
void board_init(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
bool board_requests_safe_mode(void) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void reset_board(void) {
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
#define MICROPY_HW_BOARD_NAME "DynaLoRa_USB"
|
||||||
|
#define MICROPY_HW_MCU_NAME "samd21e18"
|
||||||
|
|
||||||
|
#define MICROPY_HW_LED_STATUS (&pin_PA27)
|
||||||
|
#define MICROPY_HW_NEOPIXEL (&pin_PA19)
|
||||||
|
|
||||||
|
#define SPI_FLASH_MOSI_PIN &pin_PA04
|
||||||
|
#define SPI_FLASH_MISO_PIN &pin_PA05
|
||||||
|
#define SPI_FLASH_SCK_PIN &pin_PA07
|
||||||
|
#define SPI_FLASH_CS_PIN &pin_PA06
|
||||||
|
|
||||||
|
// These are pins not to reset.
|
||||||
|
#define MICROPY_PORT_A (0)
|
||||||
|
#define MICROPY_PORT_B (0)
|
||||||
|
#define MICROPY_PORT_C (0)
|
||||||
|
|
||||||
|
#define DEFAULT_I2C_BUS_SCL (&pin_PA01)
|
||||||
|
#define DEFAULT_I2C_BUS_SDA (&pin_PA00)
|
||||||
|
|
||||||
|
#define DEFAULT_SPI_BUS_SCK (&pin_PA17)
|
||||||
|
#define DEFAULT_SPI_BUS_MOSI (&pin_PA16)
|
||||||
|
#define DEFAULT_SPI_BUS_MISO (&pin_PA18)
|
||||||
|
|
||||||
|
#define DEFAULT_UART_BUS_RX (&pin_PA00)
|
||||||
|
#define DEFAULT_UART_BUS_TX (&pin_PA01)
|
||||||
|
|
||||||
|
// USB is always used internally so skip the pin objects for it.
|
||||||
|
#define IGNORE_PIN_PA23 1
|
||||||
|
#define IGNORE_PIN_PA24 1
|
||||||
|
|
||||||
|
// Not connected
|
||||||
|
#define IGNORE_PIN_PA08 1
|
||||||
|
#define IGNORE_PIN_PA14 1
|
||||||
|
#define IGNORE_PIN_PA21 1
|
||||||
|
#define IGNORE_PIN_PA22 1
|
||||||
|
#define IGNORE_PIN_PA28 1
|
|
@ -0,0 +1,39 @@
|
||||||
|
USB_VID = 0x04D8
|
||||||
|
USB_PID = 0xEA2A
|
||||||
|
USB_PRODUCT = "DynaLoRa_USB"
|
||||||
|
USB_MANUFACTURER = "BHDynamics"
|
||||||
|
|
||||||
|
CHIP_VARIANT = SAMD21E18A
|
||||||
|
CHIP_FAMILY = samd21
|
||||||
|
|
||||||
|
SPI_FLASH_FILESYSTEM = 1
|
||||||
|
EXTERNAL_FLASH_DEVICE_COUNT = 1
|
||||||
|
EXTERNAL_FLASH_DEVICES = GD25Q32C
|
||||||
|
LONGINT_IMPL = MPZ
|
||||||
|
|
||||||
|
CIRCUITPY_AUDIOBUSIO = 0
|
||||||
|
CIRCUITPY_FREQUENCYIO = 0
|
||||||
|
CIRCUITPY_GAMEPAD = 0
|
||||||
|
CIRCUITPY_DISPLAYIO = 0
|
||||||
|
CIRCUITPY_FULL_BUILD = 0
|
||||||
|
|
||||||
|
SUPEROPT_GC = 0
|
||||||
|
|
||||||
|
CFLAGS_BOARD = --param max-inline-insns-auto=15
|
||||||
|
ifeq ($(TRANSLATION), zh_Latn_pinyin)
|
||||||
|
RELEASE_NEEDS_CLEAN_BUILD = 1
|
||||||
|
CFLAGS_INLINE_LIMIT = 35
|
||||||
|
endif
|
||||||
|
ifeq ($(TRANSLATION), ja)
|
||||||
|
RELEASE_NEEDS_CLEAN_BUILD = 1
|
||||||
|
CFLAGS_INLINE_LIMIT = 35
|
||||||
|
endif
|
||||||
|
ifeq ($(TRANSLATION), de_DE)
|
||||||
|
RELEASE_NEEDS_CLEAN_BUILD = 1
|
||||||
|
CFLAGS_INLINE_LIMIT = 35
|
||||||
|
SUPEROPT_VM = 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
|
||||||
|
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_RFM9x
|
||||||
|
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SD
|
|
@ -0,0 +1,41 @@
|
||||||
|
#include "shared-bindings/board/__init__.h"
|
||||||
|
|
||||||
|
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA00) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA01) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA02) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA30) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA31) },
|
||||||
|
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA00) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA01) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA02) },
|
||||||
|
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA16) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA18) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA17) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_RADIO_CS), MP_ROM_PTR(&pin_PA11) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_RADIO_INT), MP_ROM_PTR(&pin_PA09) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_RADIO_RESET), MP_ROM_PTR(&pin_PA10) },
|
||||||
|
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_PA03) },
|
||||||
|
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA01) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA00) },
|
||||||
|
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA01) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA00) },
|
||||||
|
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_MOSI1), MP_ROM_PTR(&pin_PA00) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_MISO1), MP_ROM_PTR(&pin_PA02) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_SCK1), MP_ROM_PTR(&pin_PA01) },
|
||||||
|
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA27) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA19) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_PA15) },
|
||||||
|
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
|
||||||
|
};
|
||||||
|
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
|
|
@ -11,3 +11,4 @@ LONGINT_IMPL = NONE
|
||||||
CIRCUITPY_FULL_BUILD = 0
|
CIRCUITPY_FULL_BUILD = 0
|
||||||
|
|
||||||
SUPEROPT_GC = 0
|
SUPEROPT_GC = 0
|
||||||
|
SUPEROPT_VM = 0
|
||||||
|
|
|
@ -11,14 +11,5 @@ LONGINT_IMPL = NONE
|
||||||
CIRCUITPY_FULL_BUILD = 0
|
CIRCUITPY_FULL_BUILD = 0
|
||||||
|
|
||||||
SUPEROPT_GC = 0
|
SUPEROPT_GC = 0
|
||||||
|
|
||||||
CFLAGS_BOARD = --param max-inline-insns-auto=15
|
|
||||||
ifeq ($(TRANSLATION), zh_Latn_pinyin)
|
|
||||||
RELEASE_NEEDS_CLEAN_BUILD = 1
|
|
||||||
CFLAGS_INLINE_LIMIT = 35
|
|
||||||
endif
|
|
||||||
ifeq ($(TRANSLATION), de_DE)
|
|
||||||
RELEASE_NEEDS_CLEAN_BUILD = 1
|
|
||||||
CFLAGS_INLINE_LIMIT = 35
|
|
||||||
SUPEROPT_VM = 0
|
SUPEROPT_VM = 0
|
||||||
endif
|
CFLAGS_INLINE_LIMIT = 45
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
|
|
||||||
|
|
||||||
static uint8_t pewpew_tc_index = 0xff;
|
static uint8_t pewpew_tc_index = 0xff;
|
||||||
|
static volatile uint16_t pewpew_ticks = 0;
|
||||||
|
|
||||||
|
|
||||||
void pewpew_interrupt_handler(uint8_t index) {
|
void pewpew_interrupt_handler(uint8_t index) {
|
||||||
|
@ -52,6 +53,7 @@ void pewpew_interrupt_handler(uint8_t index) {
|
||||||
}
|
}
|
||||||
|
|
||||||
pew_tick();
|
pew_tick();
|
||||||
|
++pewpew_ticks;
|
||||||
|
|
||||||
// Clear the interrupt bit.
|
// Clear the interrupt bit.
|
||||||
tc->COUNT16.INTFLAG.reg = TC_INTFLAG_MC0;
|
tc->COUNT16.INTFLAG.reg = TC_INTFLAG_MC0;
|
||||||
|
@ -123,3 +125,7 @@ void pew_reset(void) {
|
||||||
}
|
}
|
||||||
MP_STATE_VM(pew_singleton) = NULL;
|
MP_STATE_VM(pew_singleton) = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint16_t pew_get_ticks() {
|
||||||
|
return pewpew_ticks;
|
||||||
|
}
|
||||||
|
|
|
@ -44,5 +44,6 @@ typedef struct {
|
||||||
void pew_init(void);
|
void pew_init(void);
|
||||||
void pewpew_interrupt_handler(uint8_t index);
|
void pewpew_interrupt_handler(uint8_t index);
|
||||||
void pew_reset(void);
|
void pew_reset(void);
|
||||||
|
uint16_t pew_get_ticks(void);
|
||||||
|
|
||||||
#endif // MICROPY_INCLUDED_PEW_PEWPEW_H
|
#endif // MICROPY_INCLUDED_PEW_PEWPEW_H
|
||||||
|
|
|
@ -97,7 +97,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
|
||||||
if (!gpio_get_pin_level(sda->number) || !gpio_get_pin_level(scl->number)) {
|
if (!gpio_get_pin_level(sda->number) || !gpio_get_pin_level(scl->number)) {
|
||||||
reset_pin_number(sda->number);
|
reset_pin_number(sda->number);
|
||||||
reset_pin_number(scl->number);
|
reset_pin_number(scl->number);
|
||||||
mp_raise_RuntimeError(translate("SDA or SCL needs a pull up"));
|
mp_raise_RuntimeError(translate("No pull up found on SDA or SCL; check your wiring"));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -28,10 +28,10 @@
|
||||||
#include "shared-bindings/supervisor/Runtime.h"
|
#include "shared-bindings/supervisor/Runtime.h"
|
||||||
#include "supervisor/serial.h"
|
#include "supervisor/serial.h"
|
||||||
|
|
||||||
bool common_hal_get_serial_connected(void) {
|
bool common_hal_supervisor_runtime_get_serial_connected(void) {
|
||||||
return (bool) serial_connected();
|
return (bool) serial_connected();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool common_hal_get_serial_bytes_available(void) {
|
bool common_hal_supervisor_runtime_get_serial_bytes_available(void) {
|
||||||
return (bool) serial_bytes_available();
|
return (bool) serial_bytes_available();
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,10 +27,10 @@
|
||||||
#include "shared-bindings/supervisor/Runtime.h"
|
#include "shared-bindings/supervisor/Runtime.h"
|
||||||
#include "supervisor/serial.h"
|
#include "supervisor/serial.h"
|
||||||
|
|
||||||
bool common_hal_get_serial_connected(void) {
|
bool common_hal_supervisor_runtime_get_serial_connected(void) {
|
||||||
return (bool) serial_connected();
|
return (bool) serial_connected();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool common_hal_get_serial_bytes_available(void) {
|
bool common_hal_supervisor_runtime_get_serial_bytes_available(void) {
|
||||||
return (bool) serial_bytes_available();
|
return (bool) serial_bytes_available();
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,7 +164,9 @@ LIBS += -lm
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# TinyUSB defines
|
# TinyUSB defines
|
||||||
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_ESP32S2 -DCFG_TUSB_OS=OPT_OS_FREERTOS -DCFG_TUD_CDC_RX_BUFSIZE=1024 -DCFG_TUD_CDC_TX_BUFSIZE=1024 -DCFG_TUD_MSC_BUFSIZE=4096 -DCFG_TUD_MIDI_RX_BUFSIZE=128 -DCFG_TUD_MIDI_TX_BUFSIZE=128
|
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_ESP32S2 -DCFG_TUSB_OS=OPT_OS_FREERTOS -DCFG_TUD_CDC_RX_BUFSIZE=1024 -DCFG_TUD_CDC_TX_BUFSIZE=1024
|
||||||
|
CFLAGS += -DCFG_TUD_MSC_BUFSIZE=4096 -DCFG_TUD_MIDI_RX_BUFSIZE=128 -DCFG_TUD_MIDI_TX_BUFSIZE=128
|
||||||
|
CFLAGS += -DCFG_TUD_VENDOR_RX_BUFSIZE=128 -DCFG_TUD_VENDOR_TX_BUFSIZE=128
|
||||||
|
|
||||||
|
|
||||||
######################################
|
######################################
|
||||||
|
|
|
@ -14,4 +14,10 @@ CIRCUITPY_ESP_FLASH_MODE=dio
|
||||||
CIRCUITPY_ESP_FLASH_FREQ=80m
|
CIRCUITPY_ESP_FLASH_FREQ=80m
|
||||||
CIRCUITPY_ESP_FLASH_SIZE=4MB
|
CIRCUITPY_ESP_FLASH_SIZE=4MB
|
||||||
|
|
||||||
|
# We only have enough endpoints available in hardware to
|
||||||
|
# enable ONE of these at a time.
|
||||||
|
CIRCUITPY_USB_MIDI = 1
|
||||||
|
CIRCUITPY_USB_HID = 0
|
||||||
|
CIRCUITPY_USB_VENDOR = 0
|
||||||
|
|
||||||
CIRCUITPY_MODULE=wrover
|
CIRCUITPY_MODULE=wrover
|
||||||
|
|
|
@ -27,6 +27,109 @@
|
||||||
#include "supervisor/board.h"
|
#include "supervisor/board.h"
|
||||||
#include "mpconfigboard.h"
|
#include "mpconfigboard.h"
|
||||||
#include "shared-bindings/microcontroller/Pin.h"
|
#include "shared-bindings/microcontroller/Pin.h"
|
||||||
|
#include "shared-module/displayio/__init__.h"
|
||||||
|
#include "shared-module/displayio/mipi_constants.h"
|
||||||
|
|
||||||
|
#define DELAY 0x80
|
||||||
|
|
||||||
|
// display init sequence according to LilyGO example app
|
||||||
|
uint8_t display_init_sequence[] = {
|
||||||
|
// sw reset
|
||||||
|
0x01, 0 | DELAY, 150,
|
||||||
|
// sleep out
|
||||||
|
0x11, 0 | DELAY, 255,
|
||||||
|
// normal display mode on
|
||||||
|
0x13, 0,
|
||||||
|
// display and color format settings
|
||||||
|
0x36, 1, 0x08,
|
||||||
|
0xB6, 2, 0x0A, 0x82,
|
||||||
|
0x3A, 1 | DELAY, 0x55, 10,
|
||||||
|
// ST7789V frame rate setting
|
||||||
|
0xB2, 5, 0x0C, 0x0C, 0x00, 0x33, 0x33,
|
||||||
|
// voltages: VGH / VGL
|
||||||
|
0xB7, 1, 0x35,
|
||||||
|
// ST7789V power setting
|
||||||
|
0xBB, 1, 0x28,
|
||||||
|
0xC0, 1, 0x0C,
|
||||||
|
0xC2, 2, 0x01, 0xFF,
|
||||||
|
0xC3, 1, 0x10,
|
||||||
|
0xC4, 1, 0x20,
|
||||||
|
0xC6, 1, 0x0F,
|
||||||
|
0xD0, 2, 0xA4, 0xA1,
|
||||||
|
// ST7789V gamma setting
|
||||||
|
0xE0, 14, 0xD0, 0x00, 0x02, 0x07, 0x0A, 0x28, 0x32, 0x44, 0x42, 0x06, 0x0E, 0x12, 0x14, 0x17,
|
||||||
|
0xE1, 14, 0xD0, 0x00, 0x02, 0x07, 0x0A, 0x28, 0x31, 0x54, 0x47, 0x0E, 0x1C, 0x17, 0x1B, 0x1E,
|
||||||
|
0x21, 0,
|
||||||
|
// display on
|
||||||
|
0x29, 0 | DELAY, 255,
|
||||||
|
};
|
||||||
|
|
||||||
|
static void display_init(void) {
|
||||||
|
busio_spi_obj_t* spi = &displays[0].fourwire_bus.inline_bus;
|
||||||
|
|
||||||
|
common_hal_busio_spi_construct(
|
||||||
|
spi,
|
||||||
|
&pin_GPIO36, // CLK
|
||||||
|
&pin_GPIO35, // MOSI
|
||||||
|
NULL // MISO not connected
|
||||||
|
);
|
||||||
|
|
||||||
|
common_hal_busio_spi_never_reset(spi);
|
||||||
|
|
||||||
|
displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus;
|
||||||
|
bus->base.type = &displayio_fourwire_type;
|
||||||
|
|
||||||
|
common_hal_displayio_fourwire_construct(
|
||||||
|
bus,
|
||||||
|
spi,
|
||||||
|
&pin_GPIO37, // DC
|
||||||
|
&pin_GPIO34, // CS
|
||||||
|
&pin_GPIO38, // RST
|
||||||
|
40000000, // baudrate
|
||||||
|
0, // polarity
|
||||||
|
0 // phase
|
||||||
|
);
|
||||||
|
|
||||||
|
displayio_display_obj_t* display = &displays[0].display;
|
||||||
|
display->base.type = &displayio_display_type;
|
||||||
|
|
||||||
|
// workaround as board_init() is called before reset_port() in main.c
|
||||||
|
pwmout_reset();
|
||||||
|
|
||||||
|
common_hal_displayio_display_construct(
|
||||||
|
display,
|
||||||
|
bus,
|
||||||
|
240, // width (after rotation)
|
||||||
|
135, // height (after rotation)
|
||||||
|
52, // column start
|
||||||
|
40, // row start
|
||||||
|
90, // rotation
|
||||||
|
16, // color depth
|
||||||
|
false, // grayscale
|
||||||
|
false, // pixels in a byte share a row. Only valid for depths < 8
|
||||||
|
1, // bytes per cell. Only valid for depths < 8
|
||||||
|
false, // reverse_pixels_in_byte. Only valid for depths < 8
|
||||||
|
true, // reverse_pixels_in_word
|
||||||
|
MIPI_COMMAND_SET_COLUMN_ADDRESS, // set column command
|
||||||
|
MIPI_COMMAND_SET_PAGE_ADDRESS, // set row command
|
||||||
|
MIPI_COMMAND_WRITE_MEMORY_START, // write memory command
|
||||||
|
0x37, // set vertical scroll command
|
||||||
|
display_init_sequence,
|
||||||
|
sizeof(display_init_sequence),
|
||||||
|
&pin_GPIO33, // backlight pin
|
||||||
|
NO_BRIGHTNESS_COMMAND,
|
||||||
|
1.0f, // brightness (ignored)
|
||||||
|
false, // auto_brightness
|
||||||
|
false, // single_byte_bounds
|
||||||
|
false, // data_as_commands
|
||||||
|
true, // auto_refresh
|
||||||
|
60, // native_frames_per_second
|
||||||
|
true, // backlight_on_high
|
||||||
|
false // SH1107_addressing
|
||||||
|
);
|
||||||
|
|
||||||
|
common_hal_never_reset_pin(&pin_GPIO33); // backlight pin
|
||||||
|
}
|
||||||
|
|
||||||
void board_init(void) {
|
void board_init(void) {
|
||||||
// USB
|
// USB
|
||||||
|
@ -38,6 +141,9 @@ void board_init(void) {
|
||||||
common_hal_never_reset_pin(&pin_GPIO43);
|
common_hal_never_reset_pin(&pin_GPIO43);
|
||||||
common_hal_never_reset_pin(&pin_GPIO44);
|
common_hal_never_reset_pin(&pin_GPIO44);
|
||||||
#endif /* DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
|
// Display
|
||||||
|
display_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool board_requests_safe_mode(void) {
|
bool board_requests_safe_mode(void) {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include "shared-bindings/board/__init__.h"
|
#include "shared-bindings/board/__init__.h"
|
||||||
|
#include "shared-module/displayio/__init__.h"
|
||||||
|
|
||||||
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||||
{ MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) },
|
{ MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) },
|
||||||
|
@ -41,13 +42,13 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||||
{ MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_GPIO10) },
|
{ MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_GPIO10) },
|
||||||
|
|
||||||
// 1.14 inch LCD ST7789
|
// 1.14 inch LCD ST7789
|
||||||
{ MP_ROM_QSTR(MP_QSTR_LCD_MISO), MP_ROM_PTR(&pin_GPIO4) },
|
|
||||||
{ MP_ROM_QSTR(MP_QSTR_LCD_MOSI), MP_ROM_PTR(&pin_GPIO35) },
|
{ MP_ROM_QSTR(MP_QSTR_LCD_MOSI), MP_ROM_PTR(&pin_GPIO35) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_LCD_CLK), MP_ROM_PTR(&pin_GPIO36) },
|
{ MP_ROM_QSTR(MP_QSTR_LCD_CLK), MP_ROM_PTR(&pin_GPIO36) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_LCD_CS), MP_ROM_PTR(&pin_GPIO34) },
|
{ MP_ROM_QSTR(MP_QSTR_LCD_CS), MP_ROM_PTR(&pin_GPIO34) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_LCD_RST), MP_ROM_PTR(&pin_GPIO38) },
|
{ MP_ROM_QSTR(MP_QSTR_LCD_RST), MP_ROM_PTR(&pin_GPIO38) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_LCD_BCKL), MP_ROM_PTR(&pin_GPIO33) },
|
{ MP_ROM_QSTR(MP_QSTR_LCD_BCKL), MP_ROM_PTR(&pin_GPIO33) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_LCD_D_C), MP_ROM_PTR(&pin_GPIO37) },
|
{ MP_ROM_QSTR(MP_QSTR_LCD_D_C), MP_ROM_PTR(&pin_GPIO37) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display) },
|
||||||
|
|
||||||
// Peripheral Power control
|
// Peripheral Power control
|
||||||
{ MP_ROM_QSTR(MP_QSTR_PE_POWER), MP_ROM_PTR(&pin_GPIO14) },
|
{ MP_ROM_QSTR(MP_QSTR_PE_POWER), MP_ROM_PTR(&pin_GPIO14) },
|
||||||
|
|
|
@ -150,6 +150,14 @@ void common_hal_alarm_set_deep_sleep_alarms(size_t n_alarms, const mp_obj_t *ala
|
||||||
void NORETURN alarm_enter_deep_sleep(void) {
|
void NORETURN alarm_enter_deep_sleep(void) {
|
||||||
alarm_pin_pinalarm_prepare_for_deep_sleep();
|
alarm_pin_pinalarm_prepare_for_deep_sleep();
|
||||||
alarm_touch_touchalarm_prepare_for_deep_sleep();
|
alarm_touch_touchalarm_prepare_for_deep_sleep();
|
||||||
|
|
||||||
|
// Disable brownout detection, which appears to be triggered sometimes when
|
||||||
|
// waking from deep sleep.
|
||||||
|
// See https://www.esp32.com/viewtopic.php?f=13&t=19208#p71084
|
||||||
|
// and https://github.com/adafruit/circuitpython/issues/4025#issuecomment-771027606
|
||||||
|
// TODO: We can remove this workaround when ESP-IDF handles this.
|
||||||
|
CLEAR_PERI_REG_MASK(RTC_CNTL_BROWN_OUT_REG, RTC_CNTL_BROWN_OUT_RST_ENA);
|
||||||
|
|
||||||
// The ESP-IDF caches the deep sleep settings and applies them before 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.
|
// We don't need to worry about resetting them in the interim.
|
||||||
esp_deep_sleep_start();
|
esp_deep_sleep_start();
|
||||||
|
|
|
@ -63,6 +63,9 @@ void common_hal_audiobusio_i2sout_construct(audiobusio_i2sout_obj_t* self,
|
||||||
self->bit_clock = bit_clock;
|
self->bit_clock = bit_clock;
|
||||||
self->word_select = word_select;
|
self->word_select = word_select;
|
||||||
self->data = data;
|
self->data = data;
|
||||||
|
claim_pin(bit_clock);
|
||||||
|
claim_pin(word_select);
|
||||||
|
claim_pin(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool common_hal_audiobusio_i2sout_deinited(audiobusio_i2sout_obj_t* self) {
|
bool common_hal_audiobusio_i2sout_deinited(audiobusio_i2sout_obj_t* self) {
|
||||||
|
|
|
@ -85,7 +85,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
|
||||||
if (gpio_get_level(sda->number) == 0 || gpio_get_level(scl->number) == 0) {
|
if (gpio_get_level(sda->number) == 0 || gpio_get_level(scl->number) == 0) {
|
||||||
reset_pin_number(sda->number);
|
reset_pin_number(sda->number);
|
||||||
reset_pin_number(scl->number);
|
reset_pin_number(scl->number);
|
||||||
mp_raise_RuntimeError(translate("SDA or SCL needs a pull up"));
|
mp_raise_RuntimeError(translate("No pull up found on SDA or SCL; check your wiring"));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
*
|
*
|
||||||
* The MIT License (MIT)
|
* The MIT License (MIT)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
|
|
||||||
* Copyright (c) 2020 Lucian Copeland for Adafruit Industries
|
* Copyright (c) 2020 Lucian Copeland for Adafruit Industries
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
@ -38,16 +37,15 @@
|
||||||
#include "components/lwip/lwip/src/include/lwip/sys.h"
|
#include "components/lwip/lwip/src/include/lwip/sys.h"
|
||||||
#include "components/lwip/lwip/src/include/lwip/netdb.h"
|
#include "components/lwip/lwip/src/include/lwip/netdb.h"
|
||||||
|
|
||||||
STATIC socketpool_socket_obj_t * open_socket_handles[CONFIG_LWIP_MAX_SOCKETS]; // 4 on the wrover/wroom
|
STATIC socketpool_socket_obj_t * open_socket_handles[CONFIG_LWIP_MAX_SOCKETS];
|
||||||
|
|
||||||
void socket_reset(void) {
|
void socket_reset(void) {
|
||||||
for (size_t i = 0; i < MP_ARRAY_SIZE(open_socket_handles); i++) {
|
for (size_t i = 0; i < MP_ARRAY_SIZE(open_socket_handles); i++) {
|
||||||
if (open_socket_handles[i]) {
|
if (open_socket_handles[i]) {
|
||||||
if (open_socket_handles[i]->num > 0) {
|
if (open_socket_handles[i]->num > 0) {
|
||||||
|
// Close automatically clears socket handle
|
||||||
common_hal_socketpool_socket_close(open_socket_handles[i]);
|
common_hal_socketpool_socket_close(open_socket_handles[i]);
|
||||||
open_socket_handles[i] = NULL;
|
|
||||||
} else {
|
} else {
|
||||||
// accidentally got a TCP socket in here, or something.
|
|
||||||
open_socket_handles[i] = NULL;
|
open_socket_handles[i] = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,73 +62,14 @@ bool register_open_socket(socketpool_socket_obj_t* self) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC void _lazy_init_LWIP(socketpool_socket_obj_t* self) {
|
|
||||||
if (self->num != -1) {
|
|
||||||
return; //safe to call on existing socket
|
|
||||||
}
|
|
||||||
if (self->tls != NULL) {
|
|
||||||
mp_raise_RuntimeError(translate("Invalid use of TLS Socket"));
|
|
||||||
}
|
|
||||||
int socknum = -1;
|
|
||||||
socknum = lwip_socket(self->family, self->type, self->ipproto);
|
|
||||||
if (socknum < 0 || !register_open_socket(self)) {
|
|
||||||
mp_raise_RuntimeError(translate("Out of sockets"));
|
|
||||||
}
|
|
||||||
self->num = socknum;
|
|
||||||
lwip_fcntl(socknum, F_SETFL, O_NONBLOCK);
|
|
||||||
}
|
|
||||||
|
|
||||||
STATIC void _lazy_init_TLS(socketpool_socket_obj_t* self) {
|
|
||||||
if (self->type != SOCK_STREAM || self->num != -1) {
|
|
||||||
mp_raise_RuntimeError(translate("Invalid socket for TLS"));
|
|
||||||
}
|
|
||||||
esp_tls_t* tls_handle = esp_tls_init();
|
|
||||||
if (tls_handle == NULL) {
|
|
||||||
mp_raise_espidf_MemoryError();
|
|
||||||
}
|
|
||||||
self->tls = tls_handle;
|
|
||||||
}
|
|
||||||
|
|
||||||
void common_hal_socketpool_socket_settimeout(socketpool_socket_obj_t* self, mp_uint_t timeout_ms) {
|
|
||||||
self->timeout_ms = timeout_ms;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool common_hal_socketpool_socket_bind(socketpool_socket_obj_t* self,
|
|
||||||
const char* host, size_t hostlen, uint8_t port) {
|
|
||||||
_lazy_init_LWIP(self);
|
|
||||||
|
|
||||||
struct sockaddr_in bind_addr;
|
|
||||||
bind_addr.sin_addr.s_addr = inet_addr(host);
|
|
||||||
bind_addr.sin_family = AF_INET;
|
|
||||||
bind_addr.sin_port = htons(port);
|
|
||||||
|
|
||||||
int opt = 1;
|
|
||||||
int err = lwip_setsockopt(self->num, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));
|
|
||||||
if (err != 0) {
|
|
||||||
mp_raise_RuntimeError(translate("Issue setting SO_REUSEADDR"));
|
|
||||||
}
|
|
||||||
int result = lwip_bind(self->num, (struct sockaddr *)&bind_addr, sizeof(bind_addr)) == 0;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool common_hal_socketpool_socket_listen(socketpool_socket_obj_t* self, int backlog) {
|
|
||||||
return lwip_listen(self->num, backlog) == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
socketpool_socket_obj_t* common_hal_socketpool_socket_accept(socketpool_socket_obj_t* self,
|
socketpool_socket_obj_t* common_hal_socketpool_socket_accept(socketpool_socket_obj_t* self,
|
||||||
uint8_t* ip, uint *port) {
|
uint8_t* ip, uint32_t *port) {
|
||||||
struct sockaddr_in accept_addr;
|
struct sockaddr_in accept_addr;
|
||||||
socklen_t socklen = sizeof(accept_addr);
|
socklen_t socklen = sizeof(accept_addr);
|
||||||
int newsoc = -1;
|
int newsoc = -1;
|
||||||
bool timed_out = false;
|
bool timed_out = false;
|
||||||
uint64_t start_ticks = supervisor_ticks_ms64();
|
uint64_t start_ticks = supervisor_ticks_ms64();
|
||||||
|
|
||||||
if (self->timeout_ms != (uint)-1) {
|
|
||||||
mp_printf(&mp_plat_print, "will timeout");
|
|
||||||
} else {
|
|
||||||
mp_printf(&mp_plat_print, "won't timeout");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Allow timeouts and interrupts
|
// Allow timeouts and interrupts
|
||||||
while (newsoc == -1 &&
|
while (newsoc == -1 &&
|
||||||
!timed_out &&
|
!timed_out &&
|
||||||
|
@ -140,7 +79,7 @@ socketpool_socket_obj_t* common_hal_socketpool_socket_accept(socketpool_socket_o
|
||||||
}
|
}
|
||||||
RUN_BACKGROUND_TASKS;
|
RUN_BACKGROUND_TASKS;
|
||||||
newsoc = lwip_accept(self->num, (struct sockaddr *)&accept_addr, &socklen);
|
newsoc = lwip_accept(self->num, (struct sockaddr *)&accept_addr, &socklen);
|
||||||
// In non-blocking mode, fail instead of looping
|
// In non-blocking mode, fail instead of timing out
|
||||||
if (newsoc == -1 && self->timeout_ms == 0) {
|
if (newsoc == -1 && self->timeout_ms == 0) {
|
||||||
mp_raise_OSError(MP_EAGAIN);
|
mp_raise_OSError(MP_EAGAIN);
|
||||||
}
|
}
|
||||||
|
@ -159,9 +98,8 @@ socketpool_socket_obj_t* common_hal_socketpool_socket_accept(socketpool_socket_o
|
||||||
socketpool_socket_obj_t *sock = m_new_obj_with_finaliser(socketpool_socket_obj_t);
|
socketpool_socket_obj_t *sock = m_new_obj_with_finaliser(socketpool_socket_obj_t);
|
||||||
sock->base.type = &socketpool_socket_type;
|
sock->base.type = &socketpool_socket_type;
|
||||||
sock->num = newsoc;
|
sock->num = newsoc;
|
||||||
sock->tls = NULL;
|
|
||||||
sock->ssl_context = NULL;
|
|
||||||
sock->pool = self->pool;
|
sock->pool = self->pool;
|
||||||
|
sock->connected = true;
|
||||||
|
|
||||||
if (!register_open_socket(sock)) {
|
if (!register_open_socket(sock)) {
|
||||||
mp_raise_OSError(MP_EBADF);
|
mp_raise_OSError(MP_EBADF);
|
||||||
|
@ -175,182 +113,97 @@ socketpool_socket_obj_t* common_hal_socketpool_socket_accept(socketpool_socket_o
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool common_hal_socketpool_socket_bind(socketpool_socket_obj_t* self,
|
||||||
|
const char* host, size_t hostlen, uint32_t port) {
|
||||||
|
struct sockaddr_in bind_addr;
|
||||||
|
bind_addr.sin_addr.s_addr = inet_addr(host);
|
||||||
|
bind_addr.sin_family = AF_INET;
|
||||||
|
bind_addr.sin_port = htons(port);
|
||||||
|
|
||||||
|
int opt = 1;
|
||||||
|
int err = lwip_setsockopt(self->num, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));
|
||||||
|
if (err != 0) {
|
||||||
|
mp_raise_RuntimeError(translate("Cannot set socket options"));
|
||||||
|
}
|
||||||
|
int result = lwip_bind(self->num, (struct sockaddr *)&bind_addr, sizeof(bind_addr)) == 0;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
void common_hal_socketpool_socket_close(socketpool_socket_obj_t* self) {
|
||||||
|
self->connected = false;
|
||||||
|
if (self->num >= 0) {
|
||||||
|
lwip_shutdown(self->num, 0);
|
||||||
|
lwip_close(self->num);
|
||||||
|
self->num = -1;
|
||||||
|
}
|
||||||
|
// Remove socket record
|
||||||
|
for (size_t i = 0; i < MP_ARRAY_SIZE(open_socket_handles); i++) {
|
||||||
|
if (open_socket_handles[i] == self) {
|
||||||
|
open_socket_handles[i] = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool common_hal_socketpool_socket_connect(socketpool_socket_obj_t* self,
|
bool common_hal_socketpool_socket_connect(socketpool_socket_obj_t* self,
|
||||||
const char* host, mp_uint_t hostlen, mp_int_t port) {
|
const char* host, size_t hostlen, uint32_t port) {
|
||||||
// For simplicity we use esp_tls for all TCP connections. If it's not SSL, ssl_context will be
|
|
||||||
// NULL and should still work. This makes regular TCP connections more memory expensive but TLS
|
|
||||||
// should become more and more common. Therefore, we optimize for the TLS case.
|
|
||||||
|
|
||||||
// Todo: move to SSL Wrapper and add lwip_connect()
|
|
||||||
_lazy_init_TLS(self);
|
|
||||||
|
|
||||||
esp_tls_cfg_t* tls_config = NULL;
|
|
||||||
if (self->ssl_context != NULL) {
|
|
||||||
tls_config = &self->ssl_context->ssl_config;
|
|
||||||
}
|
|
||||||
int result = esp_tls_conn_new_sync(host, hostlen, port, tls_config, self->tls);
|
|
||||||
self->connected = result >= 0;
|
|
||||||
if (result < 0) {
|
|
||||||
int esp_tls_code;
|
|
||||||
int flags;
|
|
||||||
esp_err_t err = esp_tls_get_and_clear_last_error(self->tls->error_handle, &esp_tls_code, &flags);
|
|
||||||
|
|
||||||
if (err == ESP_ERR_MBEDTLS_SSL_SETUP_FAILED) {
|
|
||||||
mp_raise_espidf_MemoryError();
|
|
||||||
} else if (ESP_ERR_MBEDTLS_SSL_HANDSHAKE_FAILED) {
|
|
||||||
mp_raise_OSError_msg_varg(translate("Failed SSL handshake"));
|
|
||||||
} else {
|
|
||||||
mp_raise_OSError_msg_varg(translate("Unhandled ESP TLS error %d %d %x %d"), esp_tls_code, flags, err, result);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Connection successful, set the timeout on the underlying socket. We can't rely on the IDF
|
|
||||||
// to do it because the config structure is only used for TLS connections. Generally, we
|
|
||||||
// shouldn't hit this timeout because we try to only read available data. However, there is
|
|
||||||
// always a chance that we try to read something that is used internally.
|
|
||||||
int fd;
|
|
||||||
esp_tls_get_conn_sockfd(self->tls, &fd);
|
|
||||||
struct timeval tv;
|
|
||||||
tv.tv_sec = 2 * 60; // Two minutes
|
|
||||||
tv.tv_usec = 0;
|
|
||||||
setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
|
|
||||||
setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv));
|
|
||||||
}
|
|
||||||
|
|
||||||
return self->connected;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool common_hal_socketpool_socket_get_connected(socketpool_socket_obj_t* self) {
|
|
||||||
return self->connected;
|
|
||||||
}
|
|
||||||
|
|
||||||
mp_uint_t common_hal_socketpool_socket_send(socketpool_socket_obj_t* self, const uint8_t* buf, mp_uint_t len) {
|
|
||||||
int sent = -1;
|
|
||||||
if (self->num != -1) {
|
|
||||||
// LWIP Socket
|
|
||||||
// TODO: deal with potential failure/add timeout?
|
|
||||||
sent = lwip_send(self->num, buf, len, 0);
|
|
||||||
} else if (self->tls != NULL) {
|
|
||||||
// TLS Socket
|
|
||||||
sent = esp_tls_conn_write(self->tls, buf, len);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sent < 0) {
|
|
||||||
mp_raise_OSError(MP_ENOTCONN);
|
|
||||||
}
|
|
||||||
return sent;
|
|
||||||
}
|
|
||||||
|
|
||||||
mp_uint_t common_hal_socketpool_socket_recv_into(socketpool_socket_obj_t* self, const uint8_t* buf, mp_uint_t len) {
|
|
||||||
int received = 0;
|
|
||||||
bool timed_out = false;
|
|
||||||
|
|
||||||
if (self->num != -1) {
|
|
||||||
// LWIP Socket
|
|
||||||
uint64_t start_ticks = supervisor_ticks_ms64();
|
|
||||||
received = -1;
|
|
||||||
while (received == -1 &&
|
|
||||||
!timed_out &&
|
|
||||||
!mp_hal_is_interrupted()) {
|
|
||||||
if (self->timeout_ms != (uint)-1 && self->timeout_ms != 0) {
|
|
||||||
timed_out = supervisor_ticks_ms64() - start_ticks >= self->timeout_ms;
|
|
||||||
}
|
|
||||||
RUN_BACKGROUND_TASKS;
|
|
||||||
received = lwip_recv(self->num, (void*) buf, len - 1, 0);
|
|
||||||
|
|
||||||
// In non-blocking mode, fail instead of looping
|
|
||||||
if (received == -1 && self->timeout_ms == 0) {
|
|
||||||
mp_raise_OSError(MP_EAGAIN);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (self->tls != NULL) {
|
|
||||||
// TLS Socket
|
|
||||||
int status = 0;
|
|
||||||
uint64_t start_ticks = supervisor_ticks_ms64();
|
|
||||||
int sockfd;
|
|
||||||
esp_err_t err = esp_tls_get_conn_sockfd(self->tls, &sockfd);
|
|
||||||
if (err != ESP_OK) {
|
|
||||||
mp_raise_OSError(MP_EBADF);
|
|
||||||
}
|
|
||||||
while (received == 0 &&
|
|
||||||
status >= 0 &&
|
|
||||||
!timed_out &&
|
|
||||||
!mp_hal_is_interrupted()) {
|
|
||||||
if (self->timeout_ms != (uint)-1) {
|
|
||||||
timed_out = self->timeout_ms == 0 || supervisor_ticks_ms64() - start_ticks >= self->timeout_ms;
|
|
||||||
}
|
|
||||||
RUN_BACKGROUND_TASKS;
|
|
||||||
size_t available = esp_tls_get_bytes_avail(self->tls);
|
|
||||||
if (available == 0) {
|
|
||||||
// This reads the raw socket buffer and is used for non-TLS connections
|
|
||||||
// and between encrypted TLS blocks.
|
|
||||||
status = lwip_ioctl(sockfd, FIONREAD, &available);
|
|
||||||
}
|
|
||||||
size_t remaining = len - received;
|
|
||||||
if (available > remaining) {
|
|
||||||
available = remaining;
|
|
||||||
}
|
|
||||||
if (available > 0) {
|
|
||||||
status = esp_tls_conn_read(self->tls, (void*) buf + received, available);
|
|
||||||
if (status == 0) {
|
|
||||||
// Reading zero when something is available indicates a closed
|
|
||||||
// connection. (The available bytes could have been TLS internal.)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (status > 0) {
|
|
||||||
received += status;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Socket does not have a valid descriptor of either type
|
|
||||||
mp_raise_OSError(MP_EBADF);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (timed_out) {
|
|
||||||
mp_raise_OSError(ETIMEDOUT);
|
|
||||||
}
|
|
||||||
return received;
|
|
||||||
}
|
|
||||||
|
|
||||||
mp_uint_t common_hal_socketpool_socket_sendto(socketpool_socket_obj_t* self,
|
|
||||||
const char* host, size_t hostlen, uint8_t port, const uint8_t* buf, mp_uint_t len) {
|
|
||||||
|
|
||||||
_lazy_init_LWIP(self);
|
|
||||||
|
|
||||||
// Get the IP address string
|
|
||||||
const struct addrinfo hints = {
|
const struct addrinfo hints = {
|
||||||
.ai_family = AF_INET,
|
.ai_family = AF_INET,
|
||||||
.ai_socktype = SOCK_STREAM,
|
.ai_socktype = SOCK_STREAM,
|
||||||
};
|
};
|
||||||
struct addrinfo *result;
|
struct addrinfo *result_i;
|
||||||
int error = lwip_getaddrinfo(host, NULL, &hints, &result);
|
int error = lwip_getaddrinfo(host, NULL, &hints, &result_i);
|
||||||
if (error != 0 || result == NULL) {
|
if (error != 0 || result_i == NULL) {
|
||||||
return 0;
|
mp_raise_OSError(EHOSTUNREACH);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set parameters
|
// Set parameters
|
||||||
struct sockaddr_in dest_addr;
|
struct sockaddr_in dest_addr;
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wcast-align"
|
#pragma GCC diagnostic ignored "-Wcast-align"
|
||||||
dest_addr.sin_addr.s_addr = ((struct sockaddr_in *)result->ai_addr)->sin_addr.s_addr;
|
dest_addr.sin_addr.s_addr = ((struct sockaddr_in *)result_i->ai_addr)->sin_addr.s_addr;
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
freeaddrinfo(result);
|
freeaddrinfo(result_i);
|
||||||
|
|
||||||
dest_addr.sin_family = AF_INET;
|
dest_addr.sin_family = AF_INET;
|
||||||
dest_addr.sin_port = htons(port);
|
dest_addr.sin_port = htons(port);
|
||||||
|
|
||||||
int bytes_sent = lwip_sendto(self->num, buf, len, 0, (struct sockaddr *)&dest_addr, sizeof(dest_addr));
|
// Replace above with function call -----
|
||||||
if (bytes_sent < 0) {
|
|
||||||
mp_raise_BrokenPipeError();
|
// Switch to blocking mode for this one call
|
||||||
return 0;
|
int opts;
|
||||||
|
opts = lwip_fcntl(self->num,F_GETFL,0);
|
||||||
|
opts = opts & (~O_NONBLOCK);
|
||||||
|
lwip_fcntl(self->num, F_SETFL, opts);
|
||||||
|
|
||||||
|
int result = -1;
|
||||||
|
result = lwip_connect(self->num, (struct sockaddr *)&dest_addr, sizeof(struct sockaddr_in));
|
||||||
|
|
||||||
|
// Switch back once complete
|
||||||
|
opts = opts | O_NONBLOCK;
|
||||||
|
lwip_fcntl(self->num, F_SETFL, opts);
|
||||||
|
|
||||||
|
if (result >= 0) {
|
||||||
|
self->connected = true;
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
mp_raise_OSError(errno);
|
||||||
}
|
}
|
||||||
return bytes_sent;
|
}
|
||||||
|
|
||||||
|
bool common_hal_socketpool_socket_get_closed(socketpool_socket_obj_t* self) {
|
||||||
|
return self->num < 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool common_hal_socketpool_socket_get_connected(socketpool_socket_obj_t* self) {
|
||||||
|
return self->connected;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool common_hal_socketpool_socket_listen(socketpool_socket_obj_t* self, int backlog) {
|
||||||
|
return lwip_listen(self->num, backlog) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
mp_uint_t common_hal_socketpool_socket_recvfrom_into(socketpool_socket_obj_t* self,
|
mp_uint_t common_hal_socketpool_socket_recvfrom_into(socketpool_socket_obj_t* self,
|
||||||
uint8_t* buf, mp_uint_t len, uint8_t* ip, uint *port) {
|
uint8_t* buf, uint32_t len, uint8_t* ip, uint *port) {
|
||||||
|
|
||||||
_lazy_init_LWIP(self);
|
|
||||||
|
|
||||||
struct sockaddr_in source_addr;
|
struct sockaddr_in source_addr;
|
||||||
socklen_t socklen = sizeof(source_addr);
|
socklen_t socklen = sizeof(source_addr);
|
||||||
|
@ -362,7 +215,7 @@ mp_uint_t common_hal_socketpool_socket_recvfrom_into(socketpool_socket_obj_t* se
|
||||||
while (received == -1 &&
|
while (received == -1 &&
|
||||||
!timed_out &&
|
!timed_out &&
|
||||||
!mp_hal_is_interrupted()) {
|
!mp_hal_is_interrupted()) {
|
||||||
if (self->timeout_ms != (uint)-1 && self->timeout_ms != 0) {
|
if (self->timeout_ms != (uint)-1 && self->timeout_ms != 0) {
|
||||||
timed_out = supervisor_ticks_ms64() - start_ticks >= self->timeout_ms;
|
timed_out = supervisor_ticks_ms64() - start_ticks >= self->timeout_ms;
|
||||||
}
|
}
|
||||||
RUN_BACKGROUND_TASKS;
|
RUN_BACKGROUND_TASKS;
|
||||||
|
@ -389,24 +242,87 @@ mp_uint_t common_hal_socketpool_socket_recvfrom_into(socketpool_socket_obj_t* se
|
||||||
return received;
|
return received;
|
||||||
}
|
}
|
||||||
|
|
||||||
void common_hal_socketpool_socket_close(socketpool_socket_obj_t* self) {
|
mp_uint_t common_hal_socketpool_socket_recv_into(socketpool_socket_obj_t* self, const uint8_t* buf, uint32_t len) {
|
||||||
self->connected = false;
|
int received = 0;
|
||||||
if (self->tls != NULL) {
|
bool timed_out = false;
|
||||||
esp_tls_conn_destroy(self->tls);
|
|
||||||
self->tls = NULL;
|
if (self->num != -1) {
|
||||||
|
// LWIP Socket
|
||||||
|
uint64_t start_ticks = supervisor_ticks_ms64();
|
||||||
|
received = -1;
|
||||||
|
while (received == -1 &&
|
||||||
|
!timed_out &&
|
||||||
|
!mp_hal_is_interrupted()) {
|
||||||
|
if (self->timeout_ms != (uint)-1 && self->timeout_ms != 0) {
|
||||||
|
timed_out = supervisor_ticks_ms64() - start_ticks >= self->timeout_ms;
|
||||||
|
}
|
||||||
|
RUN_BACKGROUND_TASKS;
|
||||||
|
received = lwip_recv(self->num, (void*) buf, len, 0);
|
||||||
|
|
||||||
|
// In non-blocking mode, fail instead of looping
|
||||||
|
if (received == -1 && self->timeout_ms == 0) {
|
||||||
|
mp_raise_OSError(MP_EAGAIN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
mp_raise_OSError(MP_EBADF);
|
||||||
}
|
}
|
||||||
if (self->num >= 0) {
|
|
||||||
lwip_shutdown(self->num, 0);
|
if (timed_out) {
|
||||||
lwip_close(self->num);
|
mp_raise_OSError(ETIMEDOUT);
|
||||||
self->num = -1;
|
|
||||||
}
|
}
|
||||||
|
return received;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool common_hal_socketpool_socket_get_closed(socketpool_socket_obj_t* self) {
|
mp_uint_t common_hal_socketpool_socket_send(socketpool_socket_obj_t* self, const uint8_t* buf, uint32_t len) {
|
||||||
return self->tls == NULL && self->num < 0;
|
int sent = -1;
|
||||||
|
if (self->num != -1) {
|
||||||
|
// LWIP Socket
|
||||||
|
// TODO: deal with potential failure/add timeout?
|
||||||
|
sent = lwip_send(self->num, buf, len, 0);
|
||||||
|
} else {
|
||||||
|
mp_raise_OSError(MP_EBADF);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sent < 0) {
|
||||||
|
mp_raise_OSError(errno);
|
||||||
|
}
|
||||||
|
return sent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mp_uint_t common_hal_socketpool_socket_sendto(socketpool_socket_obj_t* self,
|
||||||
|
const char* host, size_t hostlen, uint32_t port, const uint8_t* buf, uint32_t len) {
|
||||||
|
|
||||||
mp_uint_t common_hal_socketpool_socket_get_hash(socketpool_socket_obj_t* self) {
|
// Set parameters
|
||||||
return self->num;
|
const struct addrinfo hints = {
|
||||||
|
.ai_family = AF_INET,
|
||||||
|
.ai_socktype = SOCK_STREAM,
|
||||||
|
};
|
||||||
|
struct addrinfo *result_i;
|
||||||
|
int error = lwip_getaddrinfo(host, NULL, &hints, &result_i);
|
||||||
|
if (error != 0 || result_i == NULL) {
|
||||||
|
mp_raise_OSError(EHOSTUNREACH);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set parameters
|
||||||
|
struct sockaddr_in dest_addr;
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wcast-align"
|
||||||
|
dest_addr.sin_addr.s_addr = ((struct sockaddr_in *)result_i->ai_addr)->sin_addr.s_addr;
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
freeaddrinfo(result_i);
|
||||||
|
|
||||||
|
dest_addr.sin_family = AF_INET;
|
||||||
|
dest_addr.sin_port = htons(port);
|
||||||
|
|
||||||
|
int bytes_sent = lwip_sendto(self->num, buf, len, 0, (struct sockaddr *)&dest_addr, sizeof(dest_addr));
|
||||||
|
if (bytes_sent < 0) {
|
||||||
|
mp_raise_BrokenPipeError();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return bytes_sent;
|
||||||
|
}
|
||||||
|
|
||||||
|
void common_hal_socketpool_socket_settimeout(socketpool_socket_obj_t* self, uint32_t timeout_ms) {
|
||||||
|
self->timeout_ms = timeout_ms;
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,8 +41,6 @@ typedef struct {
|
||||||
int family;
|
int family;
|
||||||
int ipproto;
|
int ipproto;
|
||||||
bool connected;
|
bool connected;
|
||||||
esp_tls_t* tls;
|
|
||||||
ssl_sslcontext_obj_t* ssl_context;
|
|
||||||
socketpool_socketpool_obj_t* pool;
|
socketpool_socketpool_obj_t* pool;
|
||||||
mp_uint_t timeout_ms;
|
mp_uint_t timeout_ms;
|
||||||
} socketpool_socket_obj_t;
|
} socketpool_socket_obj_t;
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "shared-bindings/socketpool/SocketPool.h"
|
#include "shared-bindings/socketpool/SocketPool.h"
|
||||||
|
#include "common-hal/socketpool/Socket.h"
|
||||||
|
|
||||||
#include "py/runtime.h"
|
#include "py/runtime.h"
|
||||||
#include "shared-bindings/wifi/__init__.h"
|
#include "shared-bindings/wifi/__init__.h"
|
||||||
|
@ -65,23 +66,23 @@ socketpool_socket_obj_t* common_hal_socketpool_socket(socketpool_socketpool_obj_
|
||||||
mp_raise_NotImplementedError(translate("Only IPv4 sockets supported"));
|
mp_raise_NotImplementedError(translate("Only IPv4 sockets supported"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Consider LWIP and MbedTLS "variant" sockets to be incompatible (for now)
|
|
||||||
// The variant of the socket is determined by whether the socket is wrapped
|
|
||||||
// by SSL. If no TLS handle is set in sslcontext_wrap_socket, the first call
|
|
||||||
// of bind() or connect() will create a LWIP socket with a corresponding
|
|
||||||
// socketnum.
|
|
||||||
// TODO: move MbedTLS to its own duplicate Socket or Server API, maybe?
|
|
||||||
socketpool_socket_obj_t *sock = m_new_obj_with_finaliser(socketpool_socket_obj_t);
|
socketpool_socket_obj_t *sock = m_new_obj_with_finaliser(socketpool_socket_obj_t);
|
||||||
sock->base.type = &socketpool_socket_type;
|
sock->base.type = &socketpool_socket_type;
|
||||||
sock->num = -1;
|
|
||||||
sock->type = socket_type;
|
sock->type = socket_type;
|
||||||
sock->family = addr_family;
|
sock->family = addr_family;
|
||||||
sock->ipproto = ipproto;
|
sock->ipproto = ipproto;
|
||||||
|
sock->pool = self;
|
||||||
sock->timeout_ms = (uint)-1;
|
sock->timeout_ms = (uint)-1;
|
||||||
|
|
||||||
sock->tls = NULL;
|
// Create LWIP socket
|
||||||
sock->ssl_context = NULL;
|
int socknum = -1;
|
||||||
sock->pool = self;
|
socknum = lwip_socket(sock->family, sock->type, sock->ipproto);
|
||||||
|
if (socknum < 0 || !register_open_socket(sock)) {
|
||||||
|
mp_raise_RuntimeError(translate("Out of sockets"));
|
||||||
|
}
|
||||||
|
sock->num = socknum;
|
||||||
|
// Sockets should be nonblocking in most cases
|
||||||
|
lwip_fcntl(socknum, F_SETFL, O_NONBLOCK);
|
||||||
return sock;
|
return sock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "shared-bindings/ssl/SSLContext.h"
|
#include "shared-bindings/ssl/SSLContext.h"
|
||||||
|
#include "shared-bindings/ssl/SSLSocket.h"
|
||||||
|
|
||||||
|
#include "bindings/espidf/__init__.h"
|
||||||
|
|
||||||
#include "py/runtime.h"
|
#include "py/runtime.h"
|
||||||
|
|
||||||
|
@ -32,10 +35,26 @@ void common_hal_ssl_sslcontext_construct(ssl_sslcontext_obj_t* self) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
socketpool_socket_obj_t* common_hal_ssl_sslcontext_wrap_socket(ssl_sslcontext_obj_t* self,
|
ssl_sslsocket_obj_t* common_hal_ssl_sslcontext_wrap_socket(ssl_sslcontext_obj_t* self,
|
||||||
socketpool_socket_obj_t* socket, bool server_side, const char* server_hostname) {
|
socketpool_socket_obj_t* socket, bool server_side, const char* server_hostname) {
|
||||||
|
|
||||||
socket->ssl_context = self;
|
if (socket->type != SOCK_STREAM) {
|
||||||
|
mp_raise_RuntimeError(translate("Invalid socket for TLS"));
|
||||||
|
}
|
||||||
|
|
||||||
|
ssl_sslsocket_obj_t *sock = m_new_obj_with_finaliser(ssl_sslsocket_obj_t);
|
||||||
|
sock->base.type = &ssl_sslsocket_type;
|
||||||
|
sock->ssl_context = self;
|
||||||
|
sock->sock = socket;
|
||||||
|
|
||||||
|
esp_tls_t* tls_handle = esp_tls_init();
|
||||||
|
if (tls_handle == NULL) {
|
||||||
|
mp_raise_espidf_MemoryError();
|
||||||
|
}
|
||||||
|
sock->tls = tls_handle;
|
||||||
|
|
||||||
|
// TODO: do something with the original socket? Don't call a close on the internal LWIP.
|
||||||
|
|
||||||
// Should we store server hostname on the socket in case connect is called with an ip?
|
// Should we store server hostname on the socket in case connect is called with an ip?
|
||||||
return socket;
|
return sock;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,176 @@
|
||||||
|
/*
|
||||||
|
* This file is part of the MicroPython project, http://micropython.org/
|
||||||
|
*
|
||||||
|
* The MIT License (MIT)
|
||||||
|
*
|
||||||
|
* Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
|
||||||
|
* Copyright (c) 2021 Lucian Copeland for Adafruit Industries
|
||||||
|
*
|
||||||
|
* 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/ssl/SSLSocket.h"
|
||||||
|
#include "shared-bindings/socketpool/Socket.h"
|
||||||
|
#include "shared-bindings/ssl/SSLContext.h"
|
||||||
|
|
||||||
|
#include "bindings/espidf/__init__.h"
|
||||||
|
#include "lib/utils/interrupt_char.h"
|
||||||
|
#include "py/mperrno.h"
|
||||||
|
#include "py/runtime.h"
|
||||||
|
#include "supervisor/shared/tick.h"
|
||||||
|
|
||||||
|
ssl_sslsocket_obj_t* common_hal_ssl_sslsocket_accept(ssl_sslsocket_obj_t* self,
|
||||||
|
uint8_t* ip, uint32_t *port) {
|
||||||
|
socketpool_socket_obj_t * sock = common_hal_socketpool_socket_accept(self->sock, ip, port);
|
||||||
|
ssl_sslsocket_obj_t * sslsock = common_hal_ssl_sslcontext_wrap_socket(self->ssl_context, sock, false, NULL);
|
||||||
|
return sslsock;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool common_hal_ssl_sslsocket_bind(ssl_sslsocket_obj_t* self,
|
||||||
|
const char* host, size_t hostlen, uint32_t port) {
|
||||||
|
return common_hal_socketpool_socket_bind(self->sock, host, hostlen, port);
|
||||||
|
}
|
||||||
|
|
||||||
|
void common_hal_ssl_sslsocket_close(ssl_sslsocket_obj_t* self) {
|
||||||
|
common_hal_socketpool_socket_close(self->sock);
|
||||||
|
esp_tls_conn_destroy(self->tls);
|
||||||
|
self->tls = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool common_hal_ssl_sslsocket_connect(ssl_sslsocket_obj_t* self,
|
||||||
|
const char* host, size_t hostlen, uint32_t port) {
|
||||||
|
esp_tls_cfg_t* tls_config = NULL;
|
||||||
|
tls_config = &self->ssl_context->ssl_config;
|
||||||
|
int result = esp_tls_conn_new_sync(host, hostlen, port, tls_config, self->tls);
|
||||||
|
self->sock->connected = result >= 0;
|
||||||
|
if (result < 0) {
|
||||||
|
int esp_tls_code;
|
||||||
|
int flags;
|
||||||
|
esp_err_t err = esp_tls_get_and_clear_last_error(self->tls->error_handle, &esp_tls_code, &flags);
|
||||||
|
|
||||||
|
if (err == ESP_ERR_MBEDTLS_SSL_SETUP_FAILED) {
|
||||||
|
mp_raise_espidf_MemoryError();
|
||||||
|
} else if (ESP_ERR_MBEDTLS_SSL_HANDSHAKE_FAILED) {
|
||||||
|
mp_raise_OSError_msg_varg(translate("Failed SSL handshake"));
|
||||||
|
} else {
|
||||||
|
mp_raise_OSError_msg_varg(translate("Unhandled ESP TLS error %d %d %x %d"), esp_tls_code, flags, err, result);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Connection successful, set the timeout on the underlying socket. We can't rely on the IDF
|
||||||
|
// to do it because the config structure is only used for TLS connections. Generally, we
|
||||||
|
// shouldn't hit this timeout because we try to only read available data. However, there is
|
||||||
|
// always a chance that we try to read something that is used internally.
|
||||||
|
int fd;
|
||||||
|
esp_tls_get_conn_sockfd(self->tls, &fd);
|
||||||
|
struct timeval tv;
|
||||||
|
tv.tv_sec = 2 * 60; // Two minutes
|
||||||
|
tv.tv_usec = 0;
|
||||||
|
setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
|
||||||
|
setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv));
|
||||||
|
}
|
||||||
|
|
||||||
|
return self->sock->connected;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool common_hal_ssl_sslsocket_get_closed(ssl_sslsocket_obj_t* self) {
|
||||||
|
return self->tls == NULL && self->sock->num < 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool common_hal_ssl_sslsocket_get_connected(ssl_sslsocket_obj_t* self) {
|
||||||
|
return self->sock->connected;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool common_hal_ssl_sslsocket_listen(ssl_sslsocket_obj_t* self, int backlog) {
|
||||||
|
return common_hal_socketpool_socket_listen(self->sock, backlog);
|
||||||
|
}
|
||||||
|
|
||||||
|
mp_uint_t common_hal_ssl_sslsocket_recv_into(ssl_sslsocket_obj_t* self, const uint8_t* buf, uint32_t len) {
|
||||||
|
int received = 0;
|
||||||
|
bool timed_out = false;
|
||||||
|
int status = 0;
|
||||||
|
uint64_t start_ticks = supervisor_ticks_ms64();
|
||||||
|
int sockfd;
|
||||||
|
esp_err_t err = esp_tls_get_conn_sockfd(self->tls, &sockfd);
|
||||||
|
if (err != ESP_OK) {
|
||||||
|
mp_raise_OSError(MP_EBADF);
|
||||||
|
}
|
||||||
|
while (received == 0 &&
|
||||||
|
status >= 0 &&
|
||||||
|
!timed_out &&
|
||||||
|
!mp_hal_is_interrupted()) {
|
||||||
|
if (self->sock->timeout_ms != (uint)-1 && self->sock->timeout_ms != 0) {
|
||||||
|
timed_out = self->sock->timeout_ms == 0 || supervisor_ticks_ms64() - start_ticks >= self->sock->timeout_ms;
|
||||||
|
}
|
||||||
|
RUN_BACKGROUND_TASKS;
|
||||||
|
size_t available = esp_tls_get_bytes_avail(self->tls);
|
||||||
|
if (available == 0) {
|
||||||
|
// This reads the raw socket buffer and is used for non-TLS connections
|
||||||
|
// and between encrypted TLS blocks.
|
||||||
|
status = lwip_ioctl(sockfd, FIONREAD, &available);
|
||||||
|
}
|
||||||
|
size_t remaining = len - received;
|
||||||
|
if (available > remaining) {
|
||||||
|
available = remaining;
|
||||||
|
}
|
||||||
|
if (available > 0) {
|
||||||
|
status = esp_tls_conn_read(self->tls, (void*) buf + received, available);
|
||||||
|
if (status == 0) {
|
||||||
|
// Reading zero when something is available indicates a closed
|
||||||
|
// connection. (The available bytes could have been TLS internal.)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (status > 0) {
|
||||||
|
received += status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// In non-blocking mode, fail instead of timing out
|
||||||
|
if (received==0 && self->sock->timeout_ms == 0) {
|
||||||
|
mp_raise_OSError(MP_EAGAIN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (timed_out) {
|
||||||
|
mp_raise_OSError(ETIMEDOUT);
|
||||||
|
}
|
||||||
|
return received;
|
||||||
|
}
|
||||||
|
|
||||||
|
mp_uint_t common_hal_ssl_sslsocket_send(ssl_sslsocket_obj_t* self, const uint8_t* buf, uint32_t len) {
|
||||||
|
int sent = -1;
|
||||||
|
sent = esp_tls_conn_write(self->tls, buf, len);
|
||||||
|
|
||||||
|
if (sent < 0) {
|
||||||
|
int esp_tls_code;
|
||||||
|
int flags;
|
||||||
|
esp_err_t err = esp_tls_get_and_clear_last_error(self->tls->error_handle, &esp_tls_code, &flags);
|
||||||
|
|
||||||
|
if (err == ESP_ERR_MBEDTLS_SSL_SETUP_FAILED) {
|
||||||
|
mp_raise_espidf_MemoryError();
|
||||||
|
} else if (ESP_ERR_MBEDTLS_SSL_HANDSHAKE_FAILED) {
|
||||||
|
mp_raise_OSError_msg_varg(translate("Failed SSL handshake"));
|
||||||
|
} else {
|
||||||
|
mp_raise_OSError_msg_varg(translate("Unhandled ESP TLS error %d %d %x %d"), esp_tls_code, flags, err, sent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sent;
|
||||||
|
}
|
||||||
|
|
||||||
|
void common_hal_ssl_sslsocket_settimeout(ssl_sslsocket_obj_t* self, uint32_t timeout_ms) {
|
||||||
|
self->sock->timeout_ms = timeout_ms;
|
||||||
|
}
|
|
@ -0,0 +1,44 @@
|
||||||
|
/*
|
||||||
|
* This file is part of the MicroPython project, http://micropython.org/
|
||||||
|
*
|
||||||
|
* The MIT License (MIT)
|
||||||
|
*
|
||||||
|
* Copyright (c) 2021 Lucian Copeland for Adafruit Industries
|
||||||
|
*
|
||||||
|
* 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_COMMON_HAL_SSL_SSLSOCKET_H
|
||||||
|
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SSL_SSLSOCKET_H
|
||||||
|
|
||||||
|
#include "py/obj.h"
|
||||||
|
|
||||||
|
#include "common-hal/ssl/SSLContext.h"
|
||||||
|
#include "common-hal/socketpool/Socket.h"
|
||||||
|
|
||||||
|
#include "components/esp-tls/esp_tls.h"
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
mp_obj_base_t base;
|
||||||
|
socketpool_socket_obj_t * sock;
|
||||||
|
esp_tls_t* tls;
|
||||||
|
ssl_sslcontext_obj_t* ssl_context;
|
||||||
|
} ssl_sslsocket_obj_t;
|
||||||
|
|
||||||
|
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SSL_SSLSOCKET_H
|
|
@ -28,10 +28,10 @@
|
||||||
#include "shared-bindings/supervisor/Runtime.h"
|
#include "shared-bindings/supervisor/Runtime.h"
|
||||||
#include "supervisor/serial.h"
|
#include "supervisor/serial.h"
|
||||||
|
|
||||||
bool common_hal_get_serial_connected(void) {
|
bool common_hal_supervisor_runtime_get_serial_connected(void) {
|
||||||
return (bool) serial_connected();
|
return (bool) serial_connected();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool common_hal_get_serial_bytes_available(void) {
|
bool common_hal_supervisor_runtime_get_serial_bytes_available(void) {
|
||||||
return (bool) serial_bytes_available();
|
return (bool) serial_bytes_available();
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,18 +28,18 @@ CIRCUITPY_FREQUENCYIO = 1
|
||||||
CIRCUITPY_I2CPERIPHERAL = 0
|
CIRCUITPY_I2CPERIPHERAL = 0
|
||||||
CIRCUITPY_ROTARYIO = 1
|
CIRCUITPY_ROTARYIO = 1
|
||||||
CIRCUITPY_NVM = 1
|
CIRCUITPY_NVM = 1
|
||||||
|
CIRCUITPY_PS2IO ?= 1
|
||||||
|
CIRCUITPY_TOUCHIO_USE_NATIVE ?= 1
|
||||||
# We don't have enough endpoints to include MIDI.
|
# We don't have enough endpoints to include MIDI.
|
||||||
CIRCUITPY_USB_MIDI = 0
|
CIRCUITPY_USB_MIDI ?= 0
|
||||||
|
CIRCUITPY_USB_HID ?= 1
|
||||||
|
# We have borrowed the VENDOR nomenclature from tinyusb. VENDOR AKA WEBUSB
|
||||||
|
CIRCUITPY_USB_VENDOR ?= 0
|
||||||
CIRCUITPY_WIFI = 1
|
CIRCUITPY_WIFI = 1
|
||||||
CIRCUITPY_WATCHDOG ?= 1
|
CIRCUITPY_WATCHDOG ?= 1
|
||||||
|
|
||||||
CIRCUITPY_ESPIDF = 1
|
CIRCUITPY_ESPIDF = 1
|
||||||
|
|
||||||
ifndef CIRCUITPY_PS2IO
|
|
||||||
CIRCUITPY_PS2IO = 1
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef CIRCUITPY_TOUCHIO_USE_NATIVE
|
|
||||||
CIRCUITPY_TOUCHIO_USE_NATIVE = 1
|
|
||||||
endif
|
|
||||||
|
|
||||||
CIRCUITPY_MODULE ?= none
|
CIRCUITPY_MODULE ?= none
|
||||||
|
|
||||||
|
USB_NUM_EP = 5
|
||||||
|
|
|
@ -28,10 +28,10 @@
|
||||||
#include "shared-bindings/supervisor/Runtime.h"
|
#include "shared-bindings/supervisor/Runtime.h"
|
||||||
#include "supervisor/serial.h"
|
#include "supervisor/serial.h"
|
||||||
|
|
||||||
bool common_hal_get_serial_connected(void) {
|
bool common_hal_supervisor_runtime_get_serial_connected(void) {
|
||||||
return (bool) serial_connected();
|
return (bool) serial_connected();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool common_hal_get_serial_bytes_available(void) {
|
bool common_hal_supervisor_runtime_get_serial_bytes_available(void) {
|
||||||
return (bool) serial_bytes_available();
|
return (bool) serial_bytes_available();
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,7 +110,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
|
||||||
if( !GPIO_PinRead(sda->gpio, sda->number) || !GPIO_PinRead(scl->gpio, scl->number)) {
|
if( !GPIO_PinRead(sda->gpio, sda->number) || !GPIO_PinRead(scl->gpio, scl->number)) {
|
||||||
common_hal_reset_pin(sda);
|
common_hal_reset_pin(sda);
|
||||||
common_hal_reset_pin(scl);
|
common_hal_reset_pin(scl);
|
||||||
mp_raise_RuntimeError(translate("SDA or SCL needs a pull up"));
|
mp_raise_RuntimeError(translate("No pull up found on SDA or SCL; check your wiring"));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,8 @@
|
||||||
|
|
||||||
#define LPSPI_MASTER_CLK_FREQ (CLOCK_GetFreq(kCLOCK_Usb1PllPfd0Clk) / (CLOCK_GetDiv(kCLOCK_LpspiDiv) + 1))
|
#define LPSPI_MASTER_CLK_FREQ (CLOCK_GetFreq(kCLOCK_Usb1PllPfd0Clk) / (CLOCK_GetDiv(kCLOCK_LpspiDiv) + 1))
|
||||||
|
|
||||||
|
#define MAX_SPI_BUSY_RETRIES 100
|
||||||
|
|
||||||
//arrays use 0 based numbering: SPI1 is stored at index 0
|
//arrays use 0 based numbering: SPI1 is stored at index 0
|
||||||
#define MAX_SPI 4
|
#define MAX_SPI 4
|
||||||
STATIC bool reserved_spi[MAX_SPI];
|
STATIC bool reserved_spi[MAX_SPI];
|
||||||
|
@ -289,7 +291,12 @@ bool common_hal_busio_spi_write(busio_spi_obj_t *self,
|
||||||
xfer.dataSize = len;
|
xfer.dataSize = len;
|
||||||
xfer.configFlags = kLPSPI_MasterPcs0;
|
xfer.configFlags = kLPSPI_MasterPcs0;
|
||||||
|
|
||||||
const status_t status = LPSPI_MasterTransferBlocking(self->spi, &xfer);
|
status_t status;
|
||||||
|
int retries = MAX_SPI_BUSY_RETRIES;
|
||||||
|
do {
|
||||||
|
status = LPSPI_MasterTransferBlocking(self->spi, &xfer);
|
||||||
|
} while (status == kStatus_LPSPI_Busy && --retries > 0);
|
||||||
|
|
||||||
if (status != kStatus_Success)
|
if (status != kStatus_Success)
|
||||||
printf("%s: status %ld\r\n", __func__, status);
|
printf("%s: status %ld\r\n", __func__, status);
|
||||||
|
|
||||||
|
@ -311,7 +318,12 @@ bool common_hal_busio_spi_read(busio_spi_obj_t *self,
|
||||||
xfer.rxData = data;
|
xfer.rxData = data;
|
||||||
xfer.dataSize = len;
|
xfer.dataSize = len;
|
||||||
|
|
||||||
const status_t status = LPSPI_MasterTransferBlocking(self->spi, &xfer);
|
status_t status;
|
||||||
|
int retries = MAX_SPI_BUSY_RETRIES;
|
||||||
|
do {
|
||||||
|
status = LPSPI_MasterTransferBlocking(self->spi, &xfer);
|
||||||
|
} while (status == kStatus_LPSPI_Busy && --retries > 0);
|
||||||
|
|
||||||
if (status != kStatus_Success)
|
if (status != kStatus_Success)
|
||||||
printf("%s: status %ld\r\n", __func__, status);
|
printf("%s: status %ld\r\n", __func__, status);
|
||||||
|
|
||||||
|
@ -333,7 +345,12 @@ bool common_hal_busio_spi_transfer(busio_spi_obj_t *self, const uint8_t *data_ou
|
||||||
xfer.rxData = data_in;
|
xfer.rxData = data_in;
|
||||||
xfer.dataSize = len;
|
xfer.dataSize = len;
|
||||||
|
|
||||||
const status_t status = LPSPI_MasterTransferBlocking(self->spi, &xfer);
|
status_t status;
|
||||||
|
int retries = MAX_SPI_BUSY_RETRIES;
|
||||||
|
do {
|
||||||
|
status = LPSPI_MasterTransferBlocking(self->spi, &xfer);
|
||||||
|
} while (status == kStatus_LPSPI_Busy && --retries > 0);
|
||||||
|
|
||||||
if (status != kStatus_Success)
|
if (status != kStatus_Success)
|
||||||
printf("%s: status %ld\r\n", __func__, status);
|
printf("%s: status %ld\r\n", __func__, status);
|
||||||
|
|
||||||
|
|
|
@ -28,10 +28,10 @@
|
||||||
#include "shared-bindings/supervisor/Runtime.h"
|
#include "shared-bindings/supervisor/Runtime.h"
|
||||||
#include "supervisor/serial.h"
|
#include "supervisor/serial.h"
|
||||||
|
|
||||||
bool common_hal_get_serial_connected(void) {
|
bool common_hal_supervisor_runtime_get_serial_connected(void) {
|
||||||
return (bool) serial_connected();
|
return (bool) serial_connected();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool common_hal_get_serial_bytes_available(void) {
|
bool common_hal_supervisor_runtime_get_serial_bytes_available(void) {
|
||||||
return (bool) serial_bytes_available();
|
return (bool) serial_bytes_available();
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,7 +131,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self, const mcu_pin_obj_t *
|
||||||
if (!nrf_gpio_pin_read(sda->number) || !nrf_gpio_pin_read(scl->number)) {
|
if (!nrf_gpio_pin_read(sda->number) || !nrf_gpio_pin_read(scl->number)) {
|
||||||
reset_pin_number(sda->number);
|
reset_pin_number(sda->number);
|
||||||
reset_pin_number(scl->number);
|
reset_pin_number(scl->number);
|
||||||
mp_raise_RuntimeError(translate("SDA or SCL needs a pull up"));
|
mp_raise_RuntimeError(translate("No pull up found on SDA or SCL; check your wiring"));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -99,6 +99,7 @@ INC += -I. \
|
||||||
-isystem sdk/src/rp2_common/pico_platform/include/ \
|
-isystem sdk/src/rp2_common/pico_platform/include/ \
|
||||||
-isystem sdk/src/rp2_common/pico_runtime/printf/include/ \
|
-isystem sdk/src/rp2_common/pico_runtime/printf/include/ \
|
||||||
-isystem sdk/src/rp2_common/pico_bootrom/include/ \
|
-isystem sdk/src/rp2_common/pico_bootrom/include/ \
|
||||||
|
-isystem sdk/src/rp2_common/pico_unique_id/include/ \
|
||||||
-Isdk_config \
|
-Isdk_config \
|
||||||
-I../../lib/tinyusb/src \
|
-I../../lib/tinyusb/src \
|
||||||
-I../../supervisor/shared/usb \
|
-I../../supervisor/shared/usb \
|
||||||
|
@ -184,6 +185,7 @@ SRC_SDK := \
|
||||||
src/rp2_common/pico_printf/printf.c \
|
src/rp2_common/pico_printf/printf.c \
|
||||||
src/rp2_common/pico_runtime/runtime.c \
|
src/rp2_common/pico_runtime/runtime.c \
|
||||||
src/rp2_common/pico_stdio/stdio.c \
|
src/rp2_common/pico_stdio/stdio.c \
|
||||||
|
src/rp2_common/pico_unique_id/unique_id.c \
|
||||||
|
|
||||||
SRC_SDK := $(addprefix sdk/, $(SRC_SDK))
|
SRC_SDK := $(addprefix sdk/, $(SRC_SDK))
|
||||||
|
|
||||||
|
|
|
@ -25,20 +25,11 @@
|
||||||
*/
|
*/
|
||||||
#include "background.h"
|
#include "background.h"
|
||||||
|
|
||||||
#include "supervisor/filesystem.h"
|
|
||||||
#include "supervisor/shared/tick.h"
|
|
||||||
#include "supervisor/usb.h"
|
|
||||||
|
|
||||||
#include "py/runtime.h"
|
#include "py/runtime.h"
|
||||||
#include "shared-module/network/__init__.h"
|
|
||||||
#include "supervisor/shared/stack.h"
|
|
||||||
#include "supervisor/port.h"
|
#include "supervisor/port.h"
|
||||||
|
|
||||||
#if CIRCUITPY_DISPLAYIO
|
|
||||||
#include "shared-module/displayio/__init__.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void port_start_background_task(void) {}
|
void port_start_background_task(void) {}
|
||||||
void port_finish_background_task(void) {}
|
void port_finish_background_task(void) {}
|
||||||
|
|
||||||
void port_background_task(void) {}
|
void port_background_task(void) {
|
||||||
|
}
|
||||||
|
|
|
@ -189,7 +189,7 @@ STATIC mp_obj_t rp2pio_statemachine_make_new(const mp_obj_type_t *type, size_t n
|
||||||
if (bufinfo.len % 2 != 0) {
|
if (bufinfo.len % 2 != 0) {
|
||||||
mp_raise_ValueError(translate("Program size invalid"));
|
mp_raise_ValueError(translate("Program size invalid"));
|
||||||
}
|
}
|
||||||
if (bufinfo.len > 32) {
|
if (bufinfo.len > 64) {
|
||||||
mp_raise_ValueError(translate("Program too large"));
|
mp_raise_ValueError(translate("Program too large"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||||
{ MP_ROM_QSTR(MP_QSTR_GP20), MP_ROM_PTR(&pin_GPIO20) },
|
{ MP_ROM_QSTR(MP_QSTR_GP20), MP_ROM_PTR(&pin_GPIO20) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_GP21), MP_ROM_PTR(&pin_GPIO21) },
|
{ MP_ROM_QSTR(MP_QSTR_GP21), MP_ROM_PTR(&pin_GPIO21) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) },
|
{ MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_SMPS_MODE), MP_ROM_PTR(&pin_GPIO23) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO25) },
|
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO25) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_GP25), MP_ROM_PTR(&pin_GPIO25) },
|
{ MP_ROM_QSTR(MP_QSTR_GP25), MP_ROM_PTR(&pin_GPIO25) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_GP26_A0), MP_ROM_PTR(&pin_GPIO26) },
|
{ MP_ROM_QSTR(MP_QSTR_GP26_A0), MP_ROM_PTR(&pin_GPIO26) },
|
||||||
|
@ -35,5 +36,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||||
{ MP_ROM_QSTR(MP_QSTR_GP28_A2), MP_ROM_PTR(&pin_GPIO28) },
|
{ MP_ROM_QSTR(MP_QSTR_GP28_A2), MP_ROM_PTR(&pin_GPIO28) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) },
|
{ MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) },
|
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_GPIO29) },
|
||||||
};
|
};
|
||||||
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
|
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
|
||||||
|
|
|
@ -1,20 +1,23 @@
|
||||||
// Padded and checksummed version of: /Users/graham/dev/mu/pico_sdk/cmake-build-debug-mu/src/rp2_common/boot_stage2/bs2_default.bin
|
// Padded and checksummed version of: /home/pi/pico/pico-examples/build/pico-sdk/src/rp2_common/boot_stage2/bs2_default.bin
|
||||||
|
|
||||||
.section .boot2, "a"
|
.cpu cortex-m0plus
|
||||||
|
.thumb
|
||||||
|
|
||||||
.byte 0x00, 0xb5, 0x2f, 0x4b, 0x21, 0x20, 0x58, 0x60, 0x98, 0x68, 0x02, 0x21, 0x88, 0x43, 0x98, 0x60
|
.section .boot2, "ax"
|
||||||
.byte 0xd8, 0x60, 0x18, 0x61, 0x58, 0x61, 0x2b, 0x4b, 0x00, 0x21, 0x99, 0x60, 0x02, 0x21, 0x59, 0x61
|
|
||||||
.byte 0x01, 0x21, 0xf0, 0x22, 0x99, 0x50, 0x28, 0x49, 0x19, 0x60, 0x01, 0x21, 0x99, 0x60, 0x35, 0x20
|
.byte 0x00, 0xb5, 0x32, 0x4b, 0x21, 0x20, 0x58, 0x60, 0x98, 0x68, 0x02, 0x21, 0x88, 0x43, 0x98, 0x60
|
||||||
.byte 0x00, 0xf0, 0x3e, 0xf8, 0x02, 0x22, 0x90, 0x42, 0x14, 0xd0, 0x06, 0x21, 0x19, 0x66, 0x00, 0xf0
|
.byte 0xd8, 0x60, 0x18, 0x61, 0x58, 0x61, 0x2e, 0x4b, 0x00, 0x21, 0x99, 0x60, 0x02, 0x21, 0x59, 0x61
|
||||||
.byte 0x2e, 0xf8, 0x19, 0x6e, 0x01, 0x21, 0x19, 0x66, 0x00, 0x20, 0x18, 0x66, 0x1a, 0x66, 0x00, 0xf0
|
.byte 0x01, 0x21, 0xf0, 0x22, 0x99, 0x50, 0x2b, 0x49, 0x19, 0x60, 0x01, 0x21, 0x99, 0x60, 0x35, 0x20
|
||||||
.byte 0x26, 0xf8, 0x19, 0x6e, 0x19, 0x6e, 0x19, 0x6e, 0x05, 0x20, 0x00, 0xf0, 0x29, 0xf8, 0x01, 0x21
|
.byte 0x00, 0xf0, 0x44, 0xf8, 0x02, 0x22, 0x90, 0x42, 0x14, 0xd0, 0x06, 0x21, 0x19, 0x66, 0x00, 0xf0
|
||||||
.byte 0x08, 0x42, 0xf9, 0xd1, 0x00, 0x21, 0x99, 0x60, 0x18, 0x49, 0x19, 0x60, 0x00, 0x21, 0x59, 0x60
|
.byte 0x34, 0xf8, 0x19, 0x6e, 0x01, 0x21, 0x19, 0x66, 0x00, 0x20, 0x18, 0x66, 0x1a, 0x66, 0x00, 0xf0
|
||||||
.byte 0x17, 0x49, 0x18, 0x48, 0x01, 0x60, 0x01, 0x21, 0x99, 0x60, 0xeb, 0x21, 0x19, 0x66, 0xa0, 0x21
|
.byte 0x2c, 0xf8, 0x19, 0x6e, 0x19, 0x6e, 0x19, 0x6e, 0x05, 0x20, 0x00, 0xf0, 0x2f, 0xf8, 0x01, 0x21
|
||||||
.byte 0x19, 0x66, 0x00, 0xf0, 0x0c, 0xf8, 0x00, 0x21, 0x99, 0x60, 0x13, 0x49, 0x11, 0x48, 0x01, 0x60
|
.byte 0x08, 0x42, 0xf9, 0xd1, 0x00, 0x21, 0x99, 0x60, 0x1b, 0x49, 0x19, 0x60, 0x00, 0x21, 0x59, 0x60
|
||||||
.byte 0x01, 0x21, 0x99, 0x60, 0x01, 0xbc, 0x00, 0x28, 0x00, 0xd1, 0x10, 0x48, 0x00, 0x47, 0x03, 0xb5
|
.byte 0x1a, 0x49, 0x1b, 0x48, 0x01, 0x60, 0x01, 0x21, 0x99, 0x60, 0xeb, 0x21, 0x19, 0x66, 0xa0, 0x21
|
||||||
.byte 0x99, 0x6a, 0x04, 0x20, 0x01, 0x42, 0xfb, 0xd0, 0x01, 0x20, 0x01, 0x42, 0xf8, 0xd1, 0x03, 0xbd
|
.byte 0x19, 0x66, 0x00, 0xf0, 0x12, 0xf8, 0x00, 0x21, 0x99, 0x60, 0x16, 0x49, 0x14, 0x48, 0x01, 0x60
|
||||||
.byte 0x02, 0xb5, 0x18, 0x66, 0x18, 0x66, 0xff, 0xf7, 0xf2, 0xff, 0x18, 0x6e, 0x18, 0x6e, 0x02, 0xbd
|
.byte 0x01, 0x21, 0x99, 0x60, 0x01, 0xbc, 0x00, 0x28, 0x00, 0xd0, 0x00, 0x47, 0x12, 0x48, 0x13, 0x49
|
||||||
.byte 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x07, 0x00, 0x00, 0x03, 0x5f, 0x00
|
.byte 0x08, 0x60, 0x03, 0xc8, 0x80, 0xf3, 0x08, 0x88, 0x08, 0x47, 0x03, 0xb5, 0x99, 0x6a, 0x04, 0x20
|
||||||
.byte 0x21, 0x22, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x18, 0x22, 0x20, 0x00, 0xa0, 0x01, 0x01, 0x00, 0x10
|
.byte 0x01, 0x42, 0xfb, 0xd0, 0x01, 0x20, 0x01, 0x42, 0xf8, 0xd1, 0x03, 0xbd, 0x02, 0xb5, 0x18, 0x66
|
||||||
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
.byte 0x18, 0x66, 0xff, 0xf7, 0xf2, 0xff, 0x18, 0x6e, 0x18, 0x6e, 0x02, 0xbd, 0x00, 0x00, 0x02, 0x40
|
||||||
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x27, 0x2a, 0x60
|
.byte 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x07, 0x00, 0x00, 0x03, 0x5f, 0x00, 0x21, 0x22, 0x00, 0x00
|
||||||
|
.byte 0xf4, 0x00, 0x00, 0x18, 0x22, 0x20, 0x00, 0xa0, 0x00, 0x01, 0x00, 0x10, 0x08, 0xed, 0x00, 0xe0
|
||||||
|
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xb2, 0x4e, 0x7a
|
||||||
|
|
|
@ -90,7 +90,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
|
||||||
if (!gpio_get(sda->number) || !gpio_get(scl->number)) {
|
if (!gpio_get(sda->number) || !gpio_get(scl->number)) {
|
||||||
reset_pin_number(sda->number);
|
reset_pin_number(sda->number);
|
||||||
reset_pin_number(scl->number);
|
reset_pin_number(scl->number);
|
||||||
mp_raise_RuntimeError(translate("SDA or SCL needs a pull up"));
|
mp_raise_RuntimeError(translate("No pull up found on SDA or SCL; check your wiring"));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include "py/mphal.h"
|
#include "py/mphal.h"
|
||||||
#include "common-hal/microcontroller/Processor.h"
|
#include "common-hal/microcontroller/Processor.h"
|
||||||
|
@ -53,12 +54,9 @@ uint32_t common_hal_mcu_processor_get_frequency(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void common_hal_mcu_processor_get_uid(uint8_t raw_id[]) {
|
void common_hal_mcu_processor_get_uid(uint8_t raw_id[]) {
|
||||||
// TODO: get the unique id from the flash. The chip itself doesn't have one.
|
pico_unique_board_id_t retrieved_id;
|
||||||
// for (int i=0; i<4; i++) {
|
pico_get_unique_board_id(&retrieved_id);
|
||||||
// for (int k=0; k<4; k++) {
|
memcpy(raw_id, retrieved_id.id, COMMON_HAL_MCU_PROCESSOR_UID_LENGTH);
|
||||||
// raw_id[4 * i + k] = (*(id_addresses[i]) >> k * 8) & 0xff;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mcu_reset_reason_t common_hal_mcu_processor_get_reset_reason(void) {
|
mcu_reset_reason_t common_hal_mcu_processor_get_reset_reason(void) {
|
||||||
|
|
|
@ -27,7 +27,9 @@
|
||||||
#ifndef MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_MICROCONTROLLER_PROCESSOR_H
|
#ifndef MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_MICROCONTROLLER_PROCESSOR_H
|
||||||
#define MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_MICROCONTROLLER_PROCESSOR_H
|
#define MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_MICROCONTROLLER_PROCESSOR_H
|
||||||
|
|
||||||
#define COMMON_HAL_MCU_PROCESSOR_UID_LENGTH 16
|
#include "src/rp2_common/pico_unique_id/include/pico/unique_id.h"
|
||||||
|
|
||||||
|
#define COMMON_HAL_MCU_PROCESSOR_UID_LENGTH PICO_UNIQUE_BOARD_ID_SIZE_BYTES
|
||||||
|
|
||||||
#include "py/obj.h"
|
#include "py/obj.h"
|
||||||
|
|
||||||
|
|
|
@ -35,12 +35,16 @@
|
||||||
#include "shared-bindings/microcontroller/__init__.h"
|
#include "shared-bindings/microcontroller/__init__.h"
|
||||||
#include "shared-bindings/microcontroller/Pin.h"
|
#include "shared-bindings/microcontroller/Pin.h"
|
||||||
#include "shared-bindings/microcontroller/Processor.h"
|
#include "shared-bindings/microcontroller/Processor.h"
|
||||||
|
#include "supervisor/filesystem.h"
|
||||||
|
#include "supervisor/port.h"
|
||||||
#include "supervisor/shared/safe_mode.h"
|
#include "supervisor/shared/safe_mode.h"
|
||||||
#include "supervisor/shared/translate.h"
|
#include "supervisor/shared/translate.h"
|
||||||
|
|
||||||
#include "src/rp2040/hardware_structs/include/hardware/structs/sio.h"
|
#include "src/rp2040/hardware_structs/include/hardware/structs/sio.h"
|
||||||
#include "src/rp2_common/hardware_sync/include/hardware/sync.h"
|
#include "src/rp2_common/hardware_sync/include/hardware/sync.h"
|
||||||
|
|
||||||
|
#include "hardware/watchdog.h"
|
||||||
|
|
||||||
void common_hal_mcu_delay_us(uint32_t delay) {
|
void common_hal_mcu_delay_us(uint32_t delay) {
|
||||||
mp_hal_delay_us(delay);
|
mp_hal_delay_us(delay);
|
||||||
}
|
}
|
||||||
|
@ -66,8 +70,11 @@ void common_hal_mcu_enable_interrupts(void) {
|
||||||
asm volatile ("cpsie i" : : : "memory");
|
asm volatile ("cpsie i" : : : "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool next_reset_to_bootloader = false;
|
||||||
|
|
||||||
void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) {
|
void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) {
|
||||||
if (runmode == RUNMODE_BOOTLOADER) {
|
if (runmode == RUNMODE_BOOTLOADER) {
|
||||||
|
next_reset_to_bootloader = true;
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
if (runmode == RUNMODE_SAFE_MODE) {
|
if (runmode == RUNMODE_SAFE_MODE) {
|
||||||
|
@ -76,6 +83,12 @@ void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void common_hal_mcu_reset(void) {
|
void common_hal_mcu_reset(void) {
|
||||||
|
filesystem_flush();
|
||||||
|
if (next_reset_to_bootloader) {
|
||||||
|
reset_to_bootloader();
|
||||||
|
} else {
|
||||||
|
reset_cpu();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// The singleton microcontroller.Processor object, bound to microcontroller.cpu
|
// The singleton microcontroller.Processor object, bound to microcontroller.cpu
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include "bindings/rp2pio/StateMachine.h"
|
#include "bindings/rp2pio/StateMachine.h"
|
||||||
#include "common-hal/rp2pio/StateMachine.h"
|
#include "common-hal/rp2pio/StateMachine.h"
|
||||||
#include "shared-bindings/microcontroller/__init__.h"
|
#include "shared-bindings/microcontroller/__init__.h"
|
||||||
|
#include "shared-bindings/digitalio/DigitalInOut.h"
|
||||||
|
|
||||||
#include "supervisor/port.h"
|
#include "supervisor/port.h"
|
||||||
|
|
||||||
|
@ -89,7 +90,11 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t* digitalinout,
|
||||||
|
|
||||||
// Use a private deinit of the state machine that doesn't reset the pin.
|
// Use a private deinit of the state machine that doesn't reset the pin.
|
||||||
rp2pio_statemachine_deinit(&state_machine, true);
|
rp2pio_statemachine_deinit(&state_machine, true);
|
||||||
|
|
||||||
|
// Reset the pin and release it from the PIO
|
||||||
gpio_init(digitalinout->pin->number);
|
gpio_init(digitalinout->pin->number);
|
||||||
|
common_hal_digitalio_digitalinout_switch_to_output((digitalio_digitalinout_obj_t*)digitalinout, false, DRIVE_MODE_PUSH_PULL);
|
||||||
|
|
||||||
// Update the next start.
|
// Update the next start.
|
||||||
next_start_raw_ticks = port_get_raw_ticks(NULL) + 1;
|
next_start_raw_ticks = port_get_raw_ticks(NULL) + 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,7 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t* self,
|
||||||
if (variable_frequency) {
|
if (variable_frequency) {
|
||||||
return PWMOUT_ALL_TIMERS_ON_PIN_IN_USE;
|
return PWMOUT_ALL_TIMERS_ON_PIN_IN_USE;
|
||||||
}
|
}
|
||||||
// If the other user wants to change frequency then we can't share either.
|
// If the other user wants a variable frequency then we can't share either.
|
||||||
if ((slice_fixed_frequency & (1 << slice)) != 0) {
|
if ((slice_fixed_frequency & (1 << slice)) != 0) {
|
||||||
return PWMOUT_ALL_TIMERS_ON_PIN_IN_USE;
|
return PWMOUT_ALL_TIMERS_ON_PIN_IN_USE;
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t* self,
|
||||||
self->slice = slice;
|
self->slice = slice;
|
||||||
self->channel = channel;
|
self->channel = channel;
|
||||||
channel_use |= channel_use_mask;
|
channel_use |= channel_use_mask;
|
||||||
if (!variable_frequency) {
|
if (variable_frequency) {
|
||||||
slice_fixed_frequency |= 1 << slice;
|
slice_fixed_frequency |= 1 << slice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -546,15 +546,23 @@ static bool _transfer(rp2pio_statemachine_obj_t *self,
|
||||||
size_t tx_remaining = out_len;
|
size_t tx_remaining = out_len;
|
||||||
|
|
||||||
while (rx_remaining || tx_remaining) {
|
while (rx_remaining || tx_remaining) {
|
||||||
if (tx_remaining && !pio_sm_is_tx_fifo_full(self->pio, self->state_machine)) {
|
for (int i=0; i<32; i++) {
|
||||||
*tx_destination = *data_out;
|
bool did_transfer = false;
|
||||||
data_out++;
|
if (tx_remaining && !pio_sm_is_tx_fifo_full(self->pio, self->state_machine)) {
|
||||||
--tx_remaining;
|
*tx_destination = *data_out;
|
||||||
}
|
data_out++;
|
||||||
if (rx_remaining && !pio_sm_is_rx_fifo_empty(self->pio, self->state_machine)) {
|
--tx_remaining;
|
||||||
*data_in = (uint8_t) *rx_source;
|
did_transfer = true;
|
||||||
data_in++;
|
}
|
||||||
--rx_remaining;
|
if (rx_remaining && !pio_sm_is_rx_fifo_empty(self->pio, self->state_machine)) {
|
||||||
|
*data_in = (uint8_t) *rx_source;
|
||||||
|
data_in++;
|
||||||
|
--rx_remaining;
|
||||||
|
did_transfer = true;
|
||||||
|
}
|
||||||
|
if (!did_transfer) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
RUN_BACKGROUND_TASKS;
|
RUN_BACKGROUND_TASKS;
|
||||||
if (mp_hal_is_interrupted()) {
|
if (mp_hal_is_interrupted()) {
|
||||||
|
|
|
@ -28,10 +28,10 @@
|
||||||
#include "shared-bindings/supervisor/Runtime.h"
|
#include "shared-bindings/supervisor/Runtime.h"
|
||||||
#include "supervisor/serial.h"
|
#include "supervisor/serial.h"
|
||||||
|
|
||||||
bool common_hal_get_serial_connected(void) {
|
bool common_hal_supervisor_runtime_get_serial_connected(void) {
|
||||||
return (bool) serial_connected();
|
return (bool) serial_connected();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool common_hal_get_serial_bytes_available(void) {
|
bool common_hal_supervisor_runtime_get_serial_bytes_available(void) {
|
||||||
return (bool) serial_bytes_available();
|
return (bool) serial_bytes_available();
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,12 +59,11 @@ SECTIONS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.text : {
|
.text : {
|
||||||
__reset_start = .;
|
__logical_binary_start = .;
|
||||||
KEEP (*(.reset))
|
|
||||||
. = ALIGN(256);
|
|
||||||
__reset_end = .;
|
|
||||||
ASSERT(__reset_end - __reset_start == 256, "ERROR: reset section should only be 256 bytes");
|
|
||||||
KEEP (*(.vectors))
|
KEEP (*(.vectors))
|
||||||
|
KEEP (*(.binary_info_header))
|
||||||
|
__binary_info_header_end = .;
|
||||||
|
KEEP (*(.reset))
|
||||||
/* TODO revisit this now memset/memcpy/float in ROM */
|
/* TODO revisit this now memset/memcpy/float in ROM */
|
||||||
/* bit of a hack right now to exclude all floating point and time critical (e.g. memset, memcpy) code from
|
/* bit of a hack right now to exclude all floating point and time critical (e.g. memset, memcpy) code from
|
||||||
* FLASH ... we will include any thing excluded here in .data below by default */
|
* FLASH ... we will include any thing excluded here in .data below by default */
|
||||||
|
@ -246,5 +245,7 @@ SECTIONS
|
||||||
|
|
||||||
/* Check if data + heap + stack exceeds RAM limit */
|
/* Check if data + heap + stack exceeds RAM limit */
|
||||||
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed")
|
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed")
|
||||||
|
|
||||||
|
ASSERT( __binary_info_header_end - __logical_binary_start <= 256, "Binary info must be in first 256 bytes of the binary")
|
||||||
/* todo assert on extra code */
|
/* todo assert on extra code */
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ CIRCUITPY_AUDIOIO = 0
|
||||||
|
|
||||||
INTERNAL_LIBM = 1
|
INTERNAL_LIBM = 1
|
||||||
|
|
||||||
USB_SERIAL_NUMBER_LENGTH = 32
|
USB_SERIAL_NUMBER_LENGTH = 16
|
||||||
|
|
||||||
# Number of USB endpoint pairs.
|
# Number of USB endpoint pairs.
|
||||||
USB_NUM_EP = 8
|
USB_NUM_EP = 8
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 26653ea81e340cacee55025d110c3e014a252a87
|
Subproject commit 55346c953012ef5b32f392fea3b42814db8df2a5
|
|
@ -52,6 +52,8 @@
|
||||||
|
|
||||||
#include "tusb.h"
|
#include "tusb.h"
|
||||||
|
|
||||||
|
#include "pico/bootrom.h"
|
||||||
|
#include "hardware/watchdog.h"
|
||||||
|
|
||||||
extern volatile bool mp_msc_enabled;
|
extern volatile bool mp_msc_enabled;
|
||||||
|
|
||||||
|
@ -110,13 +112,17 @@ void reset_port(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void reset_to_bootloader(void) {
|
void reset_to_bootloader(void) {
|
||||||
// reset();
|
reset_usb_boot(0, 0);
|
||||||
while (true) {}
|
while (true) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
void reset_cpu(void) {
|
void reset_cpu(void) {
|
||||||
// reset();
|
watchdog_reboot(0, SRAM_END, 0);
|
||||||
while (true) {}
|
watchdog_start_tick(12);
|
||||||
|
|
||||||
|
while (true) {
|
||||||
|
__wfi();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool port_has_fixed_stack(void) {
|
bool port_has_fixed_stack(void) {
|
||||||
|
|
|
@ -28,10 +28,10 @@
|
||||||
#include "shared-bindings/supervisor/Runtime.h"
|
#include "shared-bindings/supervisor/Runtime.h"
|
||||||
#include "supervisor/serial.h"
|
#include "supervisor/serial.h"
|
||||||
|
|
||||||
bool common_hal_get_serial_connected(void) {
|
bool common_hal_supervisor_runtime_get_serial_connected(void) {
|
||||||
return (bool) serial_connected();
|
return (bool) serial_connected();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool common_hal_get_serial_bytes_available(void) {
|
bool common_hal_supervisor_runtime_get_serial_bytes_available(void) {
|
||||||
return (bool) serial_bytes_available();
|
return (bool) serial_bytes_available();
|
||||||
}
|
}
|
||||||
|
|
|
@ -292,6 +292,9 @@ endif
|
||||||
ifeq ($(CIRCUITPY_USB_MIDI),1)
|
ifeq ($(CIRCUITPY_USB_MIDI),1)
|
||||||
SRC_PATTERNS += usb_midi/%
|
SRC_PATTERNS += usb_midi/%
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(CIRCUITPY_USB_VENDOR),1)
|
||||||
|
SRC_PATTERNS += usb_vendor/%
|
||||||
|
endif
|
||||||
ifeq ($(CIRCUITPY_USTACK),1)
|
ifeq ($(CIRCUITPY_USTACK),1)
|
||||||
SRC_PATTERNS += ustack/%
|
SRC_PATTERNS += ustack/%
|
||||||
endif
|
endif
|
||||||
|
@ -388,6 +391,7 @@ SRC_COMMON_HAL_ALL = \
|
||||||
socketpool/Socket.c \
|
socketpool/Socket.c \
|
||||||
ssl/__init__.c \
|
ssl/__init__.c \
|
||||||
ssl/SSLContext.c \
|
ssl/SSLContext.c \
|
||||||
|
ssl/SSLSocket.c \
|
||||||
supervisor/Runtime.c \
|
supervisor/Runtime.c \
|
||||||
supervisor/__init__.c \
|
supervisor/__init__.c \
|
||||||
watchdog/WatchDogMode.c \
|
watchdog/WatchDogMode.c \
|
||||||
|
|
|
@ -346,7 +346,10 @@ CIRCUITPY_USB_MSC ?= 1
|
||||||
CFLAGS += -DCIRCUITPY_USB_MSC=$(CIRCUITPY_USB_MSC)
|
CFLAGS += -DCIRCUITPY_USB_MSC=$(CIRCUITPY_USB_MSC)
|
||||||
|
|
||||||
CIRCUITPY_USB_SERIAL ?= 1
|
CIRCUITPY_USB_SERIAL ?= 1
|
||||||
CFLAGS += -DCIRCUITPY_USB_SERIAL=$(CIRCUITPY_USB_MSC)
|
CFLAGS += -DCIRCUITPY_USB_SERIAL=$(CIRCUITPY_USB_SERIAL)
|
||||||
|
|
||||||
|
CIRCUITPY_USB_VENDOR ?= 0
|
||||||
|
CFLAGS += -DCIRCUITPY_USB_VENDOR=$(CIRCUITPY_USB_VENDOR)
|
||||||
|
|
||||||
ifndef USB_NUM_EP
|
ifndef USB_NUM_EP
|
||||||
$(error "USB_NUM_EP (number of USB endpoint pairs)must be defined")
|
$(error "USB_NUM_EP (number of USB endpoint pairs)must be defined")
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include "PewPew.h"
|
#include "PewPew.h"
|
||||||
#include "common-hal/_pew/PewPew.h"
|
#include "common-hal/_pew/PewPew.h"
|
||||||
|
|
||||||
|
|
||||||
STATIC mp_obj_t get_pressed(void) {
|
STATIC mp_obj_t get_pressed(void) {
|
||||||
pew_obj_t *pew = MP_STATE_VM(pew_singleton);
|
pew_obj_t *pew = MP_STATE_VM(pew_singleton);
|
||||||
if (!pew) {
|
if (!pew) {
|
||||||
|
@ -41,12 +42,19 @@ STATIC mp_obj_t get_pressed(void) {
|
||||||
STATIC MP_DEFINE_CONST_FUN_OBJ_0(get_pressed_obj, get_pressed);
|
STATIC MP_DEFINE_CONST_FUN_OBJ_0(get_pressed_obj, get_pressed);
|
||||||
|
|
||||||
|
|
||||||
|
STATIC mp_obj_t get_ticks(void) {
|
||||||
|
return mp_obj_new_int(pew_get_ticks());
|
||||||
|
}
|
||||||
|
STATIC MP_DEFINE_CONST_FUN_OBJ_0(get_ticks_obj, get_ticks);
|
||||||
|
|
||||||
|
|
||||||
//| """LED matrix driver"""
|
//| """LED matrix driver"""
|
||||||
//|
|
//|
|
||||||
STATIC const mp_rom_map_elem_t pew_module_globals_table[] = {
|
STATIC const mp_rom_map_elem_t pew_module_globals_table[] = {
|
||||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR__pew) },
|
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR__pew) },
|
||||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_PewPew), MP_ROM_PTR(&pewpew_type)},
|
{ MP_OBJ_NEW_QSTR(MP_QSTR_PewPew), MP_ROM_PTR(&pewpew_type)},
|
||||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_get_pressed), MP_ROM_PTR(&get_pressed_obj)},
|
{ MP_OBJ_NEW_QSTR(MP_QSTR_get_pressed), MP_ROM_PTR(&get_pressed_obj)},
|
||||||
|
{ MP_OBJ_NEW_QSTR(MP_QSTR_get_ticks), MP_ROM_PTR(&get_ticks_obj)},
|
||||||
};
|
};
|
||||||
STATIC MP_DEFINE_CONST_DICT(pew_module_globals,
|
STATIC MP_DEFINE_CONST_DICT(pew_module_globals,
|
||||||
pew_module_globals_table);
|
pew_module_globals_table);
|
||||||
|
|
|
@ -234,23 +234,24 @@ STATIC mp_obj_t adafruit_bus_device_i2cdevice_write_then_readinto(size_t n_args,
|
||||||
|
|
||||||
mp_obj_t dest[13];
|
mp_obj_t dest[13];
|
||||||
uint8_t num_kws = 2;
|
uint8_t num_kws = 2;
|
||||||
|
uint8_t index = 2;
|
||||||
|
|
||||||
mp_load_method(self->i2c, MP_QSTR_writeto_then_readfrom, dest);
|
mp_load_method(self->i2c, MP_QSTR_writeto_then_readfrom, dest);
|
||||||
dest[2] = MP_OBJ_NEW_SMALL_INT(self->device_address);
|
dest[index++] = MP_OBJ_NEW_SMALL_INT(self->device_address);
|
||||||
dest[3] = args[ARG_out_buffer].u_obj;
|
dest[index++] = args[ARG_out_buffer].u_obj;
|
||||||
dest[4] = args[ARG_in_buffer].u_obj;
|
dest[index++] = args[ARG_in_buffer].u_obj;
|
||||||
dest[5] = MP_OBJ_NEW_QSTR(MP_QSTR_out_start);
|
dest[index++] = MP_OBJ_NEW_QSTR(MP_QSTR_out_start);
|
||||||
dest[6] = MP_OBJ_NEW_SMALL_INT(args[ARG_out_start].u_int);
|
dest[index++] = MP_OBJ_NEW_SMALL_INT(args[ARG_out_start].u_int);
|
||||||
if (args[ARG_out_end].u_int != INT_MAX) {
|
if (args[ARG_out_end].u_int != INT_MAX) {
|
||||||
dest[7] = MP_OBJ_NEW_QSTR(MP_QSTR_out_end);
|
dest[index++] = MP_OBJ_NEW_QSTR(MP_QSTR_out_end);
|
||||||
dest[8] = MP_OBJ_NEW_SMALL_INT(args[ARG_out_end].u_int);
|
dest[index++] = MP_OBJ_NEW_SMALL_INT(args[ARG_out_end].u_int);
|
||||||
num_kws++;
|
num_kws++;
|
||||||
}
|
}
|
||||||
dest[9] = MP_OBJ_NEW_QSTR(MP_QSTR_in_start);
|
dest[index++] = MP_OBJ_NEW_QSTR(MP_QSTR_in_start);
|
||||||
dest[10] = MP_OBJ_NEW_SMALL_INT(args[ARG_in_start].u_int);
|
dest[index++] = MP_OBJ_NEW_SMALL_INT(args[ARG_in_start].u_int);
|
||||||
if (args[ARG_in_end].u_int != INT_MAX) {
|
if (args[ARG_in_end].u_int != INT_MAX) {
|
||||||
dest[11] = MP_OBJ_NEW_QSTR(MP_QSTR_in_end);
|
dest[index++] = MP_OBJ_NEW_QSTR(MP_QSTR_in_end);
|
||||||
dest[12] = MP_OBJ_NEW_SMALL_INT(args[ARG_in_end].u_int);
|
dest[index++] = MP_OBJ_NEW_SMALL_INT(args[ARG_in_end].u_int);
|
||||||
num_kws++;
|
num_kws++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
|
|
||||||
#include "lib/utils/buffer_helper.h"
|
#include "lib/utils/buffer_helper.h"
|
||||||
#include "lib/utils/context_manager_helpers.h"
|
#include "lib/utils/context_manager_helpers.h"
|
||||||
|
#include "py/objproperty.h"
|
||||||
#include "py/runtime.h"
|
#include "py/runtime.h"
|
||||||
#include "supervisor/shared/translate.h"
|
#include "supervisor/shared/translate.h"
|
||||||
|
|
||||||
|
@ -100,22 +101,51 @@ STATIC mp_obj_t adafruit_bus_device_spidevice_make_new(const mp_obj_type_t *type
|
||||||
return (mp_obj_t)self;
|
return (mp_obj_t)self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//| def __enter__(self) -> busio.SPI:
|
||||||
|
//| """Starts a SPI transaction by configuring the SPI and asserting chip select."""
|
||||||
|
//| ...
|
||||||
|
//|
|
||||||
STATIC mp_obj_t adafruit_bus_device_spidevice_obj___enter__(mp_obj_t self_in) {
|
STATIC mp_obj_t adafruit_bus_device_spidevice_obj___enter__(mp_obj_t self_in) {
|
||||||
adafruit_bus_device_spidevice_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
adafruit_bus_device_spidevice_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||||
common_hal_adafruit_bus_device_spidevice_enter(self);
|
return common_hal_adafruit_bus_device_spidevice_enter(self);
|
||||||
return self->spi;
|
|
||||||
}
|
}
|
||||||
STATIC MP_DEFINE_CONST_FUN_OBJ_1(adafruit_bus_device_spidevice___enter___obj, adafruit_bus_device_spidevice_obj___enter__);
|
STATIC MP_DEFINE_CONST_FUN_OBJ_1(adafruit_bus_device_spidevice___enter___obj, adafruit_bus_device_spidevice_obj___enter__);
|
||||||
|
|
||||||
|
|
||||||
|
//| def __exit__(self) -> None:
|
||||||
|
//| """Ends a SPI transaction by deasserting chip select. See
|
||||||
|
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||||
|
//| ...
|
||||||
|
//|
|
||||||
STATIC mp_obj_t adafruit_bus_device_spidevice_obj___exit__(size_t n_args, const mp_obj_t *args) {
|
STATIC mp_obj_t adafruit_bus_device_spidevice_obj___exit__(size_t n_args, const mp_obj_t *args) {
|
||||||
common_hal_adafruit_bus_device_spidevice_exit(MP_OBJ_TO_PTR(args[0]));
|
common_hal_adafruit_bus_device_spidevice_exit(MP_OBJ_TO_PTR(args[0]));
|
||||||
return mp_const_none;
|
return mp_const_none;
|
||||||
}
|
}
|
||||||
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(adafruit_bus_device_spidevice___exit___obj, 4, 4, adafruit_bus_device_spidevice_obj___exit__);
|
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(adafruit_bus_device_spidevice___exit___obj, 4, 4, adafruit_bus_device_spidevice_obj___exit__);
|
||||||
|
|
||||||
|
//| spi: busio.SPI
|
||||||
|
//| """The underlying SPI bus. Useful for weird uses like clocking an SD card without chip select.
|
||||||
|
//|
|
||||||
|
//| You shouldn't normally need this."""
|
||||||
|
//|
|
||||||
|
STATIC mp_obj_t adafruit_bus_device_spidevice_obj_get_spi(mp_obj_t self_in) {
|
||||||
|
adafruit_bus_device_spidevice_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||||
|
return common_hal_adafruit_bus_device_spidevice_get_spi(self);
|
||||||
|
}
|
||||||
|
MP_DEFINE_CONST_FUN_OBJ_1(adafruit_bus_device_spidevice_get_spi_obj, adafruit_bus_device_spidevice_obj_get_spi);
|
||||||
|
|
||||||
|
const mp_obj_property_t adafruit_bus_device_spidevice_spi_obj = {
|
||||||
|
.base.type = &mp_type_property,
|
||||||
|
.proxy = {(mp_obj_t)&adafruit_bus_device_spidevice_get_spi_obj,
|
||||||
|
(mp_obj_t)&mp_const_none_obj,
|
||||||
|
(mp_obj_t)&mp_const_none_obj},
|
||||||
|
};
|
||||||
|
|
||||||
STATIC const mp_rom_map_elem_t adafruit_bus_device_spidevice_locals_dict_table[] = {
|
STATIC const mp_rom_map_elem_t adafruit_bus_device_spidevice_locals_dict_table[] = {
|
||||||
{ MP_ROM_QSTR(MP_QSTR___enter__), MP_ROM_PTR(&adafruit_bus_device_spidevice___enter___obj) },
|
{ MP_ROM_QSTR(MP_QSTR___enter__), MP_ROM_PTR(&adafruit_bus_device_spidevice___enter___obj) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR___exit__), MP_ROM_PTR(&adafruit_bus_device_spidevice___exit___obj) },
|
{ MP_ROM_QSTR(MP_QSTR___exit__), MP_ROM_PTR(&adafruit_bus_device_spidevice___exit___obj) },
|
||||||
|
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_spi), MP_ROM_PTR(&adafruit_bus_device_spidevice_spi_obj) },
|
||||||
};
|
};
|
||||||
|
|
||||||
STATIC MP_DEFINE_CONST_DICT(adafruit_bus_device_spidevice_locals_dict, adafruit_bus_device_spidevice_locals_dict_table);
|
STATIC MP_DEFINE_CONST_DICT(adafruit_bus_device_spidevice_locals_dict, adafruit_bus_device_spidevice_locals_dict_table);
|
||||||
|
|
|
@ -44,7 +44,8 @@ extern const mp_obj_type_t adafruit_bus_device_spidevice_type;
|
||||||
// Initializes the hardware peripheral.
|
// Initializes the hardware peripheral.
|
||||||
extern void common_hal_adafruit_bus_device_spidevice_construct(adafruit_bus_device_spidevice_obj_t *self, busio_spi_obj_t *spi, digitalio_digitalinout_obj_t *cs,
|
extern void common_hal_adafruit_bus_device_spidevice_construct(adafruit_bus_device_spidevice_obj_t *self, busio_spi_obj_t *spi, digitalio_digitalinout_obj_t *cs,
|
||||||
uint32_t baudrate, uint8_t polarity, uint8_t phase, uint8_t extra_clocks);
|
uint32_t baudrate, uint8_t polarity, uint8_t phase, uint8_t extra_clocks);
|
||||||
extern void common_hal_adafruit_bus_device_spidevice_enter(adafruit_bus_device_spidevice_obj_t *self);
|
extern mp_obj_t common_hal_adafruit_bus_device_spidevice_enter(adafruit_bus_device_spidevice_obj_t *self);
|
||||||
extern void common_hal_adafruit_bus_device_spidevice_exit(adafruit_bus_device_spidevice_obj_t *self);
|
extern void common_hal_adafruit_bus_device_spidevice_exit(adafruit_bus_device_spidevice_obj_t *self);
|
||||||
|
extern mp_obj_t common_hal_adafruit_bus_device_spidevice_get_spi(adafruit_bus_device_spidevice_obj_t *self);
|
||||||
|
|
||||||
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_BUSDEVICE_SPIDEVICE_H
|
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_BUSDEVICE_SPIDEVICE_H
|
||||||
|
|
|
@ -55,6 +55,12 @@
|
||||||
//| Data transfers use the specified baurate (rounded down to one that is supported by
|
//| Data transfers use the specified baurate (rounded down to one that is supported by
|
||||||
//| the microcontroller)
|
//| the microcontroller)
|
||||||
//|
|
//|
|
||||||
|
//| .. important::
|
||||||
|
//| If the same SPI bus is shared with other peripherals, it is important that
|
||||||
|
//| the SD card be initialized before accessing any other peripheral on the bus.
|
||||||
|
//| Failure to do so can prevent the SD card from being recognized until it is
|
||||||
|
//| powered off or re-inserted.
|
||||||
|
//|
|
||||||
//| Example usage:
|
//| Example usage:
|
||||||
//|
|
//|
|
||||||
//| .. code-block:: python
|
//| .. code-block:: python
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
*
|
*
|
||||||
* The MIT License (MIT)
|
* The MIT License (MIT)
|
||||||
*
|
*
|
||||||
* SPDX-FileCopyrightText: Copyright (c) 2014 Damien P. George
|
* Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
|
||||||
* 2018 Nick Moore for Adafruit Industries
|
* Copyright (c) 2021 Lucian Copeland for Adafruit Industries
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
@ -64,6 +64,25 @@ STATIC mp_obj_t socketpool_socket___exit__(size_t n_args, const mp_obj_t *args)
|
||||||
}
|
}
|
||||||
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socketpool_socket___exit___obj, 4, 4, socketpool_socket___exit__);
|
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socketpool_socket___exit___obj, 4, 4, socketpool_socket___exit__);
|
||||||
|
|
||||||
|
//| def accept(self) -> Tuple[Socket, Tuple[str, int]]:
|
||||||
|
//| """Accept a connection on a listening socket of type SOCK_STREAM,
|
||||||
|
//| creating a new socket of type SOCK_STREAM.
|
||||||
|
//| Returns a tuple of (new_socket, remote_address)"""
|
||||||
|
//|
|
||||||
|
STATIC mp_obj_t socketpool_socket_accept(mp_obj_t self_in) {
|
||||||
|
socketpool_socket_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||||
|
uint8_t ip[4];
|
||||||
|
uint32_t port;
|
||||||
|
|
||||||
|
socketpool_socket_obj_t * sock = common_hal_socketpool_socket_accept(self, ip, &port);
|
||||||
|
|
||||||
|
mp_obj_t tuple_contents[2];
|
||||||
|
tuple_contents[0] = MP_OBJ_FROM_PTR(sock);
|
||||||
|
tuple_contents[1] = netutils_format_inet_addr(ip, port, NETUTILS_BIG);
|
||||||
|
return mp_obj_new_tuple(2, tuple_contents);
|
||||||
|
}
|
||||||
|
STATIC MP_DEFINE_CONST_FUN_OBJ_1(socketpool_socket_accept_obj, socketpool_socket_accept);
|
||||||
|
|
||||||
//| def bind(self, address: Tuple[str, int]) -> None:
|
//| def bind(self, address: Tuple[str, int]) -> None:
|
||||||
//| """Bind a socket to an address
|
//| """Bind a socket to an address
|
||||||
//|
|
//|
|
||||||
|
@ -79,8 +98,11 @@ STATIC mp_obj_t socketpool_socket_bind(mp_obj_t self_in, mp_obj_t addr_in) {
|
||||||
size_t hostlen;
|
size_t hostlen;
|
||||||
const char* host = mp_obj_str_get_data(addr_items[0], &hostlen);
|
const char* host = mp_obj_str_get_data(addr_items[0], &hostlen);
|
||||||
mp_int_t port = mp_obj_get_int(addr_items[1]);
|
mp_int_t port = mp_obj_get_int(addr_items[1]);
|
||||||
|
if (port < 0) {
|
||||||
|
mp_raise_ValueError(translate("port must be >= 0"));
|
||||||
|
}
|
||||||
|
|
||||||
bool ok = common_hal_socketpool_socket_bind(self, host, hostlen, port);
|
bool ok = common_hal_socketpool_socket_bind(self, host, hostlen, (uint32_t)port);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
mp_raise_ValueError(translate("Error: Failure to bind"));
|
mp_raise_ValueError(translate("Error: Failure to bind"));
|
||||||
}
|
}
|
||||||
|
@ -89,41 +111,6 @@ STATIC mp_obj_t socketpool_socket_bind(mp_obj_t self_in, mp_obj_t addr_in) {
|
||||||
}
|
}
|
||||||
STATIC MP_DEFINE_CONST_FUN_OBJ_2(socketpool_socket_bind_obj, socketpool_socket_bind);
|
STATIC MP_DEFINE_CONST_FUN_OBJ_2(socketpool_socket_bind_obj, socketpool_socket_bind);
|
||||||
|
|
||||||
//| def listen(self, backlog: int) -> None:
|
|
||||||
//| """Set socket to listen for incoming connections
|
|
||||||
//|
|
|
||||||
//| :param ~int backlog: length of backlog queue for waiting connetions"""
|
|
||||||
//| ...
|
|
||||||
//|
|
|
||||||
STATIC mp_obj_t socketpool_socket_listen(mp_obj_t self_in, mp_obj_t backlog_in) {
|
|
||||||
socketpool_socket_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
|
||||||
|
|
||||||
int backlog = mp_obj_get_int(backlog_in);
|
|
||||||
|
|
||||||
common_hal_socketpool_socket_listen(self, backlog);
|
|
||||||
return mp_const_none;
|
|
||||||
}
|
|
||||||
STATIC MP_DEFINE_CONST_FUN_OBJ_2(socketpool_socket_listen_obj, socketpool_socket_listen);
|
|
||||||
|
|
||||||
//| def accept(self) -> Tuple[Socket, Tuple[str, int]]:
|
|
||||||
//| """Accept a connection on a listening socket of type SOCK_STREAM,
|
|
||||||
//| creating a new socket of type SOCK_STREAM.
|
|
||||||
//| Returns a tuple of (new_socket, remote_address)"""
|
|
||||||
//|
|
|
||||||
STATIC mp_obj_t socketpool_socket_accept(mp_obj_t self_in) {
|
|
||||||
socketpool_socket_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
|
||||||
uint8_t ip[4];
|
|
||||||
uint port;
|
|
||||||
|
|
||||||
socketpool_socket_obj_t * sock = common_hal_socketpool_socket_accept(self, ip, &port);
|
|
||||||
|
|
||||||
mp_obj_t tuple_contents[2];
|
|
||||||
tuple_contents[0] = MP_OBJ_FROM_PTR(sock);
|
|
||||||
tuple_contents[1] = netutils_format_inet_addr(ip, port, NETUTILS_BIG);
|
|
||||||
return mp_obj_new_tuple(2, tuple_contents);
|
|
||||||
}
|
|
||||||
STATIC MP_DEFINE_CONST_FUN_OBJ_1(socketpool_socket_accept_obj, socketpool_socket_accept);
|
|
||||||
|
|
||||||
//| def close(self) -> None:
|
//| def close(self) -> None:
|
||||||
//| """Closes this Socket and makes its resources available to its SocketPool."""
|
//| """Closes this Socket and makes its resources available to its SocketPool."""
|
||||||
//|
|
//|
|
||||||
|
@ -149,8 +136,11 @@ STATIC mp_obj_t socketpool_socket_connect(mp_obj_t self_in, mp_obj_t addr_in) {
|
||||||
size_t hostlen;
|
size_t hostlen;
|
||||||
const char* host = mp_obj_str_get_data(addr_items[0], &hostlen);
|
const char* host = mp_obj_str_get_data(addr_items[0], &hostlen);
|
||||||
mp_int_t port = mp_obj_get_int(addr_items[1]);
|
mp_int_t port = mp_obj_get_int(addr_items[1]);
|
||||||
|
if (port < 0) {
|
||||||
|
mp_raise_ValueError(translate("port must be >= 0"));
|
||||||
|
}
|
||||||
|
|
||||||
bool ok = common_hal_socketpool_socket_connect(self, host, hostlen, port);
|
bool ok = common_hal_socketpool_socket_connect(self, host, hostlen, (uint32_t)port);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
mp_raise_OSError(0);
|
mp_raise_OSError(0);
|
||||||
}
|
}
|
||||||
|
@ -159,31 +149,47 @@ STATIC mp_obj_t socketpool_socket_connect(mp_obj_t self_in, mp_obj_t addr_in) {
|
||||||
}
|
}
|
||||||
STATIC MP_DEFINE_CONST_FUN_OBJ_2(socketpool_socket_connect_obj, socketpool_socket_connect);
|
STATIC MP_DEFINE_CONST_FUN_OBJ_2(socketpool_socket_connect_obj, socketpool_socket_connect);
|
||||||
|
|
||||||
//| def send(self, bytes: ReadableBuffer) -> int:
|
//| def listen(self, backlog: int) -> None:
|
||||||
//| """Send some bytes to the connected remote address.
|
//| """Set socket to listen for incoming connections
|
||||||
//| Suits sockets of type SOCK_STREAM
|
|
||||||
//|
|
//|
|
||||||
//| :param ~bytes bytes: some bytes to send"""
|
//| :param ~int backlog: length of backlog queue for waiting connetions"""
|
||||||
//| ...
|
//| ...
|
||||||
//|
|
//|
|
||||||
STATIC mp_obj_t socketpool_socket_send(mp_obj_t self_in, mp_obj_t buf_in) {
|
STATIC mp_obj_t socketpool_socket_listen(mp_obj_t self_in, mp_obj_t backlog_in) {
|
||||||
socketpool_socket_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
socketpool_socket_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||||
if (common_hal_socketpool_socket_get_closed(self)) {
|
|
||||||
// Bad file number.
|
int backlog = mp_obj_get_int(backlog_in);
|
||||||
mp_raise_OSError(MP_EBADF);
|
|
||||||
}
|
common_hal_socketpool_socket_listen(self, backlog);
|
||||||
if (!common_hal_socketpool_socket_get_connected(self)) {
|
return mp_const_none;
|
||||||
mp_raise_BrokenPipeError();
|
|
||||||
}
|
|
||||||
mp_buffer_info_t bufinfo;
|
|
||||||
mp_get_buffer_raise(buf_in, &bufinfo, MP_BUFFER_READ);
|
|
||||||
mp_int_t ret = common_hal_socketpool_socket_send(self, bufinfo.buf, bufinfo.len);
|
|
||||||
if (ret == -1) {
|
|
||||||
mp_raise_BrokenPipeError();
|
|
||||||
}
|
|
||||||
return mp_obj_new_int_from_uint(ret);
|
|
||||||
}
|
}
|
||||||
STATIC MP_DEFINE_CONST_FUN_OBJ_2(socketpool_socket_send_obj, socketpool_socket_send);
|
STATIC MP_DEFINE_CONST_FUN_OBJ_2(socketpool_socket_listen_obj, socketpool_socket_listen);
|
||||||
|
|
||||||
|
//| def recvfrom_into(self, buffer: WriteableBuffer) -> Tuple[int, Tuple[str, int]]:
|
||||||
|
//| """Reads some bytes from a remote address.
|
||||||
|
//|
|
||||||
|
//| Returns a tuple containing
|
||||||
|
//| * the number of bytes received into the given buffer
|
||||||
|
//| * a remote_address, which is a tuple of ip address and port number
|
||||||
|
//|
|
||||||
|
//| :param object buffer: buffer to read into"""
|
||||||
|
//| ...
|
||||||
|
//|
|
||||||
|
STATIC mp_obj_t socketpool_socket_recvfrom_into(mp_obj_t self_in, mp_obj_t data_in) {
|
||||||
|
socketpool_socket_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||||
|
mp_buffer_info_t bufinfo;
|
||||||
|
mp_get_buffer_raise(data_in, &bufinfo, MP_BUFFER_WRITE);
|
||||||
|
|
||||||
|
byte ip[4];
|
||||||
|
mp_uint_t port;
|
||||||
|
mp_int_t ret = common_hal_socketpool_socket_recvfrom_into(self,
|
||||||
|
(byte*)bufinfo.buf, bufinfo.len, ip, &port);
|
||||||
|
mp_obj_t tuple_contents[2];
|
||||||
|
tuple_contents[0] = mp_obj_new_int_from_uint(ret);
|
||||||
|
tuple_contents[1] = netutils_format_inet_addr(ip, port, NETUTILS_BIG);
|
||||||
|
return mp_obj_new_tuple(2, tuple_contents);
|
||||||
|
}
|
||||||
|
STATIC MP_DEFINE_CONST_FUN_OBJ_2(socketpool_socket_recvfrom_into_obj, socketpool_socket_recvfrom_into);
|
||||||
|
|
||||||
//| def recv_into(self, buffer: WriteableBuffer, bufsize: int) -> int:
|
//| def recv_into(self, buffer: WriteableBuffer, bufsize: int) -> int:
|
||||||
//| """Reads some bytes from the connected remote address, writing
|
//| """Reads some bytes from the connected remote address, writing
|
||||||
|
@ -199,7 +205,6 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(socketpool_socket_send_obj, socketpool_socket_s
|
||||||
//| :param int bufsize: optionally, a maximum number of bytes to read."""
|
//| :param int bufsize: optionally, a maximum number of bytes to read."""
|
||||||
//| ...
|
//| ...
|
||||||
//|
|
//|
|
||||||
|
|
||||||
STATIC mp_obj_t socketpool_socket_recv_into(size_t n_args, const mp_obj_t *args) {
|
STATIC mp_obj_t socketpool_socket_recv_into(size_t n_args, const mp_obj_t *args) {
|
||||||
socketpool_socket_obj_t *self = MP_OBJ_TO_PTR(args[0]);
|
socketpool_socket_obj_t *self = MP_OBJ_TO_PTR(args[0]);
|
||||||
if (common_hal_socketpool_socket_get_closed(self)) {
|
if (common_hal_socketpool_socket_get_closed(self)) {
|
||||||
|
@ -232,6 +237,32 @@ STATIC mp_obj_t socketpool_socket_recv_into(size_t n_args, const mp_obj_t *args)
|
||||||
}
|
}
|
||||||
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socketpool_socket_recv_into_obj, 2, 3, socketpool_socket_recv_into);
|
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socketpool_socket_recv_into_obj, 2, 3, socketpool_socket_recv_into);
|
||||||
|
|
||||||
|
//| def send(self, bytes: ReadableBuffer) -> int:
|
||||||
|
//| """Send some bytes to the connected remote address.
|
||||||
|
//| Suits sockets of type SOCK_STREAM
|
||||||
|
//|
|
||||||
|
//| :param ~bytes bytes: some bytes to send"""
|
||||||
|
//| ...
|
||||||
|
//|
|
||||||
|
STATIC mp_obj_t socketpool_socket_send(mp_obj_t self_in, mp_obj_t buf_in) {
|
||||||
|
socketpool_socket_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||||
|
if (common_hal_socketpool_socket_get_closed(self)) {
|
||||||
|
// Bad file number.
|
||||||
|
mp_raise_OSError(MP_EBADF);
|
||||||
|
}
|
||||||
|
if (!common_hal_socketpool_socket_get_connected(self)) {
|
||||||
|
mp_raise_BrokenPipeError();
|
||||||
|
}
|
||||||
|
mp_buffer_info_t bufinfo;
|
||||||
|
mp_get_buffer_raise(buf_in, &bufinfo, MP_BUFFER_READ);
|
||||||
|
mp_int_t ret = common_hal_socketpool_socket_send(self, bufinfo.buf, bufinfo.len);
|
||||||
|
if (ret == -1) {
|
||||||
|
mp_raise_BrokenPipeError();
|
||||||
|
}
|
||||||
|
return mp_obj_new_int_from_uint(ret);
|
||||||
|
}
|
||||||
|
STATIC MP_DEFINE_CONST_FUN_OBJ_2(socketpool_socket_send_obj, socketpool_socket_send);
|
||||||
|
|
||||||
//| def sendto(self, bytes: ReadableBuffer, address: Tuple[str, int]) -> int:
|
//| def sendto(self, bytes: ReadableBuffer, address: Tuple[str, int]) -> int:
|
||||||
//| """Send some bytes to a specific address.
|
//| """Send some bytes to a specific address.
|
||||||
//| Suits sockets of type SOCK_DGRAM
|
//| Suits sockets of type SOCK_DGRAM
|
||||||
|
@ -240,7 +271,6 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socketpool_socket_recv_into_obj, 2, 3
|
||||||
//| :param ~tuple address: tuple of (remote_address, remote_port)"""
|
//| :param ~tuple address: tuple of (remote_address, remote_port)"""
|
||||||
//| ...
|
//| ...
|
||||||
//|
|
//|
|
||||||
|
|
||||||
STATIC mp_obj_t socketpool_socket_sendto(mp_obj_t self_in, mp_obj_t data_in, mp_obj_t addr_in) {
|
STATIC mp_obj_t socketpool_socket_sendto(mp_obj_t self_in, mp_obj_t data_in, mp_obj_t addr_in) {
|
||||||
socketpool_socket_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
socketpool_socket_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||||
|
|
||||||
|
@ -254,8 +284,11 @@ STATIC mp_obj_t socketpool_socket_sendto(mp_obj_t self_in, mp_obj_t data_in, mp_
|
||||||
size_t hostlen;
|
size_t hostlen;
|
||||||
const char* host = mp_obj_str_get_data(addr_items[0], &hostlen);
|
const char* host = mp_obj_str_get_data(addr_items[0], &hostlen);
|
||||||
mp_int_t port = mp_obj_get_int(addr_items[1]);
|
mp_int_t port = mp_obj_get_int(addr_items[1]);
|
||||||
|
if (port < 0) {
|
||||||
|
mp_raise_ValueError(translate("port must be >= 0"));
|
||||||
|
}
|
||||||
|
|
||||||
mp_int_t ret = common_hal_socketpool_socket_sendto(self, host, hostlen, port, bufinfo.buf, bufinfo.len);
|
mp_int_t ret = common_hal_socketpool_socket_sendto(self, host, hostlen, (uint32_t)port, bufinfo.buf, bufinfo.len);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
mp_raise_OSError(0);
|
mp_raise_OSError(0);
|
||||||
}
|
}
|
||||||
|
@ -264,37 +297,28 @@ STATIC mp_obj_t socketpool_socket_sendto(mp_obj_t self_in, mp_obj_t data_in, mp_
|
||||||
}
|
}
|
||||||
STATIC MP_DEFINE_CONST_FUN_OBJ_3(socketpool_socket_sendto_obj, socketpool_socket_sendto);
|
STATIC MP_DEFINE_CONST_FUN_OBJ_3(socketpool_socket_sendto_obj, socketpool_socket_sendto);
|
||||||
|
|
||||||
//| def recvfrom_into(self, buffer: WriteableBuffer) -> Tuple[int, Tuple[str, int]]:
|
//| def setblocking(self, flag: bool) -> Optional[int]:
|
||||||
//| """Reads some bytes from a remote address.
|
//| """Set the blocking behaviour of this socket.
|
||||||
//|
|
//|
|
||||||
//| Returns a tuple containing
|
//| :param ~bool flag: False means non-blocking, True means block indefinitely."""
|
||||||
//| * the number of bytes received into the given buffer
|
|
||||||
//| * a remote_address, which is a tuple of ip address and port number
|
|
||||||
//|
|
|
||||||
//| :param object buffer: buffer to read into"""
|
|
||||||
//| ...
|
//| ...
|
||||||
//|
|
//|
|
||||||
STATIC mp_obj_t socketpool_socket_recvfrom_into(mp_obj_t self_in, mp_obj_t data_in) {
|
// method socket.setblocking(flag)
|
||||||
|
STATIC mp_obj_t socketpool_socket_setblocking(mp_obj_t self_in, mp_obj_t blocking) {
|
||||||
socketpool_socket_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
socketpool_socket_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||||
mp_buffer_info_t bufinfo;
|
if (mp_obj_is_true(blocking)) {
|
||||||
mp_get_buffer_raise(data_in, &bufinfo, MP_BUFFER_WRITE);
|
common_hal_socketpool_socket_settimeout(self, -1);
|
||||||
|
} else {
|
||||||
byte ip[4];
|
common_hal_socketpool_socket_settimeout(self, 0);
|
||||||
mp_uint_t port;
|
}
|
||||||
mp_int_t ret = common_hal_socketpool_socket_recvfrom_into(self,
|
return mp_const_none;
|
||||||
(byte*)bufinfo.buf, bufinfo.len, ip, &port);
|
|
||||||
mp_obj_t tuple_contents[2];
|
|
||||||
tuple_contents[0] = mp_obj_new_int_from_uint(ret);
|
|
||||||
tuple_contents[1] = netutils_format_inet_addr(ip, port, NETUTILS_BIG);
|
|
||||||
return mp_obj_new_tuple(2, tuple_contents);
|
|
||||||
}
|
}
|
||||||
STATIC MP_DEFINE_CONST_FUN_OBJ_2(socketpool_socket_recvfrom_into_obj, socketpool_socket_recvfrom_into);
|
STATIC MP_DEFINE_CONST_FUN_OBJ_2(socketpool_socket_setblocking_obj, socketpool_socket_setblocking);
|
||||||
|
|
||||||
// //| def setsockopt(self, level: int, optname: int, value: int) -> None:
|
// //| def setsockopt(self, level: int, optname: int, value: int) -> None:
|
||||||
// //| """Sets socket options"""
|
// //| """Sets socket options"""
|
||||||
// //| ...
|
// //| ...
|
||||||
// //|
|
// //|
|
||||||
|
|
||||||
// STATIC mp_obj_t socketpool_socket_setsockopt(size_t n_args, const mp_obj_t *args) {
|
// STATIC mp_obj_t socketpool_socket_setsockopt(size_t n_args, const mp_obj_t *args) {
|
||||||
// // mod_network_socket_obj_t *self = MP_OBJ_TO_PTR(args[0]);
|
// // mod_network_socket_obj_t *self = MP_OBJ_TO_PTR(args[0]);
|
||||||
|
|
||||||
|
@ -324,13 +348,13 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(socketpool_socket_recvfrom_into_obj, socketpool
|
||||||
// }
|
// }
|
||||||
// STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socketpool_socket_setsockopt_obj, 4, 4, socketpool_socket_setsockopt);
|
// STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socketpool_socket_setsockopt_obj, 4, 4, socketpool_socket_setsockopt);
|
||||||
|
|
||||||
|
|
||||||
//| def settimeout(self, value: int) -> None:
|
//| def settimeout(self, value: int) -> None:
|
||||||
//| """Set the timeout value for this socket.
|
//| """Set the timeout value for this socket.
|
||||||
//|
|
//|
|
||||||
//| :param ~int value: timeout in seconds. 0 means non-blocking. None means block indefinitely."""
|
//| :param ~int value: timeout in seconds. 0 means non-blocking. None means block indefinitely."""
|
||||||
//| ...
|
//| ...
|
||||||
//|
|
//|
|
||||||
|
|
||||||
STATIC mp_obj_t socketpool_socket_settimeout(mp_obj_t self_in, mp_obj_t timeout_in) {
|
STATIC mp_obj_t socketpool_socket_settimeout(mp_obj_t self_in, mp_obj_t timeout_in) {
|
||||||
socketpool_socket_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
socketpool_socket_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||||
mp_uint_t timeout_ms;
|
mp_uint_t timeout_ms;
|
||||||
|
@ -348,24 +372,6 @@ STATIC mp_obj_t socketpool_socket_settimeout(mp_obj_t self_in, mp_obj_t timeout_
|
||||||
}
|
}
|
||||||
STATIC MP_DEFINE_CONST_FUN_OBJ_2(socketpool_socket_settimeout_obj, socketpool_socket_settimeout);
|
STATIC MP_DEFINE_CONST_FUN_OBJ_2(socketpool_socket_settimeout_obj, socketpool_socket_settimeout);
|
||||||
|
|
||||||
// //| def setblocking(self, flag: bool) -> Optional[int]:
|
|
||||||
// //| """Set the blocking behaviour of this socket.
|
|
||||||
// //|
|
|
||||||
// //| :param ~bool flag: False means non-blocking, True means block indefinitely."""
|
|
||||||
// //| ...
|
|
||||||
// //|
|
|
||||||
|
|
||||||
// // method socket.setblocking(flag)
|
|
||||||
// STATIC mp_obj_t socketpool_socket_setblocking(mp_obj_t self_in, mp_obj_t blocking) {
|
|
||||||
// // if (mp_obj_is_true(blocking)) {
|
|
||||||
// // return socket_settimeout(self_in, mp_const_none);
|
|
||||||
// // } else {
|
|
||||||
// // return socket_settimeout(self_in, MP_OBJ_NEW_SMALL_INT(0));
|
|
||||||
// // }
|
|
||||||
// return mp_const_none;
|
|
||||||
// }
|
|
||||||
// STATIC MP_DEFINE_CONST_FUN_OBJ_2(socketpool_socket_setblocking_obj, socketpool_socket_setblocking);
|
|
||||||
|
|
||||||
//| def __hash__(self) -> int:
|
//| def __hash__(self) -> int:
|
||||||
//| """Returns a hash for the Socket."""
|
//| """Returns a hash for the Socket."""
|
||||||
//| ...
|
//| ...
|
||||||
|
@ -373,7 +379,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(socketpool_socket_settimeout_obj, socketpool_so
|
||||||
STATIC mp_obj_t socketpool_socket_unary_op(mp_unary_op_t op, mp_obj_t self_in) {
|
STATIC mp_obj_t socketpool_socket_unary_op(mp_unary_op_t op, mp_obj_t self_in) {
|
||||||
switch (op) {
|
switch (op) {
|
||||||
case MP_UNARY_OP_HASH: {
|
case MP_UNARY_OP_HASH: {
|
||||||
return MP_OBJ_NEW_SMALL_INT(common_hal_socketpool_socket_get_hash(MP_OBJ_TO_PTR(self_in)));
|
return mp_obj_id(self_in);
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
return MP_OBJ_NULL; // op not supported
|
return MP_OBJ_NULL; // op not supported
|
||||||
|
@ -384,19 +390,19 @@ STATIC const mp_rom_map_elem_t socketpool_socket_locals_dict_table[] = {
|
||||||
{ MP_ROM_QSTR(MP_QSTR___enter__), MP_ROM_PTR(&default___enter___obj) },
|
{ MP_ROM_QSTR(MP_QSTR___enter__), MP_ROM_PTR(&default___enter___obj) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR___exit__), MP_ROM_PTR(&socketpool_socket___exit___obj) },
|
{ MP_ROM_QSTR(MP_QSTR___exit__), MP_ROM_PTR(&socketpool_socket___exit___obj) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR___del__), MP_ROM_PTR(&socketpool_socket_close_obj) },
|
{ MP_ROM_QSTR(MP_QSTR___del__), MP_ROM_PTR(&socketpool_socket_close_obj) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&socketpool_socket_close_obj) },
|
|
||||||
|
|
||||||
{ MP_ROM_QSTR(MP_QSTR_bind), MP_ROM_PTR(&socketpool_socket_bind_obj) },
|
|
||||||
{ MP_ROM_QSTR(MP_QSTR_listen), MP_ROM_PTR(&socketpool_socket_listen_obj) },
|
|
||||||
{ MP_ROM_QSTR(MP_QSTR_accept), MP_ROM_PTR(&socketpool_socket_accept_obj) },
|
{ MP_ROM_QSTR(MP_QSTR_accept), MP_ROM_PTR(&socketpool_socket_accept_obj) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_bind), MP_ROM_PTR(&socketpool_socket_bind_obj) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&socketpool_socket_close_obj) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_connect), MP_ROM_PTR(&socketpool_socket_connect_obj) },
|
{ MP_ROM_QSTR(MP_QSTR_connect), MP_ROM_PTR(&socketpool_socket_connect_obj) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_send), MP_ROM_PTR(&socketpool_socket_send_obj) },
|
{ MP_ROM_QSTR(MP_QSTR_listen), MP_ROM_PTR(&socketpool_socket_listen_obj) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_sendto), MP_ROM_PTR(&socketpool_socket_sendto_obj) },
|
|
||||||
{ MP_ROM_QSTR(MP_QSTR_recvfrom_into), MP_ROM_PTR(&socketpool_socket_recvfrom_into_obj) },
|
{ MP_ROM_QSTR(MP_QSTR_recvfrom_into), MP_ROM_PTR(&socketpool_socket_recvfrom_into_obj) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_recv_into), MP_ROM_PTR(&socketpool_socket_recv_into_obj) },
|
{ MP_ROM_QSTR(MP_QSTR_recv_into), MP_ROM_PTR(&socketpool_socket_recv_into_obj) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_send), MP_ROM_PTR(&socketpool_socket_send_obj) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_sendto), MP_ROM_PTR(&socketpool_socket_sendto_obj) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_setblocking), MP_ROM_PTR(&socketpool_socket_setblocking_obj) },
|
||||||
// { MP_ROM_QSTR(MP_QSTR_setsockopt), MP_ROM_PTR(&socketpool_socket_setsockopt_obj) },
|
// { MP_ROM_QSTR(MP_QSTR_setsockopt), MP_ROM_PTR(&socketpool_socket_setsockopt_obj) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_settimeout), MP_ROM_PTR(&socketpool_socket_settimeout_obj) },
|
{ MP_ROM_QSTR(MP_QSTR_settimeout), MP_ROM_PTR(&socketpool_socket_settimeout_obj) },
|
||||||
// { MP_ROM_QSTR(MP_QSTR_setblocking), MP_ROM_PTR(&socketpool_socket_setblocking_obj) },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
STATIC MP_DEFINE_CONST_DICT(socketpool_socket_locals_dict, socketpool_socket_locals_dict_table);
|
STATIC MP_DEFINE_CONST_DICT(socketpool_socket_locals_dict, socketpool_socket_locals_dict_table);
|
||||||
|
|
|
@ -31,22 +31,20 @@
|
||||||
|
|
||||||
extern const mp_obj_type_t socketpool_socket_type;
|
extern const mp_obj_type_t socketpool_socket_type;
|
||||||
|
|
||||||
void common_hal_socketpool_socket_settimeout(socketpool_socket_obj_t* self, mp_uint_t timeout_ms);
|
socketpool_socket_obj_t * common_hal_socketpool_socket_accept(socketpool_socket_obj_t* self, uint8_t* ip, uint32_t *port);
|
||||||
|
bool common_hal_socketpool_socket_bind(socketpool_socket_obj_t* self, const char* host, size_t hostlen, uint32_t port);
|
||||||
bool common_hal_socketpool_socket_bind(socketpool_socket_obj_t* self, const char* host, size_t hostlen, uint8_t port);
|
|
||||||
bool common_hal_socketpool_socket_listen(socketpool_socket_obj_t* self, int backlog);
|
|
||||||
socketpool_socket_obj_t * common_hal_socketpool_socket_accept(socketpool_socket_obj_t* self, uint8_t* ip, uint *port);
|
|
||||||
|
|
||||||
bool common_hal_socketpool_socket_connect(socketpool_socket_obj_t* self, const char* host, size_t hostlen, mp_int_t port);
|
|
||||||
mp_uint_t common_hal_socketpool_socket_send(socketpool_socket_obj_t* self, const uint8_t* buf, mp_uint_t len);
|
|
||||||
mp_uint_t common_hal_socketpool_socket_recv_into(socketpool_socket_obj_t* self, const uint8_t* buf, mp_uint_t len);
|
|
||||||
mp_uint_t common_hal_socketpool_socket_sendto(socketpool_socket_obj_t* self,
|
|
||||||
const char* host, size_t hostlen, uint8_t port, const uint8_t* buf, mp_uint_t len);
|
|
||||||
mp_uint_t common_hal_socketpool_socket_recvfrom_into(socketpool_socket_obj_t* self,
|
|
||||||
uint8_t* buf, mp_uint_t len, uint8_t* ip, uint *port);
|
|
||||||
void common_hal_socketpool_socket_close(socketpool_socket_obj_t* self);
|
void common_hal_socketpool_socket_close(socketpool_socket_obj_t* self);
|
||||||
|
bool common_hal_socketpool_socket_connect(socketpool_socket_obj_t* self, const char* host, size_t hostlen, uint32_t port);
|
||||||
bool common_hal_socketpool_socket_get_closed(socketpool_socket_obj_t* self);
|
bool common_hal_socketpool_socket_get_closed(socketpool_socket_obj_t* self);
|
||||||
bool common_hal_socketpool_socket_get_connected(socketpool_socket_obj_t* self);
|
bool common_hal_socketpool_socket_get_connected(socketpool_socket_obj_t* self);
|
||||||
mp_uint_t common_hal_socketpool_socket_get_hash(socketpool_socket_obj_t* self);
|
mp_uint_t common_hal_socketpool_socket_get_timeout(socketpool_socket_obj_t* self);
|
||||||
|
bool common_hal_socketpool_socket_listen(socketpool_socket_obj_t* self, int backlog);
|
||||||
|
mp_uint_t common_hal_socketpool_socket_recvfrom_into(socketpool_socket_obj_t* self,
|
||||||
|
uint8_t* buf, uint32_t len, uint8_t* ip, uint32_t *port);
|
||||||
|
mp_uint_t common_hal_socketpool_socket_recv_into(socketpool_socket_obj_t* self, const uint8_t* buf, uint32_t len);
|
||||||
|
mp_uint_t common_hal_socketpool_socket_send(socketpool_socket_obj_t* self, const uint8_t* buf, uint32_t len);
|
||||||
|
mp_uint_t common_hal_socketpool_socket_sendto(socketpool_socket_obj_t* self,
|
||||||
|
const char* host, size_t hostlen, uint32_t port, const uint8_t* buf, uint32_t len);
|
||||||
|
void common_hal_socketpool_socket_settimeout(socketpool_socket_obj_t* self, uint32_t timeout_ms);
|
||||||
|
|
||||||
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_SOCKETPOOL_SOCKET_H
|
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_SOCKETPOOL_SOCKET_H
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
*
|
*
|
||||||
* The MIT License (MIT)
|
* The MIT License (MIT)
|
||||||
*
|
*
|
||||||
* SPDX-FileCopyrightText: Copyright (c) 2014 Damien P. George
|
* Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
|
||||||
* 2018 Nick Moore for Adafruit Industries
|
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
|
@ -51,7 +51,7 @@ STATIC mp_obj_t ssl_sslcontext_make_new(const mp_obj_type_t *type, size_t n_args
|
||||||
return MP_OBJ_FROM_PTR(s);
|
return MP_OBJ_FROM_PTR(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
//| def wrap_socket(sock: socketpool.Socket, *, server_side: bool = False, server_hostname: Optional[str] = None) -> socketpool.Socket:
|
//| def wrap_socket(sock: socketpool.Socket, *, server_side: bool = False, server_hostname: Optional[str] = None) -> ssl.SSLSocket:
|
||||||
//| """Wraps the socket into a socket-compatible class that handles SSL negotiation.
|
//| """Wraps the socket into a socket-compatible class that handles SSL negotiation.
|
||||||
//| The socket must be of type SOCK_STREAM."""
|
//| The socket must be of type SOCK_STREAM."""
|
||||||
//| ...
|
//| ...
|
||||||
|
|
|
@ -30,12 +30,13 @@
|
||||||
#include "common-hal/ssl/SSLContext.h"
|
#include "common-hal/ssl/SSLContext.h"
|
||||||
|
|
||||||
#include "shared-bindings/socketpool/Socket.h"
|
#include "shared-bindings/socketpool/Socket.h"
|
||||||
|
#include "shared-bindings/ssl/SSLSocket.h"
|
||||||
|
|
||||||
extern const mp_obj_type_t ssl_sslcontext_type;
|
extern const mp_obj_type_t ssl_sslcontext_type;
|
||||||
|
|
||||||
void common_hal_ssl_sslcontext_construct(ssl_sslcontext_obj_t* self);
|
void common_hal_ssl_sslcontext_construct(ssl_sslcontext_obj_t* self);
|
||||||
|
|
||||||
socketpool_socket_obj_t* common_hal_ssl_sslcontext_wrap_socket(ssl_sslcontext_obj_t* self,
|
ssl_sslsocket_obj_t* common_hal_ssl_sslcontext_wrap_socket(ssl_sslcontext_obj_t* self,
|
||||||
socketpool_socket_obj_t* sock, bool server_side, const char* server_hostname);
|
socketpool_socket_obj_t* sock, bool server_side, const char* server_hostname);
|
||||||
|
|
||||||
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_SSL_SSLCONTEXT_H
|
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_SSL_SSLCONTEXT_H
|
||||||
|
|
|
@ -0,0 +1,326 @@
|
||||||
|
/*
|
||||||
|
* This file is part of the MicroPython project, http://micropython.org/
|
||||||
|
*
|
||||||
|
* The MIT License (MIT)
|
||||||
|
*
|
||||||
|
* Copyright (c) 2021 Lucian Copeland for Adafruit Industries
|
||||||
|
*
|
||||||
|
* 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/ssl/SSLSocket.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "lib/utils/context_manager_helpers.h"
|
||||||
|
#include "py/objtuple.h"
|
||||||
|
#include "py/objlist.h"
|
||||||
|
#include "py/runtime.h"
|
||||||
|
#include "py/mperrno.h"
|
||||||
|
|
||||||
|
#include "lib/netutils/netutils.h"
|
||||||
|
|
||||||
|
//| class SSLSocket:
|
||||||
|
//| """Implements TLS security on a subset of `socketpool.Socket` functions. Cannot be created
|
||||||
|
//| directly. Instead, call `wrap_socket` on an existing socket object.
|
||||||
|
//|
|
||||||
|
//| Provides a subset of CPython's `ssl.SSLSocket` API. It only implements the versions of
|
||||||
|
//| recv that do not allocate bytes objects."""
|
||||||
|
//|
|
||||||
|
|
||||||
|
//| def __enter__(self) -> SSLSocket:
|
||||||
|
//| """No-op used by Context Managers."""
|
||||||
|
//| ...
|
||||||
|
//|
|
||||||
|
// Provided by context manager helper.
|
||||||
|
|
||||||
|
//| def __exit__(self) -> None:
|
||||||
|
//| """Automatically closes the Socket when exiting a context. See
|
||||||
|
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||||
|
//| ...
|
||||||
|
//|
|
||||||
|
STATIC mp_obj_t ssl_sslsocket___exit__(size_t n_args, const mp_obj_t *args) {
|
||||||
|
(void)n_args;
|
||||||
|
common_hal_ssl_sslsocket_close(args[0]);
|
||||||
|
return mp_const_none;
|
||||||
|
}
|
||||||
|
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(ssl_sslsocket___exit___obj, 4, 4, ssl_sslsocket___exit__);
|
||||||
|
|
||||||
|
//| def accept(self) -> Tuple[SSLSocket, Tuple[str, int]]:
|
||||||
|
//| """Accept a connection on a listening socket of type SOCK_STREAM,
|
||||||
|
//| creating a new socket of type SOCK_STREAM.
|
||||||
|
//| Returns a tuple of (new_socket, remote_address)"""
|
||||||
|
//|
|
||||||
|
STATIC mp_obj_t ssl_sslsocket_accept(mp_obj_t self_in) {
|
||||||
|
ssl_sslsocket_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||||
|
uint8_t ip[4];
|
||||||
|
uint32_t port;
|
||||||
|
|
||||||
|
ssl_sslsocket_obj_t * sslsock = common_hal_ssl_sslsocket_accept(self, ip, &port);
|
||||||
|
|
||||||
|
mp_obj_t tuple_contents[2];
|
||||||
|
tuple_contents[0] = MP_OBJ_FROM_PTR(sslsock);
|
||||||
|
tuple_contents[1] = netutils_format_inet_addr(ip, port, NETUTILS_BIG);
|
||||||
|
return mp_obj_new_tuple(2, tuple_contents);
|
||||||
|
}
|
||||||
|
STATIC MP_DEFINE_CONST_FUN_OBJ_1(ssl_sslsocket_accept_obj, ssl_sslsocket_accept);
|
||||||
|
|
||||||
|
//| def bind(self, address: Tuple[str, int]) -> None:
|
||||||
|
//| """Bind a socket to an address
|
||||||
|
//|
|
||||||
|
//| :param ~tuple address: tuple of (remote_address, remote_port)"""
|
||||||
|
//| ...
|
||||||
|
//|
|
||||||
|
STATIC mp_obj_t ssl_sslsocket_bind(mp_obj_t self_in, mp_obj_t addr_in) {
|
||||||
|
ssl_sslsocket_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||||
|
|
||||||
|
mp_obj_t *addr_items;
|
||||||
|
mp_obj_get_array_fixed_n(addr_in, 2, &addr_items);
|
||||||
|
|
||||||
|
size_t hostlen;
|
||||||
|
const char* host = mp_obj_str_get_data(addr_items[0], &hostlen);
|
||||||
|
mp_int_t port = mp_obj_get_int(addr_items[1]);
|
||||||
|
if (port < 0) {
|
||||||
|
mp_raise_ValueError(translate("port must be >= 0"));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ok = common_hal_ssl_sslsocket_bind(self, host, hostlen, (uint32_t)port);
|
||||||
|
if (!ok) {
|
||||||
|
mp_raise_ValueError(translate("Error: Failure to bind"));
|
||||||
|
}
|
||||||
|
|
||||||
|
return mp_const_none;
|
||||||
|
}
|
||||||
|
STATIC MP_DEFINE_CONST_FUN_OBJ_2(ssl_sslsocket_bind_obj, ssl_sslsocket_bind);
|
||||||
|
|
||||||
|
//| def close(self) -> None:
|
||||||
|
//| """Closes this Socket"""
|
||||||
|
//|
|
||||||
|
STATIC mp_obj_t ssl_sslsocket_close(mp_obj_t self_in) {
|
||||||
|
ssl_sslsocket_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||||
|
common_hal_ssl_sslsocket_close(self);
|
||||||
|
return mp_const_none;
|
||||||
|
}
|
||||||
|
STATIC MP_DEFINE_CONST_FUN_OBJ_1(ssl_sslsocket_close_obj, ssl_sslsocket_close);
|
||||||
|
|
||||||
|
//| def connect(self, address: Tuple[str, int]) -> None:
|
||||||
|
//| """Connect a socket to a remote address
|
||||||
|
//|
|
||||||
|
//| :param ~tuple address: tuple of (remote_address, remote_port)"""
|
||||||
|
//| ...
|
||||||
|
//|
|
||||||
|
STATIC mp_obj_t ssl_sslsocket_connect(mp_obj_t self_in, mp_obj_t addr_in) {
|
||||||
|
ssl_sslsocket_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||||
|
|
||||||
|
mp_obj_t *addr_items;
|
||||||
|
mp_obj_get_array_fixed_n(addr_in, 2, &addr_items);
|
||||||
|
|
||||||
|
size_t hostlen;
|
||||||
|
const char* host = mp_obj_str_get_data(addr_items[0], &hostlen);
|
||||||
|
mp_int_t port = mp_obj_get_int(addr_items[1]);
|
||||||
|
if (port < 0) {
|
||||||
|
mp_raise_ValueError(translate("port must be >= 0"));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ok = common_hal_ssl_sslsocket_connect(self, host, hostlen, (uint32_t)port);
|
||||||
|
if (!ok) {
|
||||||
|
mp_raise_OSError(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return mp_const_none;
|
||||||
|
}
|
||||||
|
STATIC MP_DEFINE_CONST_FUN_OBJ_2(ssl_sslsocket_connect_obj, ssl_sslsocket_connect);
|
||||||
|
|
||||||
|
//| def listen(self, backlog: int) -> None:
|
||||||
|
//| """Set socket to listen for incoming connections
|
||||||
|
//|
|
||||||
|
//| :param ~int backlog: length of backlog queue for waiting connetions"""
|
||||||
|
//| ...
|
||||||
|
//|
|
||||||
|
STATIC mp_obj_t ssl_sslsocket_listen(mp_obj_t self_in, mp_obj_t backlog_in) {
|
||||||
|
ssl_sslsocket_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||||
|
|
||||||
|
int backlog = mp_obj_get_int(backlog_in);
|
||||||
|
|
||||||
|
common_hal_ssl_sslsocket_listen(self, backlog);
|
||||||
|
return mp_const_none;
|
||||||
|
}
|
||||||
|
STATIC MP_DEFINE_CONST_FUN_OBJ_2(ssl_sslsocket_listen_obj, ssl_sslsocket_listen);
|
||||||
|
|
||||||
|
//| def recv_into(self, buffer: WriteableBuffer, bufsize: int) -> int:
|
||||||
|
//| """Reads some bytes from the connected remote address, writing
|
||||||
|
//| into the provided buffer. If bufsize <= len(buffer) is given,
|
||||||
|
//| a maximum of bufsize bytes will be read into the buffer. If no
|
||||||
|
//| valid value is given for bufsize, the default is the length of
|
||||||
|
//| the given buffer.
|
||||||
|
//|
|
||||||
|
//| Suits sockets of type SOCK_STREAM
|
||||||
|
//| Returns an int of number of bytes read.
|
||||||
|
//|
|
||||||
|
//| :param bytearray buffer: buffer to receive into
|
||||||
|
//| :param int bufsize: optionally, a maximum number of bytes to read."""
|
||||||
|
//| ...
|
||||||
|
//|
|
||||||
|
STATIC mp_obj_t ssl_sslsocket_recv_into(size_t n_args, const mp_obj_t *args) {
|
||||||
|
ssl_sslsocket_obj_t *self = MP_OBJ_TO_PTR(args[0]);
|
||||||
|
if (common_hal_ssl_sslsocket_get_closed(self)) {
|
||||||
|
// Bad file number.
|
||||||
|
mp_raise_OSError(MP_EBADF);
|
||||||
|
}
|
||||||
|
// if (!common_hal_ssl_sslsocket_get_connected(self)) {
|
||||||
|
// // not connected
|
||||||
|
// mp_raise_OSError(MP_ENOTCONN);
|
||||||
|
// }
|
||||||
|
mp_buffer_info_t bufinfo;
|
||||||
|
mp_get_buffer_raise(args[1], &bufinfo, MP_BUFFER_WRITE);
|
||||||
|
mp_int_t len = bufinfo.len;
|
||||||
|
if (n_args == 3) {
|
||||||
|
mp_int_t given_len = mp_obj_get_int(args[2]);
|
||||||
|
if (given_len > len) {
|
||||||
|
mp_raise_ValueError(translate("buffer too small for requested bytes"));
|
||||||
|
}
|
||||||
|
if (given_len > 0 && given_len < len) {
|
||||||
|
len = given_len;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (len == 0) {
|
||||||
|
return MP_OBJ_NEW_SMALL_INT(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
mp_int_t ret = common_hal_ssl_sslsocket_recv_into(self, (byte*)bufinfo.buf, len);
|
||||||
|
return mp_obj_new_int_from_uint(ret);
|
||||||
|
}
|
||||||
|
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(ssl_sslsocket_recv_into_obj, 2, 3, ssl_sslsocket_recv_into);
|
||||||
|
|
||||||
|
//| def send(self, bytes: ReadableBuffer) -> int:
|
||||||
|
//| """Send some bytes to the connected remote address.
|
||||||
|
//| Suits sockets of type SOCK_STREAM
|
||||||
|
//|
|
||||||
|
//| :param ~bytes bytes: some bytes to send"""
|
||||||
|
//| ...
|
||||||
|
//|
|
||||||
|
STATIC mp_obj_t ssl_sslsocket_send(mp_obj_t self_in, mp_obj_t buf_in) {
|
||||||
|
ssl_sslsocket_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||||
|
if (common_hal_ssl_sslsocket_get_closed(self)) {
|
||||||
|
// Bad file number.
|
||||||
|
mp_raise_OSError(MP_EBADF);
|
||||||
|
}
|
||||||
|
if (!common_hal_ssl_sslsocket_get_connected(self)) {
|
||||||
|
mp_raise_BrokenPipeError();
|
||||||
|
}
|
||||||
|
mp_buffer_info_t bufinfo;
|
||||||
|
mp_get_buffer_raise(buf_in, &bufinfo, MP_BUFFER_READ);
|
||||||
|
mp_int_t ret = common_hal_ssl_sslsocket_send(self, bufinfo.buf, bufinfo.len);
|
||||||
|
if (ret == -1) {
|
||||||
|
mp_raise_BrokenPipeError();
|
||||||
|
}
|
||||||
|
return mp_obj_new_int_from_uint(ret);
|
||||||
|
}
|
||||||
|
STATIC MP_DEFINE_CONST_FUN_OBJ_2(ssl_sslsocket_send_obj, ssl_sslsocket_send);
|
||||||
|
|
||||||
|
// //| def setsockopt(self, level: int, optname: int, value: int) -> None:
|
||||||
|
// //| """Sets socket options"""
|
||||||
|
// //| ...
|
||||||
|
// //|
|
||||||
|
// STATIC mp_obj_t ssl_sslsocket_setsockopt(size_t n_args, const mp_obj_t *args) {
|
||||||
|
// }
|
||||||
|
// STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(ssl_sslsocket_setsockopt_obj, 4, 4, ssl_sslsocket_setsockopt);
|
||||||
|
|
||||||
|
//| def settimeout(self, value: int) -> None:
|
||||||
|
//| """Set the timeout value for this socket.
|
||||||
|
//|
|
||||||
|
//| :param ~int value: timeout in seconds. 0 means non-blocking. None means block indefinitely."""
|
||||||
|
//| ...
|
||||||
|
//|
|
||||||
|
STATIC mp_obj_t ssl_sslsocket_settimeout(mp_obj_t self_in, mp_obj_t timeout_in) {
|
||||||
|
ssl_sslsocket_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||||
|
mp_uint_t timeout_ms;
|
||||||
|
if (timeout_in == mp_const_none) {
|
||||||
|
timeout_ms = -1;
|
||||||
|
} else {
|
||||||
|
#if MICROPY_PY_BUILTINS_FLOAT
|
||||||
|
timeout_ms = 1000 * mp_obj_get_float(timeout_in);
|
||||||
|
#else
|
||||||
|
timeout_ms = 1000 * mp_obj_get_int(timeout_in);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
common_hal_ssl_sslsocket_settimeout(self, timeout_ms);
|
||||||
|
return mp_const_none;
|
||||||
|
}
|
||||||
|
STATIC MP_DEFINE_CONST_FUN_OBJ_2(ssl_sslsocket_settimeout_obj, ssl_sslsocket_settimeout);
|
||||||
|
|
||||||
|
//| def setblocking(self, flag: bool) -> Optional[int]:
|
||||||
|
//| """Set the blocking behaviour of this socket.
|
||||||
|
//|
|
||||||
|
//| :param ~bool flag: False means non-blocking, True means block indefinitely."""
|
||||||
|
//| ...
|
||||||
|
//|
|
||||||
|
// method socket.setblocking(flag)
|
||||||
|
STATIC mp_obj_t ssl_sslsocket_setblocking(mp_obj_t self_in, mp_obj_t blocking) {
|
||||||
|
ssl_sslsocket_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||||
|
if (mp_obj_is_true(blocking)) {
|
||||||
|
common_hal_ssl_sslsocket_settimeout(self, -1);
|
||||||
|
} else {
|
||||||
|
common_hal_ssl_sslsocket_settimeout(self, 0);
|
||||||
|
}
|
||||||
|
return mp_const_none;
|
||||||
|
}
|
||||||
|
STATIC MP_DEFINE_CONST_FUN_OBJ_2(ssl_sslsocket_setblocking_obj, ssl_sslsocket_setblocking);
|
||||||
|
|
||||||
|
//| def __hash__(self) -> int:
|
||||||
|
//| """Returns a hash for the Socket."""
|
||||||
|
//| ...
|
||||||
|
//|
|
||||||
|
STATIC mp_obj_t ssl_sslsocket_unary_op(mp_unary_op_t op, mp_obj_t self_in) {
|
||||||
|
switch (op) {
|
||||||
|
case MP_UNARY_OP_HASH: {
|
||||||
|
return mp_obj_id(self_in);
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
return MP_OBJ_NULL; // op not supported
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
STATIC const mp_rom_map_elem_t ssl_sslsocket_locals_dict_table[] = {
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR___enter__), MP_ROM_PTR(&default___enter___obj) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR___exit__), MP_ROM_PTR(&ssl_sslsocket___exit___obj) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR___del__), MP_ROM_PTR(&ssl_sslsocket_close_obj) },
|
||||||
|
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_accept), MP_ROM_PTR(&ssl_sslsocket_accept_obj) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_bind), MP_ROM_PTR(&ssl_sslsocket_bind_obj) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&ssl_sslsocket_close_obj) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_connect), MP_ROM_PTR(&ssl_sslsocket_connect_obj) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_listen), MP_ROM_PTR(&ssl_sslsocket_listen_obj) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_recv_into), MP_ROM_PTR(&ssl_sslsocket_recv_into_obj) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_send), MP_ROM_PTR(&ssl_sslsocket_send_obj) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_setblocking), MP_ROM_PTR(&ssl_sslsocket_setblocking_obj) },
|
||||||
|
// { MP_ROM_QSTR(MP_QSTR_setsockopt), MP_ROM_PTR(&ssl_sslsocket_setsockopt_obj) },
|
||||||
|
{ MP_ROM_QSTR(MP_QSTR_settimeout), MP_ROM_PTR(&ssl_sslsocket_settimeout_obj) },
|
||||||
|
};
|
||||||
|
|
||||||
|
STATIC MP_DEFINE_CONST_DICT(ssl_sslsocket_locals_dict, ssl_sslsocket_locals_dict_table);
|
||||||
|
|
||||||
|
const mp_obj_type_t ssl_sslsocket_type = {
|
||||||
|
{ &mp_type_type },
|
||||||
|
.name = MP_QSTR_SSLSocket,
|
||||||
|
.locals_dict = (mp_obj_dict_t*)&ssl_sslsocket_locals_dict,
|
||||||
|
.unary_op = ssl_sslsocket_unary_op,
|
||||||
|
};
|
|
@ -0,0 +1,45 @@
|
||||||
|
/*
|
||||||
|
* This file is part of the MicroPython project, http://micropython.org/
|
||||||
|
*
|
||||||
|
* The MIT License (MIT)
|
||||||
|
*
|
||||||
|
* Copyright (c) 2020 Lucian Copeland for Adafruit Industries
|
||||||
|
*
|
||||||
|
* 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_SSL_SSLSOCKET_H
|
||||||
|
#define MICROPY_INCLUDED_SHARED_BINDINGS_SSL_SSLSOCKET_H
|
||||||
|
|
||||||
|
#include "common-hal/ssl/SSLSocket.h"
|
||||||
|
|
||||||
|
extern const mp_obj_type_t ssl_sslsocket_type;
|
||||||
|
|
||||||
|
ssl_sslsocket_obj_t * common_hal_ssl_sslsocket_accept(ssl_sslsocket_obj_t* self, uint8_t* ip, uint32_t *port);
|
||||||
|
bool common_hal_ssl_sslsocket_bind(ssl_sslsocket_obj_t* self, const char* host, size_t hostlen, uint32_t port);
|
||||||
|
void common_hal_ssl_sslsocket_close(ssl_sslsocket_obj_t* self);
|
||||||
|
bool common_hal_ssl_sslsocket_connect(ssl_sslsocket_obj_t* self, const char* host, size_t hostlen, uint32_t port);
|
||||||
|
bool common_hal_ssl_sslsocket_get_closed(ssl_sslsocket_obj_t* self);
|
||||||
|
bool common_hal_ssl_sslsocket_get_connected(ssl_sslsocket_obj_t* self);
|
||||||
|
bool common_hal_ssl_sslsocket_listen(ssl_sslsocket_obj_t* self, int backlog);
|
||||||
|
mp_uint_t common_hal_ssl_sslsocket_recv_into(ssl_sslsocket_obj_t* self, const uint8_t* buf, uint32_t len);
|
||||||
|
mp_uint_t common_hal_ssl_sslsocket_send(ssl_sslsocket_obj_t* self, const uint8_t* buf, uint32_t len);
|
||||||
|
void common_hal_ssl_sslsocket_settimeout(ssl_sslsocket_obj_t* self, uint32_t timeout_ms);
|
||||||
|
|
||||||
|
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_SSL_SSLSOCKET_H
|
|
@ -60,27 +60,6 @@ STATIC mp_obj_t supervisor_runtime_get_serial_connected(mp_obj_t self){
|
||||||
}
|
}
|
||||||
MP_DEFINE_CONST_FUN_OBJ_1(supervisor_runtime_get_serial_connected_obj, supervisor_runtime_get_serial_connected);
|
MP_DEFINE_CONST_FUN_OBJ_1(supervisor_runtime_get_serial_connected_obj, supervisor_runtime_get_serial_connected);
|
||||||
|
|
||||||
//| serial2: io.BytesIO
|
|
||||||
//| """Returns the USB secondary serial communication channel.
|
|
||||||
//| Raises `NotImplementedError` if it does not exist.
|
|
||||||
//| """
|
|
||||||
//|
|
|
||||||
STATIC mp_obj_t supervisor_runtime_get_serial2(mp_obj_t self){
|
|
||||||
#if CIRCUITPY_USB_SERIAL2
|
|
||||||
return mp_obj_new_bool(common_hal_supervisor_runtime_get_serial2());
|
|
||||||
#else
|
|
||||||
mp_raise_NotImplementedError(translate("serial2 not available"));
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
MP_DEFINE_CONST_FUN_OBJ_1(supervisor_runtime_get_serial2_obj, supervisor_runtime_get_serial2);
|
|
||||||
|
|
||||||
const mp_obj_property_t supervisor_runtime_serial2_connected_obj = {
|
|
||||||
.base.type = &mp_type_property,
|
|
||||||
.proxy = {(mp_obj_t)&supervisor_runtime_get_serial2_connected_obj,
|
|
||||||
(mp_obj_t)&mp_const_none_obj,
|
|
||||||
(mp_obj_t)&mp_const_none_obj},
|
|
||||||
};
|
|
||||||
|
|
||||||
const mp_obj_property_t supervisor_runtime_serial_connected_obj = {
|
const mp_obj_property_t supervisor_runtime_serial_connected_obj = {
|
||||||
.base.type = &mp_type_property,
|
.base.type = &mp_type_property,
|
||||||
.proxy = {(mp_obj_t)&supervisor_runtime_get_serial_connected_obj,
|
.proxy = {(mp_obj_t)&supervisor_runtime_get_serial_connected_obj,
|
||||||
|
@ -88,27 +67,6 @@ const mp_obj_property_t supervisor_runtime_serial_connected_obj = {
|
||||||
(mp_obj_t)&mp_const_none_obj},
|
(mp_obj_t)&mp_const_none_obj},
|
||||||
};
|
};
|
||||||
|
|
||||||
//| serial2_connected: bool
|
|
||||||
//| """Returns the USB secondary serial communication status (read-only).
|
|
||||||
//| Raises `NotImplementedError` if there is no secondary serial channel.
|
|
||||||
//| """
|
|
||||||
//|
|
|
||||||
STATIC mp_obj_t supervisor_runtime_get_serial2_connected(mp_obj_t self){
|
|
||||||
#if CIRCUITPY_USB_SERIAL2
|
|
||||||
return mp_obj_new_bool(common_hal_supervisor_runtime_get_serial2_connected());
|
|
||||||
#else
|
|
||||||
mp_raise_NotImplementedError(translate("serial2 not available"));
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
MP_DEFINE_CONST_FUN_OBJ_1(supervisor_runtime_get_serial2_connected_obj, supervisor_runtime_get_serial2_connected);
|
|
||||||
|
|
||||||
const mp_obj_property_t supervisor_runtime_serial2_connected_obj = {
|
|
||||||
.base.type = &mp_type_property,
|
|
||||||
.proxy = {(mp_obj_t)&supervisor_runtime_get_serial2_connected_obj,
|
|
||||||
(mp_obj_t)&mp_const_none_obj,
|
|
||||||
(mp_obj_t)&mp_const_none_obj},
|
|
||||||
};
|
|
||||||
|
|
||||||
//| serial_bytes_available: int
|
//| serial_bytes_available: int
|
||||||
//| """Returns the whether any bytes are available to read
|
//| """Returns the whether any bytes are available to read
|
||||||
//| on the USB serial input. Allows for polling to see whether
|
//| on the USB serial input. Allows for polling to see whether
|
||||||
|
@ -126,30 +84,6 @@ const mp_obj_property_t supervisor_runtime_serial_bytes_available_obj = {
|
||||||
(mp_obj_t)&mp_const_none_obj},
|
(mp_obj_t)&mp_const_none_obj},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//| serial2_bytes_available: int
|
|
||||||
//| """Returns the whether any bytes are available to read
|
|
||||||
//| on the secondary USB serial input (read-only).
|
|
||||||
//| Raises `NotImplementedError` if there is no secondary serial input.
|
|
||||||
//| """
|
|
||||||
//|
|
|
||||||
STATIC mp_obj_t supervisor_runtime_get_serial2_bytes_available(mp_obj_t self){
|
|
||||||
#if CIRCUITPY_USB_SERIAL2
|
|
||||||
return mp_obj_new_bool(common_hal_supervisor_runtime_get_serial2_bytes_available());
|
|
||||||
#else
|
|
||||||
mp_raise_NotImplementedError(translate("serial2 not available"));
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
MP_DEFINE_CONST_FUN_OBJ_1(supervisor_runtime_get_serial2_bytes_available_obj, supervisor_runtime_get_serial2_bytes_available);
|
|
||||||
|
|
||||||
const mp_obj_property_t supervisor_runtime_serial2_bytes_available_obj = {
|
|
||||||
.base.type = &mp_type_property,
|
|
||||||
.proxy = {(mp_obj_t)&supervisor_runtime_get_serial2_bytes_available_obj,
|
|
||||||
(mp_obj_t)&mp_const_none_obj,
|
|
||||||
(mp_obj_t)&mp_const_none_obj},
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
//| run_reason: RunReason
|
//| run_reason: RunReason
|
||||||
//| """Returns why CircuitPython started running this particular time."""
|
//| """Returns why CircuitPython started running this particular time."""
|
||||||
//|
|
//|
|
||||||
|
@ -165,15 +99,13 @@ const mp_obj_property_t supervisor_runtime_run_reason_obj = {
|
||||||
(mp_obj_t)&mp_const_none_obj},
|
(mp_obj_t)&mp_const_none_obj},
|
||||||
};
|
};
|
||||||
|
|
||||||
void supervisor_runtime_set_run_reason(supervisor_runtime_run_reason_t run_reason) {
|
void supervisor_set_run_reason(supervisor_run_reason_t run_reason) {
|
||||||
_run_reason = run_reason;
|
_run_reason = run_reason;
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC const mp_rom_map_elem_t supervisor_runtime_locals_dict_table[] = {
|
STATIC const mp_rom_map_elem_t supervisor_runtime_locals_dict_table[] = {
|
||||||
{ MP_ROM_QSTR(MP_QSTR_serial_connected), MP_ROM_PTR(&supervisor_runtime_serial_connected_obj) },
|
{ MP_ROM_QSTR(MP_QSTR_serial_connected), MP_ROM_PTR(&supervisor_runtime_serial_connected_obj) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_serial2_connected), MP_ROM_PTR(&supervisor_runtime_serial2_connected_obj) },
|
|
||||||
{ MP_ROM_QSTR(MP_QSTR_serial_bytes_available), MP_ROM_PTR(&supervisor_runtime_serial_bytes_available_obj) },
|
{ MP_ROM_QSTR(MP_QSTR_serial_bytes_available), MP_ROM_PTR(&supervisor_runtime_serial_bytes_available_obj) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_serial2_bytes_available), MP_ROM_PTR(&supervisor_runtime_serial2_bytes_available_obj) },
|
|
||||||
{ MP_ROM_QSTR(MP_QSTR_run_reason), MP_ROM_PTR(&supervisor_runtime_run_reason_obj) },
|
{ MP_ROM_QSTR(MP_QSTR_run_reason), MP_ROM_PTR(&supervisor_runtime_run_reason_obj) },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ void common_hal_adafruit_bus_device_spidevice_construct(adafruit_bus_device_spid
|
||||||
self->chip_select = cs;
|
self->chip_select = cs;
|
||||||
}
|
}
|
||||||
|
|
||||||
void common_hal_adafruit_bus_device_spidevice_enter(adafruit_bus_device_spidevice_obj_t *self) {
|
mp_obj_t common_hal_adafruit_bus_device_spidevice_enter(adafruit_bus_device_spidevice_obj_t *self) {
|
||||||
bool success = false;
|
bool success = false;
|
||||||
while (!success) {
|
while (!success) {
|
||||||
success = common_hal_busio_spi_try_lock(self->spi);
|
success = common_hal_busio_spi_try_lock(self->spi);
|
||||||
|
@ -54,6 +54,7 @@ void common_hal_adafruit_bus_device_spidevice_enter(adafruit_bus_device_spidevic
|
||||||
if (self->chip_select != MP_OBJ_NULL) {
|
if (self->chip_select != MP_OBJ_NULL) {
|
||||||
common_hal_digitalio_digitalinout_set_value(MP_OBJ_TO_PTR(self->chip_select), false);
|
common_hal_digitalio_digitalinout_set_value(MP_OBJ_TO_PTR(self->chip_select), false);
|
||||||
}
|
}
|
||||||
|
return self->spi;
|
||||||
}
|
}
|
||||||
|
|
||||||
void common_hal_adafruit_bus_device_spidevice_exit(adafruit_bus_device_spidevice_obj_t *self) {
|
void common_hal_adafruit_bus_device_spidevice_exit(adafruit_bus_device_spidevice_obj_t *self) {
|
||||||
|
@ -83,3 +84,7 @@ void common_hal_adafruit_bus_device_spidevice_exit(adafruit_bus_device_spidevice
|
||||||
|
|
||||||
common_hal_busio_spi_unlock(self->spi);
|
common_hal_busio_spi_unlock(self->spi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mp_obj_t common_hal_adafruit_bus_device_spidevice_get_spi(adafruit_bus_device_spidevice_obj_t *self) {
|
||||||
|
return self->spi;
|
||||||
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#include "supervisor/shared/tick.h"
|
#include "supervisor/shared/tick.h"
|
||||||
#include "shared-bindings/microcontroller/__init__.h"
|
#include "shared-bindings/microcontroller/__init__.h"
|
||||||
|
|
||||||
STATIC volatile background_callback_t *callback_head, *callback_tail;
|
STATIC volatile background_callback_t * volatile callback_head, * volatile callback_tail;
|
||||||
|
|
||||||
#define CALLBACK_CRITICAL_BEGIN (common_hal_mcu_disable_interrupts())
|
#define CALLBACK_CRITICAL_BEGIN (common_hal_mcu_disable_interrupts())
|
||||||
#define CALLBACK_CRITICAL_END (common_hal_mcu_enable_interrupts())
|
#define CALLBACK_CRITICAL_END (common_hal_mcu_enable_interrupts())
|
||||||
|
@ -50,7 +50,6 @@ void background_callback_add_core(background_callback_t *cb) {
|
||||||
cb->prev = (background_callback_t*)callback_tail;
|
cb->prev = (background_callback_t*)callback_tail;
|
||||||
if (callback_tail) {
|
if (callback_tail) {
|
||||||
callback_tail->next = cb;
|
callback_tail->next = cb;
|
||||||
cb->prev = (background_callback_t*)callback_tail;
|
|
||||||
}
|
}
|
||||||
if (!callback_head) {
|
if (!callback_head) {
|
||||||
callback_head = cb;
|
callback_head = cb;
|
||||||
|
|
|
@ -47,6 +47,10 @@ busio_uart_obj_t debug_uart;
|
||||||
byte buf_array[64];
|
byte buf_array[64];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if CIRCUITPY_USB_VENDOR
|
||||||
|
bool tud_vendor_connected(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
void serial_early_init(void) {
|
void serial_early_init(void) {
|
||||||
#if defined(DEBUG_UART_TX) && defined(DEBUG_UART_RX)
|
#if defined(DEBUG_UART_TX) && defined(DEBUG_UART_RX)
|
||||||
debug_uart.base.type = &busio_uart_type;
|
debug_uart.base.type = &busio_uart_type;
|
||||||
|
@ -66,6 +70,12 @@ void serial_init(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool serial_connected(void) {
|
bool serial_connected(void) {
|
||||||
|
#if CIRCUITPY_USB_VENDOR
|
||||||
|
if (tud_vendor_connected()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(DEBUG_UART_TX) && defined(DEBUG_UART_RX)
|
#if defined(DEBUG_UART_TX) && defined(DEBUG_UART_RX)
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
|
@ -74,6 +84,14 @@ bool serial_connected(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
char serial_read(void) {
|
char serial_read(void) {
|
||||||
|
#if CIRCUITPY_USB_VENDOR
|
||||||
|
if (tud_vendor_connected() && tud_vendor_available() > 0) {
|
||||||
|
char tiny_buffer;
|
||||||
|
tud_vendor_read(&tiny_buffer, 1);
|
||||||
|
return tiny_buffer;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(DEBUG_UART_TX) && defined(DEBUG_UART_RX)
|
#if defined(DEBUG_UART_TX) && defined(DEBUG_UART_RX)
|
||||||
if (tud_cdc_connected() && tud_cdc_available() > 0) {
|
if (tud_cdc_connected() && tud_cdc_available() > 0) {
|
||||||
return (char) tud_cdc_read_char();
|
return (char) tud_cdc_read_char();
|
||||||
|
@ -88,6 +106,12 @@ char serial_read(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool serial_bytes_available(void) {
|
bool serial_bytes_available(void) {
|
||||||
|
#if CIRCUITPY_USB_VENDOR
|
||||||
|
if (tud_vendor_connected() && tud_vendor_available() > 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(DEBUG_UART_TX) && defined(DEBUG_UART_RX)
|
#if defined(DEBUG_UART_TX) && defined(DEBUG_UART_RX)
|
||||||
return common_hal_busio_uart_rx_characters_available(&debug_uart) || (tud_cdc_available() > 0);
|
return common_hal_busio_uart_rx_characters_available(&debug_uart) || (tud_cdc_available() > 0);
|
||||||
#else
|
#else
|
||||||
|
@ -103,6 +127,12 @@ void serial_write_substring(const char* text, uint32_t length) {
|
||||||
common_hal_terminalio_terminal_write(&supervisor_terminal, (const uint8_t*) text, length, &errcode);
|
common_hal_terminalio_terminal_write(&supervisor_terminal, (const uint8_t*) text, length, &errcode);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if CIRCUITPY_USB_VENDOR
|
||||||
|
if (tud_vendor_connected()) {
|
||||||
|
tud_vendor_write(text, length);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
uint32_t count = 0;
|
uint32_t count = 0;
|
||||||
while (count < length && tud_cdc_connected()) {
|
while (count < length && tud_cdc_connected()) {
|
||||||
count += tud_cdc_write(text + count, length - count);
|
count += tud_cdc_write(text + count, length - count);
|
||||||
|
|
|
@ -73,6 +73,7 @@
|
||||||
#define CFG_TUD_MSC 1
|
#define CFG_TUD_MSC 1
|
||||||
#define CFG_TUD_HID CIRCUITPY_USB_HID
|
#define CFG_TUD_HID CIRCUITPY_USB_HID
|
||||||
#define CFG_TUD_MIDI CIRCUITPY_USB_MIDI
|
#define CFG_TUD_MIDI CIRCUITPY_USB_MIDI
|
||||||
|
#define CFG_TUD_VENDOR CIRCUITPY_USB_VENDOR
|
||||||
#define CFG_TUD_CUSTOM_CLASS 0
|
#define CFG_TUD_CUSTOM_CLASS 0
|
||||||
|
|
||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
|
|
|
@ -37,6 +37,19 @@
|
||||||
|
|
||||||
#include "tusb.h"
|
#include "tusb.h"
|
||||||
|
|
||||||
|
#if CIRCUITPY_USB_VENDOR
|
||||||
|
#include "genhdr/autogen_usb_descriptor.h"
|
||||||
|
|
||||||
|
// The WebUSB support being conditionally added to this file is based on the
|
||||||
|
// tinyusb demo examples/device/webusb_serial.
|
||||||
|
|
||||||
|
extern const tusb_desc_webusb_url_t desc_webusb_url;
|
||||||
|
|
||||||
|
static bool web_serial_connected = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Serial number as hex characters. This writes directly to the USB
|
// Serial number as hex characters. This writes directly to the USB
|
||||||
// descriptor.
|
// descriptor.
|
||||||
extern uint16_t usb_serial_number[1 + COMMON_HAL_MCU_PROCESSOR_UID_LENGTH * 2];
|
extern uint16_t usb_serial_number[1 + COMMON_HAL_MCU_PROCESSOR_UID_LENGTH * 2];
|
||||||
|
@ -98,9 +111,14 @@ static void usb_background_do(void* unused) {
|
||||||
usb_background();
|
usb_background();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void usb_background_schedule(void)
|
||||||
|
{
|
||||||
|
background_callback_add(&usb_callback, usb_background_do, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
void usb_irq_handler(void) {
|
void usb_irq_handler(void) {
|
||||||
tud_int_handler(0);
|
tud_int_handler(0);
|
||||||
background_callback_add(&usb_callback, usb_background_do, NULL);
|
usb_background_schedule();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
|
@ -145,6 +163,62 @@ void tud_cdc_line_state_cb(uint8_t itf, bool dtr, bool rts) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CIRCUITPY_USB_VENDOR
|
||||||
|
//--------------------------------------------------------------------+
|
||||||
|
// WebUSB use vendor class
|
||||||
|
//--------------------------------------------------------------------+
|
||||||
|
|
||||||
|
bool tud_vendor_connected(void)
|
||||||
|
{
|
||||||
|
return web_serial_connected;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Invoked when a control transfer occurred on an interface of this class
|
||||||
|
// Driver response accordingly to the request and the transfer stage (setup/data/ack)
|
||||||
|
// return false to stall control endpoint (e.g unsupported request)
|
||||||
|
bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_request_t const * request)
|
||||||
|
{
|
||||||
|
// nothing to with DATA & ACK stage
|
||||||
|
if (stage != CONTROL_STAGE_SETUP ) return true;
|
||||||
|
|
||||||
|
switch (request->bRequest)
|
||||||
|
{
|
||||||
|
case VENDOR_REQUEST_WEBUSB:
|
||||||
|
// match vendor request in BOS descriptor
|
||||||
|
// Get landing page url
|
||||||
|
return tud_control_xfer(rhport, request, (void*) &desc_webusb_url, desc_webusb_url.bLength);
|
||||||
|
|
||||||
|
case VENDOR_REQUEST_MICROSOFT:
|
||||||
|
if ( request->wIndex == 7 )
|
||||||
|
{
|
||||||
|
// Get Microsoft OS 2.0 compatible descriptor
|
||||||
|
uint16_t total_len;
|
||||||
|
memcpy(&total_len, desc_ms_os_20+8, 2);
|
||||||
|
|
||||||
|
return tud_control_xfer(rhport, request, (void*) desc_ms_os_20, total_len);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 0x22:
|
||||||
|
// Webserial simulate the CDC_REQUEST_SET_CONTROL_LINE_STATE (0x22) to
|
||||||
|
// connect and disconnect.
|
||||||
|
web_serial_connected = (request->wValue != 0);
|
||||||
|
|
||||||
|
// response with status OK
|
||||||
|
return tud_control_status(rhport, request);
|
||||||
|
|
||||||
|
default:
|
||||||
|
// stall unknown request
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
#endif CIRCUITPY_USB_VENDOR
|
||||||
|
|
||||||
|
|
||||||
#if MICROPY_KBD_EXCEPTION
|
#if MICROPY_KBD_EXCEPTION
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -43,12 +43,14 @@ uint8_t const * tud_descriptor_configuration_cb(uint8_t index) {
|
||||||
return usb_desc_cfg;
|
return usb_desc_cfg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CIRCUITPY_USB_HID
|
||||||
// Invoked when received GET HID REPORT DESCRIPTOR
|
// Invoked when received GET HID REPORT DESCRIPTOR
|
||||||
// Application return pointer to descriptor
|
// Application return pointer to descriptor
|
||||||
// Descriptor contents must exist long enough for transfer to complete
|
// Descriptor contents must exist long enough for transfer to complete
|
||||||
uint8_t const * tud_hid_descriptor_report_cb(void) {
|
uint8_t const * tud_hid_descriptor_report_cb(void) {
|
||||||
return hid_report_descriptor;
|
return hid_report_descriptor;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Invoked when received GET STRING DESCRIPTOR request
|
// Invoked when received GET STRING DESCRIPTOR request
|
||||||
// Application return pointer to descriptor, whose contents must exist long enough for transfer to complete
|
// Application return pointer to descriptor, whose contents must exist long enough for transfer to complete
|
||||||
|
|
|
@ -22,7 +22,7 @@ CFLAGS += -DINTERNAL_FLASH_FILESYSTEM=$(INTERNAL_FLASH_FILESYSTEM)
|
||||||
QSPI_FLASH_FILESYSTEM ?= 0
|
QSPI_FLASH_FILESYSTEM ?= 0
|
||||||
CFLAGS += -DQSPI_FLASH_FILESYSTEM=$(QSPI_FLASH_FILESYSTEM)
|
CFLAGS += -DQSPI_FLASH_FILESYSTEM=$(QSPI_FLASH_FILESYSTEM)
|
||||||
|
|
||||||
SPI_FLASH_FILESYSTEM = 0
|
SPI_FLASH_FILESYSTEM ?= 0
|
||||||
CFLAGS += -DSPI_FLASH_FILESYSTEM=$(SPI_FLASH_FILESYSTEM)
|
CFLAGS += -DSPI_FLASH_FILESYSTEM=$(SPI_FLASH_FILESYSTEM)
|
||||||
|
|
||||||
ifeq ($(CIRCUITPY_BLEIO),1)
|
ifeq ($(CIRCUITPY_BLEIO),1)
|
||||||
|
@ -94,6 +94,11 @@ else
|
||||||
shared-module/usb_midi/PortOut.c
|
shared-module/usb_midi/PortOut.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CIRCUITPY_USB_VENDOR), 1)
|
||||||
|
SRC_SUPERVISOR += \
|
||||||
|
lib/tinyusb/src/class/vendor/vendor_device.c
|
||||||
|
endif
|
||||||
|
|
||||||
CFLAGS += -DUSB_AVAILABLE
|
CFLAGS += -DUSB_AVAILABLE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -117,10 +122,10 @@ CFLAGS += -DUSB_MANUFACTURER=$(USB_MANUFACTURER)
|
||||||
CFLAGS += -DUSB_PRODUCT=$(USB_PRODUCT)
|
CFLAGS += -DUSB_PRODUCT=$(USB_PRODUCT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
USB_DEVICES =
|
# In the following URL, don't include the https:// prefix.
|
||||||
ifeq ($(CIRCUITPY_USB_HID),1)
|
# It gets added automatically.
|
||||||
USB_DEVICES += HID
|
USB_WEBUSB_URL ?= "circuitpython.org"
|
||||||
endif
|
|
||||||
ifeq ($(CIRCUITPY_USB_MIDI),1)
|
ifeq ($(CIRCUITPY_USB_MIDI),1)
|
||||||
USB_DEVICES += AUDIO
|
USB_DEVICES += AUDIO
|
||||||
endif
|
endif
|
||||||
|
@ -135,6 +140,9 @@ ifeq ($(CIRCUITPY_USB_SERIAL2),1)
|
||||||
CFLAGS += -DCFG_TUD_CDC=2
|
CFLAGS += -DCFG_TUD_CDC=2
|
||||||
USB_DEVICES += CDC2
|
USB_DEVICES += CDC2
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(CIRCUITPY_USB_VENDOR),1)
|
||||||
|
USB_DEVICES += VENDOR
|
||||||
|
endif
|
||||||
|
|
||||||
USB_HID_DEVICES =
|
USB_HID_DEVICES =
|
||||||
ifeq ($(CIRCUITPY_USB_HID_CONSUMER),1)
|
ifeq ($(CIRCUITPY_USB_HID_CONSUMER),1)
|
||||||
|
@ -163,7 +171,7 @@ endif
|
||||||
ifeq ($(CIRCUITPY_USB_HID_RAW),1)
|
ifeq ($(CIRCUITPY_USB_HID_RAW),1)
|
||||||
ifneq ($(CIRCUITPY_USB_HID_DEVICES,)
|
ifneq ($(CIRCUITPY_USB_HID_DEVICES,)
|
||||||
$(error HID RAW must not be combined with other HID devices)
|
$(error HID RAW must not be combined with other HID devices)
|
||||||
endif
|
endif
|
||||||
USB_HID_DEVICES += MOUSE
|
USB_HID_DEVICES += MOUSE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -202,6 +210,12 @@ USB_DESCRIPTOR_ARGS = \
|
||||||
--output_c_file $(BUILD)/autogen_usb_descriptor.c\
|
--output_c_file $(BUILD)/autogen_usb_descriptor.c\
|
||||||
--output_h_file $(BUILD)/genhdr/autogen_usb_descriptor.h
|
--output_h_file $(BUILD)/genhdr/autogen_usb_descriptor.h
|
||||||
|
|
||||||
|
ifeq ($(CIRCUITPY_USB_VENDOR), 1)
|
||||||
|
USB_DESCRIPTOR_ARGS += \
|
||||||
|
--vendor_ep_num_out 0 --vendor_ep_num_in 0 \
|
||||||
|
--webusb_url $(USB_WEBUSB_URL)
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(USB_RENUMBER_ENDPOINTS), 0)
|
ifeq ($(USB_RENUMBER_ENDPOINTS), 0)
|
||||||
USB_DESCRIPTOR_ARGS += --no-renumber_endpoints
|
USB_DESCRIPTOR_ARGS += --no-renumber_endpoints
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -35,6 +35,9 @@
|
||||||
// it may be necessary to call it directly.
|
// it may be necessary to call it directly.
|
||||||
void usb_background(void);
|
void usb_background(void);
|
||||||
|
|
||||||
|
// Schedule usb background
|
||||||
|
void usb_background_schedule(void);
|
||||||
|
|
||||||
// Ports must call this from their particular USB IRQ handler
|
// Ports must call this from their particular USB IRQ handler
|
||||||
void usb_irq_handler(void);
|
void usb_irq_handler(void);
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,8 @@ import os
|
||||||
import struct
|
import struct
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
sys.path.append("bitmap_font")
|
sys.path.insert(0, "bitmap_font")
|
||||||
sys.path.append("../../tools/bitmap_font")
|
sys.path.insert(0, "../../tools/bitmap_font")
|
||||||
|
|
||||||
from adafruit_bitmap_font import bitmap_font
|
from adafruit_bitmap_font import bitmap_font
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ from adafruit_usb_descriptor import audio, audio10, cdc, hid, midi, msc, standar
|
||||||
import hid_report_descriptors
|
import hid_report_descriptors
|
||||||
|
|
||||||
DEFAULT_INTERFACE_NAME = "CircuitPython"
|
DEFAULT_INTERFACE_NAME = "CircuitPython"
|
||||||
ALL_DEVICES = "CDC CDC2 MSC AUDIO HID"
|
ALL_DEVICES = "CDC CDC2 MSC AUDIO HID VENDOR"
|
||||||
ALL_DEVICES_SET = frozenset(ALL_DEVICES.split())
|
ALL_DEVICES_SET = frozenset(ALL_DEVICES.split())
|
||||||
DEFAULT_DEVICES = "CDC MSC AUDIO HID"
|
DEFAULT_DEVICES = "CDC MSC AUDIO HID"
|
||||||
|
|
||||||
|
@ -24,6 +24,11 @@ ALL_HID_DEVICES_SET = frozenset(ALL_HID_DEVICES.split())
|
||||||
# Digitizer works on Linux but conflicts with mouse, so omit it.
|
# Digitizer works on Linux but conflicts with mouse, so omit it.
|
||||||
DEFAULT_HID_DEVICES = "KEYBOARD MOUSE CONSUMER GAMEPAD"
|
DEFAULT_HID_DEVICES = "KEYBOARD MOUSE CONSUMER GAMEPAD"
|
||||||
|
|
||||||
|
# In the following URL, don't include the https:// because that prefix gets added automatically
|
||||||
|
DEFAULT_WEBUSB_URL = (
|
||||||
|
"circuitpython.org" # In the future, this may become a specific landing page
|
||||||
|
)
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description="Generate USB descriptors.")
|
parser = argparse.ArgumentParser(description="Generate USB descriptors.")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--highspeed",
|
"--highspeed",
|
||||||
|
@ -98,6 +103,18 @@ parser.add_argument(
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--max_ep", type=int, default=0, help="total number of endpoints available"
|
"--max_ep", type=int, default=0, help="total number of endpoints available"
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--webusb_url",
|
||||||
|
type=str,
|
||||||
|
help="The URL to include in the WebUSB URL Descriptor",
|
||||||
|
default=DEFAULT_WEBUSB_URL,
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--vendor_ep_num_out", type=int, default=0, help="endpoint number of VENDOR OUT"
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--vendor_ep_num_in", type=int, default=0, help="endpoint number of VENDOR IN"
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--output_c_file", type=argparse.FileType("w", encoding="UTF-8"), required=True
|
"--output_c_file", type=argparse.FileType("w", encoding="UTF-8"), required=True
|
||||||
)
|
)
|
||||||
|
@ -120,6 +137,7 @@ include_cdc2 = "CDC2" in args.devices
|
||||||
include_msc = "MSC" in args.devices
|
include_msc = "MSC" in args.devices
|
||||||
include_hid = "HID" in args.devices
|
include_hid = "HID" in args.devices
|
||||||
include_audio = "AUDIO" in args.devices
|
include_audio = "AUDIO" in args.devices
|
||||||
|
include_vendor = "VENDOR" in args.devices
|
||||||
|
|
||||||
if not include_cdc and include_cdc2:
|
if not include_cdc and include_cdc2:
|
||||||
raise ValueError("CDC2 requested without CDC")
|
raise ValueError("CDC2 requested without CDC")
|
||||||
|
@ -154,6 +172,12 @@ if not args.renumber_endpoints:
|
||||||
elif args.midi_ep_num_in == 0:
|
elif args.midi_ep_num_in == 0:
|
||||||
raise ValueError("MIDI endpoint IN number must not be 0")
|
raise ValueError("MIDI endpoint IN number must not be 0")
|
||||||
|
|
||||||
|
if include_vendor:
|
||||||
|
if args.vendor_ep_num_out == 0:
|
||||||
|
raise ValueError("VENDOR endpoint OUT number must not be 0")
|
||||||
|
elif args.vendor_ep_num_in == 0:
|
||||||
|
raise ValueError("VENDOR endpoint IN number must not be 0")
|
||||||
|
|
||||||
|
|
||||||
class StringIndex:
|
class StringIndex:
|
||||||
"""Assign a monotonically increasing index to each unique string. Start with 0."""
|
"""Assign a monotonically increasing index to each unique string. Start with 0."""
|
||||||
|
@ -273,7 +297,7 @@ if include_cdc:
|
||||||
cdc_comm_interface = make_cdc_comm_interface("CDC", cdc_union)
|
cdc_comm_interface = make_cdc_comm_interface("CDC", cdc_union)
|
||||||
cdc_data_interface = make_cdc_data_interface("CDC")
|
cdc_data_interface = make_cdc_data_interface("CDC")
|
||||||
|
|
||||||
cdc_interfaces = [cdc_comm_interface, cdc_data_interface]
|
cdc_interfaces = [cdc_comm_interface, cdc_data_interface]
|
||||||
|
|
||||||
if include_cdc2:
|
if include_cdc2:
|
||||||
cdc2_union = make_cdc_union("CDC2")
|
cdc2_union = make_cdc_union("CDC2")
|
||||||
|
@ -472,6 +496,38 @@ if include_audio:
|
||||||
+ cs_ac_interface.midi_streaming_interfaces
|
+ cs_ac_interface.midi_streaming_interfaces
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if include_vendor:
|
||||||
|
# Vendor-specific interface, for example WebUSB
|
||||||
|
vendor_endpoint_in_descriptor = standard.EndpointDescriptor(
|
||||||
|
description="VENDOR in",
|
||||||
|
bEndpointAddress=args.vendor_ep_num_in
|
||||||
|
| standard.EndpointDescriptor.DIRECTION_IN,
|
||||||
|
bmAttributes=standard.EndpointDescriptor.TYPE_BULK,
|
||||||
|
bInterval=16,
|
||||||
|
)
|
||||||
|
|
||||||
|
vendor_endpoint_out_descriptor = standard.EndpointDescriptor(
|
||||||
|
description="VENDOR out",
|
||||||
|
bEndpointAddress=args.vendor_ep_num_out
|
||||||
|
| standard.EndpointDescriptor.DIRECTION_OUT,
|
||||||
|
bmAttributes=standard.EndpointDescriptor.TYPE_BULK,
|
||||||
|
bInterval=16,
|
||||||
|
)
|
||||||
|
|
||||||
|
vendor_interface = standard.InterfaceDescriptor(
|
||||||
|
description="VENDOR",
|
||||||
|
bInterfaceClass=0xFF, # Vendor-specific
|
||||||
|
bInterfaceSubClass=0x00,
|
||||||
|
bInterfaceProtocol=0x00,
|
||||||
|
iInterface=StringIndex.index("{} VENDOR".format(args.interface_name)),
|
||||||
|
subdescriptors=[
|
||||||
|
vendor_endpoint_in_descriptor,
|
||||||
|
vendor_endpoint_out_descriptor,
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
vendor_interfaces = [vendor_interface]
|
||||||
|
|
||||||
interfaces_to_join = []
|
interfaces_to_join = []
|
||||||
|
|
||||||
if include_cdc:
|
if include_cdc:
|
||||||
|
@ -489,6 +545,9 @@ if include_hid:
|
||||||
if include_audio:
|
if include_audio:
|
||||||
interfaces_to_join.append(audio_interfaces)
|
interfaces_to_join.append(audio_interfaces)
|
||||||
|
|
||||||
|
if include_vendor:
|
||||||
|
interfaces_to_join.append(vendor_interfaces)
|
||||||
|
|
||||||
# util.join_interfaces() will renumber the endpoints to make them unique across descriptors,
|
# util.join_interfaces() will renumber the endpoints to make them unique across descriptors,
|
||||||
# and renumber the interfaces in order. But we still need to fix up certain
|
# and renumber the interfaces in order. But we still need to fix up certain
|
||||||
# interface cross-references.
|
# interface cross-references.
|
||||||
|
@ -502,7 +561,7 @@ if args.max_ep != 0:
|
||||||
endpoint_address = getattr(subdescriptor, "bEndpointAddress", 0) & 0x7F
|
endpoint_address = getattr(subdescriptor, "bEndpointAddress", 0) & 0x7F
|
||||||
if endpoint_address >= args.max_ep:
|
if endpoint_address >= args.max_ep:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"Endpoint address %d of %s must be less than %d"
|
"Endpoint address %d of '%s' must be less than %d; you have probably run out of endpoints"
|
||||||
% (endpoint_address & 0x7F, interface.description, args.max_ep)
|
% (endpoint_address & 0x7F, interface.description, args.max_ep)
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
@ -569,6 +628,9 @@ if include_audio:
|
||||||
# correct ordering.
|
# correct ordering.
|
||||||
descriptor_list.append(audio_control_interface)
|
descriptor_list.append(audio_control_interface)
|
||||||
|
|
||||||
|
if include_vendor:
|
||||||
|
descriptor_list.extend(vendor_interfaces)
|
||||||
|
|
||||||
# Finally, build the composite descriptor.
|
# Finally, build the composite descriptor.
|
||||||
|
|
||||||
configuration = standard.ConfigurationDescriptor(
|
configuration = standard.ConfigurationDescriptor(
|
||||||
|
@ -594,6 +656,7 @@ c_file.write(
|
||||||
"""\
|
"""\
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "tusb.h"
|
||||||
#include "py/objtuple.h"
|
#include "py/objtuple.h"
|
||||||
#include "shared-bindings/usb_hid/Device.h"
|
#include "shared-bindings/usb_hid/Device.h"
|
||||||
#include "{H_FILE_NAME}"
|
#include "{H_FILE_NAME}"
|
||||||
|
@ -732,9 +795,12 @@ c_file.write(
|
||||||
|
|
||||||
c_file.write("\n")
|
c_file.write("\n")
|
||||||
|
|
||||||
hid_descriptor_length = len(bytes(combined_hid_report_descriptor))
|
if include_hid:
|
||||||
|
hid_descriptor_length = len(bytes(combined_hid_report_descriptor))
|
||||||
|
else:
|
||||||
|
hid_descriptor_length = 0
|
||||||
|
|
||||||
# Now we values we need for the .h file.
|
# Now the values we need for the .h file.
|
||||||
h_file.write(
|
h_file.write(
|
||||||
"""\
|
"""\
|
||||||
#ifndef MICROPY_INCLUDED_AUTOGEN_USB_DESCRIPTOR_H
|
#ifndef MICROPY_INCLUDED_AUTOGEN_USB_DESCRIPTOR_H
|
||||||
|
@ -747,12 +813,8 @@ extern const uint8_t usb_desc_cfg[{configuration_length}];
|
||||||
extern uint16_t usb_serial_number[{serial_number_length}];
|
extern uint16_t usb_serial_number[{serial_number_length}];
|
||||||
extern uint16_t const * const string_desc_arr [{string_descriptor_length}];
|
extern uint16_t const * const string_desc_arr [{string_descriptor_length}];
|
||||||
|
|
||||||
extern const uint8_t hid_report_descriptor[{hid_report_descriptor_length}];
|
|
||||||
|
|
||||||
#define CFG_TUSB_RHPORT0_MODE ({rhport0_mode})
|
#define CFG_TUSB_RHPORT0_MODE ({rhport0_mode})
|
||||||
|
|
||||||
#define USB_HID_NUM_DEVICES {hid_num_devices}
|
|
||||||
|
|
||||||
// Vendor name included in Inquiry response, max 8 bytes
|
// Vendor name included in Inquiry response, max 8 bytes
|
||||||
#define CFG_TUD_MSC_VENDOR "{msc_vendor}"
|
#define CFG_TUD_MSC_VENDOR "{msc_vendor}"
|
||||||
|
|
||||||
|
@ -765,7 +827,6 @@ extern const uint8_t hid_report_descriptor[{hid_report_descriptor_length}];
|
||||||
configuration_length=descriptor_length,
|
configuration_length=descriptor_length,
|
||||||
max_configuration_length=max(hid_descriptor_length, descriptor_length),
|
max_configuration_length=max(hid_descriptor_length, descriptor_length),
|
||||||
string_descriptor_length=len(pointers_to_strings),
|
string_descriptor_length=len(pointers_to_strings),
|
||||||
hid_report_descriptor_length=len(bytes(combined_hid_report_descriptor)),
|
|
||||||
rhport0_mode="OPT_MODE_DEVICE | OPT_MODE_HIGH_SPEED"
|
rhport0_mode="OPT_MODE_DEVICE | OPT_MODE_HIGH_SPEED"
|
||||||
if args.highspeed
|
if args.highspeed
|
||||||
else "OPT_MODE_DEVICE",
|
else "OPT_MODE_DEVICE",
|
||||||
|
@ -775,62 +836,96 @@ extern const uint8_t hid_report_descriptor[{hid_report_descriptor_length}];
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
# Write out the report descriptor and info
|
if include_hid:
|
||||||
c_file.write(
|
h_file.write(
|
||||||
"""\
|
"""\
|
||||||
const uint8_t hid_report_descriptor[{HID_DESCRIPTOR_LENGTH}] = {{
|
extern const uint8_t hid_report_descriptor[{hid_report_descriptor_length}];
|
||||||
|
|
||||||
|
#define USB_HID_NUM_DEVICES {hid_num_devices}
|
||||||
""".format(
|
""".format(
|
||||||
HID_DESCRIPTOR_LENGTH=hid_descriptor_length
|
hid_report_descriptor_length=len(bytes(combined_hid_report_descriptor)),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
for b in bytes(combined_hid_report_descriptor):
|
if include_vendor:
|
||||||
c_file.write("0x{:02x}, ".format(b))
|
h_file.write(
|
||||||
c_file.write(
|
"""\
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
VENDOR_REQUEST_WEBUSB = 1,
|
||||||
|
VENDOR_REQUEST_MICROSOFT = 2
|
||||||
|
};
|
||||||
|
|
||||||
|
extern uint8_t const desc_ms_os_20[];
|
||||||
|
|
||||||
|
// Currently getting compile-time errors in files like tusb_fifo.c
|
||||||
|
// if we try do define this here (TODO figure this out!)
|
||||||
|
//extern const tusb_desc_webusb_url_t desc_webusb_url;
|
||||||
|
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
h_file.write(
|
||||||
"""\
|
"""\
|
||||||
|
#endif // MICROPY_INCLUDED_AUTOGEN_USB_DESCRIPTOR_H
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
if include_hid:
|
||||||
|
# Write out the report descriptor and info
|
||||||
|
c_file.write(
|
||||||
|
"""\
|
||||||
|
const uint8_t hid_report_descriptor[{HID_DESCRIPTOR_LENGTH}] = {{
|
||||||
|
""".format(HID_DESCRIPTOR_LENGTH=hid_descriptor_length))
|
||||||
|
|
||||||
|
for b in bytes(combined_hid_report_descriptor):
|
||||||
|
c_file.write("0x{:02x}, ".format(b))
|
||||||
|
|
||||||
|
c_file.write(
|
||||||
|
"""\
|
||||||
};
|
};
|
||||||
|
|
||||||
"""
|
"""
|
||||||
)
|
|
||||||
|
|
||||||
# Write out USB HID report buffer definitions.
|
|
||||||
for name in args.hid_devices:
|
|
||||||
c_file.write(
|
|
||||||
"""\
|
|
||||||
static uint8_t {name}_report_buffer[{report_length}];
|
|
||||||
""".format(
|
|
||||||
name=name.lower(),
|
|
||||||
report_length=hid_report_descriptors.HID_DEVICE_DATA[name].report_length,
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if hid_report_descriptors.HID_DEVICE_DATA[name].out_report_length > 0:
|
# Write out USB HID report buffer definitions.
|
||||||
|
for name in args.hid_devices:
|
||||||
c_file.write(
|
c_file.write(
|
||||||
"""\
|
"""\
|
||||||
static uint8_t {name}_out_report_buffer[{report_length}];
|
static uint8_t {name}_report_buffer[{report_length}];
|
||||||
""".format(
|
""".format(
|
||||||
name=name.lower(),
|
name=name.lower(),
|
||||||
report_length=hid_report_descriptors.HID_DEVICE_DATA[
|
report_length=hid_report_descriptors.HID_DEVICE_DATA[name].report_length,
|
||||||
name
|
|
||||||
].out_report_length,
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
# Write out table of device objects.
|
if hid_report_descriptors.HID_DEVICE_DATA[name].out_report_length > 0:
|
||||||
c_file.write(
|
c_file.write(
|
||||||
"""
|
"""\
|
||||||
usb_hid_device_obj_t usb_hid_devices[] = {
|
static uint8_t {name}_out_report_buffer[{report_length}];
|
||||||
"""
|
""".format(
|
||||||
)
|
name=name.lower(),
|
||||||
for name in args.hid_devices:
|
report_length=hid_report_descriptors.HID_DEVICE_DATA[
|
||||||
device_data = hid_report_descriptors.HID_DEVICE_DATA[name]
|
name
|
||||||
out_report_buffer = (
|
].out_report_length,
|
||||||
"{}_out_report_buffer".format(name.lower())
|
)
|
||||||
if device_data.out_report_length > 0
|
)
|
||||||
else "NULL"
|
|
||||||
)
|
# Write out table of device objects.
|
||||||
c_file.write(
|
c_file.write(
|
||||||
"""\
|
"""\
|
||||||
|
usb_hid_device_obj_t usb_hid_devices[] = {
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
for name in args.hid_devices:
|
||||||
|
device_data = hid_report_descriptors.HID_DEVICE_DATA[name]
|
||||||
|
out_report_buffer = (
|
||||||
|
"{}_out_report_buffer".format(name.lower())
|
||||||
|
if device_data.out_report_length > 0
|
||||||
|
else "NULL"
|
||||||
|
)
|
||||||
|
c_file.write(
|
||||||
|
"""\
|
||||||
{{
|
{{
|
||||||
.base = {{ .type = &usb_hid_device_type }},
|
.base = {{ .type = &usb_hid_device_type }},
|
||||||
.report_buffer = {name}_report_buffer,
|
.report_buffer = {name}_report_buffer,
|
||||||
|
@ -842,24 +937,24 @@ for name in args.hid_devices:
|
||||||
.out_report_length = {out_report_length},
|
.out_report_length = {out_report_length},
|
||||||
}},
|
}},
|
||||||
""".format(
|
""".format(
|
||||||
name=name.lower(),
|
name=name.lower(),
|
||||||
report_id=report_ids[name],
|
report_id=report_ids[name],
|
||||||
report_length=device_data.report_length,
|
report_length=device_data.report_length,
|
||||||
usage_page=device_data.usage_page,
|
usage_page=device_data.usage_page,
|
||||||
usage=device_data.usage,
|
usage=device_data.usage,
|
||||||
out_report_buffer=out_report_buffer,
|
out_report_buffer=out_report_buffer,
|
||||||
out_report_length=device_data.out_report_length,
|
out_report_length=device_data.out_report_length,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
c_file.write(
|
||||||
c_file.write(
|
"""\
|
||||||
"""\
|
|
||||||
};
|
};
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
# Write out tuple of device objects.
|
# Write out tuple of device objects.
|
||||||
c_file.write(
|
c_file.write(
|
||||||
"""
|
"""
|
||||||
mp_obj_tuple_t common_hal_usb_hid_devices = {{
|
mp_obj_tuple_t common_hal_usb_hid_devices = {{
|
||||||
.base = {{
|
.base = {{
|
||||||
.type = &mp_type_tuple,
|
.type = &mp_type_tuple,
|
||||||
|
@ -867,26 +962,119 @@ mp_obj_tuple_t common_hal_usb_hid_devices = {{
|
||||||
.len = {num_devices},
|
.len = {num_devices},
|
||||||
.items = {{
|
.items = {{
|
||||||
""".format(
|
""".format(
|
||||||
num_devices=len(args.hid_devices)
|
num_devices=len(args.hid_devices)
|
||||||
)
|
|
||||||
)
|
|
||||||
for idx in range(len(args.hid_devices)):
|
|
||||||
c_file.write(
|
|
||||||
"""\
|
|
||||||
(mp_obj_t) &usb_hid_devices[{idx}],
|
|
||||||
""".format(
|
|
||||||
idx=idx
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
c_file.write(
|
for idx in range(len(args.hid_devices)):
|
||||||
"""\
|
c_file.write(
|
||||||
|
"""\
|
||||||
|
(mp_obj_t) &usb_hid_devices[{idx}],
|
||||||
|
""".format(
|
||||||
|
idx=idx
|
||||||
|
)
|
||||||
|
)
|
||||||
|
c_file.write(
|
||||||
|
"""\
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
h_file.write(
|
if include_vendor:
|
||||||
"""\
|
# Mimic what the tinyusb webusb demo does in its main.c file
|
||||||
#endif // MICROPY_INCLUDED_AUTOGEN_USB_DESCRIPTOR_H
|
c_file.write(
|
||||||
"""
|
"""
|
||||||
)
|
#define URL "{webusb_url}"
|
||||||
|
|
||||||
|
const tusb_desc_webusb_url_t desc_webusb_url =
|
||||||
|
{{
|
||||||
|
.bLength = 3 + sizeof(URL) - 1,
|
||||||
|
.bDescriptorType = 3, // WEBUSB URL type
|
||||||
|
.bScheme = 1, // 0: http, 1: https, 255: ""
|
||||||
|
.url = URL
|
||||||
|
}};
|
||||||
|
|
||||||
|
// These next two hardcoded descriptors were pulled from the usb_descriptor.c file
|
||||||
|
// of the tinyusb webusb_serial demo. TODO - this is probably something else to
|
||||||
|
// integrate into the adafruit_usb_descriptors project...
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------+
|
||||||
|
// BOS Descriptor
|
||||||
|
//--------------------------------------------------------------------+
|
||||||
|
|
||||||
|
/* Microsoft OS 2.0 registry property descriptor
|
||||||
|
Per MS requirements https://msdn.microsoft.com/en-us/library/windows/hardware/hh450799(v=vs.85).aspx
|
||||||
|
device should create DeviceInterfaceGUIDs. It can be done by driver and
|
||||||
|
in case of real PnP solution device should expose MS "Microsoft OS 2.0
|
||||||
|
registry property descriptor". Such descriptor can insert any record
|
||||||
|
into Windows registry per device/configuration/interface. In our case it
|
||||||
|
will insert "DeviceInterfaceGUIDs" multistring property.
|
||||||
|
|
||||||
|
GUID is freshly generated and should be OK to use.
|
||||||
|
|
||||||
|
https://developers.google.com/web/fundamentals/native-hardware/build-for-webusb/
|
||||||
|
(Section Microsoft OS compatibility descriptors)
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define BOS_TOTAL_LEN (TUD_BOS_DESC_LEN + TUD_BOS_WEBUSB_DESC_LEN + TUD_BOS_MICROSOFT_OS_DESC_LEN)
|
||||||
|
|
||||||
|
#define MS_OS_20_DESC_LEN 0xB2
|
||||||
|
|
||||||
|
// BOS Descriptor is required for webUSB
|
||||||
|
uint8_t const desc_bos[] =
|
||||||
|
{{
|
||||||
|
// total length, number of device caps
|
||||||
|
TUD_BOS_DESCRIPTOR(BOS_TOTAL_LEN, 2),
|
||||||
|
|
||||||
|
// Vendor Code, iLandingPage
|
||||||
|
TUD_BOS_WEBUSB_DESCRIPTOR(VENDOR_REQUEST_WEBUSB, 1),
|
||||||
|
|
||||||
|
// Microsoft OS 2.0 descriptor
|
||||||
|
TUD_BOS_MS_OS_20_DESCRIPTOR(MS_OS_20_DESC_LEN, VENDOR_REQUEST_MICROSOFT)
|
||||||
|
}};
|
||||||
|
|
||||||
|
uint8_t const * tud_descriptor_bos_cb(void)
|
||||||
|
{{
|
||||||
|
return desc_bos;
|
||||||
|
}}
|
||||||
|
|
||||||
|
|
||||||
|
#define ITF_NUM_VENDOR {webusb_interface} // used in this next descriptor
|
||||||
|
|
||||||
|
uint8_t const desc_ms_os_20[] =
|
||||||
|
{{
|
||||||
|
// Set header: length, type, windows version, total length
|
||||||
|
U16_TO_U8S_LE(0x000A), U16_TO_U8S_LE(MS_OS_20_SET_HEADER_DESCRIPTOR), U32_TO_U8S_LE(0x06030000), U16_TO_U8S_LE(MS_OS_20_DESC_LEN),
|
||||||
|
|
||||||
|
// Configuration subset header: length, type, configuration index, reserved, configuration total length
|
||||||
|
U16_TO_U8S_LE(0x0008), U16_TO_U8S_LE(MS_OS_20_SUBSET_HEADER_CONFIGURATION), 0, 0, U16_TO_U8S_LE(MS_OS_20_DESC_LEN-0x0A),
|
||||||
|
|
||||||
|
// Function Subset header: length, type, first interface, reserved, subset length
|
||||||
|
U16_TO_U8S_LE(0x0008), U16_TO_U8S_LE(MS_OS_20_SUBSET_HEADER_FUNCTION), ITF_NUM_VENDOR, 0, U16_TO_U8S_LE(MS_OS_20_DESC_LEN-0x0A-0x08),
|
||||||
|
|
||||||
|
// MS OS 2.0 Compatible ID descriptor: length, type, compatible ID, sub compatible ID
|
||||||
|
U16_TO_U8S_LE(0x0014), U16_TO_U8S_LE(MS_OS_20_FEATURE_COMPATBLE_ID), 'W', 'I', 'N', 'U', 'S', 'B', 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // sub-compatible
|
||||||
|
|
||||||
|
// MS OS 2.0 Registry property descriptor: length, type
|
||||||
|
U16_TO_U8S_LE(MS_OS_20_DESC_LEN-0x0A-0x08-0x08-0x14), U16_TO_U8S_LE(MS_OS_20_FEATURE_REG_PROPERTY),
|
||||||
|
U16_TO_U8S_LE(0x0007), U16_TO_U8S_LE(0x002A), // wPropertyDataType, wPropertyNameLength and PropertyName "DeviceInterfaceGUIDs\0" in UTF-16
|
||||||
|
'D', 0x00, 'e', 0x00, 'v', 0x00, 'i', 0x00, 'c', 0x00, 'e', 0x00, 'I', 0x00, 'n', 0x00, 't', 0x00, 'e', 0x00,
|
||||||
|
'r', 0x00, 'f', 0x00, 'a', 0x00, 'c', 0x00, 'e', 0x00, 'G', 0x00, 'U', 0x00, 'I', 0x00, 'D', 0x00, 's', 0x00, 0x00, 0x00,
|
||||||
|
U16_TO_U8S_LE(0x0050), // wPropertyDataLength
|
||||||
|
//bPropertyData: “{{975F44D9-0D08-43FD-8B3E-127CA8AFFF9D}}”.
|
||||||
|
'{{', 0x00, '9', 0x00, '7', 0x00, '5', 0x00, 'F', 0x00, '4', 0x00, '4', 0x00, 'D', 0x00, '9', 0x00, '-', 0x00,
|
||||||
|
'0', 0x00, 'D', 0x00, '0', 0x00, '8', 0x00, '-', 0x00, '4', 0x00, '3', 0x00, 'F', 0x00, 'D', 0x00, '-', 0x00,
|
||||||
|
'8', 0x00, 'B', 0x00, '3', 0x00, 'E', 0x00, '-', 0x00, '1', 0x00, '2', 0x00, '7', 0x00, 'C', 0x00, 'A', 0x00,
|
||||||
|
'8', 0x00, 'A', 0x00, 'F', 0x00, 'F', 0x00, 'F', 0x00, '9', 0x00, 'D', 0x00, '}}', 0x00, 0x00, 0x00, 0x00, 0x00
|
||||||
|
}};
|
||||||
|
|
||||||
|
TU_VERIFY_STATIC(sizeof(desc_ms_os_20) == MS_OS_20_DESC_LEN, "Incorrect size");
|
||||||
|
|
||||||
|
// End of section about desc_ms_os_20
|
||||||
|
|
||||||
|
""".format(
|
||||||
|
webusb_url=args.webusb_url,
|
||||||
|
webusb_interface=vendor_interface.bInterfaceNumber,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in New Issue