Merge remote-tracking branch 'origin/master' into ulab

crypto-aes
Jeff Epler 3 years ago
commit da31acfcc4
  1. 10
      .github/workflows/build.yml
  2. 6
      lib/oofatfs/ff.c
  3. 6
      lib/oofatfs/ffconf.h
  4. 21
      locale/ID.po
  5. 21
      locale/circuitpython.pot
  6. 21
      locale/de_DE.po
  7. 21
      locale/en_US.po
  8. 21
      locale/en_x_pirate.po
  9. 21
      locale/es.po
  10. 21
      locale/fil.po
  11. 21
      locale/fr.po
  12. 21
      locale/it_IT.po
  13. 21
      locale/ko.po
  14. 21
      locale/pl.po
  15. 21
      locale/pt_BR.po
  16. 26
      locale/zh_Latn_pinyin.po
  17. 1
      mpy-cross/.gitignore
  18. 6
      mpy-cross/Makefile.fuzz
  19. 1
      ports/nrf/Makefile
  20. 43
      ports/nrf/supervisor/qspi_flash.c
  21. 2
      ports/stm32f4/common-hal/pulseio/PWMOut.c
  22. 163
      ports/stm32f4/common-hal/pulseio/PulseOut.c
  23. 2
      ports/stm32f4/common-hal/pulseio/PulseOut.h
  24. 7
      ports/stm32f4/peripherals/stm32f4/periph.h
  25. 2
      ports/stm32f4/supervisor/port.c
  26. 12
      ports/unix/Makefile
  27. 17
      py/compile.c
  28. 3
      py/parse.c
  29. 19
      tools/build_board_info.py
  30. 35
      tools/upload_release_files.py

@ -273,13 +273,3 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
- name: Install upload deps
run: |
pip install uritemplate
- name: Upload to Release
run: "[ -z \"$ADABOT_GITHUB_ACCESS_TOKEN\" ] || python3 -u upload_release_files.py"
working-directory: tools
env:
UPLOAD_URL: ${{ github.event.release.upload_url }}
ADABOT_GITHUB_ACCESS_TOKEN: ${{ secrets.BLINKA_GITHUB_ACCESS_TOKEN }}
if: github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')

@ -3382,11 +3382,7 @@ FRESULT f_read (
if (!sect) ABORT(fs, FR_INT_ERR);
sect += csect;
cc = btr / SS(fs); /* When remaining bytes >= sector size, */
if (cc
#if _FS_DISK_READ_ALIGNED
&& (((int)rbuff & 3) == 0)
#endif
) {/* Read maximum contiguous sectors directly */
if (cc) {/* Read maximum contiguous sectors directly */
if (csect + cc > fs->csize) { /* Clip at cluster boundary */
cc = fs->csize - csect;
}

@ -343,12 +343,6 @@
/ SemaphoreHandle_t and etc.. A header file for O/S definitions needs to be
/ included somewhere in the scope of ff.h. */
// Set to nonzero if buffers passed to disk_read have a word alignment
// restriction
#ifndef _FS_DISK_READ_ALIGNED
#define _FS_DISK_READ_ALIGNED 0
#endif
/* #include <windows.h> // O/S definitions */

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-27 11:02-0600\n"
"POT-Creation-Date: 2020-03-03 20:13-0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -184,6 +184,10 @@ msgstr ""
msgid "'align' requires 1 argument"
msgstr "'align' membutuhkan 1 argumen"
#: py/compile.c
msgid "'async for' or 'async with' outside async function"
msgstr ""
#: py/compile.c
msgid "'await' outside function"
msgstr "'await' diluar fungsi"
@ -910,10 +914,13 @@ msgstr "Pin untuk channel kanan tidak valid"
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins"
msgstr "Pin-pin tidak valid"
#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins for PWMOut"
msgstr ""
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
msgid "Invalid polarity"
msgstr ""
@ -1003,6 +1010,10 @@ msgstr ""
msgid "Must provide MISO or MOSI pin"
msgstr ""
#: py/parse.c
msgid "Name too long"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Negative step not supported"
msgstr ""
@ -1181,7 +1192,7 @@ msgid "PulseIn not yet supported"
msgstr ""
#: ports/stm32f4/common-hal/pulseio/PulseOut.c
msgid "PulseOut not yet supported"
msgid "PulseOut not supported on this chip"
msgstr ""
#: ports/stm32f4/common-hal/os/__init__.c
@ -2216,7 +2227,7 @@ msgstr ""
msgid "inline assembler must be a function"
msgstr "inline assembler harus sebuah fungsi"
#: extmod/ulab/code/linalg.c
#: extmod/ulab/code/create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr ""
@ -2539,7 +2550,7 @@ msgstr ""
msgid "number of arguments must be 2, or 3"
msgstr ""
#: extmod/ulab/code/numerical.c
#: extmod/ulab/code/create.c
msgid "number of points must be at least 2"
msgstr ""

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-27 11:02-0600\n"
"POT-Creation-Date: 2020-03-03 20:13-0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -183,6 +183,10 @@ msgstr ""
msgid "'align' requires 1 argument"
msgstr ""
#: py/compile.c
msgid "'async for' or 'async with' outside async function"
msgstr ""
#: py/compile.c
msgid "'await' outside function"
msgstr ""
@ -899,10 +903,13 @@ msgstr ""
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins"
msgstr ""
#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins for PWMOut"
msgstr ""
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
msgid "Invalid polarity"
msgstr ""
@ -992,6 +999,10 @@ msgstr ""
msgid "Must provide MISO or MOSI pin"
msgstr ""
#: py/parse.c
msgid "Name too long"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Negative step not supported"
msgstr ""
@ -1167,7 +1178,7 @@ msgid "PulseIn not yet supported"
msgstr ""
#: ports/stm32f4/common-hal/pulseio/PulseOut.c
msgid "PulseOut not yet supported"
msgid "PulseOut not supported on this chip"
msgstr ""
#: ports/stm32f4/common-hal/os/__init__.c
@ -2192,7 +2203,7 @@ msgstr ""
msgid "inline assembler must be a function"
msgstr ""
#: extmod/ulab/code/linalg.c
#: extmod/ulab/code/create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr ""
@ -2515,7 +2526,7 @@ msgstr ""
msgid "number of arguments must be 2, or 3"
msgstr ""
#: extmod/ulab/code/numerical.c
#: extmod/ulab/code/create.c
msgid "number of points must be at least 2"
msgstr ""

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-27 11:02-0600\n"
"POT-Creation-Date: 2020-03-03 20:13-0600\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: Pascal Deneaux\n"
"Language-Team: Sebastian Plamauer, Pascal Deneaux\n"
@ -185,6 +185,10 @@ msgstr "'S' und 'O' sind keine unterstützten Formattypen"
msgid "'align' requires 1 argument"
msgstr "'align' erfordert genau ein Argument"
#: py/compile.c
msgid "'async for' or 'async with' outside async function"
msgstr ""
#: py/compile.c
msgid "'await' outside function"
msgstr "'await' außerhalb einer Funktion"
@ -907,10 +911,13 @@ msgstr "Ungültiger Pin für rechten Kanal"
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins"
msgstr "Ungültige Pins"
#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins for PWMOut"
msgstr ""
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
msgid "Invalid polarity"
msgstr "Ungültige Polarität"
@ -1001,6 +1008,10 @@ msgstr "Muss eine %q Unterklasse sein."
msgid "Must provide MISO or MOSI pin"
msgstr ""
#: py/parse.c
msgid "Name too long"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Negative step not supported"
msgstr ""
@ -1184,7 +1195,7 @@ msgid "PulseIn not yet supported"
msgstr ""
#: ports/stm32f4/common-hal/pulseio/PulseOut.c
msgid "PulseOut not yet supported"
msgid "PulseOut not supported on this chip"
msgstr ""
#: ports/stm32f4/common-hal/os/__init__.c
@ -2222,7 +2233,7 @@ msgstr ""
msgid "inline assembler must be a function"
msgstr "inline assembler muss eine function sein"
#: extmod/ulab/code/linalg.c
#: extmod/ulab/code/create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr ""
@ -2551,7 +2562,7 @@ msgstr ""
msgid "number of arguments must be 2, or 3"
msgstr ""
#: extmod/ulab/code/numerical.c
#: extmod/ulab/code/create.c
msgid "number of points must be at least 2"
msgstr ""

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-27 11:02-0600\n"
"POT-Creation-Date: 2020-03-03 20:13-0600\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -183,6 +183,10 @@ msgstr ""
msgid "'align' requires 1 argument"
msgstr ""
#: py/compile.c
msgid "'async for' or 'async with' outside async function"
msgstr ""
#: py/compile.c
msgid "'await' outside function"
msgstr ""
@ -899,10 +903,13 @@ msgstr ""
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins"
msgstr ""
#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins for PWMOut"
msgstr ""
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
msgid "Invalid polarity"
msgstr ""
@ -992,6 +999,10 @@ msgstr ""
msgid "Must provide MISO or MOSI pin"
msgstr ""
#: py/parse.c
msgid "Name too long"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Negative step not supported"
msgstr ""
@ -1167,7 +1178,7 @@ msgid "PulseIn not yet supported"
msgstr ""
#: ports/stm32f4/common-hal/pulseio/PulseOut.c
msgid "PulseOut not yet supported"
msgid "PulseOut not supported on this chip"
msgstr ""
#: ports/stm32f4/common-hal/os/__init__.c
@ -2192,7 +2203,7 @@ msgstr ""
msgid "inline assembler must be a function"
msgstr ""
#: extmod/ulab/code/linalg.c
#: extmod/ulab/code/create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr ""
@ -2515,7 +2526,7 @@ msgstr ""
msgid "number of arguments must be 2, or 3"
msgstr ""
#: extmod/ulab/code/numerical.c
#: extmod/ulab/code/create.c
msgid "number of points must be at least 2"
msgstr ""

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-27 11:02-0600\n"
"POT-Creation-Date: 2020-03-03 20:13-0600\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: \n"
"Language-Team: @sommersoft, @MrCertainly\n"
@ -185,6 +185,10 @@ msgstr ""
msgid "'align' requires 1 argument"
msgstr ""
#: py/compile.c
msgid "'async for' or 'async with' outside async function"
msgstr ""
#: py/compile.c
msgid "'await' outside function"
msgstr ""
@ -903,10 +907,13 @@ msgstr "Belay that! Invalid pin for starboard-side channel"
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins"
msgstr ""
#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins for PWMOut"
msgstr ""
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
msgid "Invalid polarity"
msgstr ""
@ -996,6 +1003,10 @@ msgstr ""
msgid "Must provide MISO or MOSI pin"
msgstr ""
#: py/parse.c
msgid "Name too long"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Negative step not supported"
msgstr ""
@ -1171,7 +1182,7 @@ msgid "PulseIn not yet supported"
msgstr ""
#: ports/stm32f4/common-hal/pulseio/PulseOut.c
msgid "PulseOut not yet supported"
msgid "PulseOut not supported on this chip"
msgstr ""
#: ports/stm32f4/common-hal/os/__init__.c
@ -2196,7 +2207,7 @@ msgstr ""
msgid "inline assembler must be a function"
msgstr ""
#: extmod/ulab/code/linalg.c
#: extmod/ulab/code/create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr ""
@ -2519,7 +2530,7 @@ msgstr ""
msgid "number of arguments must be 2, or 3"
msgstr ""
#: extmod/ulab/code/numerical.c
#: extmod/ulab/code/create.c
msgid "number of points must be at least 2"
msgstr ""

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-27 11:02-0600\n"
"POT-Creation-Date: 2020-03-03 20:13-0600\n"
"PO-Revision-Date: 2018-08-24 22:56-0500\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -185,6 +185,10 @@ msgstr "'S' y 'O' no son compatibles con los tipos de formato"
msgid "'align' requires 1 argument"
msgstr "'align' requiere 1 argumento"
#: py/compile.c
msgid "'async for' or 'async with' outside async function"
msgstr ""
#: py/compile.c
msgid "'await' outside function"
msgstr "'await' fuera de la función"
@ -907,10 +911,13 @@ msgstr "Pin inválido para canal derecho"
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins"
msgstr "pines inválidos"
#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins for PWMOut"
msgstr ""
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
msgid "Invalid polarity"
msgstr "Polaridad inválida"
@ -1000,6 +1007,10 @@ msgstr "Debe de ser una subclase de %q"
msgid "Must provide MISO or MOSI pin"
msgstr ""
#: py/parse.c
msgid "Name too long"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Negative step not supported"
msgstr ""
@ -1183,7 +1194,7 @@ msgid "PulseIn not yet supported"
msgstr ""
#: ports/stm32f4/common-hal/pulseio/PulseOut.c
msgid "PulseOut not yet supported"
msgid "PulseOut not supported on this chip"
msgstr ""
#: ports/stm32f4/common-hal/os/__init__.c
@ -2223,7 +2234,7 @@ msgstr ""
msgid "inline assembler must be a function"
msgstr "ensamblador en línea debe ser una función"
#: extmod/ulab/code/linalg.c
#: extmod/ulab/code/create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr ""
@ -2552,7 +2563,7 @@ msgstr "no suficientes argumentos para format string"
msgid "number of arguments must be 2, or 3"
msgstr ""
#: extmod/ulab/code/numerical.c
#: extmod/ulab/code/create.c
msgid "number of points must be at least 2"
msgstr ""

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-27 11:02-0600\n"
"POT-Creation-Date: 2020-03-03 20:13-0600\n"
"PO-Revision-Date: 2018-12-20 22:15-0800\n"
"Last-Translator: Timothy <me@timothygarcia.ca>\n"
"Language-Team: fil\n"
@ -186,6 +186,10 @@ msgstr "Ang 'S' at 'O' ay hindi suportadong uri ng format"
msgid "'align' requires 1 argument"
msgstr "'align' kailangan ng 1 argument"
#: py/compile.c
msgid "'async for' or 'async with' outside async function"
msgstr ""
#: py/compile.c
msgid "'await' outside function"
msgstr "'await' sa labas ng function"
@ -915,10 +919,13 @@ msgstr "Mali ang pin para sa kanang channel"
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins"
msgstr "Mali ang pins"
#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins for PWMOut"
msgstr ""
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
msgid "Invalid polarity"
msgstr "Mali ang polarity"
@ -1008,6 +1015,10 @@ msgstr ""
msgid "Must provide MISO or MOSI pin"
msgstr ""
#: py/parse.c
msgid "Name too long"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Negative step not supported"
msgstr ""
@ -1189,7 +1200,7 @@ msgid "PulseIn not yet supported"
msgstr ""
#: ports/stm32f4/common-hal/pulseio/PulseOut.c
msgid "PulseOut not yet supported"
msgid "PulseOut not supported on this chip"
msgstr ""
#: ports/stm32f4/common-hal/os/__init__.c
@ -2238,7 +2249,7 @@ msgstr ""
msgid "inline assembler must be a function"
msgstr "inline assembler ay dapat na function"
#: extmod/ulab/code/linalg.c
#: extmod/ulab/code/create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr ""
@ -2565,7 +2576,7 @@ msgstr "kulang sa arguments para sa format string"
msgid "number of arguments must be 2, or 3"
msgstr ""
#: extmod/ulab/code/numerical.c
#: extmod/ulab/code/create.c
msgid "number of points must be at least 2"
msgstr ""

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-27 11:02-0600\n"
"POT-Creation-Date: 2020-03-03 20:13-0600\n"
"PO-Revision-Date: 2019-04-14 20:05+0100\n"
"Last-Translator: Pierrick Couturier <arofarn@arofarn.info>\n"
"Language-Team: fr\n"
@ -187,6 +187,10 @@ msgstr "'S' et 'O' ne sont pas des types de format supportés"
msgid "'align' requires 1 argument"
msgstr "'align' nécessite 1 argument"
#: py/compile.c
msgid "'async for' or 'async with' outside async function"
msgstr ""
#: py/compile.c
msgid "'await' outside function"
msgstr "'await' en dehors d'une fonction"
@ -921,10 +925,13 @@ msgstr "Broche invalide pour le canal droit"
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins"
msgstr "Broches invalides"
#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins for PWMOut"
msgstr ""
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
msgid "Invalid polarity"
msgstr "Polarité invalide"
@ -1015,6 +1022,10 @@ msgstr ""
msgid "Must provide MISO or MOSI pin"
msgstr ""
#: py/parse.c
msgid "Name too long"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Negative step not supported"
msgstr ""
@ -1202,7 +1213,7 @@ msgid "PulseIn not yet supported"
msgstr ""
#: ports/stm32f4/common-hal/pulseio/PulseOut.c
msgid "PulseOut not yet supported"
msgid "PulseOut not supported on this chip"
msgstr ""
#: ports/stm32f4/common-hal/os/__init__.c
@ -2262,7 +2273,7 @@ msgstr ""
msgid "inline assembler must be a function"
msgstr "l'assembleur doit être une fonction"
#: extmod/ulab/code/linalg.c
#: extmod/ulab/code/create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr ""
@ -2592,7 +2603,7 @@ msgstr "pas assez d'arguments pour la chaîne de format"
msgid "number of arguments must be 2, or 3"
msgstr ""
#: extmod/ulab/code/numerical.c
#: extmod/ulab/code/create.c
msgid "number of points must be at least 2"
msgstr ""

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-27 11:02-0600\n"
"POT-Creation-Date: 2020-03-03 20:13-0600\n"
"PO-Revision-Date: 2018-10-02 16:27+0200\n"
"Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n"
"Language-Team: \n"
@ -185,6 +185,10 @@ msgstr "'S' e 'O' non sono formati supportati"
msgid "'align' requires 1 argument"
msgstr "'align' richiede 1 argomento"
#: py/compile.c
msgid "'async for' or 'async with' outside async function"
msgstr ""
#: py/compile.c
msgid "'await' outside function"
msgstr "'await' al di fuori della funzione"
@ -917,10 +921,13 @@ msgstr "Pin non valido per il canale destro"
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins"
msgstr "Pin non validi"
#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins for PWMOut"
msgstr ""
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
msgid "Invalid polarity"
msgstr "Polarità non valida"
@ -1012,6 +1019,10 @@ msgstr ""
msgid "Must provide MISO or MOSI pin"
msgstr ""
#: py/parse.c
msgid "Name too long"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Negative step not supported"
msgstr ""
@ -1198,7 +1209,7 @@ msgid "PulseIn not yet supported"
msgstr ""
#: ports/stm32f4/common-hal/pulseio/PulseOut.c
msgid "PulseOut not yet supported"
msgid "PulseOut not supported on this chip"
msgstr ""
#: ports/stm32f4/common-hal/os/__init__.c
@ -2239,7 +2250,7 @@ msgstr ""
msgid "inline assembler must be a function"
msgstr "inline assembler deve essere una funzione"
#: extmod/ulab/code/linalg.c
#: extmod/ulab/code/create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr ""
@ -2570,7 +2581,7 @@ msgstr "argomenti non sufficienti per la stringa di formattazione"
msgid "number of arguments must be 2, or 3"
msgstr ""
#: extmod/ulab/code/numerical.c
#: extmod/ulab/code/create.c
msgid "number of points must be at least 2"
msgstr ""

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-27 11:02-0600\n"
"POT-Creation-Date: 2020-03-03 20:13-0600\n"
"PO-Revision-Date: 2019-05-06 14:22-0700\n"
"Last-Translator: \n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -185,6 +185,10 @@ msgstr ""
msgid "'align' requires 1 argument"
msgstr "'align' 에는 1 개의 독립변수가 필요합니다"
#: py/compile.c
msgid "'async for' or 'async with' outside async function"
msgstr ""
#: py/compile.c
msgid "'await' outside function"
msgstr "'await' 는 펑크션 외부에 있습니다"
@ -903,10 +907,13 @@ msgstr "오른쪽 채널 핀이 잘못되었습니다"
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins"
msgstr "핀이 유효하지 않습니다"
#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins for PWMOut"
msgstr ""
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
msgid "Invalid polarity"
msgstr ""
@ -996,6 +1003,10 @@ msgstr ""
msgid "Must provide MISO or MOSI pin"
msgstr ""
#: py/parse.c
msgid "Name too long"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Negative step not supported"
msgstr ""
@ -1171,7 +1182,7 @@ msgid "PulseIn not yet supported"
msgstr ""
#: ports/stm32f4/common-hal/pulseio/PulseOut.c
msgid "PulseOut not yet supported"
msgid "PulseOut not supported on this chip"
msgstr ""
#: ports/stm32f4/common-hal/os/__init__.c
@ -2197,7 +2208,7 @@ msgstr ""
msgid "inline assembler must be a function"
msgstr ""
#: extmod/ulab/code/linalg.c
#: extmod/ulab/code/create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr ""
@ -2520,7 +2531,7 @@ msgstr ""
msgid "number of arguments must be 2, or 3"
msgstr ""
#: extmod/ulab/code/numerical.c
#: extmod/ulab/code/create.c
msgid "number of points must be at least 2"
msgstr ""

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-27 11:02-0600\n"
"POT-Creation-Date: 2020-03-03 20:13-0600\n"
"PO-Revision-Date: 2019-03-19 18:37-0700\n"
"Last-Translator: Radomir Dopieralski <circuitpython@sheep.art.pl>\n"
"Language-Team: pl\n"
@ -184,6 +184,10 @@ msgstr "typy formatowania 'S' oraz 'O' są niewspierane"
msgid "'align' requires 1 argument"
msgstr "'align' wymaga 1 argumentu"
#: py/compile.c
msgid "'async for' or 'async with' outside async function"
msgstr ""
#: py/compile.c
msgid "'await' outside function"
msgstr "'await' poza funkcją"
@ -904,10 +908,13 @@ msgstr "Zła nóżka dla prawego kanału"
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins"
msgstr "Złe nóżki"
#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins for PWMOut"
msgstr ""
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
msgid "Invalid polarity"
msgstr "Zła polaryzacja"
@ -997,6 +1004,10 @@ msgstr ""
msgid "Must provide MISO or MOSI pin"
msgstr ""
#: py/parse.c
msgid "Name too long"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Negative step not supported"
msgstr ""
@ -1172,7 +1183,7 @@ msgid "PulseIn not yet supported"
msgstr ""
#: ports/stm32f4/common-hal/pulseio/PulseOut.c
msgid "PulseOut not yet supported"
msgid "PulseOut not supported on this chip"
msgstr ""
#: ports/stm32f4/common-hal/os/__init__.c
@ -2201,7 +2212,7 @@ msgstr ""
msgid "inline assembler must be a function"
msgstr "wtrącony asembler musi być funkcją"
#: extmod/ulab/code/linalg.c
#: extmod/ulab/code/create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr ""
@ -2524,7 +2535,7 @@ msgstr "nie dość argumentów przy formatowaniu"
msgid "number of arguments must be 2, or 3"
msgstr ""
#: extmod/ulab/code/numerical.c
#: extmod/ulab/code/create.c
msgid "number of points must be at least 2"
msgstr ""

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-27 11:02-0600\n"
"POT-Creation-Date: 2020-03-03 20:13-0600\n"
"PO-Revision-Date: 2018-10-02 21:14-0000\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -185,6 +185,10 @@ msgstr "'S' e 'O' não são tipos de formato suportados"
msgid "'align' requires 1 argument"
msgstr ""
#: py/compile.c
msgid "'async for' or 'async with' outside async function"
msgstr ""
#: py/compile.c
msgid "'await' outside function"
msgstr ""
@ -910,10 +914,13 @@ msgstr "Pino inválido para canal direito"
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins"
msgstr "Pinos inválidos"
#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins for PWMOut"
msgstr ""
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
msgid "Invalid polarity"
msgstr ""
@ -1004,6 +1011,10 @@ msgstr ""
msgid "Must provide MISO or MOSI pin"
msgstr ""
#: py/parse.c
msgid "Name too long"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Negative step not supported"
msgstr ""
@ -1183,7 +1194,7 @@ msgid "PulseIn not yet supported"
msgstr ""
#: ports/stm32f4/common-hal/pulseio/PulseOut.c
msgid "PulseOut not yet supported"
msgid "PulseOut not supported on this chip"
msgstr ""
#: ports/stm32f4/common-hal/os/__init__.c
@ -2214,7 +2225,7 @@ msgstr ""
msgid "inline assembler must be a function"
msgstr ""
#: extmod/ulab/code/linalg.c
#: extmod/ulab/code/create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr ""
@ -2537,7 +2548,7 @@ msgstr ""
msgid "number of arguments must be 2, or 3"
msgstr ""
#: extmod/ulab/code/numerical.c
#: extmod/ulab/code/create.c
msgid "number of points must be at least 2"
msgstr ""

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: circuitpython-cn\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-27 11:02-0600\n"
"POT-Creation-Date: 2020-03-03 20:13-0600\n"
"PO-Revision-Date: 2019-04-13 10:10-0700\n"
"Last-Translator: hexthat\n"
"Language-Team: Chinese Hanyu Pinyin\n"
@ -190,6 +190,10 @@ msgstr "'S' hé 'O' bù zhīchí géshì lèixíng"
msgid "'align' requires 1 argument"
msgstr "'align' xūyào 1 gè cānshù"
#: py/compile.c
msgid "'async for' or 'async with' outside async function"
msgstr ""
#: py/compile.c
msgid "'await' outside function"
msgstr "'await' wàibù gōngnéng"
@ -912,10 +916,13 @@ msgstr "Yòuxián tōngdào yǐn jiǎo wúxiào"
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins"
msgstr "Wúxiào de yǐn jiǎo"
#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins for PWMOut"
msgstr ""
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
msgid "Invalid polarity"
msgstr "Wúxiào liǎng jí zhí"
@ -1005,6 +1012,10 @@ msgstr "Bìxū shì %q zi lèi."
msgid "Must provide MISO or MOSI pin"
msgstr "Bìxū tígōng MISO huò MOSI yǐn jiǎo"
#: py/parse.c
msgid "Name too long"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Negative step not supported"
msgstr "Bù zhīchí fù bù"
@ -1186,8 +1197,8 @@ msgid "PulseIn not yet supported"
msgstr "Shàng bù zhīchí PulseIn"
#: ports/stm32f4/common-hal/pulseio/PulseOut.c
msgid "PulseOut not yet supported"
msgstr "Shàng bù zhīchí PulseOut"
msgid "PulseOut not supported on this chip"
msgstr ""
#: ports/stm32f4/common-hal/os/__init__.c
msgid "RNG DeInit Error"
@ -2229,7 +2240,7 @@ msgstr ""
msgid "inline assembler must be a function"
msgstr "nèi lián jíhé bìxū shì yīgè hánshù"
#: extmod/ulab/code/linalg.c
#: extmod/ulab/code/create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr ""
@ -2554,7 +2565,7 @@ msgstr "géshì zìfú chuàn cān shǔ bùzú"
msgid "number of arguments must be 2, or 3"
msgstr ""
#: extmod/ulab/code/numerical.c
#: extmod/ulab/code/create.c
msgid "number of points must be at least 2"
msgstr ""
@ -3286,6 +3297,9 @@ msgstr "líng bù"
#~ msgid "Pixel beyond bounds of buffer"
#~ msgstr "Xiàngsù chāochū huǎnchōng qū biānjiè"
#~ msgid "PulseOut not yet supported"
#~ msgstr "Shàng bù zhīchí PulseOut"
#~ msgid "Range out of bounds"
#~ msgstr "Fànwéi chāochū biānjiè"

@ -3,4 +3,5 @@
/mpy-cross.static
/mpy-cross.static.exe
/mpy-cross.static-raspbian
/mpy-cross.fuzz
/pitools

@ -0,0 +1,6 @@
PROG=mpy-cross.fuzz
BUILD=build-static
STATIC_BUILD=1
CC=afl-clang-fast
include mpy-cross.mk

@ -102,7 +102,6 @@ CFLAGS += -Wno-undef
CFLAGS += -Wno-cast-align
NRF_DEFINES += -DCONFIG_GPIO_AS_PINRESET
NRF_DEFINES += -D_FS_DISK_READ_ALIGNED=1
CFLAGS += $(NRF_DEFINES)
CFLAGS += \

@ -83,11 +83,52 @@ bool spi_flash_sector_command(uint8_t command, uint32_t address) {
}
bool spi_flash_write_data(uint32_t address, uint8_t* data, uint32_t length) {
// TODO: In theory, this also needs to handle unaligned data and
// non-multiple-of-4 length. (in practice, I don't think the fat layer
// generates such writes)
return nrfx_qspi_write(data, length, address) == NRFX_SUCCESS;
}
bool spi_flash_read_data(uint32_t address, uint8_t* data, uint32_t length) {
return nrfx_qspi_read(data, length, address) == NRFX_SUCCESS;
int misaligned = ((intptr_t)data) & 3;
// If the data is misaligned, we need to read 4 bytes
// into an aligned buffer, and then copy 1, 2, or 3 bytes from the aligned
// buffer to data.
if(misaligned) {
int sz = 4 - misaligned;
__attribute__((aligned(4))) uint8_t buf[4];
if(nrfx_qspi_read(buf, 4, address) != NRFX_SUCCESS) {
return false;
}
memcpy(data, buf, sz);
data += sz;
address += sz;
length -= sz;
}
// nrfx_qspi_read works in 4 byte increments, though it doesn't
// signal an error if sz is not a multiple of 4. Read (directly into data)
// all but the last 1, 2, or 3 bytes depending on the (remaining) length.
uint32_t sz = length & ~(uint32_t)3;
if(nrfx_qspi_read(data, sz, address) != NRFX_SUCCESS) {
return false;
}
data += sz;
address += sz;
length -= sz;
// Now, if we have any bytes left over, we must do a final read of 4
// bytes and copy 1, 2, or 3 bytes to data.
if(length) {
__attribute__((aligned(4))) uint8_t buf[4];
if(nrfx_qspi_read(buf, 4, address) != NRFX_SUCCESS) {
return false;
}
memcpy(data, buf, length);
}
return true;
}
void spi_flash_init(void) {

@ -163,7 +163,7 @@ pwmout_result_t common_hal_pulseio_pwmout_construct(pulseio_pwmout_obj_t* self,
} else if (var_freq_mismatch) {
mp_raise_ValueError(translate("Cannot vary frequency on a timer that is already in use"));
} else {
mp_raise_ValueError(translate("Invalid pins"));
mp_raise_ValueError(translate("Invalid pins for PWMOut"));
}
}

@ -35,21 +35,180 @@
#include "shared-bindings/pulseio/PWMOut.h"
#include "supervisor/shared/translate.h"
#include "stm32f4xx_hal.h"
#include "common-hal/microcontroller/Pin.h"
#include "tick.h"
// A single timer is shared amongst all PulseOut objects under the assumption that
// the code is single threaded.
STATIC uint8_t refcount = 0;
STATIC uint16_t *pulse_array = NULL;
STATIC volatile uint16_t pulse_array_index = 0;
STATIC uint16_t pulse_array_length;
//Timer is shared, must be accessible by interrupt
STATIC TIM_HandleTypeDef t7_handle;
pulseio_pulseout_obj_t *curr_pulseout = NULL;
STATIC void turn_on(pulseio_pulseout_obj_t *pulseout) {
// Turn on PWM
HAL_TIM_PWM_Start(&(pulseout->pwmout->handle), pulseout->pwmout->channel);
}
STATIC void turn_off(pulseio_pulseout_obj_t *pulseout) {
// Turn off PWM
HAL_TIM_PWM_Stop(&(pulseout->pwmout->handle), pulseout->pwmout->channel);
// Make sure pin is low.
HAL_GPIO_WritePin(pin_port(pulseout->pwmout->tim->pin->port),
pin_mask(pulseout->pwmout->tim->pin->number), 0);
}
STATIC void start_timer(void) {
// Set the new period
t7_handle.Init.Period = pulse_array[pulse_array_index] - 1;
HAL_TIM_Base_Init(&t7_handle);
// TIM7 has limited HAL support, set registers manually
t7_handle.Instance->SR = 0; // Prevent the SR from triggering an interrupt
t7_handle.Instance->CR1 |= TIM_CR1_CEN; // Resume timer
t7_handle.Instance->CR1 |= TIM_CR1_URS; // Disable non-overflow interrupts
__HAL_TIM_ENABLE_IT(&t7_handle, TIM_IT_UPDATE);
}
STATIC void pulseout_event_handler(void) {
if (curr_pulseout->pwmout == NULL) {
return; //invalid interrupt
}
HAL_GPIO_WritePin(pin_port(2),pin_mask(6), 1);
HAL_GPIO_WritePin(pin_port(2),pin_mask(6), 0);
pulse_array_index++;
// No more pulses. Turn off output and don't restart.
if (pulse_array_index >= pulse_array_length) {
turn_off(curr_pulseout);
return;
}
// Alternate on and off, starting with on.
if (pulse_array_index % 2 == 0) {
turn_on(curr_pulseout);
} else {
turn_off(curr_pulseout);
}
// Count up to the next given value.
start_timer();
}
void pulseout_reset() {
#if HAS_BASIC_TIM
__HAL_RCC_TIM7_CLK_DISABLE();
refcount = 0;
#endif
}
void common_hal_pulseio_pulseout_construct(pulseio_pulseout_obj_t* self,
const pulseio_pwmout_obj_t* carrier) {
mp_raise_NotImplementedError(translate("PulseOut not yet supported"));
#if !(HAS_BASIC_TIM)
mp_raise_NotImplementedError(translate("PulseOut not supported on this chip"));
#else
// Add to active PulseOuts
refcount++;
// Calculate a 1 ms period
uint32_t source, clk_div;
source = HAL_RCC_GetPCLK1Freq(); // TIM7 is on APB1
clk_div = RCC->CFGR & RCC_CFGR_PPRE1;
// APB quirk, see See DM00031020 Rev 4, page 115.
if (clk_div != 0) {
// APB prescaler for this timer is > 1
source *= 2;
}
uint32_t prescaler = source/1000000; //1us intervals
__HAL_RCC_TIM7_CLK_ENABLE();
HAL_NVIC_SetPriority(TIM7_IRQn, 4, 0);
HAL_NVIC_EnableIRQ(TIM7_IRQn);
// Timers 6 and 7 have no pins, so using them doesn't affect PWM availability
t7_handle.Instance = TIM7;
t7_handle.Init.Period = 100; //immediately replaced.
t7_handle.Init.Prescaler = prescaler - 1;
t7_handle.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
t7_handle.Init.CounterMode = TIM_COUNTERMODE_UP;
t7_handle.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
HAL_TIM_Base_Init(&t7_handle);
t7_handle.Instance->SR = 0;
// The HAL can't work with const, recast required.
self->pwmout = (pulseio_pwmout_obj_t*)carrier;
turn_off(self);
#endif
}
bool common_hal_pulseio_pulseout_deinited(pulseio_pulseout_obj_t* self) {
return true;
return self->pwmout == NULL;
}
void common_hal_pulseio_pulseout_deinit(pulseio_pulseout_obj_t* self) {
if (common_hal_pulseio_pulseout_deinited(self)) {
return;
}
turn_on(self);
self->pwmout = NULL;
refcount--;
if (refcount == 0) {
#if HAS_BASIC_TIM