Merge remote-tracking branch 'upstream/main' into esp32-pin-reset

This commit is contained in:
Lucian Copeland 2020-11-23 18:58:46 -05:00
commit 86694262b8
160 changed files with 2793 additions and 720 deletions

View File

@ -14,7 +14,7 @@ on:
jobs:
test:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- name: Dump GitHub context
env:
@ -37,7 +37,7 @@ jobs:
run: |
sudo apt-get install -y eatmydata
sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64 latexmk texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra
pip install requests sh click setuptools cpp-coveralls "Sphinx<4" sphinx-rtd-theme recommonmark sphinx-autoapi sphinxcontrib-svg2pdfconverter polib pyyaml astroid isort black awscli
pip install requests sh click setuptools cpp-coveralls "Sphinx<4" sphinx-rtd-theme recommonmark sphinx-autoapi sphinxcontrib-svg2pdfconverter polib pyyaml astroid isort black awscli mypy
- name: Versions
run: |
gcc --version
@ -67,8 +67,8 @@ jobs:
- name: mpy Tests
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float
working-directory: tests
- name: Stubs
run: make stubs -j2
- name: Build and Validate Stubs
run: make check-stubs -j2
- uses: actions/upload-artifact@v2
with:
name: stubs
@ -111,12 +111,15 @@ jobs:
with:
name: mpy-cross.static-x64-windows
path: mpy-cross/mpy-cross.static.exe
- name: Upload mpy-cross builds to S3
- name: Upload stubs and mpy-cross builds to S3
run: |
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static-raspbian s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-raspbian-${{ env.CP_VERSION }} --no-progress --region us-east-1
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-amd64-linux-${{ env.CP_VERSION }} --no-progress --region us-east-1
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static.exe s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-x64-windows-${{ env.CP_VERSION }}.exe --no-progress --region us-east-1
zip -9r circuitpython-stubs.zip circuitpython-stubs
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp circuitpython-stubs.zip s3://adafruit-circuit-python/bin/stubs/circuitpython-stubs-${{ env.CP_VERSION }}.zip --no-progress --region us-east-1
env:
AWS_PAGER: ''
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'))
@ -157,19 +160,21 @@ jobs:
run: |
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross-macos-catalina-${{ env.CP_VERSION }} --no-progress --region us-east-1
env:
AWS_PAGER: ''
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'))
build-arm:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
needs: test
strategy:
fail-fast: false
matrix:
board:
- "8086_commander"
- "ADM_B_NRF52840_1"
- "TG-Watch02A"
- "aloriumtech_evo_m51"
- "aramcon_badge_2019"
@ -193,6 +198,7 @@ jobs:
- "circuitplayground_express_displayio"
- "clue_nrf52840_express"
- "cp32-m4"
- "cp_sapling_m0"
- "datalore_ip_m4"
- "datum_distance"
- "datum_imu"
@ -360,12 +366,13 @@ jobs:
- name: Upload to S3
run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
env:
AWS_PAGER: ''
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'))
build-riscv:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
needs: test
strategy:
fail-fast: false
@ -408,17 +415,18 @@ jobs:
- name: Upload to S3
run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
env:
AWS_PAGER: ''
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'))
build-xtensa:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
needs: test
strategy:
fail-fast: false
matrix:
board:
- "adafruit_esp32s2_eink_portal"
- "adafruit_magtag_2.9_grayscale"
- "adafruit_metro_esp32s2"
- "electroniccats_bastwifi"
- "espressif_kaluga_1"
@ -502,6 +510,7 @@ jobs:
- name: Upload to S3
run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
env:
AWS_PAGER: ''
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'))

View File

@ -10,7 +10,7 @@ on:
jobs:
website:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Dump GitHub context
env:

View File

@ -11,7 +11,7 @@ on:
jobs:
pre-commit:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1

2
.gitmodules vendored
View File

@ -152,4 +152,4 @@
url = https://github.com/adafruit/Adafruit_CircuitPython_RFM69.git
[submodule "ports/esp32s2/esp-idf"]
path = ports/esp32s2/esp-idf
url = https://github.com/espressif/esp-idf.git
url = https://github.com/jepler/esp-idf.git

View File

@ -6,7 +6,7 @@ SPDX-License-Identifier: MIT
# Contributing
Please note that this project is released with a
[Contributor Code of Conduct](https://github.com/adafruit/circuitpython/blob/main/CODE_OF_CONDUCT.md).
[Contributor Code of Conduct](CODE_OF_CONDUCT.md).
By participating in this project you agree to abide by its terms. Participation
covers any forum used to converse about CircuitPython including unofficial and official spaces. Failure to do
so will result in corrective actions such as time out or ban from the project.

View File

@ -21,7 +21,7 @@
STATIC uintptr_t machine_mem_get_addr(mp_obj_t addr_o, uint align) {
uintptr_t addr = mp_obj_int_get_truncated(addr_o);
if ((addr & (align - 1)) != 0) {
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError, translate("address %08x is not aligned to %d bytes"), addr, align));
mp_raise_ValueError_varg(translate("address %08x is not aligned to %d bytes"), addr, align);
}
return addr;
}

View File

@ -62,7 +62,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(mod_uheapq_heappush_obj, mod_uheapq_heappush);
STATIC mp_obj_t mod_uheapq_heappop(mp_obj_t heap_in) {
mp_obj_list_t *heap = get_heap(heap_in);
if (heap->len == 0) {
nlr_raise(mp_obj_new_exception_msg(&mp_type_IndexError, translate("empty heap")));
mp_raise_IndexError(translate("empty heap"));
}
mp_obj_t item = heap->items[0];
heap->len -= 1;

View File

@ -43,7 +43,7 @@ STATIC mp_obj_t match_group(mp_obj_t self_in, mp_obj_t no_in) {
mp_obj_match_t *self = MP_OBJ_TO_PTR(self_in);
mp_int_t no = mp_obj_get_int(no_in);
if (no < 0 || no >= self->num_matches) {
nlr_raise(mp_obj_new_exception_arg1(&mp_type_IndexError, no_in));
mp_raise_arg1(&mp_type_IndexError, no_in);
}
const char *start = self->caps[no * 2];
@ -82,7 +82,7 @@ STATIC void match_span_helper(size_t n_args, const mp_obj_t *args, mp_obj_t span
if (n_args == 2) {
no = mp_obj_get_int(args[1]);
if (no < 0 || no >= self->num_matches) {
nlr_raise(mp_obj_new_exception_arg1(&mp_type_IndexError, args[1]));
mp_raise_arg1(&mp_type_IndexError, args[1]);
}
}
@ -326,7 +326,7 @@ STATIC mp_obj_t re_sub_helper(mp_obj_t self_in, size_t n_args, const mp_obj_t *a
}
if (match_no >= (unsigned int)match->num_matches) {
nlr_raise(mp_obj_new_exception_arg1(&mp_type_IndexError, MP_OBJ_NEW_SMALL_INT(match_no)));
mp_raise_arg1(&mp_type_IndexError, MP_OBJ_NEW_SMALL_INT(match_no));
}
const char *start_match = match->caps[match_no * 2];

View File

@ -179,7 +179,7 @@ STATIC mp_obj_t mod_uzlib_decompress(size_t n_args, const mp_obj_t *args) {
return res;
error:
nlr_raise(mp_obj_new_exception_arg1(&mp_type_ValueError, MP_OBJ_NEW_SMALL_INT(st)));
mp_raise_arg1(&mp_type_ValueError, MP_OBJ_NEW_SMALL_INT(st));
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_uzlib_decompress_obj, 1, 3, mod_uzlib_decompress);

@ -1 +1 @@
Subproject commit 8242b84753355433b61230ab6631c06e5ac77f35
Subproject commit aa7e741530df471d206a4a321823a37a913a0eb8

View File

@ -24,7 +24,7 @@ typedef struct _mp_obj_vfs_posix_file_t {
#ifdef MICROPY_CPYTHON_COMPAT
STATIC void check_fd_is_open(const mp_obj_vfs_posix_file_t *o) {
if (o->fd < 0) {
nlr_raise(mp_obj_new_exception_msg(&mp_type_ValueError, translate("I/O operation on closed file")));
mp_raise_ValueError(translate("I/O operation on closed file"));
}
}
#else

@ -1 +1 @@
Subproject commit de6b7704c530d886ad8dfa0fa1864764d86117ee
Subproject commit 902c16f49197a8baf5e71ec924a812a86e733a74

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-21 20:13-0500\n"
"POT-Creation-Date: 2020-11-10 15:30+0530\n"
"PO-Revision-Date: 2020-10-10 23:51+0000\n"
"Last-Translator: oon arfiandwi <oon.arfiandwi@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -300,6 +300,11 @@ msgstr ""
msgid "All I2C peripherals are in use"
msgstr "Semua perangkat I2C sedang digunakan"
#: ports/esp32s2/common-hal/countio/Counter.c
#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
msgid "All PCNT units in use"
msgstr ""
#: ports/atmel-samd/common-hal/canio/Listener.c
#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
@ -431,6 +436,11 @@ msgstr "Di bawah frame rate minimum"
msgid "Bit clock and word select must share a clock unit"
msgstr "Bit clock dan word harus memiliki kesamaan pada clock unit"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Bit depth must be from 1 to 6 inclusive, not %d"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr "Kedalaman bit harus kelipatan 8."
@ -1009,6 +1019,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr "Ukuran penyangga salah"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr ""
@ -1130,7 +1144,8 @@ msgid "Invalid phase"
msgstr "Fase tidak valid"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Pin tidak valid"
@ -3244,6 +3259,7 @@ msgstr ""
msgid "pow() with 3 arguments requires integers"
msgstr ""
#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@ -3459,6 +3475,7 @@ msgstr ""
msgid "time.struct_time() takes a 9-sequence"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr ""
@ -3643,6 +3660,10 @@ msgstr ""
msgid "vectors must have same lengths"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr ""
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-21 20:13-0500\n"
"POT-Creation-Date: 2020-11-23 10:10-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"
@ -296,6 +296,11 @@ msgstr ""
msgid "All I2C peripherals are in use"
msgstr ""
#: ports/esp32s2/common-hal/countio/Counter.c
#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
msgid "All PCNT units in use"
msgstr ""
#: ports/atmel-samd/common-hal/canio/Listener.c
#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
@ -425,6 +430,11 @@ msgstr ""
msgid "Bit clock and word select must share a clock unit"
msgstr ""
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Bit depth must be from 1 to 6 inclusive, not %d"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr ""
@ -845,6 +855,10 @@ msgstr ""
msgid "FFT is defined for ndarrays only"
msgstr ""
#: extmod/ulab/code/fft/fft.c
msgid "FFT is implemented for linear arrays only"
msgstr ""
#: ports/esp32s2/common-hal/socketpool/Socket.c
msgid "Failed SSL handshake"
msgstr ""
@ -988,6 +1002,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr ""
@ -1109,7 +1127,8 @@ msgid "Invalid phase"
msgstr ""
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr ""
@ -1936,7 +1955,7 @@ msgstr ""
msgid "WARNING: Your code filename has two extensions\n"
msgstr ""
#: shared-bindings/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET"
msgstr ""
@ -2015,10 +2034,6 @@ msgstr ""
msgid "addresses is empty"
msgstr ""
#: extmod/ulab/code/vector/vectorise.c
msgid "arctan2 is implemented for scalars and ndarrays only"
msgstr ""
#: py/modbuiltins.c
msgid "arg is an empty sequence"
msgstr ""
@ -2027,6 +2042,10 @@ msgstr ""
msgid "argsort argument must be an ndarray"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
msgid "argsort is not implemented for flattened arrays"
msgstr ""
#: py/runtime.c
msgid "argument has wrong type"
msgstr ""
@ -2044,14 +2063,22 @@ msgstr ""
msgid "argument should be a '%q' not a '%q'"
msgstr ""
#: extmod/ulab/code/linalg/linalg.c
#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c
msgid "arguments must be ndarrays"
msgstr ""
#: extmod/ulab/code/ndarray.c
msgid "array and index length must be equal"
msgstr ""
#: py/objarray.c shared-bindings/nvm/ByteArray.c
msgid "array/bytes required on right side"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
msgid "attempt to get (arg)min/(arg)max of empty sequence"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
msgid "attempt to get argmin/argmax of an empty sequence"
msgstr ""
@ -2061,15 +2088,15 @@ msgid "attributes not supported yet"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
msgid "axis must be -1, 0, None, or 1"
msgid "axis is out of bounds"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
msgid "axis must be -1, 0, or 1"
msgid "axis must be None, or an integer"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
msgid "axis must be None, 0, or 1"
msgid "axis too long"
msgstr ""
#: py/builtinevex.c
@ -2273,6 +2300,10 @@ msgid ""
"can't switch from manual field specification to automatic field numbering"
msgstr ""
#: extmod/ulab/code/ndarray_operators.c
msgid "cannot cast output with casting rule"
msgstr ""
#: py/objtype.c
msgid "cannot create '%q' instances"
msgstr ""
@ -2289,10 +2320,6 @@ msgstr ""
msgid "cannot perform relative import"
msgstr ""
#: extmod/ulab/code/ndarray.c
msgid "cannot reshape array (incompatible input/output shape)"
msgstr ""
#: py/emitnative.c
msgid "casting"
msgstr ""
@ -2365,10 +2392,6 @@ msgstr ""
msgid "convolve arguments must not be empty"
msgstr ""
#: extmod/ulab/code/ndarray.c
msgid "could not broadast input array from shape"
msgstr ""
#: extmod/ulab/code/poly/poly.c
msgid "could not invert Vandermonde matrix"
msgstr ""
@ -2377,6 +2400,10 @@ msgstr ""
msgid "couldn't determine SD card version"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
msgid "cross is defined for 1D arrays of length 3"
msgstr ""
#: extmod/ulab/code/approx/approx.c
msgid "data must be iterable"
msgstr ""
@ -2385,10 +2412,6 @@ msgstr ""
msgid "data must be of equal length"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
msgid "ddof must be smaller than length of data set"
msgstr ""
#: py/parsenum.c
msgid "decimal numbers not supported"
msgstr ""
@ -2418,6 +2441,10 @@ msgstr ""
msgid "diff argument must be an ndarray"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
msgid "differentiation order out of range"
msgstr ""
#: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c
#: shared-bindings/math/__init__.c
msgid "division by zero"
@ -2533,6 +2560,10 @@ msgstr ""
msgid "first argument must be a function"
msgstr ""
#: extmod/ulab/code/ulab_create.c
msgid "first argument must be a tuple of ndarrays"
msgstr ""
#: extmod/ulab/code/ndarray.c
msgid "first argument must be an iterable"
msgstr ""
@ -2586,8 +2617,8 @@ msgstr ""
msgid "function has the same sign at the ends of interval"
msgstr ""
#: extmod/ulab/code/compare/compare.c
msgid "function is implemented for scalars and ndarrays only"
#: extmod/ulab/code/ndarray.c
msgid "function is defined for ndarrays only"
msgstr ""
#: py/argcheck.c
@ -2657,6 +2688,7 @@ msgstr ""
msgid "index is out of bounds"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr ""
@ -2681,6 +2713,10 @@ msgstr ""
msgid "inline assembler must be a function"
msgstr ""
#: extmod/ulab/code/ndarray.c
msgid "input and output shapes are not compatible"
msgstr ""
#: extmod/ulab/code/ulab_create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr ""
@ -2689,6 +2725,10 @@ msgstr ""
msgid "input array length must be power of 2"
msgstr ""
#: extmod/ulab/code/ulab_create.c
msgid "input arrays are not compatible"
msgstr ""
#: extmod/ulab/code/poly/poly.c
msgid "input data must be an iterable"
msgstr ""
@ -2701,6 +2741,22 @@ msgstr ""
msgid "input matrix is singular"
msgstr ""
#: extmod/ulab/code/user/user.c
msgid "input must be a dense ndarray"
msgstr ""
#: extmod/ulab/code/ulab_create.c
msgid "input must be a tensor of rank 2"
msgstr ""
#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c
msgid "input must be an ndarray"
msgstr ""
#: extmod/ulab/code/filter/filter.c
msgid "input must be one-dimensional"
msgstr ""
#: extmod/ulab/code/linalg/linalg.c
msgid "input must be square matrix"
msgstr ""
@ -2713,6 +2769,10 @@ msgstr ""
msgid "input vectors must be of equal length"
msgstr ""
#: extmod/ulab/code/poly/poly.c
msgid "inputs are not iterable"
msgstr ""
#: py/parsenum.c
msgid "int() arg 2 must be >= 2 and <= 36"
msgstr ""
@ -2881,6 +2941,10 @@ msgstr ""
msgid "max_length must be > 0"
msgstr ""
#: extmod/ulab/code/ndarray.c
msgid "maximum number of dimensions is 4"
msgstr ""
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr ""
@ -2930,10 +2994,6 @@ msgstr ""
msgid "must use keyword argument for key function"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
msgid "n must be between 0, and 9"
msgstr ""
#: py/runtime.c
msgid "name '%q' is not defined"
msgstr ""
@ -3016,6 +3076,10 @@ msgstr ""
msgid "non-keyword arg after keyword arg"
msgstr ""
#: extmod/ulab/code/linalg/linalg.c
msgid "norm is defined for 1D and 2D arrays"
msgstr ""
#: shared-bindings/_bleio/UUID.c
msgid "not a 128-bit UUID"
msgstr ""
@ -3028,10 +3092,6 @@ msgstr ""
msgid "not enough arguments for format string"
msgstr ""
#: extmod/ulab/code/poly/poly.c
msgid "number of arguments must be 2, or 3"
msgstr ""
#: extmod/ulab/code/ulab_create.c
msgid "number of points must be at least 2"
msgstr ""
@ -3084,6 +3144,10 @@ msgstr ""
msgid "odd-length string"
msgstr ""
#: extmod/ulab/code/ulab_create.c
msgid "offset is too large"
msgstr ""
#: py/objstr.c py/objstrunicode.c
msgid "offset out of bounds"
msgstr ""
@ -3106,6 +3170,14 @@ msgstr ""
msgid "operands could not be broadcast together"
msgstr ""
#: extmod/ulab/code/ndarray.c
msgid "operation is implemented for 1D Boolean arrays only"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
msgid "operation is not implemented for flattened array"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
msgid "operation is not implemented on ndarrays"
msgstr ""
@ -3196,6 +3268,7 @@ msgstr ""
msgid "pow() with 3 arguments requires integers"
msgstr ""
#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@ -3239,6 +3312,10 @@ msgstr ""
msgid "requested length %d but object has length %d"
msgstr ""
#: extmod/ulab/code/ndarray_operators.c
msgid "results cannot be cast to specified type"
msgstr ""
#: py/compile.c
msgid "return annotation must be an identifier"
msgstr ""
@ -3257,8 +3334,8 @@ msgstr ""
msgid "rgb_pins[%d] is not on the same port as clock"
msgstr ""
#: extmod/ulab/code/ndarray.c
msgid "right hand side must be an ndarray, or a scalar"
#: extmod/ulab/code/numerical/numerical.c
msgid "roll argument must be an ndarray"
msgstr ""
#: py/objstr.c
@ -3284,7 +3361,7 @@ msgid "script compilation not supported"
msgstr ""
#: extmod/ulab/code/ndarray.c
msgid "shape must be a 2-tuple"
msgid "shape must be a tuple"
msgstr ""
#: py/objstr.c
@ -3327,10 +3404,6 @@ msgstr ""
msgid "sort argument must be an ndarray"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
msgid "sorted axis can't be longer than 65535"
msgstr ""
#: extmod/ulab/code/filter/filter.c
msgid "sos array must be of shape (n_section, 6)"
msgstr ""
@ -3411,6 +3484,7 @@ msgstr ""
msgid "time.struct_time() takes a 9-sequence"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr ""
@ -3435,6 +3509,10 @@ msgstr ""
msgid "timestamp out of range for platform time_t"
msgstr ""
#: extmod/ulab/code/ndarray.c
msgid "tobytes can be invoked for dense arrays only"
msgstr ""
#: shared-module/struct/__init__.c
msgid "too many arguments provided with the given format"
msgstr ""
@ -3594,6 +3672,10 @@ msgstr ""
msgid "vectors must have same lengths"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr ""
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr ""
@ -3606,12 +3688,12 @@ msgstr ""
msgid "window must be <= interval"
msgstr ""
#: extmod/ulab/code/linalg/linalg.c
msgid "wrong argument type"
#: extmod/ulab/code/numerical/numerical.c
msgid "wrong axis index"
msgstr ""
#: extmod/ulab/code/ndarray.c
msgid "wrong index type"
#: extmod/ulab/code/ulab_create.c
msgid "wrong axis specified"
msgstr ""
#: extmod/ulab/code/vector/vectorise.c

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-21 20:13-0500\n"
"POT-Creation-Date: 2020-11-10 15:30+0530\n"
"PO-Revision-Date: 2020-05-24 03:22+0000\n"
"Last-Translator: dronecz <mzuzelka@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -300,6 +300,11 @@ msgstr ""
msgid "All I2C peripherals are in use"
msgstr ""
#: ports/esp32s2/common-hal/countio/Counter.c
#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
msgid "All PCNT units in use"
msgstr ""
#: ports/atmel-samd/common-hal/canio/Listener.c
#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
@ -429,6 +434,11 @@ msgstr ""
msgid "Bit clock and word select must share a clock unit"
msgstr ""
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Bit depth must be from 1 to 6 inclusive, not %d"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr ""
@ -992,6 +1002,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr ""
@ -1113,7 +1127,8 @@ msgid "Invalid phase"
msgstr ""
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr ""
@ -3200,6 +3215,7 @@ msgstr ""
msgid "pow() with 3 arguments requires integers"
msgstr ""
#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@ -3415,6 +3431,7 @@ msgstr ""
msgid "time.struct_time() takes a 9-sequence"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr ""
@ -3598,6 +3615,10 @@ msgstr ""
msgid "vectors must have same lengths"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr ""
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr ""

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-21 20:13-0500\n"
"POT-Creation-Date: 2020-11-10 15:30+0530\n"
"PO-Revision-Date: 2020-06-16 18:24+0000\n"
"Last-Translator: Andreas Buchen <andreas.buchen@gmail.com>\n"
"Language: de_DE\n"
@ -299,6 +299,11 @@ msgstr ""
msgid "All I2C peripherals are in use"
msgstr "Alle I2C-Peripheriegeräte sind in Benutzung"
#: ports/esp32s2/common-hal/countio/Counter.c
#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
msgid "All PCNT units in use"
msgstr ""
#: ports/atmel-samd/common-hal/canio/Listener.c
#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
@ -432,6 +437,11 @@ msgstr "Unterhalb der minimalen Frame Rate"
msgid "Bit clock and word select must share a clock unit"
msgstr "Bit clock und word select müssen eine clock unit teilen"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Bit depth must be from 1 to 6 inclusive, not %d"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr "Bit depth muss ein Vielfaches von 8 sein."
@ -1009,6 +1019,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr "Inkorrekte Puffergröße"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr ""
@ -1130,7 +1144,8 @@ msgid "Invalid phase"
msgstr "Ungültige Phase"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Ungültiger Pin"
@ -3283,6 +3298,7 @@ msgstr "pow() drittes Argument darf nicht 0 sein"
msgid "pow() with 3 arguments requires integers"
msgstr "pow () mit 3 Argumenten erfordert Integer"
#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@ -3501,6 +3517,7 @@ msgstr "threshold muss im Intervall 0-65536 liegen"
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() nimmt eine 9-Sequenz an"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr "Das Zeitlimit hat den maximal zulässigen Wert überschritten"
@ -3688,6 +3705,10 @@ msgstr "value_count muss größer als 0 sein"
msgid "vectors must have same lengths"
msgstr "Vektoren müssen die selbe Länge haben"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr ""
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-21 20:13-0500\n"
"POT-Creation-Date: 2020-11-10 15:30+0530\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
@ -295,6 +295,11 @@ msgstr ""
msgid "All I2C peripherals are in use"
msgstr ""
#: ports/esp32s2/common-hal/countio/Counter.c
#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
msgid "All PCNT units in use"
msgstr ""
#: ports/atmel-samd/common-hal/canio/Listener.c
#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
@ -424,6 +429,11 @@ msgstr ""
msgid "Bit clock and word select must share a clock unit"
msgstr ""
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Bit depth must be from 1 to 6 inclusive, not %d"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr ""
@ -987,6 +997,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr ""
@ -1108,7 +1122,8 @@ msgid "Invalid phase"
msgstr ""
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr ""
@ -3195,6 +3210,7 @@ msgstr ""
msgid "pow() with 3 arguments requires integers"
msgstr ""
#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@ -3410,6 +3426,7 @@ msgstr ""
msgid "time.struct_time() takes a 9-sequence"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr ""
@ -3593,6 +3610,10 @@ msgstr ""
msgid "vectors must have same lengths"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr ""
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr ""

View File

@ -7,16 +7,16 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-21 20:13-0500\n"
"PO-Revision-Date: 2020-10-27 21:01+0000\n"
"Last-Translator: Adolfo Jayme Barrientos <fitojb@ubuntu.com>\n"
"POT-Creation-Date: 2020-11-10 15:30+0530\n"
"PO-Revision-Date: 2020-11-15 16:28+0000\n"
"Last-Translator: RubenD <rubendariopm14@gmail.com>\n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.3.2-dev\n"
"X-Generator: Weblate 4.4-dev\n"
#: main.c
msgid ""
@ -297,12 +297,17 @@ msgstr "Tipo de dirección fuera de rango"
#: ports/esp32s2/common-hal/canio/CAN.c
msgid "All CAN peripherals are in use"
msgstr ""
msgstr "Todos los periféricos CAN están en uso"
#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use"
msgstr "Todos los periféricos I2C están siendo usados"
#: ports/esp32s2/common-hal/countio/Counter.c
#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
msgid "All PCNT units in use"
msgstr "Todas las unidades PCNT en uso"
#: ports/atmel-samd/common-hal/canio/Listener.c
#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
@ -427,7 +432,7 @@ msgstr ""
#: ports/esp32s2/common-hal/canio/CAN.c
msgid "Baudrate not supported by peripheral"
msgstr ""
msgstr "El periférico no maneja el Baudrate"
#: shared-module/displayio/Display.c
#: shared-module/framebufferio/FramebufferDisplay.c
@ -438,6 +443,11 @@ msgstr "Por debajo de taza mínima de refrescamiento"
msgid "Bit clock and word select must share a clock unit"
msgstr "Bit clock y word select deben compartir una unidad de reloj"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Bit depth must be from 1 to 6 inclusive, not %d"
msgstr "Bit depth tiene que ser de 1 a 6 inclusivo, no %d"
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr "Bits depth debe ser múltiplo de 8."
@ -1010,6 +1020,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr "Tamaño incorrecto del buffer"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr "La entrada está durando mucho tiempo"
@ -1131,7 +1145,8 @@ msgid "Invalid phase"
msgstr "Fase inválida"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Pin inválido"
@ -3271,6 +3286,7 @@ msgstr "el 3er argumento de pow() no puede ser 0"
msgid "pow() with 3 arguments requires integers"
msgstr "pow() con 3 argumentos requiere enteros"
#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@ -3488,6 +3504,7 @@ msgstr "limite debe ser en el rango 0-65536"
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() toma un sequencio 9"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr ""
@ -3672,6 +3689,10 @@ msgstr "value_count debe ser > 0"
msgid "vectors must have same lengths"
msgstr "los vectores deben tener el mismo tamaño"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr ""
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr "el tiempo de espera del perro guardián debe ser mayor a 0"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-21 20:13-0500\n"
"POT-Creation-Date: 2020-11-10 15:30+0530\n"
"PO-Revision-Date: 2018-12-20 22:15-0800\n"
"Last-Translator: Timothy <me@timothygarcia.ca>\n"
"Language-Team: fil\n"
@ -297,6 +297,11 @@ msgstr ""
msgid "All I2C peripherals are in use"
msgstr "Lahat ng I2C peripherals ginagamit"
#: ports/esp32s2/common-hal/countio/Counter.c
#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
msgid "All PCNT units in use"
msgstr ""
#: ports/atmel-samd/common-hal/canio/Listener.c
#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
@ -429,6 +434,11 @@ msgstr ""
msgid "Bit clock and word select must share a clock unit"
msgstr "Ang bit clock at word select dapat makibahagi sa isang clock unit"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Bit depth must be from 1 to 6 inclusive, not %d"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr "Bit depth ay dapat multiple ng 8."
@ -1002,6 +1012,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr ""
@ -1123,7 +1137,8 @@ msgid "Invalid phase"
msgstr "Mali ang phase"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Mali ang pin"
@ -3246,6 +3261,7 @@ msgstr "pow() 3rd argument ay hindi maaring 0"
msgid "pow() with 3 arguments requires integers"
msgstr "pow() na may 3 argumento kailangan ng integers"
#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@ -3464,6 +3480,7 @@ msgstr "ang threshold ay dapat sa range 0-65536"
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() kumukuha ng 9-sequence"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr ""
@ -3648,6 +3665,10 @@ msgstr ""
msgid "vectors must have same lengths"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr ""
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr ""

View File

@ -7,15 +7,15 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-21 20:13-0500\n"
"PO-Revision-Date: 2020-10-22 20:48+0000\n"
"Last-Translator: Antonin ENFRUN <antonin.e@me.com>\n"
"POT-Creation-Date: 2020-11-10 15:30+0530\n"
"PO-Revision-Date: 2020-11-20 22:28+0000\n"
"Last-Translator: Noel Gaetan <gaetan.noel@viacesi.fr>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 4.3.1\n"
"X-Generator: Weblate 4.4-dev\n"
#: main.c
msgid ""
@ -298,12 +298,17 @@ msgstr "Type d'adresse hors plage"
#: ports/esp32s2/common-hal/canio/CAN.c
msgid "All CAN peripherals are in use"
msgstr ""
msgstr "Tous les périphériques CAN sont utilisés"
#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use"
msgstr "Tous les périphériques I2C sont utilisés"
#: ports/esp32s2/common-hal/countio/Counter.c
#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
msgid "All PCNT units in use"
msgstr "Toutes les unités PCNT sont utilisées"
#: ports/atmel-samd/common-hal/canio/Listener.c
#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
@ -427,7 +432,7 @@ msgstr ""
#: ports/esp32s2/common-hal/canio/CAN.c
msgid "Baudrate not supported by peripheral"
msgstr ""
msgstr "Baudrate non prise en charge par le périphérique"
#: shared-module/displayio/Display.c
#: shared-module/framebufferio/FramebufferDisplay.c
@ -438,6 +443,11 @@ msgstr "Inférieur à la fréquence d'images minimale"
msgid "Bit clock and word select must share a clock unit"
msgstr "'bit clock' et 'word select' doivent partager une horloge"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Bit depth must be from 1 to 6 inclusive, not %d"
msgstr "Bit depth doit être compris entre 1 et 6 inclus, et non %d"
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr "La profondeur de bit doit être un multiple de 8."
@ -1015,6 +1025,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr "Taille de tampon incorrecte"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory"
msgstr "L'initialisation a échoué par manque de mémoire"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr "L'entrée prend trop de temps"
@ -1136,7 +1150,8 @@ msgid "Invalid phase"
msgstr "Phase invalide"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Broche invalide"
@ -2943,7 +2958,7 @@ msgstr "entiers longs non supportés dans cette build"
#: ports/esp32s2/common-hal/canio/CAN.c
msgid "loopback + silent mode not supported by peripheral"
msgstr ""
msgstr "loopback + silent mode non pris en charge par le périphérique"
#: py/parse.c
msgid "malformed f-string"
@ -2981,11 +2996,11 @@ msgstr "profondeur maximale de récursivité dépassée"
#: extmod/ulab/code/approx/approx.c
msgid "maxiter must be > 0"
msgstr ""
msgstr "maxiter doit être > 0"
#: extmod/ulab/code/approx/approx.c
msgid "maxiter should be > 0"
msgstr ""
msgstr "maxiter devrait être > 0"
#: py/runtime.c
#, c-format
@ -3295,6 +3310,7 @@ msgstr "le 3e argument de pow() ne peut être 0"
msgid "pow() with 3 arguments requires integers"
msgstr "pow() avec 3 arguments nécessite des entiers"
#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@ -3430,7 +3446,7 @@ msgstr "l'argument de «sort» doit être un ndarray"
#: extmod/ulab/code/numerical/numerical.c
msgid "sorted axis can't be longer than 65535"
msgstr ""
msgstr "sorted axis ne peut pas dépasser 65535"
#: extmod/ulab/code/filter/filter.c
msgid "sos array must be of shape (n_section, 6)"
@ -3513,6 +3529,7 @@ msgstr "le seuil doit être dans la gamme 0-65536"
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() prend une séquence de longueur 9"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr "le délai d'expiration a dépassé la valeur maximale prise en charge"
@ -3565,12 +3582,12 @@ msgstr "tuple/liste a une mauvaise longueur"
#: ports/esp32s2/common-hal/canio/CAN.c
#, c-format
msgid "twai_driver_install returned esp-idf error #%d"
msgstr ""
msgstr "twai_driver_install a renvoyé l'erreur esp-idf #%d"
#: ports/esp32s2/common-hal/canio/CAN.c
#, c-format
msgid "twai_start returned esp-idf error #%d"
msgstr ""
msgstr "twai_start a renvoyé l'erreur esp-idf #%d"
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
@ -3696,6 +3713,10 @@ msgstr "'value_count' doit être > 0"
msgid "vectors must have same lengths"
msgstr "les vecteurs doivent avoir la même longueur"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr "chien de garde non initialisé"
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr "watchdog timeout doit être supérieur à 0"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-21 20:13-0500\n"
"POT-Creation-Date: 2020-11-10 15:30+0530\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
@ -295,6 +295,11 @@ msgstr ""
msgid "All I2C peripherals are in use"
msgstr ""
#: ports/esp32s2/common-hal/countio/Counter.c
#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
msgid "All PCNT units in use"
msgstr ""
#: ports/atmel-samd/common-hal/canio/Listener.c
#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
@ -424,6 +429,11 @@ msgstr ""
msgid "Bit clock and word select must share a clock unit"
msgstr ""
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Bit depth must be from 1 to 6 inclusive, not %d"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr ""
@ -987,6 +997,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr ""
@ -1108,7 +1122,8 @@ msgid "Invalid phase"
msgstr ""
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr ""
@ -3195,6 +3210,7 @@ msgstr ""
msgid "pow() with 3 arguments requires integers"
msgstr ""
#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@ -3410,6 +3426,7 @@ msgstr ""
msgid "time.struct_time() takes a 9-sequence"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr ""
@ -3593,6 +3610,10 @@ msgstr ""
msgid "vectors must have same lengths"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr ""
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr ""

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-21 20:13-0500\n"
"POT-Creation-Date: 2020-11-10 15:30+0530\n"
"PO-Revision-Date: 2018-10-02 16:27+0200\n"
"Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n"
"Language-Team: \n"
@ -296,6 +296,11 @@ msgstr ""
msgid "All I2C peripherals are in use"
msgstr "Tutte le periferiche I2C sono in uso"
#: ports/esp32s2/common-hal/countio/Counter.c
#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
msgid "All PCNT units in use"
msgstr ""
#: ports/atmel-samd/common-hal/canio/Listener.c
#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
@ -429,6 +434,11 @@ msgid "Bit clock and word select must share a clock unit"
msgstr ""
"Clock di bit e selezione parola devono condividere la stessa unità di clock"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Bit depth must be from 1 to 6 inclusive, not %d"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr "La profondità di bit deve essere multipla di 8."
@ -1002,6 +1012,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr ""
@ -1125,7 +1139,8 @@ msgid "Invalid phase"
msgstr "Fase non valida"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Pin non valido"
@ -3253,6 +3268,7 @@ msgstr "il terzo argomento di pow() non può essere 0"
msgid "pow() with 3 arguments requires integers"
msgstr "pow() con 3 argomenti richiede interi"
#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@ -3471,6 +3487,7 @@ msgstr "la soglia deve essere nell'intervallo 0-65536"
msgid "time.struct_time() takes a 9-sequence"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr ""
@ -3655,6 +3672,10 @@ msgstr ""
msgid "vectors must have same lengths"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr ""
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr ""

View File

@ -7,16 +7,16 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-21 20:13-0500\n"
"PO-Revision-Date: 2020-09-25 18:20+0000\n"
"Last-Translator: Taku Fukada <naninunenor@gmail.com>\n"
"POT-Creation-Date: 2020-11-10 15:30+0530\n"
"PO-Revision-Date: 2020-11-12 22:51+0000\n"
"Last-Translator: sporeball <sporeballdev@gmail.com>\n"
"Language-Team: none\n"
"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 4.3-dev\n"
"X-Generator: Weblate 4.4-dev\n"
#: main.c
msgid ""
@ -162,12 +162,12 @@ msgstr "'%s' にはラベルが必要"
#: py/emitinlinethumb.c py/emitinlinextensa.c
#, c-format
msgid "'%s' expects a register"
msgstr ""
msgstr "'%s'にはレジスタが必要"
#: py/emitinlinethumb.c
#, c-format
msgid "'%s' expects a special register"
msgstr ""
msgstr "'%s'には特別レジスタが必要"
#: py/emitinlinethumb.c
#, c-format
@ -192,7 +192,7 @@ msgstr ""
#: py/emitinlinethumb.c
#, c-format
msgid "'%s' expects {r0, r1, ...}"
msgstr ""
msgstr "'%s'には{r0, r1, ...}が必要"
#: py/emitinlinextensa.c
#, c-format
@ -246,7 +246,7 @@ msgstr "'data'には整数の引数が必要"
#: py/compile.c
msgid "'label' requires 1 argument"
msgstr ""
msgstr "'label'には1つの引数が必要"
#: py/compile.c
msgid "'return' outside function"
@ -296,12 +296,17 @@ msgstr "address_typeが範囲外"
#: ports/esp32s2/common-hal/canio/CAN.c
msgid "All CAN peripherals are in use"
msgstr ""
msgstr "全てのCAN周辺機器が使用中"
#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use"
msgstr "全てのI2C周辺機器が使用中"
#: ports/esp32s2/common-hal/countio/Counter.c
#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
msgid "All PCNT units in use"
msgstr ""
#: ports/atmel-samd/common-hal/canio/Listener.c
#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
@ -433,6 +438,11 @@ msgstr "最低のフレームレート未満"
msgid "Bit clock and word select must share a clock unit"
msgstr "bit clockとword selectはクロックユニットを共有しなければなりません"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Bit depth must be from 1 to 6 inclusive, not %d"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr "ビット深度は8の倍数でなければなりません"
@ -821,19 +831,19 @@ msgstr "%qが必要"
#: shared-bindings/_bleio/CharacteristicBuffer.c
#: shared-bindings/_bleio/Descriptor.c shared-bindings/_bleio/PacketBuffer.c
msgid "Expected a Characteristic"
msgstr ""
msgstr "Characteristicが必要"
#: shared-bindings/_bleio/Adapter.c
msgid "Expected a DigitalInOut"
msgstr ""
msgstr "DigitalInOutが必要"
#: shared-bindings/_bleio/Characteristic.c
msgid "Expected a Service"
msgstr ""
msgstr "Serviceが必要"
#: shared-bindings/_bleio/Adapter.c
msgid "Expected a UART"
msgstr ""
msgstr "UARTが必要"
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
#: shared-bindings/_bleio/Service.c
@ -842,7 +852,7 @@ msgstr "UUIDが必要"
#: shared-bindings/_bleio/Adapter.c
msgid "Expected an Address"
msgstr ""
msgstr "Addressが必要"
#: shared-module/_pixelbuf/PixelBuf.c
#, c-format
@ -886,7 +896,7 @@ msgstr "%dバイトのRXバッファの確保に失敗"
#: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Failed to allocate Wifi memory"
msgstr ""
msgstr "Wi-Fiのメモリの確保に失敗"
#: ports/esp32s2/common-hal/wifi/ScannedNetworks.c
msgid "Failed to allocate wifi scan memory"
@ -1002,6 +1012,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr "バッファサイズが正しくありません"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr ""
@ -1052,7 +1066,7 @@ msgstr "不正なBMPファイル"
#: shared-bindings/wifi/Radio.c
msgid "Invalid BSSID"
msgstr ""
msgstr "不正なBSSID"
#: ports/esp32s2/common-hal/analogio/AnalogOut.c
#: ports/stm/common-hal/analogio/AnalogOut.c
@ -1103,7 +1117,7 @@ msgstr "フォーマットチャンクのサイズが不正"
#: ports/esp32s2/common-hal/pwmio/PWMOut.c
msgid "Invalid frequency"
msgstr ""
msgstr "不正な周波数"
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Invalid frequency supplied"
@ -1123,7 +1137,8 @@ msgid "Invalid phase"
msgstr "不正なphase"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "不正なピン"
@ -1338,11 +1353,11 @@ msgstr "long integerに対応していません"
#: ports/esp32s2/common-hal/pwmio/PWMOut.c
msgid "No more channels available"
msgstr ""
msgstr "使えるチャネルがもうありません"
#: ports/esp32s2/common-hal/pwmio/PWMOut.c
msgid "No more timers available"
msgstr ""
msgstr "使えるタイマーがもうありません"
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "No more timers available on this pin."
@ -1658,7 +1673,7 @@ msgstr ""
#: ports/cxd56/common-hal/camera/Camera.c
msgid "Size not supported"
msgstr ""
msgstr "サイズは対応していません"
#: shared-bindings/nvm/ByteArray.c
msgid "Slice and value different lengths."
@ -2781,7 +2796,7 @@ msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "invalid hostname"
msgstr ""
msgstr "不正なホスト名"
#: extmod/modussl_axtls.c
msgid "invalid key"
@ -3227,6 +3242,7 @@ msgstr "pow()の3つ目の引数は0にできません"
msgid "pow() with 3 arguments requires integers"
msgstr "pow()の第3引数には整数が必要"
#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@ -3443,6 +3459,7 @@ msgstr "threshouldは0から65536まで"
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time()は9要素のシーケンスを受け取ります"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr "タイムアウト長は対応する最大値を超えています"
@ -3626,6 +3643,10 @@ msgstr "value_countは0より大きくなければなりません"
msgid "vectors must have same lengths"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr ""
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr "watchdogのtimeoutは0以上でなければなりません"

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-21 20:13-0500\n"
"POT-Creation-Date: 2020-11-10 15:30+0530\n"
"PO-Revision-Date: 2020-10-05 12:12+0000\n"
"Last-Translator: Michal Čihař <michal@cihar.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -298,6 +298,11 @@ msgstr ""
msgid "All I2C peripherals are in use"
msgstr "사용중인 모든 I2C주변 기기"
#: ports/esp32s2/common-hal/countio/Counter.c
#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
msgid "All PCNT units in use"
msgstr ""
#: ports/atmel-samd/common-hal/canio/Listener.c
#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
@ -429,6 +434,11 @@ msgstr ""
msgid "Bit clock and word select must share a clock unit"
msgstr ""
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Bit depth must be from 1 to 6 inclusive, not %d"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr ""
@ -992,6 +1002,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr ""
@ -1113,7 +1127,8 @@ msgid "Invalid phase"
msgstr "단계가 잘못되었습니다"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "핀이 잘못되었습니다"
@ -3201,6 +3216,7 @@ msgstr ""
msgid "pow() with 3 arguments requires integers"
msgstr ""
#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@ -3416,6 +3432,7 @@ msgstr ""
msgid "time.struct_time() takes a 9-sequence"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr ""
@ -3599,6 +3616,10 @@ msgstr ""
msgid "vectors must have same lengths"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr ""
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr ""

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-21 20:13-0500\n"
"POT-Creation-Date: 2020-11-10 15:30+0530\n"
"PO-Revision-Date: 2020-10-27 16:47+0000\n"
"Last-Translator: Jelle Jager <jell@jjc.id.au>\n"
"Language-Team: none\n"
@ -300,6 +300,11 @@ msgstr ""
msgid "All I2C peripherals are in use"
msgstr "Alle I2C peripherals zijn in gebruik"
#: ports/esp32s2/common-hal/countio/Counter.c
#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
msgid "All PCNT units in use"
msgstr ""
#: ports/atmel-samd/common-hal/canio/Listener.c
#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
@ -431,6 +436,11 @@ msgstr "Onder de minimum frame rate"
msgid "Bit clock and word select must share a clock unit"
msgstr "Bit clock en word select moeten een clock eenheid delen"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Bit depth must be from 1 to 6 inclusive, not %d"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr "Bit diepte moet een meervoud van 8 zijn."
@ -1004,6 +1014,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr "Incorrecte buffer grootte"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr "Invoer duurt te lang"
@ -1125,7 +1139,8 @@ msgid "Invalid phase"
msgstr "Ongeldige fase"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Ongeldige pin"
@ -3260,6 +3275,7 @@ msgstr "derde argument van pow() mag geen 0 zijn"
msgid "pow() with 3 arguments requires integers"
msgstr "pow() met 3 argumenten vereist integers"
#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@ -3477,6 +3493,7 @@ msgstr "drempelwaarde moet in het bereik 0-65536 liggen"
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() accepteert een 9-rij"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr "time-outduur is groter dan de ondersteunde maximale waarde"
@ -3660,6 +3677,10 @@ msgstr "value_count moet groter dan 0 zijn"
msgid "vectors must have same lengths"
msgstr "vectoren moeten van gelijke lengte zijn"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr ""
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr "watchdog time-out moet groter zijn dan 0"

View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-21 20:13-0500\n"
"PO-Revision-Date: 2020-09-29 01:39+0000\n"
"POT-Creation-Date: 2020-11-10 15:30+0530\n"
"PO-Revision-Date: 2020-11-11 19:13+0000\n"
"Last-Translator: Maciej Stankiewicz <tawezik@gmail.com>\n"
"Language-Team: pl\n"
"Language: pl\n"
@ -16,7 +16,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 4.3-dev\n"
"X-Generator: Weblate 4.4-dev\n"
#: main.c
msgid ""
@ -76,7 +76,7 @@ msgstr "%q poza zakresem"
#: py/obj.c
msgid "%q indices must be integers, not %q"
msgstr ""
msgstr "%q indeksy muszą być liczbami typu int, a nie %q"
#: shared-bindings/vectorio/Polygon.c
msgid "%q list must be a list"
@ -104,7 +104,7 @@ msgstr "%q poza zakresem"
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
msgid "%q pin invalid"
msgstr ""
msgstr "nieprawidłowy pin %q"
#: shared-bindings/fontio/BuiltinFont.c
msgid "%q should be an int"
@ -254,7 +254,7 @@ msgstr "'return' poza funkcją"
#: py/compile.c
msgid "'yield from' inside async function"
msgstr ""
msgstr "'yield from' wewnątrz funkcji asynchronicznej"
#: py/compile.c
msgid "'yield' outside function"
@ -283,7 +283,7 @@ msgstr "Kanał przerwań sprzętowych w użyciu"
#: ports/esp32s2/common-hal/analogio/AnalogIn.c
msgid "ADC2 is being used by WiFi"
msgstr ""
msgstr "ADC2 jest używany przez WiFi"
#: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c
#, c-format
@ -302,6 +302,11 @@ msgstr ""
msgid "All I2C peripherals are in use"
msgstr "Wszystkie peryferia I2C w użyciu"
#: ports/esp32s2/common-hal/countio/Counter.c
#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
msgid "All PCNT units in use"
msgstr ""
#: ports/atmel-samd/common-hal/canio/Listener.c
#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
@ -433,6 +438,11 @@ msgstr ""
msgid "Bit clock and word select must share a clock unit"
msgstr "Zegar bitowy i wybór słowa muszą współdzielić jednostkę zegara"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Bit depth must be from 1 to 6 inclusive, not %d"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr "Głębia musi być wielokrotnością 8."
@ -1002,6 +1012,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr "Niewłaściwa wielkość bufora"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr ""
@ -1029,7 +1043,7 @@ msgstr "Błąd wewnętrzny #%d"
#: shared-bindings/sdioio/SDCard.c
msgid "Invalid %q"
msgstr ""
msgstr "Nieprawidłowe %q"
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
@ -1103,7 +1117,7 @@ msgstr "Zła wielkość fragmentu formatu"
#: ports/esp32s2/common-hal/pwmio/PWMOut.c
msgid "Invalid frequency"
msgstr ""
msgstr "Nieprawidłowa częstotliwość"
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Invalid frequency supplied"
@ -1123,7 +1137,8 @@ msgid "Invalid phase"
msgstr "Zła faza"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Zła nóżka"
@ -1201,7 +1216,7 @@ msgstr ""
#: shared-module/displayio/Group.c
msgid "Layer must be a Group or TileGrid subclass."
msgstr "Layer musi dziedziczyć z Group albo TileGrid"
msgstr "Layer musi dziedziczyć z Group albo TileGrid."
#: py/objslice.c
msgid "Length must be an int"
@ -1339,7 +1354,7 @@ msgstr ""
#: ports/esp32s2/common-hal/pwmio/PWMOut.c
msgid "No more channels available"
msgstr ""
msgstr "Brak dostępnych kanałów"
#: ports/esp32s2/common-hal/pwmio/PWMOut.c
msgid "No more timers available"
@ -1431,7 +1446,7 @@ msgstr ""
#: shared-module/displayio/ColorConverter.c
msgid "Only one color can be transparent at a time"
msgstr ""
msgstr "W danym momencie przezroczysty może być tylko jeden kolor"
#: shared-bindings/ipaddress/__init__.c
msgid "Only raw int supported for ip"
@ -1500,7 +1515,7 @@ msgstr "Oraz moduły w systemie plików\n"
#: shared-module/vectorio/Polygon.c
msgid "Polygon needs at least 3 points"
msgstr ""
msgstr "Wielokąt musi mieć co najmniej 3 punkty"
#: ports/esp32s2/common-hal/pulseio/PulseOut.c
msgid ""
@ -1812,7 +1827,7 @@ msgstr ""
#: ports/stm/common-hal/busio/UART.c
msgid "UART write error"
msgstr ""
msgstr "Błąd zapisu UART"
#: shared-module/usb_hid/Device.c
msgid "USB Busy"
@ -2009,7 +2024,7 @@ msgstr "__init__() powinien zwracać None"
#: py/objtype.c
msgid "__init__() should return None, not '%q'"
msgstr ""
msgstr "__init__() powinno zwrócić None, a nie '%q'"
#: py/objobject.c
msgid "__new__ arg must be a user-type"
@ -3052,11 +3067,11 @@ msgstr "nie dość argumentów przy formatowaniu"
#: extmod/ulab/code/poly/poly.c
msgid "number of arguments must be 2, or 3"
msgstr ""
msgstr "liczba argumentów musi wynosić 2 lub 3"
#: extmod/ulab/code/ulab_create.c
msgid "number of points must be at least 2"
msgstr ""
msgstr "liczba punktów musi wynosić co najmniej 2"
#: py/obj.c
msgid "object '%q' is not a tuple or list"
@ -3219,6 +3234,7 @@ msgstr "trzeci argument pow() nie może być 0"
msgid "pow() with 3 arguments requires integers"
msgstr "trzyargumentowe pow() wymaga liczb całkowitych"
#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@ -3369,7 +3385,7 @@ msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "source palette too large"
msgstr ""
msgstr "źródłowa paleta jest zbyt duża"
#: py/objstr.c
msgid "start/end indices"
@ -3435,6 +3451,7 @@ msgstr "threshold musi być w zakresie 0-65536"
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() wymaga 9-elementowej sekwencji"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr ""
@ -3618,6 +3635,10 @@ msgstr "value_count musi być > 0"
msgid "vectors must have same lengths"
msgstr "wektory muszą mieć identyczną długość"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr ""
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr ""

View File

@ -5,8 +5,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-21 20:13-0500\n"
"PO-Revision-Date: 2020-10-28 21:45+0000\n"
"POT-Creation-Date: 2020-11-10 15:30+0530\n"
"PO-Revision-Date: 2020-11-18 00:28+0000\n"
"Last-Translator: Wellington Terumi Uemura <wellingtonuemura@gmail.com>\n"
"Language-Team: \n"
"Language: pt_BR\n"
@ -14,7 +14,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 4.3.2-dev\n"
"X-Generator: Weblate 4.4-dev\n"
#: main.c
msgid ""
@ -304,6 +304,11 @@ msgstr "Todos os periféricos CAN estão em uso"
msgid "All I2C peripherals are in use"
msgstr "Todos os periféricos I2C estão em uso"
#: ports/esp32s2/common-hal/countio/Counter.c
#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
msgid "All PCNT units in use"
msgstr "Todas as unidades PCNT estão em uso"
#: ports/atmel-samd/common-hal/canio/Listener.c
#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
@ -439,6 +444,11 @@ msgstr ""
"O clock de bits e a seleção de palavras devem compartilhar uma unidade de "
"clock"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Bit depth must be from 1 to 6 inclusive, not %d"
msgstr "A profundidade dos bits deve ser de 1 até 6 inclusive, porém não %d"
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr "A profundidade de bits deve ser o múltiplo de 8."
@ -1013,6 +1023,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr "O tamanho do buffer está incorreto"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory"
msgstr "A inicialização falhou devido à falta de memória"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr "A entrada está demorando demais"
@ -1134,7 +1148,8 @@ msgid "Invalid phase"
msgstr "Fase Inválida"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Pino inválido"
@ -3286,6 +3301,7 @@ msgstr "O terceiro argumento pow() não pode ser 0"
msgid "pow() with 3 arguments requires integers"
msgstr "o pow() com 3 argumentos requer números inteiros"
#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@ -3503,6 +3519,7 @@ msgstr "Limite deve estar no alcance de 0-65536"
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() leva uma sequência com 9"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr "a duração do tempo limite excedeu o valor máximo suportado"
@ -3686,6 +3703,10 @@ msgstr "o value_count deve ser > 0"
msgid "vectors must have same lengths"
msgstr "os vetores devem ter os mesmos comprimentos"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr "o watchdog não foi inicializado"
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr "o tempo limite do watchdog deve ser maior que 0"

View File

@ -5,8 +5,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-21 20:13-0500\n"
"PO-Revision-Date: 2020-10-26 02:36+0000\n"
"POT-Creation-Date: 2020-11-10 15:30+0530\n"
"PO-Revision-Date: 2020-11-20 22:28+0000\n"
"Last-Translator: Jonny Bergdahl <jonny@bergdahl.it>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: sv\n"
@ -14,7 +14,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.3.2-dev\n"
"X-Generator: Weblate 4.4-dev\n"
#: main.c
msgid ""
@ -294,12 +294,17 @@ msgstr "Adresstyp utanför intervallet"
#: ports/esp32s2/common-hal/canio/CAN.c
msgid "All CAN peripherals are in use"
msgstr ""
msgstr "All I2C-kringutrustning används"
#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use"
msgstr "All I2C-kringutrustning används"
#: ports/esp32s2/common-hal/countio/Counter.c
#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
msgid "All PCNT units in use"
msgstr "Alla PCNT-enheter används"
#: ports/atmel-samd/common-hal/canio/Listener.c
#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
@ -415,12 +420,12 @@ msgid ""
"Auto-reload is on. Simply save files over USB to run them or enter REPL to "
"disable.\n"
msgstr ""
"Autoladdning är på. Spara bara filer via USB för att köra dem eller ange "
"REPL för att inaktivera.\n"
"Autoladdning är på. Spara filer via USB för att köra dem eller ange REPL för "
"att inaktivera.\n"
#: ports/esp32s2/common-hal/canio/CAN.c
msgid "Baudrate not supported by peripheral"
msgstr ""
msgstr "Baudrate stöds inte av kringutrustning"
#: shared-module/displayio/Display.c
#: shared-module/framebufferio/FramebufferDisplay.c
@ -431,6 +436,11 @@ msgstr "Under minsta bildfrekvens"
msgid "Bit clock and word select must share a clock unit"
msgstr "Bitklocka och ordval måste dela en klockenhet"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Bit depth must be from 1 to 6 inclusive, not %d"
msgstr "Bitdjup måste vara inom 1 till 6, inte %d"
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr "Bitdjup måste vara multipel av 8."
@ -1002,6 +1012,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr "Fel buffertstorlek"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory"
msgstr "Initieringen misslyckades på grund av minnesbrist"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr "Indata tar för lång tid"
@ -1123,7 +1137,8 @@ msgid "Invalid phase"
msgstr "Ogiltig fas"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Ogiltig pinne"
@ -2220,7 +2235,7 @@ msgstr "kan bara ha upp till 4 parametrar att Xtensa assembly"
#: py/persistentcode.c
msgid "can only save bytecode"
msgstr "kan bara spara bytekod"
msgstr "kan bara spara bytecode"
#: py/objtype.c
msgid "can't add special method to already-subclassed class"
@ -2905,7 +2920,7 @@ msgstr "long int stöds inte i denna build"
#: ports/esp32s2/common-hal/canio/CAN.c
msgid "loopback + silent mode not supported by peripheral"
msgstr ""
msgstr "loopback + tyst läge stöds inte av kringutrustning"
#: py/parse.c
msgid "malformed f-string"
@ -2943,11 +2958,11 @@ msgstr "maximal rekursionsdjup överskriden"
#: extmod/ulab/code/approx/approx.c
msgid "maxiter must be > 0"
msgstr ""
msgstr "maxiter måste vara > 0"
#: extmod/ulab/code/approx/approx.c
msgid "maxiter should be > 0"
msgstr ""
msgstr "maxiter bör vara > 0"
#: py/runtime.c
#, c-format
@ -3253,6 +3268,7 @@ msgstr "pow() 3: e argument kan inte vara 0"
msgid "pow() with 3 arguments requires integers"
msgstr "pow() med 3 argument kräver heltal"
#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@ -3388,7 +3404,7 @@ msgstr "argumentet sort måste vara en ndarray"
#: extmod/ulab/code/numerical/numerical.c
msgid "sorted axis can't be longer than 65535"
msgstr ""
msgstr "sorterad axel kan inte vara längre än 65535"
#: extmod/ulab/code/filter/filter.c
msgid "sos array must be of shape (n_section, 6)"
@ -3470,6 +3486,7 @@ msgstr "tröskelvärdet måste ligga i intervallet 0-65536"
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() kräver en 9-sekvens"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr "timeout-längd överskred det maximala värde som stöds"
@ -3522,12 +3539,12 @@ msgstr "tupel/lista har fel längd"
#: ports/esp32s2/common-hal/canio/CAN.c
#, c-format
msgid "twai_driver_install returned esp-idf error #%d"
msgstr ""
msgstr "twai_driver_install returnerade esp-idf-fel #%d"
#: ports/esp32s2/common-hal/canio/CAN.c
#, c-format
msgid "twai_start returned esp-idf error #%d"
msgstr ""
msgstr "twai_start returnerade esp-idf-fel #%d"
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
@ -3653,6 +3670,10 @@ msgstr "value_count måste vara > 0"
msgid "vectors must have same lengths"
msgstr "vektorer måste ha samma längd"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr "watchdog är inte initierad"
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr "watchdog timeout måste vara större än 0"

View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: circuitpython-cn\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-21 20:13-0500\n"
"PO-Revision-Date: 2020-10-28 21:45+0000\n"
"POT-Creation-Date: 2020-11-10 15:30+0530\n"
"PO-Revision-Date: 2020-11-19 01:28+0000\n"
"Last-Translator: hexthat <hexthat@gmail.com>\n"
"Language-Team: Chinese Hanyu Pinyin\n"
"Language: zh_Latn_pinyin\n"
@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 4.3.2-dev\n"
"X-Generator: Weblate 4.4-dev\n"
#: main.c
msgid ""
@ -302,6 +302,11 @@ msgstr "suǒ yǒu CAN wài shè dōu zài shǐ yòng zhōng"
msgid "All I2C peripherals are in use"
msgstr "Suǒyǒu I2C wàiwéi qì zhèngzài shǐyòng"
#: ports/esp32s2/common-hal/countio/Counter.c
#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
msgid "All PCNT units in use"
msgstr "suǒ yǒu zhèng zài shǐ yòng zhōng de PCNT dān yuán"
#: ports/atmel-samd/common-hal/canio/Listener.c
#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
@ -433,6 +438,11 @@ msgstr "Dī yú zuìdī zhèng sùlǜ"
msgid "Bit clock and word select must share a clock unit"
msgstr "Bǐtè shízhōng hé dānzì xuǎnzé bìxū gòngxiǎng shízhōng dānwèi"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Bit depth must be from 1 to 6 inclusive, not %d"
msgstr "wèi shēn dù bì xū bāo hán 1 dào 6 ér bù shì %d"
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr "Bǐtè shēndù bìxū shì 8 bèi yǐshàng."
@ -1000,6 +1010,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr "Huǎnchōng qū dàxiǎo bù zhèngquè"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory"
msgstr "yóu yú nèi cún bù zú, chū shǐ huà shī bài"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr "Shūrù shíjiānguò zhǎng"
@ -1121,7 +1135,8 @@ msgid "Invalid phase"
msgstr "Jiēduàn wúxiào"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Wúxiào de yǐn jiǎo"
@ -3242,6 +3257,7 @@ msgstr "pow() 3 cān shǔ bùnéng wéi 0"
msgid "pow() with 3 arguments requires integers"
msgstr "pow() yǒu 3 cānshù xūyào zhěngshù"
#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@ -3459,6 +3475,7 @@ msgstr "yùzhí bìxū zài fànwéi 0-65536"
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() xūyào 9 xùliè"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr "chāoshí shíjiān chāoguò zuìdà zhīchí zhí"
@ -3642,6 +3659,10 @@ msgstr "zhí jìshù bìxū wèi > 0"
msgid "vectors must have same lengths"
msgstr "xiàngliàng bìxū jùyǒu xiāngtóng de chángdù"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr "wèi chū shǐ huà jiān shì qì"
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr "kān mén gǒu chāoshí bìxū dàyú 0"

4
main.c
View File

@ -234,10 +234,12 @@ void cleanup_after_vm(supervisor_allocation* heap) {
common_hal_canio_reset();
#endif
reset_port();
// reset_board_busses() first because it may release pins from the never_reset state, so that
// reset_port() can reset them.
#if CIRCUITPY_BOARD
reset_board_busses();
#endif
reset_port();
reset_board();
reset_status_led();
}

View File

@ -12,14 +12,14 @@
#define BOARD_HAS_CRYSTAL 1
#define DEFAULT_I2C_BUS_SDA (&pin_PB02)
#define DEFAULT_I2C_BUS_SCL (&pin_PB03)
#define DEFAULT_I2C_BUS_SCL (&pin_PA16)
#define DEFAULT_I2C_BUS_SDA (&pin_PA17)
#define DEFAULT_UART_BUS_RX (&pin_PB20)
#define DEFAULT_UART_BUS_TX (&pin_PB21)
#define DEFAULT_SPI_BUS_MISO (&pin_PB23)
#define DEFAULT_UART_BUS_TX (&pin_PB24)
#define DEFAULT_UART_BUS_RX (&pin_PB25)
#define DEFAULT_SPI_BUS_MOSI (&pin_PC27)
#define DEFAULT_SPI_BUS_SCK (&pin_PC28)
#define MICROPY_HW_LED_STATUS (&pin_PA15)
#define MICROPY_HW_LED_STATUS (&pin_PA23)
#define MICROPY_HW_LED_RX (&pin_PC05)
#define MICROPY_HW_LED_TX (&pin_PC06)

View File

@ -1,64 +1,70 @@
#include "shared-bindings/board/__init__.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PB08) },
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB09) },
{ MP_ROM_QSTR(MP_QSTR_A10), MP_ROM_PTR(&pin_PC00) },
{ MP_ROM_QSTR(MP_QSTR_A11), MP_ROM_PTR(&pin_PC01) },
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA04) },
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA06) },
{ MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA07) },
{ MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PB00) },
{ MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PB01) },
{ MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_PB05) },
{ MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_PB06) },
{ MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_PB07) },
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PC10) },
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PC11) },
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA14) },
{ MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA13) },
{ MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PB14) },
{ MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PB15) },
{ MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PC20) },
{ MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PC21) },
{ MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA12) },
{ MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PB31) },
{ MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA16) },
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA17) },
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA04) },
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA06) },
{ MP_ROM_QSTR(MP_QSTR_A10), MP_ROM_PTR(&pin_PB07) },
{ MP_ROM_QSTR(MP_QSTR_A11), MP_ROM_PTR(&pin_PC00) },
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA07) },
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PB08) },
{ MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PB09) },
{ MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PC02) },
{ MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PC03) },
{ MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_PB04) },
{ MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_PB05) },
{ MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_PB06) },
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PB31) },
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PC16) },
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PC13) },
{ MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA14) },
{ MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA15) },
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PB12) },
{ MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PB13) },
{ MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PC17) },
{ MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PC18) },
{ MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PC19) },
{ MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PC20) },
{ MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PC21) },
{ MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PB18) },
{ MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PB19) },
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PC12) },
{ MP_ROM_QSTR(MP_QSTR_DAC0), MP_ROM_PTR(&pin_PA02) },
{ MP_ROM_QSTR(MP_QSTR_DAC1), MP_ROM_PTR(&pin_PA05) },
{ MP_ROM_QSTR(MP_QSTR_ESP01_EN), MP_ROM_PTR(&pin_PC03) },
{ MP_ROM_QSTR(MP_QSTR_ESP01_EN), MP_ROM_PTR(&pin_PC15) },
{ MP_ROM_QSTR(MP_QSTR_E5), MP_ROM_PTR(&pin_PC15) },
{ MP_ROM_QSTR(MP_QSTR_ESP01_GPIO0), MP_ROM_PTR(&pin_PA18) },
{ MP_ROM_QSTR(MP_QSTR_UART3_RTS), MP_ROM_PTR(&pin_PA18) },
{ MP_ROM_QSTR(MP_QSTR_E3), MP_ROM_PTR(&pin_PA18) },
{ MP_ROM_QSTR(MP_QSTR_ESP01_GPIO2), MP_ROM_PTR(&pin_PA19) },
{ MP_ROM_QSTR(MP_QSTR_UART3_CTS), MP_ROM_PTR(&pin_PA19) },
{ MP_ROM_QSTR(MP_QSTR_ESP01_RESET), MP_ROM_PTR(&pin_PC02) },
{ MP_ROM_QSTR(MP_QSTR_ESP01_RX), MP_ROM_PTR(&pin_PB21) },
{ MP_ROM_QSTR(MP_QSTR_UART3_RX), MP_ROM_PTR(&pin_PB21) },
{ MP_ROM_QSTR(MP_QSTR_ESP01_TX), MP_ROM_PTR(&pin_PB20) },
{ MP_ROM_QSTR(MP_QSTR_UART3_TX), MP_ROM_PTR(&pin_PB20) },
{ MP_ROM_QSTR(MP_QSTR_I2C_SCL), MP_ROM_PTR(&pin_PB03) },
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PB03) },
{ MP_ROM_QSTR(MP_QSTR_I2C_SDA), MP_ROM_PTR(&pin_PB02) },
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PB02) },
{ MP_ROM_QSTR(MP_QSTR_E4), MP_ROM_PTR(&pin_PA19) },
{ MP_ROM_QSTR(MP_QSTR_ESP01_RESET), MP_ROM_PTR(&pin_PC14) },
{ MP_ROM_QSTR(MP_QSTR_E6), MP_ROM_PTR(&pin_PC14) },
{ MP_ROM_QSTR(MP_QSTR_ESP01_RX), MP_ROM_PTR(&pin_PA12) },
{ MP_ROM_QSTR(MP_QSTR_UART3_RX), MP_ROM_PTR(&pin_PA12) },
{ MP_ROM_QSTR(MP_QSTR_I2C3_SCL), MP_ROM_PTR(&pin_PA12) },
{ MP_ROM_QSTR(MP_QSTR_E2), MP_ROM_PTR(&pin_PA12) },
{ MP_ROM_QSTR(MP_QSTR_ESP01_TX), MP_ROM_PTR(&pin_PA13) },
{ MP_ROM_QSTR(MP_QSTR_UART3_TX), MP_ROM_PTR(&pin_PA13) },
{ MP_ROM_QSTR(MP_QSTR_I2C3_SDA), MP_ROM_PTR(&pin_PA13) },
{ MP_ROM_QSTR(MP_QSTR_E1), MP_ROM_PTR(&pin_PA13) },
{ MP_ROM_QSTR(MP_QSTR_I2C1_SCL), MP_ROM_PTR(&pin_PA16) },
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA16) },
{ MP_ROM_QSTR(MP_QSTR_I2C1_SDA), MP_ROM_PTR(&pin_PA17) },
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA17) },
{ MP_ROM_QSTR(MP_QSTR_I2S_FS_0), MP_ROM_PTR(&pin_PA20) },
{ MP_ROM_QSTR(MP_QSTR_I2S_FS_1), MP_ROM_PTR(&pin_PA23) },
{ MP_ROM_QSTR(MP_QSTR_I2S_MCK_0), MP_ROM_PTR(&pin_PB17) },
{ MP_ROM_QSTR(MP_QSTR_I2S_MCK_1), MP_ROM_PTR(&pin_PB13) },
{ MP_ROM_QSTR(MP_QSTR_I2S_SCK_0), MP_ROM_PTR(&pin_PB16) },
{ MP_ROM_QSTR(MP_QSTR_I2S_SCK_1), MP_ROM_PTR(&pin_PB12) },
{ MP_ROM_QSTR(MP_QSTR_I2S_SDI), MP_ROM_PTR(&pin_PA22) },
{ MP_ROM_QSTR(MP_QSTR_I2S_SDO), MP_ROM_PTR(&pin_PA21) },
{ MP_ROM_QSTR(MP_QSTR_LED_B), MP_ROM_PTR(&pin_PA15) },
{ MP_ROM_QSTR(MP_QSTR_LED_STATUS), MP_ROM_PTR(&pin_PA15) },
{ MP_ROM_QSTR(MP_QSTR_LED_G), MP_ROM_PTR(&pin_PB18) },
{ MP_ROM_QSTR(MP_QSTR_LED_R), MP_ROM_PTR(&pin_PB19) },
{ MP_ROM_QSTR(MP_QSTR_LED_B), MP_ROM_PTR(&pin_PA23) },
{ MP_ROM_QSTR(MP_QSTR_LED_STATUS), MP_ROM_PTR(&pin_PA23) },
{ MP_ROM_QSTR(MP_QSTR_LED_G), MP_ROM_PTR(&pin_PB15) },
{ MP_ROM_QSTR(MP_QSTR_LED_R), MP_ROM_PTR(&pin_PB14) },
{ MP_ROM_QSTR(MP_QSTR_LED_RX), MP_ROM_PTR(&pin_PC05) },
{ MP_ROM_QSTR(MP_QSTR_LED_TX), MP_ROM_PTR(&pin_PC06) },
{ MP_ROM_QSTR(MP_QSTR_RS485_RE), MP_ROM_PTR(&pin_PC15) },
{ MP_ROM_QSTR(MP_QSTR_RS485_RX), MP_ROM_PTR(&pin_PC13) },
{ MP_ROM_QSTR(MP_QSTR_RS485_TE), MP_ROM_PTR(&pin_PC14) },
{ MP_ROM_QSTR(MP_QSTR_RS485_TX), MP_ROM_PTR(&pin_PC12) },
{ MP_ROM_QSTR(MP_QSTR_RS485_RE), MP_ROM_PTR(&pin_PB01) },
{ MP_ROM_QSTR(MP_QSTR_RS485_RX), MP_ROM_PTR(&pin_PB03) },
{ MP_ROM_QSTR(MP_QSTR_RS485_TE), MP_ROM_PTR(&pin_PB00) },
{ MP_ROM_QSTR(MP_QSTR_RS485_TX), MP_ROM_PTR(&pin_PB02) },
{ MP_ROM_QSTR(MP_QSTR_SPI_MISO), MP_ROM_PTR(&pin_PB23) },
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB23) },
{ MP_ROM_QSTR(MP_QSTR_SPI_MOSI), MP_ROM_PTR(&pin_PC27) },
@ -67,14 +73,16 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PC28) },
{ MP_ROM_QSTR(MP_QSTR_SPI_SS), MP_ROM_PTR(&pin_PB22) },
{ MP_ROM_QSTR(MP_QSTR_SS), MP_ROM_PTR(&pin_PB22) },
{ MP_ROM_QSTR(MP_QSTR_UART1_CTS), MP_ROM_PTR(&pin_PC19) },
{ MP_ROM_QSTR(MP_QSTR_UART1_RTS), MP_ROM_PTR(&pin_PC18) },
{ MP_ROM_QSTR(MP_QSTR_UART1_RX), MP_ROM_PTR(&pin_PC17) },
{ MP_ROM_QSTR(MP_QSTR_UART1_TX), MP_ROM_PTR(&pin_PC16) },
{ MP_ROM_QSTR(MP_QSTR_UART2_RX), MP_ROM_PTR(&pin_PB25) },
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB25) },
{ MP_ROM_QSTR(MP_QSTR_UART2_TX), MP_ROM_PTR(&pin_PB24) },
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB24) },
{ MP_ROM_QSTR(MP_QSTR_UART1_CTS), MP_ROM_PTR(&pin_PC25) },
{ MP_ROM_QSTR(MP_QSTR_UART1_RTS), MP_ROM_PTR(&pin_PC24) },
{ MP_ROM_QSTR(MP_QSTR_UART1_RX), MP_ROM_PTR(&pin_PB24) },
{ MP_ROM_QSTR(MP_QSTR_UART1_TX), MP_ROM_PTR(&pin_PB25) },
{ MP_ROM_QSTR(MP_QSTR_UART2_RX), MP_ROM_PTR(&pin_PB20) },
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB20) },
{ MP_ROM_QSTR(MP_QSTR_I2C2_SCL), MP_ROM_PTR(&pin_PB20) },
{ MP_ROM_QSTR(MP_QSTR_UART2_TX), MP_ROM_PTR(&pin_PB21) },
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB21) },
{ MP_ROM_QSTR(MP_QSTR_I2C2_SDA), MP_ROM_PTR(&pin_PB21) },
{ 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) },

View File

@ -3,7 +3,7 @@
*
* The MIT License (MIT)
*
* Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
* 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
@ -25,17 +25,11 @@
*/
#include "boards/board.h"
#include "mpconfigboard.h"
#include "shared-bindings/microcontroller/Pin.h"
#include "common-hal/microcontroller/Pin.h"
#include "supervisor/shared/board.h"
#include "hal/include/hal_gpio.h"
void board_init(void) {
// USB
common_hal_never_reset_pin(&pin_GPIO19);
common_hal_never_reset_pin(&pin_GPIO20);
// Debug UART
common_hal_never_reset_pin(&pin_GPIO43);
common_hal_never_reset_pin(&pin_GPIO44);
}
bool board_requests_safe_mode(void) {
@ -43,5 +37,4 @@ bool board_requests_safe_mode(void) {
}
void reset_board(void) {
}

View File

@ -0,0 +1,57 @@
#define MICROPY_HW_BOARD_NAME "CP Sapling M0"
#define MICROPY_HW_MCU_NAME "samd21e18"
#define MICROPY_HW_NEOPIXEL (&pin_PA15)
#define MICROPY_PORT_A (0)
#define MICROPY_PORT_B (0)
#define MICROPY_PORT_C (0)
#define IGNORE_PIN_PA02 1
#define IGNORE_PIN_PA03 1
#define IGNORE_PIN_PA04 1
#define IGNORE_PIN_PA05 1
#define IGNORE_PIN_PA06 1
#define IGNORE_PIN_PA07 1
#define IGNORE_PIN_PA12 1
#define IGNORE_PIN_PA13 1
#define IGNORE_PIN_PA14 1
#define IGNORE_PIN_PA20 1
#define IGNORE_PIN_PA21 1
// USB is always used internally so skip the pin objects for it.
#define IGNORE_PIN_PA24 1
#define IGNORE_PIN_PA25 1
#define IGNORE_PIN_PA27 1
#define IGNORE_PIN_PA28 1
#define IGNORE_PIN_PA30 1
#define IGNORE_PIN_PA31 1
#define IGNORE_PIN_PB01 1
#define IGNORE_PIN_PB02 1
#define IGNORE_PIN_PB03 1
#define IGNORE_PIN_PB04 1
#define IGNORE_PIN_PB05 1
#define IGNORE_PIN_PB06 1
#define IGNORE_PIN_PB07 1
#define IGNORE_PIN_PB08 1
#define IGNORE_PIN_PB09 1
#define IGNORE_PIN_PB10 1
#define IGNORE_PIN_PB11 1
#define IGNORE_PIN_PB12 1
#define IGNORE_PIN_PB13 1
#define IGNORE_PIN_PB14 1
#define IGNORE_PIN_PB15 1
#define IGNORE_PIN_PB16 1
#define IGNORE_PIN_PB17 1
#define IGNORE_PIN_PB22 1
#define IGNORE_PIN_PB23 1
#define IGNORE_PIN_PB30 1
#define IGNORE_PIN_PB31 1
#define IGNORE_PIN_PB00 1
#define DEFAULT_I2C_BUS_SCL (&pin_PA09)
#define DEFAULT_I2C_BUS_SDA (&pin_PA08)
#define DEFAULT_SPI_BUS_SS (&pin_PA22)
#define DEFAULT_SPI_BUS_SCK (&pin_PA19)
#define DEFAULT_SPI_BUS_MOSI (&pin_PA18)
#define DEFAULT_SPI_BUS_MISO (&pin_PA17)

View File

@ -0,0 +1,24 @@
USB_VID = 0x1209
USB_PID = 0x4DDD
USB_PRODUCT = "CP Sapling"
USB_MANUFACTURER = "Oak Development Technologies"
CHIP_VARIANT = SAMD21E18A
CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE
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), de_DE)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
SUPEROPT_VM = 0
endif

View File

@ -0,0 +1,38 @@
#include "shared-bindings/board/__init__.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA00) },
{ MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA00) },
{ MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA01) },
{ MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PA01) },
{ MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA09) },
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA09) },
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA22) },
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA22) },
{ MP_ROM_QSTR(MP_QSTR_SS), MP_ROM_PTR(&pin_PA22) },
{ MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA19) },
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA19) },
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA19) },
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA17) },
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA17) },
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA17) },
{ MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA18) },
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA18) },
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA18) },
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), 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_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);

View File

@ -12,11 +12,15 @@ EXTERNAL_FLASH_DEVICE_COUNT = 1
EXTERNAL_FLASH_DEVICES = "GD25Q32C"
LONGINT_IMPL = MPZ
CIRCUITPY_FULLBUILD = 0
CIRCUITPY_BITBANGIO = 0
CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_COUNTIO = 0
CIRCUITPY_I2CPERIPHERAL = 0
CIRCUITPY_I2CPERIPHERAL = 1
CIRCUITPY_VECTORIO = 0
CIRCUITPY_DISPLAYIO = 0
CIRCUITPY_TOUCHIO = 0
CIRCUITPY_ROTARYIO = 0
CFLAGS_INLINE_LIMIT = 60

View File

@ -4,17 +4,17 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) },
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA12) },
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB10) },
{ MP_ROM_QSTR(MP_QSTR_D30), MP_ROM_PTR(&pin_PA30) },
{ MP_ROM_QSTR(MP_QSTR_D31), MP_ROM_PTR(&pin_PA31) },
{ MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_PA30) },
{ MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_PA31) },
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA17) },
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA07) },
{ MP_ROM_QSTR(MP_QSTR_OVTEMP), MP_ROM_PTR(&pin_PA07) },
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA16) },
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA09) },
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA11) },
{ MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA11) },
{ MP_ROM_QSTR(MP_QSTR_SAT_RESET), MP_ROM_PTR(&pin_PA11) },
{ MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_SAT_PWR_ENABLE), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA19) },
{ MP_ROM_QSTR(MP_QSTR_INT_IMU_OBC), MP_ROM_PTR(&pin_PA19) },
@ -22,10 +22,17 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_PWRMON_SDA), MP_ROM_PTR(&pin_PA04) },
{ MP_ROM_QSTR(MP_QSTR_PWRMON_SCL), MP_ROM_PTR(&pin_PA05) },
{ MP_ROM_QSTR(MP_QSTR_PWRMON_ALERT), MP_ROM_PTR(&pin_PB03) },
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PB09) },
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB02) },
{ MP_ROM_QSTR(MP_QSTR_V_3V3_MEAS), MP_ROM_PTR(&pin_PB09) },
{ MP_ROM_QSTR(MP_QSTR_V_5V_MEAS), MP_ROM_PTR(&pin_PB02) },
{ MP_ROM_QSTR(MP_QSTR_FLASH_SCK), MP_ROM_PTR(&pin_PA23) },
{ MP_ROM_QSTR(MP_QSTR_FLASH_MOSI), MP_ROM_PTR(&pin_PA22) },
{ MP_ROM_QSTR(MP_QSTR_FLASH_MISO), MP_ROM_PTR(&pin_PA21) },
{ MP_ROM_QSTR(MP_QSTR_FLASH_CS), MP_ROM_PTR(&pin_PA20) },
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA06) },
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA06) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_I2C_MONITOR), 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) },
};

View File

@ -26,12 +26,16 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PB07) },
{ MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PB06) },
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PB30) },
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA12) },
{ MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA15) },
{ MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PB00) },
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_D32), MP_ROM_PTR(&pin_PA30) },
{ MP_ROM_QSTR(MP_QSTR_D33), MP_ROM_PTR(&pin_PA31) },
{ MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_PB22) },
{ MP_ROM_QSTR(MP_QSTR_INT_IMU), MP_ROM_PTR(&pin_PA12) },
{ MP_ROM_QSTR(MP_QSTR_SAT_POWER), MP_ROM_PTR(&pin_PA15) },
{ MP_ROM_QSTR(MP_QSTR_OVTEMP), MP_ROM_PTR(&pin_PB00) },
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },

View File

@ -12,7 +12,7 @@ CIRCUITPY_FULL_BUILD = 0
# A number of modules are removed for RFM69 to make room for frozen libraries.
# Many I/O functions are not available.
CIRCUITPY_ANALOGIO = 0
CIRCUITPY_ANALOGIO = 1
CIRCUITPY_PULSEIO = 0
CIRCUITPY_NEOPIXEL_WRITE = 1
CIRCUITPY_ROTARYIO = 0

View File

@ -13,7 +13,7 @@ CIRCUITPY_FULL_BUILD = 0
# A number of modules are removed for RFM9x to make room for frozen libraries.
# Many I/O functions are not available.
CIRCUITPY_ANALOGIO = 0
CIRCUITPY_ANALOGIO = 1
CIRCUITPY_PULSEIO = 0
CIRCUITPY_NEOPIXEL_WRITE = 1
CIRCUITPY_ROTARYIO = 0

View File

@ -36,6 +36,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA12) },
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA13) },
{ MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA14) },
{ MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PA16) },
{ MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA18) },
@ -45,14 +46,17 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA22) },
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA23) },
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PB03) },
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PB02) },
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_PB03) },
{ MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_PB01) },
{ MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_PB01) },
{ MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_PB00) },
{ MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_PB00) },
{ MP_ROM_QSTR(MP_QSTR_BOOST_ENABLE), MP_ROM_PTR(&pin_PB13) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_CAN_RX), MP_ROM_PTR(&pin_PB15) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_CAN_TX), MP_ROM_PTR(&pin_PB14) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_CAN_STANDBY), MP_ROM_PTR(&pin_PB13) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_CAN_STANDBY), MP_ROM_PTR(&pin_PB12) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },

View File

@ -16,8 +16,8 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_BUSY), MP_ROM_PTR(&pin_PA22) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RESET), MP_ROM_PTR(&pin_PA21) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RTS), MP_ROM_PTR(&pin_PA18) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_TX), MP_ROM_PTR(&pin_PA12) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RX), MP_ROM_PTR(&pin_PA13) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_TX), MP_ROM_PTR(&pin_PA13) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RX), MP_ROM_PTR(&pin_PA12) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_SCL),MP_ROM_PTR(&pin_PB30) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_SDA),MP_ROM_PTR(&pin_PB31) },

View File

@ -33,6 +33,10 @@
#define DEFAULT_UART_BUS_RX (&pin_PA11)
#define DEFAULT_UART_BUS_TX (&pin_PA10)
// These pins are connected to the external crystal.
#define IGNORE_PIN_PA00 1
#define IGNORE_PIN_PA01 1
// USB is always used internally so skip the pin objects for it.
#define IGNORE_PIN_PA24 1
#define IGNORE_PIN_PA25 1

View File

@ -16,8 +16,6 @@
#define IGNORE_PIN_PA27 1
#define IGNORE_PIN_PA28 1
#define IGNORE_PIN_PA30 1
#define IGNORE_PIN_PA31 1
#define IGNORE_PIN_PB01 1
#define IGNORE_PIN_PB02 1

View File

@ -1,14 +1,18 @@
#include "shared-bindings/board/__init__.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA09) },
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA11) },
{ MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA02) },
{ MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PA04) },
{ MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PA03) },
{ MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_PA05) },
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA07) },
{ MP_ROM_QSTR(MP_QSTR_BOOST_EN), MP_ROM_PTR(&pin_PA14) },
{ MP_ROM_QSTR(MP_QSTR_VEXT_SELECT), MP_ROM_PTR(&pin_PA15) },
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA06) },
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA06) },
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA09) },
{ MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PA11) },
{ MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PA02) },
{ MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_PA03) },
{ MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_PA04) },
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA16) },
{ MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA10) },
@ -19,8 +23,10 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA19) },
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA22) },
{ MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA23) },
{ MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PA03) },
{ MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_PA05) },
{ MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA31) },
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA30) },
{ MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PA02) },
{ MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_PA03) },
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA09) },
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA22) },

View File

@ -326,7 +326,7 @@ static void setup_dma(audiobusio_pdmin_obj_t* self, uint32_t length,
// higher sample rate than specified. Then after the audio is
// recorded, a more expensive filter non-real-time filter could be
// used to down-sample and low-pass.
uint16_t sinc_filter [OVERSAMPLING] = {
const uint16_t sinc_filter [OVERSAMPLING] = {
0, 2, 9, 21, 39, 63, 94, 132,
179, 236, 302, 379, 467, 565, 674, 792,
920, 1055, 1196, 1341, 1487, 1633, 1776, 1913,
@ -337,7 +337,11 @@ uint16_t sinc_filter [OVERSAMPLING] = {
94, 63, 39, 21, 9, 2, 0, 0
};
#define REPEAT_16_TIMES(X) X X X X X X X X X X X X X X X X
#ifdef SAMD21
#define REPEAT_16_TIMES(X) do { for(uint8_t j=0; j<4; j++) { X X X X } } while (0)
#else
#define REPEAT_16_TIMES(X) do { X X X X X X X X X X X X X X X X } while(0)
#endif
static uint16_t filter_sample(uint32_t pdm_samples[4]) {
uint16_t running_sum = 0;
@ -354,7 +358,7 @@ static uint16_t filter_sample(uint32_t pdm_samples[4]) {
filter_ptr++;
pdm_sample <<= 1;
}
)
);
}
return running_sum;
}

View File

@ -129,7 +129,8 @@ bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) {
return true;
}
void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, display_chip_select_behavior_t chip_select, uint8_t *data, uint32_t data_length) {
void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type,
display_chip_select_behavior_t chip_select, const uint8_t *data, uint32_t data_length) {
displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj);
common_hal_digitalio_digitalinout_set_value(&self->command, byte_type == DISPLAY_DATA);
uint32_t* clear_write = (uint32_t*) &self->write_group->OUTCLR.reg;

View File

@ -47,6 +47,7 @@
// MICROPY_PY_UJSON depends on MICROPY_PY_IO
#define MICROPY_PY_IO (0)
#define MICROPY_PY_REVERSE_SPECIAL_METHODS (0)
#define MICROPY_PY_UBINASCII (0)
#define MICROPY_PY_UJSON (0)
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (0)
#define MICROPY_PY_UERRNO_LIST \

View File

@ -98,8 +98,12 @@ void reset_to_bootloader(void) {
}
}
supervisor_allocation _fixed_stack;
supervisor_allocation* port_fixed_stack(void) {
return NULL;
_fixed_stack.ptr = port_stack_get_limit();
_fixed_stack.length = (port_stack_get_top() - port_stack_get_limit()) * sizeof(uint32_t);
return &_fixed_stack;
}
uint32_t *port_stack_get_limit(void) {

View File

@ -188,6 +188,8 @@ SRC_C += \
lib/utils/pyexec.c \
lib/utils/stdout_helpers.c \
lib/utils/sys_stdio_mphal.c \
peripherals/timer.c \
peripherals/pcnt.c \
peripherals/pins.c \
peripherals/rmt.c \
supervisor/shared/memory.c

View File

@ -30,7 +30,7 @@ Connect these pins using a [USB adapter](https://www.adafruit.com/product/4090)
## Building and flashing ##
Before building or flashing the ESP32-S2, you must [install the esp-idf](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/get-started/index.html). This must be re-done ever time the esp-idf is updated, but not every time you build. Run `cd ports/esp32s2` from `circuitpython/` to move to the esp32s2 port root, and run:
Before building or flashing the ESP32-S2, you must [install the esp-idf](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/get-started/index.html). This must be re-done every time the esp-idf is updated, but not every time you build. Run `cd ports/esp32s2` from `circuitpython/` to move to the esp32s2 port root, and run:
```
./esp-idf/install.sh

View File

@ -0,0 +1,169 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 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 "boards/board.h"
#include "mpconfigboard.h"
#include "shared-bindings/busio/SPI.h"
#include "shared-bindings/displayio/FourWire.h"
#include "shared-bindings/microcontroller/Pin.h"
#include "shared-module/displayio/__init__.h"
#include "supervisor/shared/board.h"
#define DELAY 0x80
// This is an ILO373 control chip. The display is a 2.9" grayscale EInk.
const uint8_t display_start_sequence[] = {
0x01, 5, 0x03, 0x00, 0x2b, 0x2b, 0x13, // power setting
0x06, 3, 0x17, 0x17, 0x17, // booster soft start
0x04, DELAY, 200, // power on and wait 200 ms
0x00, 1, 0x7f, // panel setting
0x50, 1, 0x97, // CDI setting
0x30, 1, 0x3c, // PLL set to 50 Hx (M = 7, N = 4)
0x61, 3, 0x80, 0x01, 0x28, // Resolution
0x82, DELAY | 1, 0x12, 50, // VCM DC and delay 50ms
// Look up tables for voltage sequence for pixel transition
// Common voltage
0x20, 0x2a,
0x00, 0x0a, 0x00, 0x00, 0x00, 0x01,
0x60, 0x14, 0x14, 0x00, 0x00, 0x01,
0x00, 0x14, 0x00, 0x00, 0x00, 0x01,
0x00, 0x13, 0x0a, 0x01, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// White to white
0x21, 0x2a,
0x40, 0x0a, 0x00, 0x00, 0x00, 0x01,
0x90, 0x14, 0x14, 0x00, 0x00, 0x01,
0x10, 0x14, 0x0a, 0x00, 0x00, 0x01,
0xa0, 0x13, 0x01, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// Black to white
0x22, 0x2a,
0x40, 0x0a, 0x00, 0x00, 0x00, 0x01,
0x90, 0x14, 0x14, 0x00, 0x00, 0x01,
0x00, 0x14, 0x0a, 0x00, 0x00, 0x01,
0x99, 0x0c, 0x01, 0x03, 0x04, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// White to black
0x23, 0x2a,
0x40, 0x0a, 0x00, 0x00, 0x00, 0x01,
0x90, 0x14, 0x14, 0x00, 0x00, 0x01,
0x00, 0x14, 0x0a, 0x00, 0x00, 0x01,
0x99, 0x0b, 0x04, 0x04, 0x01, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// Black to black
0x24, 0x2a,
0x80, 0x0a, 0x00, 0x00, 0x00, 0x01,
0x90, 0x14, 0x14, 0x00, 0x00, 0x01,
0x20, 0x14, 0x0a, 0x00, 0x00, 0x01,
0x50, 0x13, 0x01, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
const uint8_t display_stop_sequence[] = {
0x50, 0x01, 0x17, // CDI Setting
0x82, 0x01, 0x00, // VCM DC to -0.1V
0x02, 0x00 // Power off
};
void board_init(void) {
// USB
common_hal_never_reset_pin(&pin_GPIO19);
common_hal_never_reset_pin(&pin_GPIO20);
// Debug UART
common_hal_never_reset_pin(&pin_GPIO43);
common_hal_never_reset_pin(&pin_GPIO44);
busio_spi_obj_t* spi = &displays[0].fourwire_bus.inline_bus;
common_hal_busio_spi_construct(spi, &pin_GPIO36, &pin_GPIO35, NULL);
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_GPIO7, // EPD_DC Command or data
&pin_GPIO8, // EPD_CS Chip select
&pin_GPIO6, // EPD_RST Reset
4000000, // Baudrate
0, // Polarity
0); // Phase
displayio_epaperdisplay_obj_t* display = &displays[0].epaper_display;
display->base.type = &displayio_epaperdisplay_type;
common_hal_displayio_epaperdisplay_construct(
display,
bus,
display_start_sequence, sizeof(display_start_sequence),
display_stop_sequence, sizeof(display_stop_sequence),
296, // width
128, // height
160, // ram_width
296, // ram_height
0, // colstart
0, // rowstart
270, // rotation
NO_COMMAND, // set_column_window_command
NO_COMMAND, // set_row_window_command
NO_COMMAND, // set_current_column_command
NO_COMMAND, // set_current_row_command
0x10, // write_black_ram_command
false, // black_bits_inverted
0x13, // write_color_ram_command
false, // color_bits_inverted
0x000000, // highlight_color
0x12, // refresh_display_command
1.0, // refresh_time
&pin_GPIO5, // busy_pin
false, // busy_state
5.0, // seconds_per_frame
false, // always_toggle_chip_select
true); // grayscale
}
bool board_requests_safe_mode(void) {
return false;
}
void reset_board(void) {
}

View File

@ -26,7 +26,7 @@
//Micropython setup
#define MICROPY_HW_BOARD_NAME "EInk Portal"
#define MICROPY_HW_BOARD_NAME "MagTag"
#define MICROPY_HW_MCU_NAME "ESP32S2"
#define MICROPY_HW_NEOPIXEL (&pin_GPIO1)

View File

@ -1,6 +1,6 @@
USB_VID = 0x239A
USB_PID = 0x80E6
USB_PRODUCT = "EInk Portal"
USB_PRODUCT = "MagTag"
USB_MANUFACTURER = "Adafruit"
INTERNAL_FLASH_FILESYSTEM = 1

View File

@ -1,5 +1,7 @@
#include "shared-bindings/board/__init__.h"
#include "shared-module/displayio/__init__.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO10) },
{ MP_ROM_QSTR(MP_QSTR_AD1), MP_ROM_PTR(&pin_GPIO18) },
@ -37,5 +39,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ 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_DISPLAY), MP_ROM_PTR(&displays[0].epaper_display)}
};
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);

View File

@ -2,41 +2,65 @@
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO17) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO18) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO1) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO2) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO3) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO4) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO18) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO1) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO2) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO3) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO4) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO5) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO5) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO6) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO6) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO7) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO8) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO9) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO10) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO11) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO12) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO13) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO14) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO15) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO16) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO21) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO42) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_SDA),MP_ROM_PTR(&pin_GPIO33) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO33),MP_ROM_PTR(&pin_GPIO33) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_SCL),MP_ROM_PTR(&pin_GPIO34) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO34),MP_ROM_PTR(&pin_GPIO34) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_MOSI),MP_ROM_PTR(&pin_GPIO35) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO35),MP_ROM_PTR(&pin_GPIO35) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_MISO),MP_ROM_PTR(&pin_GPIO37) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO37),MP_ROM_PTR(&pin_GPIO37) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO42) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO45) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_DEBUG_RX), MP_ROM_PTR(&pin_GPIO38) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_DEBUG_TX), MP_ROM_PTR(&pin_GPIO37) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_MOSI),MP_ROM_PTR(&pin_GPIO35) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_MISO),MP_ROM_PTR(&pin_GPIO37) },
{ 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) },

View File

@ -25,7 +25,6 @@
*/
//Micropython setup
#define MICROPY_HW_BOARD_NAME "microS2"
#define MICROPY_HW_MCU_NAME "ESP32S2"
@ -33,8 +32,20 @@
#define MICROPY_HW_BUTTON (&pin_GPIO0)
#define MICROPY_HW_NEOPIXEL (&pin_GPIO33)
// Default bus pins
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO1)
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO2)
#define DEFAULT_SPI_BUS_SCK (&pin_GPIO36)
#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35)
#define DEFAULT_SPI_BUS_MISO (&pin_GPIO37)
#define DEFAULT_UART_BUS_TX (&pin_GPIO43)
#define DEFAULT_UART_BUS_RX (&pin_GPIO44)
#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0)
// Explanation of how a user got into safe mode.
#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n")
#define AUTORESET_DELAY_MS 500

View File

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

View File

@ -0,0 +1,84 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 microDev
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "common-hal/countio/Counter.h"
#include "common-hal/microcontroller/Pin.h"
#include "py/runtime.h"
#include "supervisor/shared/translate.h"
void common_hal_countio_counter_construct(countio_counter_obj_t* self,
const mcu_pin_obj_t* pin) {
claim_pin(pin);
// Prepare configuration for the PCNT unit
const pcnt_config_t pcnt_config = {
// Set PCNT input signal and control GPIOs
.pulse_gpio_num = pin->number,
.ctrl_gpio_num = PCNT_PIN_NOT_USED,
.channel = PCNT_CHANNEL_0,
// What to do on the positive / negative edge of pulse input?
.pos_mode = PCNT_COUNT_INC, // Count up on the positive edge
.neg_mode = PCNT_COUNT_DIS, // Keep the counter value on the negative edge
};
// Initialize PCNT unit
const int8_t unit = peripherals_pcnt_init(pcnt_config);
if (unit == -1) {
mp_raise_RuntimeError(translate("All PCNT units in use"));
}
self->pin = pin->number;
self->unit = (pcnt_unit_t)unit;
}
bool common_hal_countio_counter_deinited(countio_counter_obj_t* self) {
return self->unit == PCNT_UNIT_MAX;
}
void common_hal_countio_counter_deinit(countio_counter_obj_t* self) {
if (common_hal_countio_counter_deinited(self)) {
return;
}
reset_pin_number(self->pin);
peripherals_pcnt_deinit(&self->unit);
}
mp_int_t common_hal_countio_counter_get_count(countio_counter_obj_t* self) {
int16_t count;
pcnt_get_counter_value(self->unit, &count);
return count+self->count;
}
void common_hal_countio_counter_set_count(countio_counter_obj_t* self,
mp_int_t new_count) {
self->count = new_count;
pcnt_counter_clear(self->unit);
}
void common_hal_countio_counter_reset(countio_counter_obj_t* self) {
common_hal_countio_counter_set_count(self, 0);
}

View File

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

View File

@ -0,0 +1 @@
//No countio module functions

View File

@ -57,7 +57,8 @@ bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) {
return false;
}
void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, display_chip_select_behavior_t chip_select, uint8_t *data, uint32_t data_length) {
void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type,
display_chip_select_behavior_t chip_select, const uint8_t *data, uint32_t data_length) {
}

View File

@ -0,0 +1,193 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 microDev
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "shared-bindings/frequencyio/FrequencyIn.h"
#include "py/runtime.h"
static void IRAM_ATTR pcnt_overflow_handler(void *self_in) {
frequencyio_frequencyin_obj_t * self = self_in;
// reset counter
pcnt_counter_clear(self->unit);
// increase multiplier
self->multiplier++;
// reset interrupt
PCNT.int_clr.val = BIT(self->unit);
}
static void IRAM_ATTR timer_interrupt_handler(void *self_in) {
frequencyio_frequencyin_obj_t * self = self_in;
// get counter value
int16_t count;
pcnt_get_counter_value(self->unit, &count);
self->frequency = ((count / 2.0) + (self->multiplier * INT16_MAX / 4.0)) / (self->capture_period);
// reset multiplier
self->multiplier = 0;
// reset counter
pcnt_counter_clear(self->unit);
// reset interrupt
timg_dev_t *device = self->timer.group ? &(TIMERG1) : &(TIMERG0);
if (self->timer.idx) {
device->int_clr.t1 = 1;
} else {
device->int_clr.t0 = 1;
}
device->hw_timer[self->timer.idx].config.alarm_en = 1;
}
static void init_pcnt(frequencyio_frequencyin_obj_t* self) {
// Prepare configuration for the PCNT unit
const pcnt_config_t pcnt_config = {
// Set PCNT input signal and control GPIOs
.pulse_gpio_num = self->pin,
.ctrl_gpio_num = PCNT_PIN_NOT_USED,
.channel = PCNT_CHANNEL_0,
// What to do on the positive / negative edge of pulse input?
.pos_mode = PCNT_COUNT_INC, // count both rising and falling edges
.neg_mode = PCNT_COUNT_INC,
// Set counter limit
.counter_h_lim = INT16_MAX,
.counter_l_lim = 0,
};
// initialize PCNT
const int8_t unit = peripherals_pcnt_init(pcnt_config);
if (unit == -1) {
mp_raise_RuntimeError(translate("All PCNT units in use"));
}
// set the GPIO back to high-impedance, as pcnt_unit_config sets it as pull-up
gpio_set_pull_mode(self->pin, GPIO_FLOATING);
self->unit = (pcnt_unit_t)unit;
// enable pcnt interrupt
pcnt_event_enable(self->unit, PCNT_EVT_H_LIM);
pcnt_isr_register(pcnt_overflow_handler, (void *)self, ESP_INTR_FLAG_IRAM, &self->handle);
pcnt_intr_enable(self->unit);
}
static void init_timer(frequencyio_frequencyin_obj_t* self) {
// Prepare configuration for the timer module
const timer_config_t config = {
.alarm_en = true,
.counter_en = false,
.intr_type = TIMER_INTR_LEVEL,
.counter_dir = TIMER_COUNT_UP,
.auto_reload = true,
.divider = 80 // 1 us per tick
};
// initialize Timer
peripherals_timer_init(&config, &self->timer);
if (self->timer.idx == TIMER_MAX || self->timer.group == TIMER_GROUP_MAX) {
mp_raise_RuntimeError(translate("All timers in use"));
}
timer_idx_t idx = self->timer.idx;
timer_group_t group = self->timer.group;
// enable timer interrupt
timer_set_alarm_value(group, idx, self->capture_period * 1000000);
timer_isr_register(group, idx, timer_interrupt_handler, (void *)self, ESP_INTR_FLAG_IRAM, &self->handle);
timer_enable_intr(group, idx);
// start timer
timer_start(self->timer.group, self->timer.idx);
}
void common_hal_frequencyio_frequencyin_construct(frequencyio_frequencyin_obj_t* self,
const mcu_pin_obj_t* pin, const uint16_t capture_period) {
if ((capture_period == 0) || (capture_period > 500)) {
mp_raise_ValueError(translate("Invalid capture period. Valid range: 1 - 500"));
}
self->pin = pin->number;
self->handle = NULL;
self->multiplier = 0;
self->capture_period = capture_period;
// initialize pcnt and timer
init_pcnt(self);
init_timer(self);
claim_pin(pin);
}
bool common_hal_frequencyio_frequencyin_deinited(frequencyio_frequencyin_obj_t* self) {
return self->unit == PCNT_UNIT_MAX;
}
void common_hal_frequencyio_frequencyin_deinit(frequencyio_frequencyin_obj_t* self) {
if (common_hal_frequencyio_frequencyin_deinited(self)) {
return;
}
reset_pin_number(self->pin);
peripherals_pcnt_deinit(&self->unit);
peripherals_timer_deinit(&self->timer);
if (self->handle) {
esp_intr_free(self->handle);
self->handle = NULL;
}
}
uint32_t common_hal_frequencyio_frequencyin_get_item(frequencyio_frequencyin_obj_t* self) {
return self->frequency;
}
void common_hal_frequencyio_frequencyin_pause(frequencyio_frequencyin_obj_t* self) {
pcnt_counter_pause(self->unit);
timer_pause(self->timer.group, self->timer.idx);
}
void common_hal_frequencyio_frequencyin_resume(frequencyio_frequencyin_obj_t* self) {
pcnt_counter_resume(self->unit);
timer_start(self->timer.group, self->timer.idx);
}
void common_hal_frequencyio_frequencyin_clear(frequencyio_frequencyin_obj_t* self) {
self->frequency = 0;
pcnt_counter_clear(self->unit);
timer_set_counter_value(self->timer.group, self->timer.idx, 0);
}
uint16_t common_hal_frequencyio_frequencyin_get_capture_period(frequencyio_frequencyin_obj_t *self) {
return self->capture_period;
}
void common_hal_frequencyio_frequencyin_set_capture_period(frequencyio_frequencyin_obj_t *self, uint16_t capture_period) {
if ((capture_period == 0) || (capture_period > 500)) {
mp_raise_ValueError(translate("Invalid capture period. Valid range: 1 - 500"));
}
self->capture_period = capture_period;
common_hal_frequencyio_frequencyin_clear(self);
timer_set_alarm_value(self->timer.group, self->timer.idx, capture_period * 1000000);
}

View File

@ -0,0 +1,45 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 microDev
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_FREQUENCYIO_FREQUENCYIN_H
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_FREQUENCYIO_FREQUENCYIN_H
#include "py/obj.h"
#include "peripherals/pcnt.h"
#include "peripherals/timer.h"
typedef struct {
mp_obj_base_t base;
pcnt_unit_t unit;
timer_index_t timer;
intr_handle_t handle;
uint8_t pin;
uint8_t multiplier;
uint32_t frequency;
uint16_t capture_period;
} frequencyio_frequencyin_obj_t;
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_FREQUENCYIO_FREQUENCYIN_H

View File

@ -0,0 +1 @@
// No ferquencyio module functions.

View File

@ -42,7 +42,7 @@
#include "freertos/FreeRTOS.h"
void common_hal_mcu_delay_us(uint32_t delay) {
mp_hal_delay_us(delay);
}
volatile uint32_t nesting_count = 0;
@ -85,6 +85,17 @@ const mcu_processor_obj_t common_hal_mcu_processor_obj = {
},
};
#if CIRCUITPY_WATCHDOG
// The singleton watchdog.WatchDogTimer object.
watchdog_watchdogtimer_obj_t common_hal_mcu_watchdogtimer_obj = {
.base = {
.type = &watchdog_watchdogtimer_type,
},
.timeout = 0.0f,
.mode = WATCHDOGMODE_NONE,
};
#endif
// This maps MCU pin names to pin objects.
STATIC const mp_rom_map_elem_t mcu_pin_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_GPIO0), MP_ROM_PTR(&pin_GPIO0) },

View File

@ -125,4 +125,6 @@ void common_hal_neopixel_write (const digitalio_digitalinout_obj_t* digitalinout
// Free channel again
esp32s2_peripherals_free_rmt(config.channel);
// Swap pin back to GPIO mode
gpio_set_direction(digitalinout->pin->number, GPIO_MODE_OUTPUT);
}

View File

@ -77,7 +77,9 @@ void pulsein_reset(void) {
for (size_t i = 0; i < RMT_CHANNEL_MAX; i++) {
handles[i] = NULL;
}
supervisor_disable_tick();
if (refcount != 0) {
supervisor_disable_tick();
}
refcount = 0;
}
@ -122,8 +124,10 @@ void common_hal_pulseio_pulsein_construct(pulseio_pulsein_obj_t* self, const mcu
// start RMT RX, and enable ticks so the core doesn't turn off.
rmt_rx_start(channel, true);
supervisor_enable_tick();
refcount++;
if (refcount == 1) {
supervisor_enable_tick();
}
}
bool common_hal_pulseio_pulsein_deinited(pulseio_pulsein_obj_t* self) {

View File

@ -0,0 +1,86 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 microDev
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "common-hal/rotaryio/IncrementalEncoder.h"
#include "common-hal/microcontroller/Pin.h"
#include "py/runtime.h"
#include "supervisor/shared/translate.h"
void common_hal_rotaryio_incrementalencoder_construct(rotaryio_incrementalencoder_obj_t* self,
const mcu_pin_obj_t* pin_a, const mcu_pin_obj_t* pin_b) {
claim_pin(pin_a);
claim_pin(pin_b);
// Prepare configuration for the PCNT unit
const pcnt_config_t pcnt_config = {
// Set PCNT input signal and control GPIOs
.pulse_gpio_num = pin_a->number,
.ctrl_gpio_num = pin_b->number,
.channel = PCNT_CHANNEL_0,
// What to do on the positive / negative edge of pulse input?
.pos_mode = PCNT_COUNT_DEC, // Count up on the positive edge
.neg_mode = PCNT_COUNT_INC, // Keep the counter value on the negative edge
// What to do when control input is low or high?
.lctrl_mode = PCNT_MODE_REVERSE, // Reverse counting direction if low
.hctrl_mode = PCNT_MODE_KEEP, // Keep the primary counter mode if high
};
// Initialize PCNT unit
const int8_t unit = peripherals_pcnt_init(pcnt_config);
if (unit == -1) {
mp_raise_RuntimeError(translate("All PCNT units in use"));
}
self->pin_a = pin_a->number;
self->pin_b = pin_b->number;
self->unit = (pcnt_unit_t)unit;
}
bool common_hal_rotaryio_incrementalencoder_deinited(rotaryio_incrementalencoder_obj_t* self) {
return self->unit == PCNT_UNIT_MAX;
}
void common_hal_rotaryio_incrementalencoder_deinit(rotaryio_incrementalencoder_obj_t* self) {
if (common_hal_rotaryio_incrementalencoder_deinited(self)) {
return;
}
reset_pin_number(self->pin_a);
reset_pin_number(self->pin_b);
peripherals_pcnt_deinit(&self->unit);
}
mp_int_t common_hal_rotaryio_incrementalencoder_get_position(rotaryio_incrementalencoder_obj_t* self) {
int16_t count;
pcnt_get_counter_value(self->unit, &count);
return (count/2)+self->position;
}
void common_hal_rotaryio_incrementalencoder_set_position(rotaryio_incrementalencoder_obj_t* self,
mp_int_t new_position) {
self->position = new_position;
pcnt_counter_clear(self->unit);
}

View File

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

View File

@ -0,0 +1 @@
// No rotaryio module functions.

View File

@ -79,15 +79,15 @@ mp_uint_t common_hal_socketpool_socket_send(socketpool_socket_obj_t* self, const
mp_uint_t common_hal_socketpool_socket_recv_into(socketpool_socket_obj_t* self, const uint8_t* buf, mp_uint_t len) {
size_t received = 0;
ssize_t last_read = 1;
int status = 0;
uint64_t start_ticks = supervisor_ticks_ms64();
int sockfd;
esp_err_t err = esp_tls_get_conn_sockfd(self->tcp, &sockfd);
if (err != ESP_OK) {
mp_raise_OSError(MP_EBADF);
}
while (received < len &&
last_read > 0 &&
while (received == 0 &&
status >= 0 &&
(self->timeout_ms == 0 || supervisor_ticks_ms64() - start_ticks <= self->timeout_ms) &&
!mp_hal_is_interrupted()) {
RUN_BACKGROUND_TASKS;
@ -95,27 +95,25 @@ mp_uint_t common_hal_socketpool_socket_recv_into(socketpool_socket_obj_t* self,
if (available == 0) {
// This reads the raw socket buffer and is used for non-TLS connections
// and between encrypted TLS blocks.
int status = lwip_ioctl(sockfd, FIONREAD, &available);
if (status < 0) {
last_read = status;
break;
}
status = lwip_ioctl(sockfd, FIONREAD, &available);
}
size_t remaining = len - received;
if (available > remaining) {
available = remaining;
}
if (available > 0) {
last_read = esp_tls_conn_read(self->tcp, (void*) buf + received, available);
received += last_read;
status = esp_tls_conn_read(self->tcp, (void*) buf + received, available);
if (status > 0) {
received += status;
}
}
}
if (last_read == 0) {
if (received == 0) {
// socket closed
common_hal_socketpool_socket_close(self);
}
if (last_read < 0) {
if (status < 0) {
mp_raise_BrokenPipeError();
}
return received;

View File

@ -3,7 +3,7 @@
*
* The MIT License (MIT)
*
* Copyright (c) 2016 Scott Shawcroft for Adafruit Industries
* Copyright (c) 2020 microDev
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

View File

@ -3,7 +3,7 @@
*
* The MIT License (MIT)
*
* Copyright (c) 2016 Scott Shawcroft
* Copyright (c) 2020 microDev
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

View File

@ -0,0 +1 @@
// No watchdog module functions.

View File

@ -0,0 +1,93 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 microDev
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "py/runtime.h"
#include "common-hal/watchdog/WatchDogTimer.h"
#include "shared-bindings/watchdog/__init__.h"
#include "shared-bindings/microcontroller/__init__.h"
#include "esp_task_wdt.h"
void esp_task_wdt_isr_user_handler(void) {
mp_obj_exception_clear_traceback(MP_OBJ_FROM_PTR(&mp_watchdog_timeout_exception));
MP_STATE_VM(mp_pending_exception) = &mp_watchdog_timeout_exception;
#if MICROPY_ENABLE_SCHEDULER
if (MP_STATE_VM(sched_state) == MP_SCHED_IDLE) {
MP_STATE_VM(sched_state) = MP_SCHED_PENDING;
}
#endif
}
void common_hal_watchdog_feed(watchdog_watchdogtimer_obj_t *self) {
if (esp_task_wdt_reset() != ESP_OK) {
mp_raise_RuntimeError(translate("watchdog not initialized"));
}
}
void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) {
if (esp_task_wdt_deinit() == ESP_OK) {
self->mode = WATCHDOGMODE_NONE;
}
}
void watchdog_reset(void) {
common_hal_watchdog_deinit(&common_hal_mcu_watchdogtimer_obj);
}
static void wdt_config(watchdog_watchdogtimer_obj_t *self) {
// enable panic hanler in WATCHDOGMODE_RESET mode
// initialize Task Watchdog Timer (TWDT)
if (esp_task_wdt_init((uint32_t)self->timeout, (self->mode == WATCHDOGMODE_RESET)) != ESP_OK) {
mp_raise_RuntimeError(translate("Initialization failed due to lack of memory"));
}
esp_task_wdt_add(NULL);
}
mp_float_t common_hal_watchdog_get_timeout(watchdog_watchdogtimer_obj_t *self) {
return self->timeout;
}
void common_hal_watchdog_set_timeout(watchdog_watchdogtimer_obj_t *self, mp_float_t new_timeout) {
if ((uint64_t)new_timeout > UINT32_MAX) {
mp_raise_ValueError(translate("timeout duration exceeded the maximum supported value"));
}
if ((uint32_t)self->timeout != (uint32_t)new_timeout) {
self->timeout = new_timeout;
wdt_config(self);
}
}
watchdog_watchdogmode_t common_hal_watchdog_get_mode(watchdog_watchdogtimer_obj_t *self) {
return self->mode;
}
void common_hal_watchdog_set_mode(watchdog_watchdogtimer_obj_t *self, watchdog_watchdogmode_t new_mode) {
if (self->mode != new_mode) {
self->mode = new_mode;
wdt_config(self);
}
}

View File

@ -0,0 +1,43 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 microDev
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H
#include "py/obj.h"
#include "shared-bindings/watchdog/WatchDogMode.h"
#include "shared-bindings/watchdog/WatchDogTimer.h"
struct _watchdog_watchdogtimer_obj_t {
mp_obj_base_t base;
mp_float_t timeout;
watchdog_watchdogmode_t mode;
};
// This needs to be called in order to disable the watchdog
void watchdog_reset(void);
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H

View File

@ -0,0 +1 @@
// No watchdog module functions.

View File

@ -72,6 +72,8 @@ void common_hal_wifi_radio_set_enabled(wifi_radio_obj_t *self, bool enabled) {
return;
}
if (!self->started && enabled) {
// esp_wifi_start() would default to soft-AP, thus setting it to station
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA));
ESP_ERROR_CHECK(esp_wifi_start());
self->started = true;
return;
@ -140,6 +142,13 @@ wifi_radio_error_t common_hal_wifi_radio_connect(wifi_radio_obj_t *self, uint8_t
} else {
config->sta.bssid_set = 0;
}
// If channel is 0 (default/unset) and BSSID is not given, do a full scan instead of fast scan
// This will ensure that the best AP in range is chosen automatically
if ((config->sta.bssid_set == 0) && (config->sta.channel == 0)) {
config->sta.scan_method = WIFI_ALL_CHANNEL_SCAN;
} else {
config->sta.scan_method = WIFI_FAST_SCAN;
}
esp_wifi_set_config(ESP_IF_WIFI_STA, config);
self->starting_retries = 5;
self->retries_left = 5;

View File

@ -88,14 +88,17 @@ static void event_handler(void* arg, esp_event_base_t event_base,
}
}
static bool wifi_inited;
static bool wifi_inited, wifi_ever_inited;
void common_hal_wifi_init(void) {
wifi_inited = true;
common_hal_wifi_radio_obj.base.type = &wifi_radio_type;
ESP_ERROR_CHECK(esp_netif_init());
ESP_ERROR_CHECK(esp_event_loop_create_default());
if (!wifi_ever_inited) {
ESP_ERROR_CHECK(esp_netif_init());
ESP_ERROR_CHECK(esp_event_loop_create_default());
}
wifi_ever_inited = true;
wifi_radio_obj_t* self = &common_hal_wifi_radio_obj;
self->netif = esp_netif_create_default_wifi_sta();
@ -144,7 +147,6 @@ void wifi_reset(void) {
ESP_ERROR_CHECK(esp_wifi_deinit());
esp_netif_destroy(radio->netif);
radio->netif = NULL;
ESP_ERROR_CHECK(esp_netif_deinit());
}
void ipaddress_ipaddress_to_esp_idf(mp_obj_t ip_address, ip_addr_t* esp_ip_address) {

@ -1 +1 @@
Subproject commit 8bc19ba893e5544d571a753d82b44a84799b94b1
Subproject commit d06744f5efc382c61cbad8758107cec308feef09

View File

@ -135,6 +135,7 @@ CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y
# CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set
# CONFIG_COMPILER_WARN_WRITE_STRINGS is not set
# CONFIG_COMPILER_DISABLE_GCC8_WARNINGS is not set
# CONFIG_COMPILER_DUMP_RTL_FILES is not set
# end of Compiler options
#
@ -263,6 +264,11 @@ CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP=y
# CONFIG_PM_ENABLE is not set
# end of Power Management
#
# ADC-Calibration
#
# end of ADC-Calibration
#
# Common ESP-related
#
@ -332,12 +338,13 @@ CONFIG_ESP_TIMER_IMPL_SYSTIMER=y
#
# Wi-Fi
#
CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10
CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32
CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=4
CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=8
# CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set
CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y
CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1
CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32
CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=16
CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16
# CONFIG_ESP32_WIFI_CSI_ENABLED is not set
CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y
CONFIG_ESP32_WIFI_TX_BA_WIN=6
@ -401,6 +408,7 @@ CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0
# CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set
CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y
# CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set
# CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH is not set
CONFIG_FREERTOS_DEBUG_OCDAWARE=y
# end of FreeRTOS
@ -439,7 +447,7 @@ CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y
# CONFIG_LWIP_L2_TO_L3_COPY is not set
# CONFIG_LWIP_IRAM_OPTIMIZATION is not set
CONFIG_LWIP_TIMERS_ONDEMAND=y
CONFIG_LWIP_MAX_SOCKETS=10
CONFIG_LWIP_MAX_SOCKETS=4
# CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set
# CONFIG_LWIP_SO_LINGER is not set
CONFIG_LWIP_SO_REUSE=y
@ -459,6 +467,9 @@ CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32
CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y
# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set
#
# CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH is not set
#
# DHCP server
#
@ -474,15 +485,15 @@ CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8
#
# TCP
#
CONFIG_LWIP_MAX_ACTIVE_TCP=16
CONFIG_LWIP_MAX_LISTENING_TCP=16
CONFIG_LWIP_MAX_ACTIVE_TCP=4
CONFIG_LWIP_MAX_LISTENING_TCP=4
CONFIG_LWIP_TCP_MAXRTX=12
CONFIG_LWIP_TCP_SYNMAXRTX=6
CONFIG_LWIP_TCP_MSS=1440
CONFIG_LWIP_TCP_TMR_INTERVAL=250
CONFIG_LWIP_TCP_MSL=60000
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744
CONFIG_LWIP_TCP_WND_DEFAULT=5744
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=2880
CONFIG_LWIP_TCP_WND_DEFAULT=2880
CONFIG_LWIP_TCP_RECVMBOX_SIZE=6
CONFIG_LWIP_TCP_QUEUE_OOSEQ=y
# CONFIG_LWIP_TCP_SACK_OUT is not set
@ -505,6 +516,8 @@ CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y
# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set
CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF
# CONFIG_LWIP_PPP_SUPPORT is not set
CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3
CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5
# CONFIG_LWIP_SLIP_SUPPORT is not set
#
@ -552,8 +565,10 @@ CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
# CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set
CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=y
CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=16384
CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=4096
# CONFIG_MBEDTLS_DYNAMIC_BUFFER is not set
CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=2048
CONFIG_MBEDTLS_DYNAMIC_BUFFER=y
CONFIG_MBEDTLS_DYNAMIC_FREE_PEER_CERT=y
CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA=y
# CONFIG_MBEDTLS_DEBUG is not set
#
@ -706,6 +721,7 @@ CONFIG_SPI_FLASH_YIELD_DURING_ERASE=y
CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS=20
CONFIG_SPI_FLASH_ERASE_YIELD_TICKS=1
CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=8192
# CONFIG_SPI_FLASH_SIZE_OVERRIDE is not set
#
# Auto-detect flash chips
@ -824,8 +840,8 @@ CONFIG_TCP_MAXRTX=12
CONFIG_TCP_SYNMAXRTX=6
CONFIG_TCP_MSS=1440
CONFIG_TCP_MSL=60000
CONFIG_TCP_SND_BUF_DEFAULT=5744
CONFIG_TCP_WND_DEFAULT=5744
CONFIG_TCP_SND_BUF_DEFAULT=2880
CONFIG_TCP_WND_DEFAULT=2880
CONFIG_TCP_RECVMBOX_SIZE=6
CONFIG_TCP_QUEUE_OOSEQ=y
# CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set

View File

@ -17,14 +17,15 @@ CIRCUITPY_FULL_BUILD = 1
CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_AUDIOIO = 0
CIRCUITPY_CANIO = 1
CIRCUITPY_COUNTIO = 0
CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_COUNTIO = 1
CIRCUITPY_FREQUENCYIO = 1
CIRCUITPY_I2CPERIPHERAL = 0
CIRCUITPY_ROTARYIO = 0
CIRCUITPY_ROTARYIO = 1
CIRCUITPY_NVM = 0
# We don't have enough endpoints to include MIDI.
CIRCUITPY_USB_MIDI = 0
CIRCUITPY_WIFI = 1
CIRCUITPY_WATCHDOG ?= 1
CIRCUITPY_ESPIDF = 1
ifndef CIRCUITPY_TOUCHIO_USE_NATIVE

View File

@ -0,0 +1,68 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 microDev
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "peripherals/pcnt.h"
#define PCNT_UNIT_ACTIVE 1
#define PCNT_UNIT_INACTIVE 0
static uint8_t pcnt_unit_state[4];
void peripherals_pcnt_reset(void) {
for (uint8_t i = 0; i<=3; i++) {
pcnt_unit_state[i] = PCNT_UNIT_INACTIVE;
}
}
int peripherals_pcnt_init(pcnt_config_t pcnt_config) {
// Look for available pcnt unit
for (uint8_t i = 0; i<=3; i++) {
if (pcnt_unit_state[i] == PCNT_UNIT_INACTIVE) {
pcnt_config.unit = (pcnt_unit_t)i;
pcnt_unit_state[i] = PCNT_UNIT_ACTIVE;
break;
} else if (i == 3) {
return -1;
}
}
// Initialize PCNT unit
pcnt_unit_config(&pcnt_config);
// Initialize PCNT's counter
pcnt_counter_pause(pcnt_config.unit);
pcnt_counter_clear(pcnt_config.unit);
// Everything is set up, now go to counting
pcnt_counter_resume(pcnt_config.unit);
return pcnt_config.unit;
}
void peripherals_pcnt_deinit(pcnt_unit_t* unit) {
pcnt_unit_state[*unit] = PCNT_UNIT_INACTIVE;
*unit = PCNT_UNIT_MAX;
}

View File

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

View File

@ -0,0 +1,76 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 microDev
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "peripherals/timer.h"
#define TIMER_FREE 1
#define TIMER_BUSY 0
static uint8_t timer_state[2][2];
void peripherals_timer_reset(void) {
timer_index_t timer;
for (uint8_t i = 0; i < 2; i++) {
for (uint8_t j = 0; j < 2; j++) {
if (timer_state[i][j] == TIMER_BUSY) {
timer.idx = (timer_idx_t)j;
timer.group = (timer_group_t)i;
timer_state[i][j] = TIMER_FREE;
peripherals_timer_deinit(&timer);
}
}
}
}
void peripherals_timer_init(const timer_config_t * config, timer_index_t * timer) {
bool break_loop = false;
// get free timer
for (uint8_t i = 0; i < 2; i++) {
for (uint8_t j = 0; j < 2; j++) {
if (timer_state[i][j] == TIMER_FREE) {
timer->idx = (timer_idx_t)j;
timer->group = (timer_group_t)i;
timer_state[i][j] = TIMER_BUSY;
break_loop = true;
break;
} else if (i == 1 && j == 1) {
timer->idx = TIMER_MAX;
timer->group = TIMER_GROUP_MAX;
return;
}
}
if (break_loop) {break;}
}
// initialize timer module
timer_init(timer->group, timer->idx, config);
timer_set_counter_value(timer->group, timer->idx, 0);
}
void peripherals_timer_deinit(timer_index_t * timer) {
timer_deinit(timer->group, timer->idx);
}

View File

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

View File

@ -0,0 +1,35 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2019 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_SUPERVISOR_PORT_H
#define MICROPY_INCLUDED_ESP32S2_SUPERVISOR_PORT_H
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
extern TaskHandle_t sleeping_circuitpython_task;
#endif // MICROPY_INCLUDED_ESP32S2_SUPERVISOR_PORT_H

View File

@ -30,6 +30,8 @@
#include "supervisor/port.h"
#include "boards/board.h"
#include "modules/module.h"
#include "py/runtime.h"
#include "supervisor/esp_port.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
@ -41,12 +43,15 @@
#include "common-hal/busio/UART.h"
#include "common-hal/pulseio/PulseIn.h"
#include "common-hal/pwmio/PWMOut.h"
#include "common-hal/watchdog/WatchDogTimer.h"
#include "common-hal/wifi/__init__.h"
#include "supervisor/memory.h"
#include "supervisor/shared/tick.h"
#include "shared-bindings/rtc/__init__.h"
#include "peripherals/rmt.h"
#include "peripherals/pcnt.h"
#include "peripherals/timer.h"
#include "components/heap/include/esp_heap_caps.h"
#include "components/soc/soc/esp32s2/include/soc/cache_memory.h"
@ -100,6 +105,20 @@ void reset_port(void) {
analogout_reset();
#endif
#if CIRCUITPY_BUSIO
i2c_reset();
spi_reset();
uart_reset();
#endif
#if defined(CIRCUITPY_COUNTIO) || defined(CIRCUITPY_ROTARYIO)
peripherals_pcnt_reset();
#endif
#if CIRCUITPY_FREQUENCYIO
peripherals_timer_reset();
#endif
#if CIRCUITPY_PULSEIO
esp32s2_peripherals_rmt_reset();
pulsein_reset();
@ -109,16 +128,14 @@ void reset_port(void) {
pwmout_reset();
#endif
#if CIRCUITPY_BUSIO
i2c_reset();
spi_reset();
uart_reset();
#endif
#if CIRCUITPY_RTC
rtc_reset();
#endif
#if CIRCUITPY_WATCHDOG
watchdog_reset();
#endif
#if CIRCUITPY_WIFI
wifi_reset();
#endif
@ -148,7 +165,18 @@ uint32_t *port_stack_get_limit(void) {
}
uint32_t *port_stack_get_top(void) {
return port_stack_get_limit() + CONFIG_ESP_MAIN_TASK_STACK_SIZE / (sizeof(uint32_t) / sizeof(StackType_t));
// The sizeof-arithmetic is so that the pointer arithmetic is done on units
// of uint32_t instead of units of StackType_t. StackType_t is an alias
// for a byte sized type.
//
// The main stack is bigger than CONFIG_ESP_MAIN_TASK_STACK_SIZE -- an
// "extra" size is added to it (TASK_EXTRA_STACK_SIZE). This total size is
// available as ESP_TASK_MAIN_STACK. Presumably TASK_EXTRA_STACK_SIZE is
// additional stack that can be used by the esp-idf runtime. But what's
// important for us is that some very outermost stack frames, such as
// pyexec_friendly_repl, could lie inside the "extra" area and be invisible
// to the garbage collector.
return port_stack_get_limit() + ESP_TASK_MAIN_STACK / (sizeof(uint32_t) / sizeof(StackType_t));
}
supervisor_allocation _fixed_stack;
@ -168,14 +196,14 @@ uint32_t port_get_saved_word(void) {
}
uint64_t port_get_raw_ticks(uint8_t* subticks) {
struct timeval tv_now;
gettimeofday(&tv_now, NULL);
// convert usec back to ticks
uint64_t all_subticks = (uint64_t)(tv_now.tv_usec * 2) / 71;
// Convert microseconds to subticks of 1/32768 seconds
// 32768/1000000 = 64/15625 in lowest terms
// this arithmetic overflows after 570 years
int64_t all_subticks = esp_timer_get_time() * 512 / 15625;
if (subticks != NULL) {
*subticks = all_subticks % 32;
}
return (uint64_t)tv_now.tv_sec * 1024L + all_subticks / 32;
return all_subticks / 32;
}
// Enable 1/1024 second tick.
@ -188,25 +216,28 @@ void port_disable_tick(void) {
esp_timer_stop(_tick_timer);
}
TickType_t sleep_time_set;
TickType_t sleep_time_duration;
void port_interrupt_after_ticks(uint32_t ticks) {
sleep_time_set = xTaskGetTickCount();
sleep_time_duration = ticks / portTICK_PERIOD_MS;
// esp_sleep_enable_timer_wakeup(uint64_t time_in_us)
sleep_time_duration = (ticks * 100)/1024;
sleeping_circuitpython_task = xTaskGetCurrentTaskHandle();
}
void port_sleep_until_interrupt(void) {
// FreeRTOS delay here maybe.
// Light sleep shuts down BLE and wifi.
// esp_light_sleep_start()
uint32_t NotifyValue = 0;
if (sleep_time_duration == 0) {
return;
}
vTaskDelayUntil(&sleep_time_set, sleep_time_duration);
xTaskNotifyWait(0x01,0x01,&NotifyValue,
sleep_time_duration );
if (NotifyValue == 1) {
sleeping_circuitpython_task = NULL;
mp_handle_pending();
}
}
// Wrap main in app_main that the IDF expects.
extern void main(void);
void app_main(void) {

View File

@ -52,6 +52,8 @@
StackType_t usb_device_stack[USBD_STACK_SIZE];
StaticTask_t usb_device_taskdef;
TaskHandle_t sleeping_circuitpython_task = NULL;
// USB Device Driver task
// This top level thread process all usb events and invoke callbacks
void usb_device_task(void* param)
@ -114,3 +116,23 @@ void init_usb_hardware(void) {
usb_device_stack,
&usb_device_taskdef);
}
/**
* Callback invoked when received an "wanted" char.
* @param itf Interface index (for multiple cdc interfaces)
* @param wanted_char The wanted char (set previously)
*/
void tud_cdc_rx_wanted_cb(uint8_t itf, char wanted_char)
{
(void) itf; // not used
// Workaround for using lib/utils/interrupt_char.c
// Compare mp_interrupt_char with wanted_char and ignore if not matched
if (mp_interrupt_char == wanted_char) {
tud_cdc_read_flush(); // flush read fifo
mp_keyboard_interrupt();
// CircuitPython's VM is run in a separate FreeRTOS task from TinyUSB.
// So, we must notify the other task when a CTRL-C is received.
if (sleeping_circuitpython_task != NULL) {
xTaskNotifyGive(sleeping_circuitpython_task);
}
}
}

View File

@ -57,7 +57,8 @@ bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) {
return false;
}
void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, display_chip_select_behavior_t chip_select, uint8_t *data, uint32_t data_length) {
void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type,
display_chip_select_behavior_t chip_select, const uint8_t *data, uint32_t data_length) {
}

View File

@ -0,0 +1,38 @@
/*
* 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 "boards/board.h"
void board_init(void) {
}
bool board_requests_safe_mode(void) {
return false;
}
void reset_board(void) {
}

View File

@ -0,0 +1,33 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2016 Glenn Ruben Bakke
*
*
* 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 "nrfx/hal/nrf_gpio.h"
#define MICROPY_HW_BOARD_NAME "AtelierDuMaker nRF52840 Breakout"
#define MICROPY_HW_MCU_NAME "nRF52840"
#define MICROPY_HW_LED_STATUS (&pin_P0_19)

View File

@ -0,0 +1,8 @@
USB_VID = 0x239A
USB_PID = 0x80A0
USB_PRODUCT = "ADM_B_NRF52840_1"
USB_MANUFACTURER = "AtelierDuMaker"
MCU_CHIP = nrf52840
INTERNAL_FLASH_FILESYSTEM = 1

View File

@ -0,0 +1,57 @@
#include "shared-bindings/board/__init__.h"
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_P1_10), MP_ROM_PTR(&pin_P0_02) },
{ MP_ROM_QSTR(MP_QSTR_P1_11), MP_ROM_PTR(&pin_P1_11) },
{ MP_ROM_QSTR(MP_QSTR_P1_13), MP_ROM_PTR(&pin_P1_13) },
{ MP_ROM_QSTR(MP_QSTR_P1_15), MP_ROM_PTR(&pin_P1_15) },
{ MP_ROM_QSTR(MP_QSTR_P0_03), MP_ROM_PTR(&pin_P0_03) },
{ MP_ROM_QSTR(MP_QSTR_P0_02), MP_ROM_PTR(&pin_P0_02) },
{ MP_ROM_QSTR(MP_QSTR_P0_28), MP_ROM_PTR(&pin_P0_28) },
{ MP_ROM_QSTR(MP_QSTR_P0_29), MP_ROM_PTR(&pin_P0_29) },
{ MP_ROM_QSTR(MP_QSTR_P0_30), MP_ROM_PTR(&pin_P0_30) },
{ MP_ROM_QSTR(MP_QSTR_P0_31), MP_ROM_PTR(&pin_P0_31) },
{ MP_ROM_QSTR(MP_QSTR_P0_04), MP_ROM_PTR(&pin_P0_04) },
{ MP_ROM_QSTR(MP_QSTR_P0_05), MP_ROM_PTR(&pin_P0_05) },
{ MP_ROM_QSTR(MP_QSTR_P1_14), MP_ROM_PTR(&pin_P1_14) },
{ MP_ROM_QSTR(MP_QSTR_P1_12), MP_ROM_PTR(&pin_P1_12) },
{ MP_ROM_QSTR(MP_QSTR_P0_25), MP_ROM_PTR(&pin_P0_25) },
{ MP_ROM_QSTR(MP_QSTR_P0_11), MP_ROM_PTR(&pin_P0_11) },
{ MP_ROM_QSTR(MP_QSTR_P1_08), MP_ROM_PTR(&pin_P1_08) },
{ MP_ROM_QSTR(MP_QSTR_P0_27), MP_ROM_PTR(&pin_P0_28) },
{ MP_ROM_QSTR(MP_QSTR_P0_08), MP_ROM_PTR(&pin_P0_08) },
{ MP_ROM_QSTR(MP_QSTR_P0_06), MP_ROM_PTR(&pin_P0_06) },
{ MP_ROM_QSTR(MP_QSTR_P0_26), MP_ROM_PTR(&pin_P0_26) },
{ MP_ROM_QSTR(MP_QSTR_P0_10), MP_ROM_PTR(&pin_P0_10) },
{ MP_ROM_QSTR(MP_QSTR_P0_09), MP_ROM_PTR(&pin_P0_09) },
{ MP_ROM_QSTR(MP_QSTR_P1_06), MP_ROM_PTR(&pin_P1_06) },
{ MP_ROM_QSTR(MP_QSTR_P1_04), MP_ROM_PTR(&pin_P1_04) },
{ MP_ROM_QSTR(MP_QSTR_P1_02), MP_ROM_PTR(&pin_P1_02) },
{ MP_ROM_QSTR(MP_QSTR_P1_01), MP_ROM_PTR(&pin_P1_01) },
{ MP_ROM_QSTR(MP_QSTR_P1_03), MP_ROM_PTR(&pin_P1_03) },
{ MP_ROM_QSTR(MP_QSTR_P1_00), MP_ROM_PTR(&pin_P1_00) },
{ MP_ROM_QSTR(MP_QSTR_P0_22), MP_ROM_PTR(&pin_P0_22) },
{ MP_ROM_QSTR(MP_QSTR_P1_07), MP_ROM_PTR(&pin_P1_07) },
{ MP_ROM_QSTR(MP_QSTR_P1_05), MP_ROM_PTR(&pin_P1_05) },
{ MP_ROM_QSTR(MP_QSTR_P0_24), MP_ROM_PTR(&pin_P0_24) },
{ MP_ROM_QSTR(MP_QSTR_P0_20), MP_ROM_PTR(&pin_P0_20) },
{ MP_ROM_QSTR(MP_QSTR_P0_17), MP_ROM_PTR(&pin_P0_17) },
{ MP_ROM_QSTR(MP_QSTR_P0_15), MP_ROM_PTR(&pin_P0_15) },
{ MP_ROM_QSTR(MP_QSTR_P0_14), MP_ROM_PTR(&pin_P0_14) },
{ MP_ROM_QSTR(MP_QSTR_P0_13), MP_ROM_PTR(&pin_P0_13) },
{ MP_ROM_QSTR(MP_QSTR_P0_16), MP_ROM_PTR(&pin_P0_16) },
{ MP_ROM_QSTR(MP_QSTR_P0_07), MP_ROM_PTR(&pin_P0_07) },
{ MP_ROM_QSTR(MP_QSTR_P1_09), MP_ROM_PTR(&pin_P1_09) },
{ MP_ROM_QSTR(MP_QSTR_P0_12), MP_ROM_PTR(&pin_P0_12) },
{ MP_ROM_QSTR(MP_QSTR_P0_23), MP_ROM_PTR(&pin_P0_23) },
{ MP_ROM_QSTR(MP_QSTR_P0_21), MP_ROM_PTR(&pin_P0_21) },
{ MP_ROM_QSTR(MP_QSTR_P0_19), MP_ROM_PTR(&pin_P0_19) },
// RESET { MP_ROM_QSTR(MP_QSTR_P0_18), MP_ROM_PTR(&pin_P0_18) }
};
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);

View File

@ -109,10 +109,10 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_P0_27) },
{ MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_P0_27) },
{ MP_ROM_QSTR(MP_QSTR_P27), MP_ROM_PTR(&pin_P1_14) },
{ MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_P1_14) },
{ MP_ROM_QSTR(MP_QSTR_TFT_RESET), MP_ROM_PTR(&pin_P1_14) },
{ MP_ROM_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_P1_14) },
{ MP_ROM_QSTR(MP_QSTR_P27), MP_ROM_PTR(&pin_P1_13) },
{ MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_P1_13) },
//{ MP_ROM_QSTR(MP_QSTR_TFT_RESET), MP_ROM_PTR(&pin_P1_13) },
{ MP_ROM_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_P1_13) },
// P28~P33/D28~D33 connecte into QSPI FlashROM (W25Q16JV_IQ)

View File

@ -141,7 +141,8 @@ bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) {
}
// This ignores chip_select behaviour because data is clocked in by the write line toggling.
void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, display_chip_select_behavior_t chip_select, uint8_t *data, uint32_t data_length) {
void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type,
display_chip_select_behavior_t chip_select, const uint8_t *data, uint32_t data_length) {
displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj);
common_hal_digitalio_digitalinout_set_value(&self->command, byte_type == DISPLAY_DATA);
uint32_t* clear_write = (uint32_t*) &self->write_group->OUTCLR;

View File

@ -93,6 +93,9 @@ void common_hal_watchdog_feed(watchdog_watchdogtimer_obj_t *self) {
}
void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) {
if (self->mode == WATCHDOGMODE_RESET) {
mp_raise_NotImplementedError(translate("WatchDogTimer cannot be deinitialized once mode is set to RESET"));
}
if (timer) {
timer_free();
}

Some files were not shown because too many files have changed in this diff Show More