Merge pull request #2629 from mubes/rtsctsrs485

Addition of RTS/CTS/RS485 capability
This commit is contained in:
Scott Shawcroft 2020-02-19 10:35:57 -08:00 committed by GitHub
commit 4552aff125
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 582 additions and 64 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-10 11:46-0500\n"
"POT-Creation-Date: 2020-02-19 08:44+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -462,6 +462,10 @@ msgstr ""
msgid "Cannot set value when direction is input."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Cannot specify RTS or CTS in RS485 mode"
msgstr ""
#: py/objslice.c
msgid "Cannot subclass slice"
msgstr ""
@ -1183,6 +1187,10 @@ msgstr ""
msgid "RNG Init Error"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "RS485 inversion specified when not in RS485 mode"
msgstr ""
#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/rtc/RTC.c
msgid "RTC calibration is not supported on this board"
@ -1192,6 +1200,11 @@ msgstr ""
msgid "RTC is not supported on this board"
msgstr ""
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
#: ports/nrf/common-hal/busio/UART.c ports/stm32f4/common-hal/busio/UART.c
msgid "RTS/CTS/RS485 Not yet supported on this device"
msgstr ""
#: ports/stm32f4/common-hal/os/__init__.c
msgid "Random number generation error"
msgstr ""
@ -1255,6 +1268,14 @@ msgstr "Nilai sampel terlalu tinggi. Nilai harus kurang dari %d"
msgid "Scan already in progess. Stop with stop_scan."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected CTS pin not valid"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected RTS pin not valid"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Serializer in use"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-12 11:31-0800\n"
"POT-Creation-Date: 2020-02-19 08:44+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -452,6 +452,10 @@ msgstr ""
msgid "Cannot set value when direction is input."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Cannot specify RTS or CTS in RS485 mode"
msgstr ""
#: py/objslice.c
msgid "Cannot subclass slice"
msgstr ""
@ -1169,6 +1173,10 @@ msgstr ""
msgid "RNG Init Error"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "RS485 inversion specified when not in RS485 mode"
msgstr ""
#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/rtc/RTC.c
msgid "RTC calibration is not supported on this board"
@ -1178,6 +1186,11 @@ msgstr ""
msgid "RTC is not supported on this board"
msgstr ""
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
#: ports/nrf/common-hal/busio/UART.c ports/stm32f4/common-hal/busio/UART.c
msgid "RTS/CTS/RS485 Not yet supported on this device"
msgstr ""
#: ports/stm32f4/common-hal/os/__init__.c
msgid "Random number generation error"
msgstr ""
@ -1239,6 +1252,14 @@ msgstr ""
msgid "Scan already in progess. Stop with stop_scan."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected CTS pin not valid"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected RTS pin not valid"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Serializer in use"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-10 11:46-0500\n"
"POT-Creation-Date: 2020-02-19 08:44+0000\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: Pascal Deneaux\n"
"Language-Team: Sebastian Plamauer, Pascal Deneaux\n"
@ -456,6 +456,10 @@ msgstr "Reset zum bootloader nicht möglich da bootloader nicht vorhanden"
msgid "Cannot set value when direction is input."
msgstr "Der Wert kann nicht gesetzt werden, wenn die Richtung input ist."
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Cannot specify RTS or CTS in RS485 mode"
msgstr ""
#: py/objslice.c
msgid "Cannot subclass slice"
msgstr ""
@ -1186,6 +1190,10 @@ msgstr ""
msgid "RNG Init Error"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "RS485 inversion specified when not in RS485 mode"
msgstr ""
#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/rtc/RTC.c
msgid "RTC calibration is not supported on this board"
@ -1195,6 +1203,11 @@ msgstr "Die RTC-Kalibrierung wird auf diesem Board nicht unterstützt"
msgid "RTC is not supported on this board"
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/nrf/common-hal/busio/UART.c ports/stm32f4/common-hal/busio/UART.c
msgid "RTS/CTS/RS485 Not yet supported on this device"
msgstr ""
#: ports/stm32f4/common-hal/os/__init__.c
msgid "Random number generation error"
msgstr ""
@ -1256,6 +1269,14 @@ msgstr "Abtastrate zu hoch. Wert muss unter %d liegen"
msgid "Scan already in progess. Stop with stop_scan."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected CTS pin not valid"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected RTS pin not valid"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Serializer in use"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-10 11:46-0500\n"
"POT-Creation-Date: 2020-02-19 08:44+0000\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -452,6 +452,10 @@ msgstr ""
msgid "Cannot set value when direction is input."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Cannot specify RTS or CTS in RS485 mode"
msgstr ""
#: py/objslice.c
msgid "Cannot subclass slice"
msgstr ""
@ -1169,6 +1173,10 @@ msgstr ""
msgid "RNG Init Error"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "RS485 inversion specified when not in RS485 mode"
msgstr ""
#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/rtc/RTC.c
msgid "RTC calibration is not supported on this board"
@ -1178,6 +1186,11 @@ msgstr ""
msgid "RTC is not supported on this board"
msgstr ""
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
#: ports/nrf/common-hal/busio/UART.c ports/stm32f4/common-hal/busio/UART.c
msgid "RTS/CTS/RS485 Not yet supported on this device"
msgstr ""
#: ports/stm32f4/common-hal/os/__init__.c
msgid "Random number generation error"
msgstr ""
@ -1239,6 +1252,14 @@ msgstr ""
msgid "Scan already in progess. Stop with stop_scan."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected CTS pin not valid"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected RTS pin not valid"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Serializer in use"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-10 11:46-0500\n"
"POT-Creation-Date: 2020-02-19 08:44+0000\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: \n"
"Language-Team: @sommersoft, @MrCertainly\n"
@ -456,6 +456,10 @@ msgstr ""
msgid "Cannot set value when direction is input."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Cannot specify RTS or CTS in RS485 mode"
msgstr ""
#: py/objslice.c
msgid "Cannot subclass slice"
msgstr ""
@ -1173,6 +1177,10 @@ msgstr ""
msgid "RNG Init Error"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "RS485 inversion specified when not in RS485 mode"
msgstr ""
#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/rtc/RTC.c
msgid "RTC calibration is not supported on this board"
@ -1182,6 +1190,11 @@ msgstr ""
msgid "RTC is not supported on this board"
msgstr ""
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
#: ports/nrf/common-hal/busio/UART.c ports/stm32f4/common-hal/busio/UART.c
msgid "RTS/CTS/RS485 Not yet supported on this device"
msgstr ""
#: ports/stm32f4/common-hal/os/__init__.c
msgid "Random number generation error"
msgstr ""
@ -1243,6 +1256,14 @@ msgstr ""
msgid "Scan already in progess. Stop with stop_scan."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected CTS pin not valid"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected RTS pin not valid"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Serializer in use"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-10 11:46-0500\n"
"POT-Creation-Date: 2020-02-19 08:44+0000\n"
"PO-Revision-Date: 2018-08-24 22:56-0500\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -458,6 +458,10 @@ msgstr "No se puede reiniciar a bootloader porque no hay bootloader presente."
msgid "Cannot set value when direction is input."
msgstr "No se puede asignar un valor cuando la dirección es input."
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Cannot specify RTS or CTS in RS485 mode"
msgstr ""
#: py/objslice.c
msgid "Cannot subclass slice"
msgstr "Cannot subclass slice"
@ -1185,6 +1189,10 @@ msgstr ""
msgid "RNG Init Error"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "RS485 inversion specified when not in RS485 mode"
msgstr ""
#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/rtc/RTC.c
msgid "RTC calibration is not supported on this board"
@ -1194,6 +1202,11 @@ msgstr "Calibración de RTC no es soportada en esta placa"
msgid "RTC is not supported on this board"
msgstr "RTC no soportado en esta placa"
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
#: ports/nrf/common-hal/busio/UART.c ports/stm32f4/common-hal/busio/UART.c
msgid "RTS/CTS/RS485 Not yet supported on this device"
msgstr ""
#: ports/stm32f4/common-hal/os/__init__.c
msgid "Random number generation error"
msgstr ""
@ -1256,6 +1269,14 @@ msgstr "Frecuencia de muestreo demasiado alta. Debe ser menor a %d"
msgid "Scan already in progess. Stop with stop_scan."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected CTS pin not valid"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected RTS pin not valid"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Serializer in use"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-10 11:46-0500\n"
"POT-Creation-Date: 2020-02-19 08:44+0000\n"
"PO-Revision-Date: 2018-12-20 22:15-0800\n"
"Last-Translator: Timothy <me@timothygarcia.ca>\n"
"Language-Team: fil\n"
@ -460,6 +460,10 @@ msgstr "Hindi ma-reset sa bootloader dahil walang bootloader."
msgid "Cannot set value when direction is input."
msgstr "Hindi ma i-set ang value kapag ang direksyon ay input."
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Cannot specify RTS or CTS in RS485 mode"
msgstr ""
#: py/objslice.c
msgid "Cannot subclass slice"
msgstr "Hindi magawa ang sublcass slice"
@ -1191,6 +1195,10 @@ msgstr ""
msgid "RNG Init Error"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "RS485 inversion specified when not in RS485 mode"
msgstr ""
#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/rtc/RTC.c
msgid "RTC calibration is not supported on this board"
@ -1200,6 +1208,11 @@ msgstr "RTC calibration ay hindi supportado ng board na ito"
msgid "RTC is not supported on this board"
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/nrf/common-hal/busio/UART.c ports/stm32f4/common-hal/busio/UART.c
msgid "RTS/CTS/RS485 Not yet supported on this device"
msgstr ""
#: ports/stm32f4/common-hal/os/__init__.c
msgid "Random number generation error"
msgstr ""
@ -1262,6 +1275,14 @@ msgstr "Sample rate ay masyadong mataas. Ito ay dapat hindi hiigit sa %d"
msgid "Scan already in progess. Stop with stop_scan."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected CTS pin not valid"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected RTS pin not valid"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Serializer in use"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-10 11:46-0500\n"
"POT-Creation-Date: 2020-02-19 08:44+0000\n"
"PO-Revision-Date: 2019-04-14 20:05+0100\n"
"Last-Translator: Pierrick Couturier <arofarn@arofarn.info>\n"
"Language-Team: fr\n"
@ -465,6 +465,10 @@ msgstr ""
msgid "Cannot set value when direction is input."
msgstr "Impossible d'affecter une valeur quand la direction est 'input'."
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Cannot specify RTS or CTS in RS485 mode"
msgstr ""
#: py/objslice.c
msgid "Cannot subclass slice"
msgstr "On ne peut faire de sous-classes de tranches"
@ -1204,6 +1208,10 @@ msgstr ""
msgid "RNG Init Error"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "RS485 inversion specified when not in RS485 mode"
msgstr ""
#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/rtc/RTC.c
msgid "RTC calibration is not supported on this board"
@ -1213,6 +1221,11 @@ msgstr "étalonnage de la RTC non supportée sur cette carte"
msgid "RTC is not supported on this board"
msgstr "RTC non supportée sur cette carte"
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
#: ports/nrf/common-hal/busio/UART.c ports/stm32f4/common-hal/busio/UART.c
msgid "RTS/CTS/RS485 Not yet supported on this device"
msgstr ""
#: ports/stm32f4/common-hal/os/__init__.c
msgid "Random number generation error"
msgstr ""
@ -1276,6 +1289,14 @@ msgstr "Taux d'échantillonage trop élevé. Doit être inf. à %d"
msgid "Scan already in progess. Stop with stop_scan."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected CTS pin not valid"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected RTS pin not valid"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Serializer in use"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-10 11:46-0500\n"
"POT-Creation-Date: 2020-02-19 08:44+0000\n"
"PO-Revision-Date: 2018-10-02 16:27+0200\n"
"Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n"
"Language-Team: \n"
@ -461,6 +461,10 @@ msgstr ""
msgid "Cannot set value when direction is input."
msgstr "non si può impostare un valore quando direzione è input"
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Cannot specify RTS or CTS in RS485 mode"
msgstr ""
#: py/objslice.c
msgid "Cannot subclass slice"
msgstr "Impossibile subclasare slice"
@ -1200,6 +1204,10 @@ msgstr ""
msgid "RNG Init Error"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "RS485 inversion specified when not in RS485 mode"
msgstr ""
#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/rtc/RTC.c
msgid "RTC calibration is not supported on this board"
@ -1209,6 +1217,11 @@ msgstr "calibrazione RTC non supportata su questa scheda"
msgid "RTC is not supported on this board"
msgstr "RTC non supportato su questa scheda"
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
#: ports/nrf/common-hal/busio/UART.c ports/stm32f4/common-hal/busio/UART.c
msgid "RTS/CTS/RS485 Not yet supported on this device"
msgstr ""
#: ports/stm32f4/common-hal/os/__init__.c
msgid "Random number generation error"
msgstr ""
@ -1273,6 +1286,14 @@ msgstr ""
msgid "Scan already in progess. Stop with stop_scan."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected CTS pin not valid"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected RTS pin not valid"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Serializer in use"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-10 11:46-0500\n"
"POT-Creation-Date: 2020-02-19 08:44+0000\n"
"PO-Revision-Date: 2019-05-06 14:22-0700\n"
"Last-Translator: \n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -456,6 +456,10 @@ msgstr ""
msgid "Cannot set value when direction is input."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Cannot specify RTS or CTS in RS485 mode"
msgstr ""
#: py/objslice.c
msgid "Cannot subclass slice"
msgstr ""
@ -1173,6 +1177,10 @@ msgstr ""
msgid "RNG Init Error"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "RS485 inversion specified when not in RS485 mode"
msgstr ""
#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/rtc/RTC.c
msgid "RTC calibration is not supported on this board"
@ -1182,6 +1190,11 @@ msgstr ""
msgid "RTC is not supported on this board"
msgstr ""
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
#: ports/nrf/common-hal/busio/UART.c ports/stm32f4/common-hal/busio/UART.c
msgid "RTS/CTS/RS485 Not yet supported on this device"
msgstr ""
#: ports/stm32f4/common-hal/os/__init__.c
msgid "Random number generation error"
msgstr ""
@ -1243,6 +1256,14 @@ msgstr ""
msgid "Scan already in progess. Stop with stop_scan."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected CTS pin not valid"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected RTS pin not valid"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Serializer in use"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-10 11:46-0500\n"
"POT-Creation-Date: 2020-02-19 08:44+0000\n"
"PO-Revision-Date: 2019-03-19 18:37-0700\n"
"Last-Translator: Radomir Dopieralski <circuitpython@sheep.art.pl>\n"
"Language-Team: pl\n"
@ -455,6 +455,10 @@ msgstr "Nie można zrestartować -- nie ma bootloadera."
msgid "Cannot set value when direction is input."
msgstr "Nie można ustawić wartości w trybie wejścia"
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Cannot specify RTS or CTS in RS485 mode"
msgstr ""
#: py/objslice.c
msgid "Cannot subclass slice"
msgstr "Nie można dziedziczyć ze slice"
@ -1174,6 +1178,10 @@ msgstr ""
msgid "RNG Init Error"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "RS485 inversion specified when not in RS485 mode"
msgstr ""
#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/rtc/RTC.c
msgid "RTC calibration is not supported on this board"
@ -1183,6 +1191,11 @@ msgstr "Brak obsługi kalibracji RTC"
msgid "RTC is not supported on this board"
msgstr "Brak obsługi RTC"
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
#: ports/nrf/common-hal/busio/UART.c ports/stm32f4/common-hal/busio/UART.c
msgid "RTS/CTS/RS485 Not yet supported on this device"
msgstr ""
#: ports/stm32f4/common-hal/os/__init__.c
msgid "Random number generation error"
msgstr ""
@ -1244,6 +1257,14 @@ msgstr "Zbyt wysoka częstotliwość próbkowania. Musi być mniejsza niż %d"
msgid "Scan already in progess. Stop with stop_scan."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected CTS pin not valid"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected RTS pin not valid"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Serializer in use"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-10 11:46-0500\n"
"POT-Creation-Date: 2020-02-19 08:44+0000\n"
"PO-Revision-Date: 2018-10-02 21:14-0000\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -457,6 +457,10 @@ msgstr ""
msgid "Cannot set value when direction is input."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Cannot specify RTS or CTS in RS485 mode"
msgstr ""
#: py/objslice.c
msgid "Cannot subclass slice"
msgstr ""
@ -1185,6 +1189,10 @@ msgstr ""
msgid "RNG Init Error"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "RS485 inversion specified when not in RS485 mode"
msgstr ""
#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/rtc/RTC.c
msgid "RTC calibration is not supported on this board"
@ -1194,6 +1202,11 @@ msgstr "A calibração RTC não é suportada nesta placa"
msgid "RTC is not supported on this board"
msgstr "O RTC não é suportado nesta placa"
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
#: ports/nrf/common-hal/busio/UART.c ports/stm32f4/common-hal/busio/UART.c
msgid "RTS/CTS/RS485 Not yet supported on this device"
msgstr ""
#: ports/stm32f4/common-hal/os/__init__.c
msgid "Random number generation error"
msgstr ""
@ -1256,6 +1269,14 @@ msgstr "Taxa de amostragem muito alta. Deve ser menor que %d"
msgid "Scan already in progess. Stop with stop_scan."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected CTS pin not valid"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected RTS pin not valid"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Serializer in use"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: circuitpython-cn\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-12 11:31-0800\n"
"POT-Creation-Date: 2020-02-19 08:44+0000\n"
"PO-Revision-Date: 2019-04-13 10:10-0700\n"
"Last-Translator: hexthat\n"
"Language-Team: Chinese Hanyu Pinyin\n"
@ -461,6 +461,10 @@ msgstr "Wúfǎ chóng zhì wèi bootloader, yīnwèi méiyǒu bootloader cúnzà
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í."
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Cannot specify RTS or CTS in RS485 mode"
msgstr ""
#: py/objslice.c
msgid "Cannot subclass slice"
msgstr "Wúfǎ zi fēnlèi"
@ -1188,6 +1192,10 @@ msgstr "RNG qǔxiāo chūshǐhuà cuòwù"
msgid "RNG Init Error"
msgstr "RNG chūshǐhuà cuòwù"
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "RS485 inversion specified when not in RS485 mode"
msgstr ""
#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/rtc/RTC.c
msgid "RTC calibration is not supported on this board"
@ -1197,6 +1205,11 @@ msgstr "Cǐ bǎn bù zhīchí RTC jiàozhǔn"
msgid "RTC is not supported on this board"
msgstr "Cǐ bǎn bù zhīchí RTC"
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
#: ports/nrf/common-hal/busio/UART.c ports/stm32f4/common-hal/busio/UART.c
msgid "RTS/CTS/RS485 Not yet supported on this device"
msgstr ""
#: ports/stm32f4/common-hal/os/__init__.c
msgid "Random number generation error"
msgstr "Suíjī shù shēngchéng cuòwù"
@ -1258,6 +1271,14 @@ msgstr "Cǎiyàng lǜ tài gāo. Tā bìxū xiǎoyú %d"
msgid "Scan already in progess. Stop with stop_scan."
msgstr "Zhèngzài jìn háng sǎomiáo. Shǐyòng stop_scan tíngzhǐ."
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected CTS pin not valid"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected RTS pin not valid"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Serializer in use"

View File

@ -52,9 +52,12 @@ static void usart_async_rxc_callback(const struct usart_async_descriptor *const
}
void common_hal_busio_uart_construct(busio_uart_obj_t *self,
const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx, uint32_t baudrate,
uint8_t bits, uart_parity_t parity, uint8_t stop, mp_float_t timeout,
uint16_t receiver_buffer_size) {
const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx,
const mcu_pin_obj_t * rts, const mcu_pin_obj_t * cts,
const mcu_pin_obj_t * rs485_dir, bool rs485_invert,
uint32_t baudrate, uint8_t bits, uart_parity_t parity, uint8_t stop,
mp_float_t timeout, uint16_t receiver_buffer_size) {
Sercom* sercom = NULL;
uint8_t sercom_index = 255; // Unset index
uint32_t rx_pinmux = 0;
@ -62,6 +65,10 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self,
uint32_t tx_pinmux = 0;
uint8_t tx_pad = 255; // Unset pad
if ((rts != mp_const_none) || (cts != mp_const_none) || (rs485_dir != mp_const_none) || (rs485_invert)) {
mp_raise_ValueError(translate("RTS/CTS/RS485 Not yet supported on this device"));
}
if (bits > 8) {
mp_raise_NotImplementedError(translate("bytes > 8 bits not supported"));
}

View File

@ -53,11 +53,17 @@ STATIC busio_uart_dev_t busio_uart_dev[] = {
};
void common_hal_busio_uart_construct(busio_uart_obj_t *self,
const mcu_pin_obj_t *tx, const mcu_pin_obj_t *rx, uint32_t baudrate,
uint8_t bits, uart_parity_t parity, uint8_t stop, mp_float_t timeout,
uint16_t receiver_buffer_size) {
const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx,
const mcu_pin_obj_t * rts, const mcu_pin_obj_t * cts,
const mcu_pin_obj_t * rs485_dir, bool rs485_invert,
uint32_t baudrate, uint8_t bits, uart_parity_t parity, uint8_t stop,
mp_float_t timeout, uint16_t receiver_buffer_size) {
struct termios tio;
if ((rts != mp_const_none) || (cts != mp_const_none) || (rs485_dir != mp_const_none) || (rs485_invert)) {
mp_raise_ValueError(translate("RTS/CTS/RS485 Not yet supported on this device"));
}
if (bits != 8) {
mp_raise_ValueError(translate("Could not initialize UART"));
}

View File

@ -42,7 +42,11 @@ const flexspi_nor_config_t qspiflash_config = {
{
.tag = FLEXSPI_CFG_BLK_TAG,
.version = FLEXSPI_CFG_BLK_VERSION,
#ifdef BOARD_USING_SECONDARY_QSPI_PINMUX
.readSampleClkSrc = kFlexSPIReadSampleClk_LoopbackFromInternally,
#else
.readSampleClkSrc = kFlexSPIReadSampleClk_LoopbackFromDqsPad,
#endif
.csHoldTime = 1u,
.csSetupTime = 2u,
// Enable DDR mode, Wordaddressable, Safe configuration, Differential clock

View File

@ -53,8 +53,8 @@ static void config_periph_pin(const mcu_periph_obj_t *periph) {
IOMUXC_SetPinConfig(0, 0, 0, 0,
periph->pin->cfg_reg,
IOMUXC_SW_PAD_CTL_PAD_HYS(0)
| IOMUXC_SW_PAD_CTL_PAD_PUS(0)
| IOMUXC_SW_PAD_CTL_PAD_PUE(0)
| IOMUXC_SW_PAD_CTL_PAD_PUS(1)
| IOMUXC_SW_PAD_CTL_PAD_PUE(1)
| IOMUXC_SW_PAD_CTL_PAD_PKE(1)
| IOMUXC_SW_PAD_CTL_PAD_ODE(0)
| IOMUXC_SW_PAD_CTL_PAD_SPEED(1)
@ -72,9 +72,11 @@ void LPUART_UserCallback(LPUART_Type *base, lpuart_handle_t *handle, status_t st
}
void common_hal_busio_uart_construct(busio_uart_obj_t *self,
const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx, uint32_t baudrate,
uint8_t bits, uart_parity_t parity, uint8_t stop, mp_float_t timeout,
uint16_t receiver_buffer_size) {
const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx,
const mcu_pin_obj_t * rts, const mcu_pin_obj_t * cts,
const mcu_pin_obj_t * rs485_dir, bool rs485_invert,
uint32_t baudrate, uint8_t bits, uart_parity_t parity, uint8_t stop,
mp_float_t timeout, uint16_t receiver_buffer_size) {
// TODO: Allow none rx or tx
@ -111,12 +113,60 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self,
if(self->rx_pin == NULL || self->tx_pin == NULL) {
mp_raise_RuntimeError(translate("Invalid UART pin selection"));
} else {
self->uart = mcu_uart_banks[self->tx_pin->bank_idx - 1];
}
// Filter for sane settings for RS485
if (rs485_dir != mp_const_none) {
if ((rts != mp_const_none) || (cts != mp_const_none)) {
mp_raise_ValueError(translate("Cannot specify RTS or CTS in RS485 mode"));
}
// For IMXRT the RTS pin is used for RS485 direction
rts = rs485_dir;
}
else {
if (rs485_invert) {
mp_raise_ValueError(translate("RS485 inversion specified when not in RS485 mode"));
}
}
// Now check for RTS/CTS (or overloaded RS485 direction) pin(s)
const uint32_t rts_count = sizeof(mcu_uart_rts_list) / sizeof(mcu_periph_obj_t);
const uint32_t cts_count = sizeof(mcu_uart_cts_list) / sizeof(mcu_periph_obj_t);
if (rts != mp_const_none) {
for (uint32_t i=0; i < rts_count; ++i) {
if (mcu_uart_rts_list[i].bank_idx == self->rx_pin->bank_idx) {
if (mcu_uart_rts_list[i].pin == rts) {
self->rts_pin = &mcu_uart_rts_list[i];
break;
}
}
}
if (self->rts_pin == NULL)
mp_raise_ValueError(translate("Selected RTS pin not valid"));
}
if (cts != mp_const_none) {
for (uint32_t i=0; i < cts_count; ++i) {
if (mcu_uart_cts_list[i].bank_idx == self->rx_pin->bank_idx) {
if (mcu_uart_cts_list[i].pin == cts) {
self->cts_pin = &mcu_uart_cts_list[i];
break;
}
}
}
if (self->cts_pin == NULL)
mp_raise_ValueError(translate("Selected CTS pin not valid"));
}
self->uart = mcu_uart_banks[self->tx_pin->bank_idx - 1];
config_periph_pin(self->rx_pin);
config_periph_pin(self->tx_pin);
if (self->rts_pin)
config_periph_pin(self->rts_pin);
if (self->cts_pin)
config_periph_pin(self->cts_pin);
lpuart_config_t config = { 0 };
LPUART_GetDefaultConfig(&config);
@ -125,10 +175,27 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self,
config.baudRate_Bps = self->baudrate;
config.enableTx = self->tx_pin != NULL;
config.enableRx = self->rx_pin != NULL;
config.enableRxRTS = self->rts_pin != NULL;
config.enableTxCTS = self->cts_pin != NULL;
if (self->rts_pin != NULL)
claim_pin(self->rts_pin->pin);
if (self->cts_pin != NULL)
claim_pin(self->cts_pin->pin);
LPUART_Init(self->uart, &config, UART_CLOCK_FREQ);
claim_pin(self->tx_pin->pin);
// Before we init, setup RS485 direction pin
// ..unfortunately this isn't done by the driver library
uint32_t modir = (self->uart->MODIR) & ~(LPUART_MODIR_TXRTSPOL_MASK | LPUART_MODIR_TXRTSE_MASK);
if (rs485_dir != mp_const_none) {
modir |= LPUART_MODIR_TXRTSE_MASK;
if (rs485_invert)
modir |= LPUART_MODIR_TXRTSPOL_MASK;
}
self->uart->MODIR = modir;
if (self->tx_pin != NULL)
claim_pin(self->tx_pin->pin);
if (self->rx_pin != NULL) {
ringbuf_alloc(&self->rbuf, receiver_buffer_size, true);
@ -203,7 +270,9 @@ size_t common_hal_busio_uart_read(busio_uart_obj_t *self, uint8_t *data, size_t
LPUART_TransferAbortReceive(self->uart, &self->handle);
}
return len - self->handle.rxDataSize;
// The only place we can reliably tell how many bytes have been received is from the current
// wp in the handle (because the abort nukes rxDataSize, and reading it before abort is a race.)
return self->handle.rxData-data;
}
// Write characters.

View File

@ -113,6 +113,26 @@ const mcu_periph_obj_t mcu_uart_tx_list[9] = {
PERIPH_PIN(4, 3, kIOMUXC_LPUART4_TXD_SELECT_INPUT, 1, &pin_GPIO_06),
};
const mcu_periph_obj_t mcu_uart_rts_list[4] = {
PERIPH_PIN(1, 6, 0, 0, &pin_GPIO_07),
PERIPH_PIN(2, 3, 0, 0, &pin_GPIO_AD_07),
PERIPH_PIN(3, 1, 0, 0, &pin_GPIO_AD_13),
PERIPH_PIN(4, 3, 0, 0, &pin_GPIO_AD_13)
};
const mcu_periph_obj_t mcu_uart_cts_list[4] = {
PERIPH_PIN(1, 6, 0, 0, &pin_GPIO_08),
PERIPH_PIN(2, 3, 0, 0, &pin_GPIO_AD_08),
PERIPH_PIN(3, 1, 0, 0, &pin_GPIO_AD_14),
PERIPH_PIN(4, 3, 0, 0, &pin_GPIO_AD_14),
};
const mcu_pwm_obj_t mcu_pwm_list[20] = {
PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmA, 2, &pin_GPIO_02),
PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmA, 2, &pin_GPIO_SD_02),

View File

@ -36,6 +36,8 @@ extern const mcu_periph_obj_t mcu_spi_miso_list[4];
extern const mcu_periph_obj_t mcu_uart_rx_list[9];
extern const mcu_periph_obj_t mcu_uart_tx_list[9];
extern const mcu_periph_obj_t mcu_uart_rts_list[4];
extern const mcu_periph_obj_t mcu_uart_cts_list[4];
extern const mcu_pwm_obj_t mcu_pwm_list[20];

View File

@ -109,53 +109,93 @@ LPUART_Type *mcu_uart_banks[] = { LPUART1, LPUART2, LPUART3, LPUART4, LPUART5, L
const mcu_periph_obj_t mcu_uart_rx_list[16] = {
PERIPH_PIN(1, 2, 0, 0, &pin_GPIO_AD_B0_07),
PERIPH_PIN(2, 2, kIOMUXC_LPUART2_RX_SELECT_INPUT, 0, &pin_GPIO_EMC_23),
PERIPH_PIN(2, 2, kIOMUXC_LPUART2_RX_SELECT_INPUT, 1, &pin_GPIO_AD_B1_09),
PERIPH_PIN(2, 2, kIOMUXC_LPUART2_RX_SELECT_INPUT, 0, &pin_GPIO_AD_B1_09),
PERIPH_PIN(2, 2, kIOMUXC_LPUART2_RX_SELECT_INPUT, 1, &pin_GPIO_EMC_23),
PERIPH_PIN(3, 2, kIOMUXC_LPUART3_RX_SELECT_INPUT, 0, &pin_GPIO_EMC_07),
PERIPH_PIN(3, 2, kIOMUXC_LPUART3_RX_SELECT_INPUT, 1, &pin_GPIO_AD_B0_15),
PERIPH_PIN(4, 2, kIOMUXC_LPUART4_RX_SELECT_INPUT, 0, &pin_GPIO_EMC_03),
PERIPH_PIN(4, 2, kIOMUXC_LPUART4_RX_SELECT_INPUT, 1, &pin_GPIO_EMC_33),
PERIPH_PIN(4, 2, kIOMUXC_LPUART4_RX_SELECT_INPUT, 2, &pin_GPIO_AD_B1_11),
PERIPH_PIN(4, 2, kIOMUXC_LPUART4_RX_SELECT_INPUT, 1, &pin_GPIO_AD_B1_11),
PERIPH_PIN(4, 2, kIOMUXC_LPUART4_RX_SELECT_INPUT, 2, &pin_GPIO_EMC_33),
PERIPH_PIN(5, 2, kIOMUXC_LPUART5_RX_SELECT_INPUT, 0, &pin_GPIO_EMC_39),
PERIPH_PIN(5, 2, kIOMUXC_LPUART5_RX_SELECT_INPUT, 1, &pin_GPIO_AD_B0_11),
PERIPH_PIN(5, 2, kIOMUXC_LPUART5_RX_SELECT_INPUT, 0, &pin_GPIO_AD_B0_11),
PERIPH_PIN(5, 2, kIOMUXC_LPUART5_RX_SELECT_INPUT, 1, &pin_GPIO_EMC_39),
PERIPH_PIN(6, 2, kIOMUXC_LPUART6_RX_SELECT_INPUT, 0, &pin_GPIO_EMC_13),
PERIPH_PIN(6, 2, kIOMUXC_LPUART6_RX_SELECT_INPUT, 1, &pin_GPIO_SD_B1_01),
PERIPH_PIN(7, 2, kIOMUXC_LPUART7_RX_SELECT_INPUT, 0, &pin_GPIO_EMC_35),
PERIPH_PIN(7, 2, kIOMUXC_LPUART7_RX_SELECT_INPUT, 1, &pin_GPIO_SD_B0_05),
PERIPH_PIN(7, 2, kIOMUXC_LPUART7_RX_SELECT_INPUT, 0, &pin_GPIO_SD_B0_05),
PERIPH_PIN(7, 2, kIOMUXC_LPUART7_RX_SELECT_INPUT, 1, &pin_GPIO_EMC_35),
PERIPH_PIN(8, 2, kIOMUXC_LPUART8_RX_SELECT_INPUT, 0, &pin_GPIO_EMC_27),
PERIPH_PIN(8, 2, kIOMUXC_LPUART8_RX_SELECT_INPUT, 1, &pin_GPIO_SD_B1_03),
PERIPH_PIN(8, 2, kIOMUXC_LPUART8_RX_SELECT_INPUT, 0, &pin_GPIO_SD_B1_03),
PERIPH_PIN(8, 2, kIOMUXC_LPUART8_RX_SELECT_INPUT, 1, &pin_GPIO_EMC_27),
};
const mcu_periph_obj_t mcu_uart_tx_list[16] = {
PERIPH_PIN(1, 2, 0, 0, &pin_GPIO_AD_B0_06),
PERIPH_PIN(2, 2, kIOMUXC_LPUART2_TX_SELECT_INPUT, 0, &pin_GPIO_EMC_22),
PERIPH_PIN(2, 2, kIOMUXC_LPUART2_TX_SELECT_INPUT, 1, &pin_GPIO_AD_B1_08),
PERIPH_PIN(2, 2, kIOMUXC_LPUART2_TX_SELECT_INPUT, 0, &pin_GPIO_AD_B1_08),
PERIPH_PIN(2, 2, kIOMUXC_LPUART2_TX_SELECT_INPUT, 1, &pin_GPIO_EMC_22),
PERIPH_PIN(3, 2, kIOMUXC_LPUART3_TX_SELECT_INPUT, 0, &pin_GPIO_EMC_06),
PERIPH_PIN(3, 2, kIOMUXC_LPUART3_TX_SELECT_INPUT, 1, &pin_GPIO_AD_B0_14),
PERIPH_PIN(4, 2, kIOMUXC_LPUART4_TX_SELECT_INPUT, 0, &pin_GPIO_EMC_02),
PERIPH_PIN(4, 2, kIOMUXC_LPUART4_TX_SELECT_INPUT, 1, &pin_GPIO_EMC_32),
PERIPH_PIN(4, 2, kIOMUXC_LPUART4_TX_SELECT_INPUT, 2, &pin_GPIO_AD_B1_10),
PERIPH_PIN(4, 2, kIOMUXC_LPUART4_TX_SELECT_INPUT, 1, &pin_GPIO_AD_B1_10),
PERIPH_PIN(4, 2, kIOMUXC_LPUART4_TX_SELECT_INPUT, 2, &pin_GPIO_EMC_32),
PERIPH_PIN(5, 2, kIOMUXC_LPUART5_TX_SELECT_INPUT, 0, &pin_GPIO_EMC_38),
PERIPH_PIN(5, 2, kIOMUXC_LPUART5_TX_SELECT_INPUT, 1, &pin_GPIO_AD_B0_10),
PERIPH_PIN(5, 2, kIOMUXC_LPUART5_TX_SELECT_INPUT, 0, &pin_GPIO_AD_B0_10),
PERIPH_PIN(5, 2, kIOMUXC_LPUART5_TX_SELECT_INPUT, 1, &pin_GPIO_EMC_38),
PERIPH_PIN(6, 2, kIOMUXC_LPUART6_TX_SELECT_INPUT, 0, &pin_GPIO_EMC_12),
PERIPH_PIN(6, 2, kIOMUXC_LPUART6_TX_SELECT_INPUT, 1, &pin_GPIO_SD_B1_00),
PERIPH_PIN(7, 2, kIOMUXC_LPUART7_TX_SELECT_INPUT, 0, &pin_GPIO_EMC_34),
PERIPH_PIN(7, 2, kIOMUXC_LPUART7_TX_SELECT_INPUT, 1, &pin_GPIO_SD_B0_04),
PERIPH_PIN(7, 2, kIOMUXC_LPUART7_TX_SELECT_INPUT, 0, &pin_GPIO_SD_B0_04),
PERIPH_PIN(7, 2, kIOMUXC_LPUART7_TX_SELECT_INPUT, 1, &pin_GPIO_EMC_34),
PERIPH_PIN(8, 2, kIOMUXC_LPUART8_TX_SELECT_INPUT, 0, &pin_GPIO_EMC_26),
PERIPH_PIN(8, 2, kIOMUXC_LPUART8_TX_SELECT_INPUT, 1, &pin_GPIO_SD_B1_02),
PERIPH_PIN(8, 2, kIOMUXC_LPUART8_TX_SELECT_INPUT, 0, &pin_GPIO_SD_B1_02),
PERIPH_PIN(8, 2, kIOMUXC_LPUART8_TX_SELECT_INPUT, 1, &pin_GPIO_EMC_26),
};
const mcu_periph_obj_t mcu_uart_rts_list[10] = {
PERIPH_PIN(1, 2, 0, 0, &pin_GPIO_AD_B0_09),
PERIPH_PIN(2, 2, 0, 0, &pin_GPIO_EMC_21),
PERIPH_PIN(2, 2, 0, 1, &pin_GPIO_AD_B1_07),
PERIPH_PIN(3, 2, 0, 1, &pin_GPIO_AD_B0_13),
PERIPH_PIN(4, 2, 0, 0, &pin_GPIO_EMC_01),
PERIPH_PIN(4, 2, 0, 1, &pin_GPIO_EMC_31),
PERIPH_PIN(5, 2, 0, 0, &pin_GPIO_EMC_37),
PERIPH_PIN(6, 2, 0, 0, &pin_GPIO_EMC_15),
PERIPH_PIN(7, 2, 0, 1, &pin_GPIO_SD_B0_03),
PERIPH_PIN(8, 2, 0, 0, &pin_GPIO_EMC_25),
};
const mcu_periph_obj_t mcu_uart_cts_list[10] = {
PERIPH_PIN(1, 2, 0, 0, &pin_GPIO_AD_B0_08),
PERIPH_PIN(2, 2, kIOMUXC_LPUART2_CTS_B_SELECT_INPUT, 0, &pin_GPIO_AD_B1_06),
PERIPH_PIN(2, 2, kIOMUXC_LPUART2_CTS_B_SELECT_INPUT, 1, &pin_GPIO_EMC_20),
PERIPH_PIN(3, 2, 0, 1, &pin_GPIO_AD_B0_12),
PERIPH_PIN(4, 2, kIOMUXC_LPUART4_CTS_B_SELECT_INPUT, 0, &pin_GPIO_EMC_00),
PERIPH_PIN(4, 2, kIOMUXC_LPUART4_CTS_B_SELECT_INPUT, 0, &pin_GPIO_EMC_30),
PERIPH_PIN(5, 2, 0, 0, &pin_GPIO_EMC_36),
PERIPH_PIN(6, 2, 0, 0, &pin_GPIO_EMC_14),
PERIPH_PIN(7, 2, 0, 0, &pin_GPIO_SD_B0_02),
PERIPH_PIN(8, 2, 0, 0, &pin_GPIO_EMC_24),
};
const mcu_pwm_obj_t mcu_pwm_list[39] = {

View File

@ -37,6 +37,8 @@ extern const mcu_periph_obj_t mcu_spi_miso_list[8];
extern const mcu_periph_obj_t mcu_uart_rx_list[16];
extern const mcu_periph_obj_t mcu_uart_tx_list[16];
extern const mcu_periph_obj_t mcu_uart_rts_list[10];
extern const mcu_periph_obj_t mcu_uart_cts_list[10];
extern const mcu_pwm_obj_t mcu_pwm_list[39];

View File

@ -127,8 +127,8 @@ const mcu_periph_obj_t mcu_uart_rx_list[18] = {
PERIPH_PIN(6, 2, kIOMUXC_LPUART6_RX_SELECT_INPUT, 0, &pin_GPIO_EMC_26),
PERIPH_PIN(6, 2, kIOMUXC_LPUART6_RX_SELECT_INPUT, 1, &pin_GPIO_AD_B0_03),
PERIPH_PIN(7, 2, kIOMUXC_LPUART7_RX_SELECT_INPUT, 1, &pin_GPIO_EMC_32),
PERIPH_PIN(7, 2, kIOMUXC_LPUART7_RX_SELECT_INPUT, 0, &pin_GPIO_SD_B1_09),
PERIPH_PIN(7, 2, kIOMUXC_LPUART7_RX_SELECT_INPUT, 1, &pin_GPIO_EMC_32),
PERIPH_PIN(8, 2, kIOMUXC_LPUART8_RX_SELECT_INPUT, 0, &pin_GPIO_SD_B0_05),
PERIPH_PIN(8, 2, kIOMUXC_LPUART8_RX_SELECT_INPUT, 1, &pin_GPIO_AD_B1_11),
@ -163,6 +163,44 @@ const mcu_periph_obj_t mcu_uart_tx_list[18] = {
PERIPH_PIN(8, 2, kIOMUXC_LPUART8_TX_SELECT_INPUT, 2, &pin_GPIO_EMC_38),
};
const mcu_periph_obj_t mcu_uart_rts_list[9] = {
PERIPH_PIN(1, 2, 0, 0, &pin_GPIO_AD_B0_15),
PERIPH_PIN(2, 2, 0, 0, &pin_GPIO_AD_B1_01),
PERIPH_PIN(3, 2, 0, 0, &pin_GPIO_AD_B1_05),
PERIPH_PIN(3, 2, 0, 0, &pin_GPIO_EMC_16),
PERIPH_PIN(4, 2, 0, 0, &pin_GPIO_EMC_18),
PERIPH_PIN(5, 2, 0, 0, &pin_GPIO_EMC_27),
PERIPH_PIN(6, 2, 0, 0, &pin_GPIO_EMC_29),
PERIPH_PIN(7, 2, 0, 0, &pin_GPIO_SD_B1_07),
PERIPH_PIN(8, 2, 0, 0, &pin_GPIO_SD_B0_03),
};
const mcu_periph_obj_t mcu_uart_cts_list[9] = {
PERIPH_PIN(1, 2, 0, 0, &pin_GPIO_AD_B0_14),
PERIPH_PIN(2, 2, 0, 0, &pin_GPIO_AD_B1_00),
PERIPH_PIN(3, 2, kIOMUXC_LPUART3_CTS_B_SELECT_INPUT, 0, &pin_GPIO_EMC_15),
PERIPH_PIN(3, 2, kIOMUXC_LPUART3_CTS_B_SELECT_INPUT, 1, &pin_GPIO_AD_B1_04),
PERIPH_PIN(4, 2, 0, 0, &pin_GPIO_EMC_17),
PERIPH_PIN(5, 2, 0, 0, &pin_GPIO_EMC_28),
PERIPH_PIN(6, 2, 0, 0, &pin_GPIO_EMC_30),
PERIPH_PIN(7, 2, 0, 0, &pin_GPIO_SD_B1_06),
PERIPH_PIN(8, 2, 0, 0, &pin_GPIO_SD_B0_02),
};
const mcu_pwm_obj_t mcu_pwm_list[67] = {
PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmA, 1, &pin_GPIO_EMC_23),
PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmA, 1, &pin_GPIO_SD_B0_00),

View File

@ -36,6 +36,8 @@ extern const mcu_periph_obj_t mcu_spi_miso_list[8];
extern const mcu_periph_obj_t mcu_uart_rx_list[18];
extern const mcu_periph_obj_t mcu_uart_tx_list[18];
extern const mcu_periph_obj_t mcu_uart_rts_list[9];
extern const mcu_periph_obj_t mcu_uart_cts_list[9];
extern const mcu_pwm_obj_t mcu_pwm_list[67];

View File

@ -324,7 +324,11 @@ void flexspi_nor_flash_init(FLEXSPI_Type *base)
config.ahbConfig.enableAHBBufferable = true;
config.ahbConfig.enableReadAddressOpt = true;
config.ahbConfig.enableAHBCachable = true;
#ifdef BOARD_USING_SECONDARY_QSPI_PINMUX
config.rxSampleClock = kFLEXSPI_ReadSampleClkLoopbackInternally;
#else
config.rxSampleClock = kFLEXSPI_ReadSampleClkLoopbackFromDqsPad;
#endif
FLEXSPI_Init(base, &config);
/* Configure flash settings according to serial flash feature. */

View File

@ -128,10 +128,17 @@ void uart_reset(void) {
}
}
void common_hal_busio_uart_construct (busio_uart_obj_t *self,
const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx, uint32_t baudrate,
uint8_t bits, uart_parity_t parity, uint8_t stop, mp_float_t timeout,
uint16_t receiver_buffer_size) {
void common_hal_busio_uart_construct(busio_uart_obj_t *self,
const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx,
const mcu_pin_obj_t * rts, const mcu_pin_obj_t * cts,
const mcu_pin_obj_t * rs485_dir, bool rs485_invert,
uint32_t baudrate, uint8_t bits, uart_parity_t parity, uint8_t stop,
mp_float_t timeout, uint16_t receiver_buffer_size) {
if ((rts != mp_const_none) || (cts != mp_const_none) || (rs485_dir != mp_const_none) || (rs485_invert)) {
mp_raise_ValueError(translate("RTS/CTS/RS485 Not yet supported on this device"));
}
// Find a free UART peripheral.
self->uarte = NULL;
for (size_t i = 0 ; i < MP_ARRAY_SIZE(nrfx_uartes); i++) {

View File

@ -71,10 +71,12 @@ void uart_reset(void) {
uart_clock_disable(ALL_UARTS);
}
void common_hal_busio_uart_construct(busio_uart_obj_t* self,
const mcu_pin_obj_t* tx, const mcu_pin_obj_t* rx, uint32_t baudrate,
uint8_t bits, uart_parity_t parity, uint8_t stop, mp_float_t timeout,
uint16_t receiver_buffer_size) {
void common_hal_busio_uart_construct(busio_uart_obj_t *self,
const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx,
const mcu_pin_obj_t * rts, const mcu_pin_obj_t * cts,
const mcu_pin_obj_t * rs485_dir, bool rs485_invert,
uint32_t baudrate, uint8_t bits, uart_parity_t parity, uint8_t stop,
mp_float_t timeout, uint16_t receiver_buffer_size) {
//match pins to UART objects
USART_TypeDef * USARTx;
@ -84,6 +86,10 @@ void common_hal_busio_uart_construct(busio_uart_obj_t* self,
bool uart_taken = false;
uint8_t uart_index = 0; //origin 0 corrected
if ((rts != mp_const_none) || (cts != mp_const_none) || (rs485_dir != mp_const_none) || (rs485_invert == true)) {
mp_raise_ValueError(translate("RTS/CTS/RS485 Not yet supported on this device"));
}
//Can have both pins, or either
if ((tx != mp_const_none) && (rx != mp_const_none)) {
//normal find loop if both pins exist

View File

@ -53,6 +53,10 @@
//|
//| :param ~microcontroller.Pin tx: the pin to transmit with, or ``None`` if this ``UART`` is receive-only.
//| :param ~microcontroller.Pin rx: the pin to receive on, or ``None`` if this ``UART`` is transmit-only.
//| :param ~microcontroller.Pin rts: the pin for rts, or ``None`` if rts not in use.
//| :param ~microcontroller.Pin cts: the pin for cts, or ``None`` if cts not in use.
//| :param ~microcontroller.Pin rs485_dir: the pin for rs485 direction setting, or ``None`` if rs485 not in use.
//| :param bool rs485_invert: set to invert the sense of the rs485_dir pin.
//| :param int baudrate: the transmit and receive speed.
//| :param int bits: the number of bits per byte, 7, 8 or 9.
//| :param Parity parity: the parity used for error checking.
@ -82,7 +86,8 @@ STATIC mp_obj_t busio_uart_make_new(const mp_obj_type_t *type, size_t n_args, co
// https://github.com/adafruit/circuitpython/issues/1056)
busio_uart_obj_t *self = m_new_ll_obj(busio_uart_obj_t);
self->base.type = &busio_uart_type;
enum { ARG_tx, ARG_rx, ARG_baudrate, ARG_bits, ARG_parity, ARG_stop, ARG_timeout, ARG_receiver_buffer_size};
enum { ARG_tx, ARG_rx, ARG_baudrate, ARG_bits, ARG_parity, ARG_stop, ARG_timeout, ARG_receiver_buffer_size,
ARG_rts, ARG_cts, ARG_rs485_dir,ARG_rs485_invert};
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_tx, MP_ARG_REQUIRED | MP_ARG_OBJ },
{ MP_QSTR_rx, MP_ARG_REQUIRED | MP_ARG_OBJ },
@ -92,6 +97,10 @@ STATIC mp_obj_t busio_uart_make_new(const mp_obj_type_t *type, size_t n_args, co
{ MP_QSTR_stop, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 1} },
{ MP_QSTR_timeout, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = MP_OBJ_NEW_SMALL_INT(1)} },
{ MP_QSTR_receiver_buffer_size, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 64} },
{ MP_QSTR_rts, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} },
{ MP_QSTR_cts, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} },
{ MP_QSTR_rs485_dir, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none } },
{ MP_QSTR_rs485_invert, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = false } },
};
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
@ -124,7 +133,14 @@ STATIC mp_obj_t busio_uart_make_new(const mp_obj_type_t *type, size_t n_args, co
mp_float_t timeout = mp_obj_get_float(args[ARG_timeout].u_obj);
validate_timeout(timeout);
common_hal_busio_uart_construct(self, tx, rx,
const mcu_pin_obj_t* rts = MP_OBJ_TO_PTR(args[ARG_rts].u_obj);
const mcu_pin_obj_t* cts = MP_OBJ_TO_PTR(args[ARG_cts].u_obj);
const mcu_pin_obj_t* rs485_dir = args[ARG_rs485_dir].u_obj;
bool rs485_invert = args[ARG_rs485_invert].u_bool;
common_hal_busio_uart_construct(self, tx, rx, rts, cts, rs485_dir, rs485_invert,
args[ARG_baudrate].u_int, bits, parity, stop, timeout,
args[ARG_receiver_buffer_size].u_int);
return (mp_obj_t)self;

View File

@ -40,9 +40,11 @@ typedef enum {
// Construct an underlying UART object.
extern void common_hal_busio_uart_construct(busio_uart_obj_t *self,
const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx, uint32_t baudrate,
uint8_t bits, uart_parity_t parity, uint8_t stop, mp_float_t timeout,
uint16_t receiver_buffer_size);
const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx,
const mcu_pin_obj_t * rts, const mcu_pin_obj_t * cts,
const mcu_pin_obj_t * rs485_dir, bool rs485_invert,
uint32_t baudrate, uint8_t bits, uart_parity_t parity, uint8_t stop,
mp_float_t timeout, uint16_t receiver_buffer_size);
extern void common_hal_busio_uart_deinit(busio_uart_obj_t *self);
extern bool common_hal_busio_uart_deinited(busio_uart_obj_t *self);

View File

@ -100,8 +100,28 @@ mp_obj_t common_hal_board_create_uart(void) {
const mcu_pin_obj_t* rx = MP_OBJ_TO_PTR(DEFAULT_UART_BUS_RX);
const mcu_pin_obj_t* tx = MP_OBJ_TO_PTR(DEFAULT_UART_BUS_TX);
#ifdef DEFAULT_UART_BUS_RTS
const mcu_pin_obj_t* rts = MP_OBJ_TO_PTR(DEFAULT_UART_BUS_RTS);
#else
const mcu_pin_obj_t* rts = mp_const_none;
#endif
#ifdef DEFAULT_UART_BUS_CTS
const mcu_pin_obj_t* cts = MP_OBJ_TO_PTR(DEFAULT_UART_BUS_CTS);
#else
const mcu_pin_obj_t* cts = mp_const_none;
#endif
#ifdef DEFAULT_UART_IS_RS485
const mcu_pin_obj_t* rs485_dir = MP_OBJ_TO_PTR(DEFAULT_UART_BUS_RS485DIR);
#ifdef DEFAULT_UART_RS485_INVERT
const bool rs485_invert = true;
#endif
#else
const mcu_pin_obj_t* rs485_dir = mp_const_none;
const bool rs485_invert = true;
#endif
common_hal_busio_uart_construct(self, tx, rx, 9600, 8, PARITY_NONE, 1, 1.0f, 64);
common_hal_busio_uart_construct(self, tx, rx, rts, cts, rs485_dir, rs485_invert,
9600, 8, PARITY_NONE, 1, 1.0f, 64);
MP_STATE_VM(shared_uart_bus) = MP_OBJ_FROM_PTR(self);
return MP_STATE_VM(shared_uart_bus);
}