merge from adafruit/circuitpython
This commit is contained in:
commit
2a75196aa3
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@ -84,6 +84,7 @@ jobs:
|
||||
- "circuitplayground_express"
|
||||
- "circuitplayground_express_crickit"
|
||||
- "circuitplayground_express_displayio"
|
||||
- "clue_nrf52840_express"
|
||||
- "cp32-m4"
|
||||
- "datalore_ip_m4"
|
||||
- "datum_distance"
|
||||
@ -101,6 +102,8 @@ jobs:
|
||||
- "feather_m0_rfm9x"
|
||||
- "feather_m0_supersized"
|
||||
- "feather_m4_express"
|
||||
- "feather_mimxrt1011"
|
||||
- "feather_mimxrt1062"
|
||||
- "feather_nrf52840_express"
|
||||
- "feather_radiofruit_zigbee"
|
||||
- "feather_stm32f405_express"
|
||||
@ -108,6 +111,7 @@ jobs:
|
||||
- "grandcentral_m4_express"
|
||||
- "hallowing_m0_express"
|
||||
- "hallowing_m4_express"
|
||||
- "imxrt1010_evk"
|
||||
- "itsybitsy_m0_express"
|
||||
- "itsybitsy_m4_express"
|
||||
- "itsybitsy_nrf52840_express"
|
||||
@ -155,12 +159,15 @@ jobs:
|
||||
- "stm32f411ve_discovery"
|
||||
- "stm32f412zg_discovery"
|
||||
- "stringcar_m0_express"
|
||||
- "teknikio_bluebird"
|
||||
- "trellis_m4_express"
|
||||
- "trinket_m0"
|
||||
- "trinket_m0_haxpress"
|
||||
- "uchip"
|
||||
- "ugame10"
|
||||
- "winterbloom_sol"
|
||||
- "xinabox_cc03"
|
||||
- "xinabox_cs11"
|
||||
|
||||
steps:
|
||||
- name: Set up Python 3.5
|
||||
@ -171,7 +178,7 @@ jobs:
|
||||
run: |
|
||||
sudo apt-get install -y gettext
|
||||
pip install requests sh click setuptools awscli
|
||||
wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/RC2.1/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2
|
||||
wget https://adafruit-circuit-python.s3.amazonaws.com/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2
|
||||
sudo tar -C /usr --strip-components=1 -xaf gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2
|
||||
- name: Versions
|
||||
run: |
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -65,6 +65,8 @@ TAGS
|
||||
*~
|
||||
|
||||
*.DS_Store
|
||||
**/*.DS_Store
|
||||
*.icloud
|
||||
|
||||
# POEdit mo files
|
||||
####################
|
||||
|
6
.gitmodules
vendored
6
.gitmodules
vendored
@ -102,6 +102,12 @@
|
||||
[submodule "ports/cxd56/spresense-exported-sdk"]
|
||||
path = ports/cxd56/spresense-exported-sdk
|
||||
url = https://github.com/sonydevworld/spresense-exported-sdk.git
|
||||
[submodule "frozen/Adafruit_CircuitPython_SD"]
|
||||
path = frozen/Adafruit_CircuitPython_SD
|
||||
url = https://github.com/adafruit/Adafruit_CircuitPython_SD.git
|
||||
[submodule "lib/mp3"]
|
||||
path = lib/mp3
|
||||
url = https://github.com/adafruit/Adafruit_MP3
|
||||
[submodule "ports/mimxrt10xx/sdk"]
|
||||
path = ports/mimxrt10xx/sdk
|
||||
url = https://github.com/arturo182/MIMXRT10xx_SDK
|
||||
|
82
BUILDING.md
Normal file
82
BUILDING.md
Normal file
@ -0,0 +1,82 @@
|
||||
|
||||
# Building CircuitPython
|
||||
|
||||
Welcome to CircuitPython!
|
||||
|
||||
This document is a quick-start guide only.
|
||||
|
||||
Detailed guides on how to build CircuitPython can be found in the Adafruit Learn system at
|
||||
https://learn.adafruit.com/building-circuitpython/
|
||||
|
||||
## Setup
|
||||
|
||||
Please ensure you setup your build environment appropriately, as per the guide. You will need:
|
||||
|
||||
* Linux: https://learn.adafruit.com/building-circuitpython/linux
|
||||
* MacOS: https://learn.adafruit.com/building-circuitpython/macos
|
||||
* Windows Subsystem for Linux (WSL): https://learn.adafruit.com/building-circuitpython/windows-subsystem-for-linux
|
||||
|
||||
### Submodules
|
||||
|
||||
This project has a bunch of git submodules. You will need to update them regularly.
|
||||
|
||||
git submodule sync
|
||||
git submodule update --init
|
||||
|
||||
### mpy-cross
|
||||
|
||||
As part of the build process, mpy-cross is needed to compile .py files into .mpy files.
|
||||
To compile (or recompile) mpy-cross:
|
||||
|
||||
make -C mpy-cross
|
||||
|
||||
# Building
|
||||
|
||||
There a number of ports of CircuitPython! To build for your board, change to the appropriate ports directory and build.
|
||||
|
||||
Examples:
|
||||
|
||||
cd ports/atmel-samd
|
||||
make BOARD=circuitplayground_express
|
||||
|
||||
cd ports/nrf
|
||||
make BOARD=circuitplayground_bluefruit
|
||||
|
||||
If you aren't sure what boards exist, have a peek in the boards subdirectory of your port.
|
||||
If you have a fast computer with many cores, consider adding `-j` to your build flags, such as `-j17` on
|
||||
a 6-core 12-thread machine.
|
||||
|
||||
# Testing
|
||||
|
||||
If you are working on changes to the core language, you might find it useful to run the test suite.
|
||||
The test suite in the top level `tests` directory. It needs the unix port to run.
|
||||
|
||||
cd ports/unix
|
||||
make axtls
|
||||
make micropython
|
||||
|
||||
Then you can run the test suite:
|
||||
|
||||
cd ../../tests
|
||||
./run-tests
|
||||
|
||||
A successful run will say something like
|
||||
|
||||
676 tests performed (19129 individual testcases)
|
||||
676 tests passed
|
||||
30 tests skipped: buffered_writer builtin_help builtin_range_binop class_delattr_setattr cmd_parsetree extra_coverage framebuf1 framebuf16 framebuf2 framebuf4 framebuf8 framebuf_subclass mpy_invalid namedtuple_asdict non_compliant resource_stream schedule sys_getsizeof urandom_extra ure_groups ure_span ure_sub ure_sub_unmatched vfs_basic vfs_fat_fileio1 vfs_fat_fileio2 vfs_fat_more vfs_fat_oldproto vfs_fat_ramdisk vfs_userfs
|
||||
|
||||
# Debugging
|
||||
|
||||
The easiest way to debug CircuitPython on hardware is with a JLink device, JLinkGDBServer, and an appropriate GDB.
|
||||
Instructions can be found at https://learn.adafruit.com/debugging-the-samd21-with-gdb
|
||||
|
||||
If using JLink, you'll need both the `JLinkGDBServer` and `arm-none-eabi-gdb` running.
|
||||
|
||||
Example:
|
||||
|
||||
JLinkGDBServer -if SWD -device ATSAMD51J19
|
||||
arm-none-eabi-gdb build-metro_m4_express/firmware.elf -iex "target extended-remote :2331"
|
||||
|
||||
If your port/build includes `arm-none-eabi-gdb-py`, consider using it instead, as it can be used for better register
|
||||
debugging with https://github.com/bnahill/PyCortexMDebug
|
2
conf.py
2
conf.py
@ -131,6 +131,8 @@ exclude_patterns = ["**/build*",
|
||||
"ports/esp8266/common-hal",
|
||||
"ports/esp8266/modules",
|
||||
"ports/minimal",
|
||||
"ports/mimxrt10xx/peripherals",
|
||||
"ports/mimxrt10xx/sdk",
|
||||
"ports/nrf/device",
|
||||
"ports/nrf/bluetooth",
|
||||
"ports/nrf/modules",
|
||||
|
@ -43,6 +43,7 @@ Full Table of Contents
|
||||
|
||||
../README
|
||||
../CONTRIBUTING
|
||||
../BUILDING
|
||||
../CODE_OF_CONDUCT
|
||||
../license.rst
|
||||
|
||||
|
@ -26,7 +26,7 @@ import os
|
||||
import re
|
||||
|
||||
|
||||
SUPPORTED_PORTS = ["atmel-samd", "nrf"]
|
||||
SUPPORTED_PORTS = ["atmel-samd", "nrf", "mimxrt10xx"]
|
||||
|
||||
|
||||
def parse_port_config(contents, chip_keyword=None):
|
||||
|
@ -8,6 +8,7 @@ and ESP8266.
|
||||
:maxdepth: 2
|
||||
|
||||
../ports/atmel-samd/README
|
||||
../ports/mimxrt10xx/README
|
||||
../ports/nrf/README
|
||||
../ports/stm32f4/README
|
||||
../ports/cxd56/README
|
||||
|
@ -247,7 +247,7 @@ STATIC mp_obj_t btree_iternext(mp_obj_t self_in) {
|
||||
}
|
||||
|
||||
STATIC mp_obj_t btree_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) {
|
||||
mp_obj_btree_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
mp_obj_btree_t *self = mp_instance_cast_to_native_base(self_in, &btree_type);
|
||||
if (value == MP_OBJ_NULL) {
|
||||
// delete
|
||||
DBT key;
|
||||
|
@ -518,8 +518,8 @@ STATIC void uctypes_struct_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) {
|
||||
}
|
||||
}
|
||||
|
||||
STATIC mp_obj_t uctypes_struct_subscr(mp_obj_t self_in, mp_obj_t index_in, mp_obj_t value) {
|
||||
mp_obj_uctypes_struct_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
STATIC mp_obj_t uctypes_struct_subscr(mp_obj_t base_in, mp_obj_t index_in, mp_obj_t value) {
|
||||
mp_obj_uctypes_struct_t *self = mp_instance_cast_to_native_base(base_in, &uctypes_struct_type);
|
||||
|
||||
if (value == MP_OBJ_NULL) {
|
||||
// delete
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 52d87bd7e571af66ecb57ee32b5af92531134150
|
||||
Subproject commit 805d41a021c70df7609da772a6f6131810e5d6ba
|
@ -1 +1 @@
|
||||
Subproject commit d87ea261c40ecbc6d893d72d337beefbea1cf932
|
||||
Subproject commit 82ba9e40dfff41fdc0541636afde4936c930d86c
|
@ -1 +1 @@
|
||||
Subproject commit a6100fb5d867c7f4980f071119bfa7e0a76e1d47
|
||||
Subproject commit 5534662902a223ac8562e6f999d6359e4c17dab1
|
@ -1 +1 @@
|
||||
Subproject commit 409e90902ac49720c4add985e8e1a1660bbe63a0
|
||||
Subproject commit 01e89a8437c78b62d4d655c745ded57e26dc747a
|
@ -1 +1 @@
|
||||
Subproject commit 89faee0eb08a6855e14f117c514fecf2dd90769d
|
||||
Subproject commit 2d1dce6ad6ca7e091fd8b5c3f102693c24af8b88
|
@ -1 +1 @@
|
||||
Subproject commit ddc74844983b35b027bd45091c7b8bb3c8d7a2d1
|
||||
Subproject commit f69fc9b47fa25ba1414eb3d5c82f05013280c0d2
|
@ -1 +1 @@
|
||||
Subproject commit c0bdd8b10383725ee9293f5d88fb8d47eb1272bd
|
||||
Subproject commit ff99d55115f81899902c2c4a84fdfbea9ae83823
|
1
frozen/Adafruit_CircuitPython_SD
Submodule
1
frozen/Adafruit_CircuitPython_SD
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit dd0fe8530a2dcc64ac95bb3e116af2158dcd7cd2
|
@ -1 +1 @@
|
||||
Subproject commit c1d8e1d645cbc83d857e12cf4ba67549b988a4e7
|
||||
Subproject commit 8d5cc384058b1cb296aaeab86fb8405042d547ed
|
2
lib/mp3
2
lib/mp3
@ -1 +1 @@
|
||||
Subproject commit 2a3cc7873b5c642d4bb60043dc14d2555e3377a5
|
||||
Subproject commit c3c664bf4db6a36d11808dfcbb5dbf7cff1715b8
|
@ -1 +1 @@
|
||||
Subproject commit e413c9efa303d70de019a91aa415384fe80ca78f
|
||||
Subproject commit dda4c9a94b509238faa7b5ab5b9464c1d2e63ff0
|
50
locale/ID.po
50
locale/ID.po
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-12-12 15:33-0800\n"
|
||||
"POT-Creation-Date: 2020-01-07 14:31-0800\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"
|
||||
@ -66,7 +66,8 @@ msgid "%q indices must be integers, not %s"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/displayio/Group.c shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
#, fuzzy
|
||||
msgid "%q must be >= 1"
|
||||
msgstr "buffers harus mempunyai panjang yang sama"
|
||||
@ -377,6 +378,10 @@ msgstr ""
|
||||
msgid "Buffer must be at least length 1"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Buffer too large and unable to allocate"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
|
||||
#: ports/nrf/common-hal/displayio/ParallelBus.c
|
||||
#, fuzzy, c-format
|
||||
@ -396,11 +401,6 @@ msgstr ""
|
||||
msgid "Call super().__init__() before accessing native object."
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, c-format
|
||||
msgid "Can not use dotstar with %s"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "Can't set CCCD on local Characteristic"
|
||||
msgstr ""
|
||||
@ -601,10 +601,14 @@ msgid "Expected a %q"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/Descriptor.c
|
||||
#: shared-bindings/_bleio/Descriptor.c shared-bindings/_bleio/PacketBuffer.c
|
||||
msgid "Expected a Characteristic"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/__init__.c
|
||||
msgid "Expected a PixelBuf instance"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/Characteristic.c
|
||||
msgid "Expected a Service"
|
||||
msgstr ""
|
||||
@ -745,6 +749,10 @@ msgstr ""
|
||||
msgid "Invalid buffer size"
|
||||
msgstr "Ukuran buffer tidak valid"
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Invalid byteorder string"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
|
||||
msgid "Invalid capture period. Valid range: 1 - 500"
|
||||
msgstr ""
|
||||
@ -872,6 +880,10 @@ msgstr ""
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Negative step not supported"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "No CCCD for this Characteristic"
|
||||
msgstr ""
|
||||
@ -971,10 +983,6 @@ msgid ""
|
||||
"%d bpp given"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Only slices with step=1 (aka None) are supported"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/audiobusio/PDMIn.c
|
||||
msgid "Oversample must be multiple of 8."
|
||||
msgstr ""
|
||||
@ -1079,7 +1087,6 @@ msgid "Sample rate must be positive"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
|
||||
#, c-format
|
||||
msgid "Sample rate too high. It must be less than %d"
|
||||
msgstr "Nilai sampel terlalu tinggi. Nilai harus kurang dari %d"
|
||||
@ -1323,6 +1330,10 @@ msgstr ""
|
||||
"\n"
|
||||
"Untuk menampilkan modul built-in silahkan ketik `help(\"modules\")`.\n"
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Writes not supported on Characteristic"
|
||||
msgstr ""
|
||||
|
||||
#: supervisor/shared/safe_mode.c
|
||||
msgid "You are in safe mode: something unanticipated happened.\n"
|
||||
msgstr ""
|
||||
@ -1462,8 +1473,7 @@ msgid "byte code not implemented"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, c-format
|
||||
msgid "byteorder is not an instance of ByteOrder (got a %s)"
|
||||
msgid "byteorder is not a string"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c
|
||||
@ -2143,7 +2153,7 @@ msgstr "tidak ada modul yang bernama '%q'"
|
||||
msgid "no reset pin available"
|
||||
msgstr ""
|
||||
|
||||
#: py/runtime.c shared-bindings/_pixelbuf/__init__.c
|
||||
#: py/runtime.c
|
||||
msgid "no such attribute"
|
||||
msgstr ""
|
||||
|
||||
@ -2325,10 +2335,6 @@ msgstr "antrian meluap (overflow)"
|
||||
msgid "rawbuf is not the same size as buf"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/__init__.c
|
||||
msgid "readonly attribute"
|
||||
msgstr ""
|
||||
|
||||
#: py/builtinimport.c
|
||||
msgid "relative import"
|
||||
msgstr "relative import"
|
||||
@ -2631,10 +2637,6 @@ msgstr ""
|
||||
msgid "window must be <= interval"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "write_args must be a list, tuple, or None"
|
||||
msgstr ""
|
||||
|
||||
#: py/objstr.c
|
||||
msgid "wrong number of arguments"
|
||||
msgstr ""
|
||||
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-12-12 15:33-0800\n"
|
||||
"POT-Creation-Date: 2020-01-07 14:31-0800\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"
|
||||
@ -66,7 +66,8 @@ msgid "%q indices must be integers, not %s"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/displayio/Group.c shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
msgid "%q must be >= 1"
|
||||
msgstr ""
|
||||
|
||||
@ -373,6 +374,10 @@ msgstr ""
|
||||
msgid "Buffer must be at least length 1"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Buffer too large and unable to allocate"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
|
||||
#: ports/nrf/common-hal/displayio/ParallelBus.c
|
||||
#, c-format
|
||||
@ -391,11 +396,6 @@ msgstr ""
|
||||
msgid "Call super().__init__() before accessing native object."
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, c-format
|
||||
msgid "Can not use dotstar with %s"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "Can't set CCCD on local Characteristic"
|
||||
msgstr ""
|
||||
@ -590,10 +590,14 @@ msgid "Expected a %q"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/Descriptor.c
|
||||
#: shared-bindings/_bleio/Descriptor.c shared-bindings/_bleio/PacketBuffer.c
|
||||
msgid "Expected a Characteristic"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/__init__.c
|
||||
msgid "Expected a PixelBuf instance"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/Characteristic.c
|
||||
msgid "Expected a Service"
|
||||
msgstr ""
|
||||
@ -734,6 +738,10 @@ msgstr ""
|
||||
msgid "Invalid buffer size"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Invalid byteorder string"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
|
||||
msgid "Invalid capture period. Valid range: 1 - 500"
|
||||
msgstr ""
|
||||
@ -861,6 +869,10 @@ msgstr ""
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Negative step not supported"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "No CCCD for this Characteristic"
|
||||
msgstr ""
|
||||
@ -959,10 +971,6 @@ msgid ""
|
||||
"%d bpp given"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Only slices with step=1 (aka None) are supported"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/audiobusio/PDMIn.c
|
||||
msgid "Oversample must be multiple of 8."
|
||||
msgstr ""
|
||||
@ -1063,7 +1071,6 @@ msgid "Sample rate must be positive"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
|
||||
#, c-format
|
||||
msgid "Sample rate too high. It must be less than %d"
|
||||
msgstr ""
|
||||
@ -1300,6 +1307,10 @@ msgid ""
|
||||
"To list built-in modules please do `help(\"modules\")`.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Writes not supported on Characteristic"
|
||||
msgstr ""
|
||||
|
||||
#: supervisor/shared/safe_mode.c
|
||||
msgid "You are in safe mode: something unanticipated happened.\n"
|
||||
msgstr ""
|
||||
@ -1438,8 +1449,7 @@ msgid "byte code not implemented"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, c-format
|
||||
msgid "byteorder is not an instance of ByteOrder (got a %s)"
|
||||
msgid "byteorder is not a string"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c
|
||||
@ -2119,7 +2129,7 @@ msgstr ""
|
||||
msgid "no reset pin available"
|
||||
msgstr ""
|
||||
|
||||
#: py/runtime.c shared-bindings/_pixelbuf/__init__.c
|
||||
#: py/runtime.c
|
||||
msgid "no such attribute"
|
||||
msgstr ""
|
||||
|
||||
@ -2300,10 +2310,6 @@ msgstr ""
|
||||
msgid "rawbuf is not the same size as buf"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/__init__.c
|
||||
msgid "readonly attribute"
|
||||
msgstr ""
|
||||
|
||||
#: py/builtinimport.c
|
||||
msgid "relative import"
|
||||
msgstr ""
|
||||
@ -2605,10 +2611,6 @@ msgstr ""
|
||||
msgid "window must be <= interval"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "write_args must be a list, tuple, or None"
|
||||
msgstr ""
|
||||
|
||||
#: py/objstr.c
|
||||
msgid "wrong number of arguments"
|
||||
msgstr ""
|
||||
|
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-12-12 15:33-0800\n"
|
||||
"POT-Creation-Date: 2020-01-07 14:31-0800\n"
|
||||
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
|
||||
"Last-Translator: Pascal Deneaux\n"
|
||||
"Language-Team: Sebastian Plamauer, Pascal Deneaux\n"
|
||||
@ -68,7 +68,8 @@ msgid "%q indices must be integers, not %s"
|
||||
msgstr "%q Indizes müssen ganze Zahlen sein, nicht %s"
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/displayio/Group.c shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
msgid "%q must be >= 1"
|
||||
msgstr "%q muss >= 1 sein"
|
||||
|
||||
@ -377,6 +378,10 @@ msgstr "Die Pufferlänge %d ist zu groß. Sie muss kleiner als %d sein."
|
||||
msgid "Buffer must be at least length 1"
|
||||
msgstr "Der Puffer muss eine Mindestenslänge von 1 haben"
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Buffer too large and unable to allocate"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
|
||||
#: ports/nrf/common-hal/displayio/ParallelBus.c
|
||||
#, c-format
|
||||
@ -395,11 +400,6 @@ msgstr "Ein Bytes kann nur Werte zwischen 0 und 255 annehmen."
|
||||
msgid "Call super().__init__() before accessing native object."
|
||||
msgstr "Rufe super().__init__() vor dem Zugriff auf ein natives Objekt auf."
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, c-format
|
||||
msgid "Can not use dotstar with %s"
|
||||
msgstr "Kann dotstar nicht mit %s verwenden"
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "Can't set CCCD on local Characteristic"
|
||||
msgstr ""
|
||||
@ -594,10 +594,14 @@ msgid "Expected a %q"
|
||||
msgstr "Erwartet ein(e) %q"
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/Descriptor.c
|
||||
#: shared-bindings/_bleio/Descriptor.c shared-bindings/_bleio/PacketBuffer.c
|
||||
msgid "Expected a Characteristic"
|
||||
msgstr "Characteristic wird erwartet"
|
||||
|
||||
#: shared-bindings/_pixelbuf/__init__.c
|
||||
msgid "Expected a PixelBuf instance"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/Characteristic.c
|
||||
msgid "Expected a Service"
|
||||
msgstr "Ein Service wird erwartet"
|
||||
@ -742,6 +746,10 @@ msgstr "Ungültige Bits pro Wert"
|
||||
msgid "Invalid buffer size"
|
||||
msgstr "Ungültige Puffergröße"
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Invalid byteorder string"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
|
||||
msgid "Invalid capture period. Valid range: 1 - 500"
|
||||
msgstr "Ungültiger Aufnahmezeitraum. Gültiger Bereich: 1 - 500"
|
||||
@ -870,6 +878,10 @@ msgstr ""
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr "Muss eine %q Unterklasse sein."
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Negative step not supported"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "No CCCD for this Characteristic"
|
||||
msgstr "Kein CCCD für diese Charakteristik"
|
||||
@ -974,10 +986,6 @@ msgstr ""
|
||||
"Nur monochrome, indizierte 4bpp oder 8bpp, und 16bpp oder größere BMPs "
|
||||
"unterstützt: %d bpp wurden gegeben"
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Only slices with step=1 (aka None) are supported"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/audiobusio/PDMIn.c
|
||||
msgid "Oversample must be multiple of 8."
|
||||
msgstr "Oversample muss ein Vielfaches von 8 sein."
|
||||
@ -1080,7 +1088,6 @@ msgid "Sample rate must be positive"
|
||||
msgstr "Abtastrate muss positiv sein"
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
|
||||
#, c-format
|
||||
msgid "Sample rate too high. It must be less than %d"
|
||||
msgstr "Abtastrate zu hoch. Wert muss unter %d liegen"
|
||||
@ -1328,6 +1335,10 @@ msgstr ""
|
||||
"Um die integrierten Module aufzulisten, führe bitte `help(\"modules\")` "
|
||||
"aus.\n"
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Writes not supported on Characteristic"
|
||||
msgstr ""
|
||||
|
||||
#: supervisor/shared/safe_mode.c
|
||||
msgid "You are in safe mode: something unanticipated happened.\n"
|
||||
msgstr ""
|
||||
@ -1466,9 +1477,8 @@ msgid "byte code not implemented"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, c-format
|
||||
msgid "byteorder is not an instance of ByteOrder (got a %s)"
|
||||
msgstr "byteorder ist keine Instanz von ByteOrder (%s erhalten)"
|
||||
msgid "byteorder is not a string"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c
|
||||
msgid "bytes > 8 bits not supported"
|
||||
@ -2155,7 +2165,7 @@ msgstr "Kein Modul mit dem Namen '%q'"
|
||||
msgid "no reset pin available"
|
||||
msgstr "kein Reset Pin verfügbar"
|
||||
|
||||
#: py/runtime.c shared-bindings/_pixelbuf/__init__.c
|
||||
#: py/runtime.c
|
||||
msgid "no such attribute"
|
||||
msgstr "kein solches Attribut"
|
||||
|
||||
@ -2338,10 +2348,6 @@ msgstr "Warteschlangenüberlauf"
|
||||
msgid "rawbuf is not the same size as buf"
|
||||
msgstr "rawbuf hat nicht die gleiche Größe wie buf"
|
||||
|
||||
#: shared-bindings/_pixelbuf/__init__.c
|
||||
msgid "readonly attribute"
|
||||
msgstr "Readonly-Attribut"
|
||||
|
||||
#: py/builtinimport.c
|
||||
msgid "relative import"
|
||||
msgstr "relativer Import"
|
||||
@ -2650,10 +2656,6 @@ msgstr "value_count muss größer als 0 sein"
|
||||
msgid "window must be <= interval"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "write_args must be a list, tuple, or None"
|
||||
msgstr "write_args muss eine Liste, ein Tupel oder None sein"
|
||||
|
||||
#: py/objstr.c
|
||||
msgid "wrong number of arguments"
|
||||
msgstr "falsche Anzahl an Argumenten"
|
||||
@ -2687,6 +2689,10 @@ msgstr ""
|
||||
#~ msgid "C-level assert"
|
||||
#~ msgstr "C-Level Assert"
|
||||
|
||||
#, c-format
|
||||
#~ msgid "Can not use dotstar with %s"
|
||||
#~ msgstr "Kann dotstar nicht mit %s verwenden"
|
||||
|
||||
#~ msgid "Can't add services in Central mode"
|
||||
#~ msgstr "Im Central mode können Dienste nicht hinzugefügt werden"
|
||||
|
||||
@ -2991,6 +2997,10 @@ msgstr ""
|
||||
#~ msgid "buffer too long"
|
||||
#~ msgstr "Buffer zu lang"
|
||||
|
||||
#, c-format
|
||||
#~ msgid "byteorder is not an instance of ByteOrder (got a %s)"
|
||||
#~ msgstr "byteorder ist keine Instanz von ByteOrder (%s erhalten)"
|
||||
|
||||
#~ msgid "expected a DigitalInOut"
|
||||
#~ msgstr "erwarte DigitalInOut"
|
||||
|
||||
@ -3043,6 +3053,9 @@ msgstr ""
|
||||
#~ msgid "pin does not have IRQ capabilities"
|
||||
#~ msgstr "Pin hat keine IRQ Fähigkeiten"
|
||||
|
||||
#~ msgid "readonly attribute"
|
||||
#~ msgstr "Readonly-Attribut"
|
||||
|
||||
#~ msgid "scan failed"
|
||||
#~ msgstr "Scan fehlgeschlagen"
|
||||
|
||||
@ -3054,3 +3067,6 @@ msgstr ""
|
||||
|
||||
#~ msgid "wifi_set_ip_info() failed"
|
||||
#~ msgstr "wifi_set_ip_info() fehlgeschlagen"
|
||||
|
||||
#~ msgid "write_args must be a list, tuple, or None"
|
||||
#~ msgstr "write_args muss eine Liste, ein Tupel oder None sein"
|
||||
|
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-12-12 15:33-0800\n"
|
||||
"POT-Creation-Date: 2020-01-07 14:31-0800\n"
|
||||
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
@ -66,7 +66,8 @@ msgid "%q indices must be integers, not %s"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/displayio/Group.c shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
msgid "%q must be >= 1"
|
||||
msgstr ""
|
||||
|
||||
@ -373,6 +374,10 @@ msgstr ""
|
||||
msgid "Buffer must be at least length 1"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Buffer too large and unable to allocate"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
|
||||
#: ports/nrf/common-hal/displayio/ParallelBus.c
|
||||
#, c-format
|
||||
@ -391,11 +396,6 @@ msgstr ""
|
||||
msgid "Call super().__init__() before accessing native object."
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, c-format
|
||||
msgid "Can not use dotstar with %s"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "Can't set CCCD on local Characteristic"
|
||||
msgstr ""
|
||||
@ -590,10 +590,14 @@ msgid "Expected a %q"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/Descriptor.c
|
||||
#: shared-bindings/_bleio/Descriptor.c shared-bindings/_bleio/PacketBuffer.c
|
||||
msgid "Expected a Characteristic"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/__init__.c
|
||||
msgid "Expected a PixelBuf instance"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/Characteristic.c
|
||||
msgid "Expected a Service"
|
||||
msgstr ""
|
||||
@ -734,6 +738,10 @@ msgstr ""
|
||||
msgid "Invalid buffer size"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Invalid byteorder string"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
|
||||
msgid "Invalid capture period. Valid range: 1 - 500"
|
||||
msgstr ""
|
||||
@ -861,6 +869,10 @@ msgstr ""
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Negative step not supported"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "No CCCD for this Characteristic"
|
||||
msgstr ""
|
||||
@ -959,10 +971,6 @@ msgid ""
|
||||
"%d bpp given"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Only slices with step=1 (aka None) are supported"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/audiobusio/PDMIn.c
|
||||
msgid "Oversample must be multiple of 8."
|
||||
msgstr ""
|
||||
@ -1063,7 +1071,6 @@ msgid "Sample rate must be positive"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
|
||||
#, c-format
|
||||
msgid "Sample rate too high. It must be less than %d"
|
||||
msgstr ""
|
||||
@ -1300,6 +1307,10 @@ msgid ""
|
||||
"To list built-in modules please do `help(\"modules\")`.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Writes not supported on Characteristic"
|
||||
msgstr ""
|
||||
|
||||
#: supervisor/shared/safe_mode.c
|
||||
msgid "You are in safe mode: something unanticipated happened.\n"
|
||||
msgstr ""
|
||||
@ -1438,8 +1449,7 @@ msgid "byte code not implemented"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, c-format
|
||||
msgid "byteorder is not an instance of ByteOrder (got a %s)"
|
||||
msgid "byteorder is not a string"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c
|
||||
@ -2119,7 +2129,7 @@ msgstr ""
|
||||
msgid "no reset pin available"
|
||||
msgstr ""
|
||||
|
||||
#: py/runtime.c shared-bindings/_pixelbuf/__init__.c
|
||||
#: py/runtime.c
|
||||
msgid "no such attribute"
|
||||
msgstr ""
|
||||
|
||||
@ -2300,10 +2310,6 @@ msgstr ""
|
||||
msgid "rawbuf is not the same size as buf"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/__init__.c
|
||||
msgid "readonly attribute"
|
||||
msgstr ""
|
||||
|
||||
#: py/builtinimport.c
|
||||
msgid "relative import"
|
||||
msgstr ""
|
||||
@ -2605,10 +2611,6 @@ msgstr ""
|
||||
msgid "window must be <= interval"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "write_args must be a list, tuple, or None"
|
||||
msgstr ""
|
||||
|
||||
#: py/objstr.c
|
||||
msgid "wrong number of arguments"
|
||||
msgstr ""
|
||||
|
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-12-12 15:33-0800\n"
|
||||
"POT-Creation-Date: 2020-01-07 14:31-0800\n"
|
||||
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: @sommersoft, @MrCertainly\n"
|
||||
@ -68,7 +68,8 @@ msgid "%q indices must be integers, not %s"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/displayio/Group.c shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
msgid "%q must be >= 1"
|
||||
msgstr ""
|
||||
|
||||
@ -377,6 +378,10 @@ msgstr ""
|
||||
msgid "Buffer must be at least length 1"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Buffer too large and unable to allocate"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
|
||||
#: ports/nrf/common-hal/displayio/ParallelBus.c
|
||||
#, c-format
|
||||
@ -395,11 +400,6 @@ msgstr ""
|
||||
msgid "Call super().__init__() before accessing native object."
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, c-format
|
||||
msgid "Can not use dotstar with %s"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "Can't set CCCD on local Characteristic"
|
||||
msgstr ""
|
||||
@ -594,10 +594,14 @@ msgid "Expected a %q"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/Descriptor.c
|
||||
#: shared-bindings/_bleio/Descriptor.c shared-bindings/_bleio/PacketBuffer.c
|
||||
msgid "Expected a Characteristic"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/__init__.c
|
||||
msgid "Expected a PixelBuf instance"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/Characteristic.c
|
||||
msgid "Expected a Service"
|
||||
msgstr ""
|
||||
@ -738,6 +742,10 @@ msgstr ""
|
||||
msgid "Invalid buffer size"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Invalid byteorder string"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
|
||||
msgid "Invalid capture period. Valid range: 1 - 500"
|
||||
msgstr ""
|
||||
@ -865,6 +873,10 @@ msgstr ""
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Negative step not supported"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "No CCCD for this Characteristic"
|
||||
msgstr ""
|
||||
@ -963,10 +975,6 @@ msgid ""
|
||||
"%d bpp given"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Only slices with step=1 (aka None) are supported"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/audiobusio/PDMIn.c
|
||||
msgid "Oversample must be multiple of 8."
|
||||
msgstr ""
|
||||
@ -1067,7 +1075,6 @@ msgid "Sample rate must be positive"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
|
||||
#, c-format
|
||||
msgid "Sample rate too high. It must be less than %d"
|
||||
msgstr ""
|
||||
@ -1304,6 +1311,10 @@ msgid ""
|
||||
"To list built-in modules please do `help(\"modules\")`.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Writes not supported on Characteristic"
|
||||
msgstr ""
|
||||
|
||||
#: supervisor/shared/safe_mode.c
|
||||
msgid "You are in safe mode: something unanticipated happened.\n"
|
||||
msgstr ""
|
||||
@ -1442,8 +1453,7 @@ msgid "byte code not implemented"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, c-format
|
||||
msgid "byteorder is not an instance of ByteOrder (got a %s)"
|
||||
msgid "byteorder is not a string"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c
|
||||
@ -2123,7 +2133,7 @@ msgstr ""
|
||||
msgid "no reset pin available"
|
||||
msgstr ""
|
||||
|
||||
#: py/runtime.c shared-bindings/_pixelbuf/__init__.c
|
||||
#: py/runtime.c
|
||||
msgid "no such attribute"
|
||||
msgstr ""
|
||||
|
||||
@ -2304,10 +2314,6 @@ msgstr ""
|
||||
msgid "rawbuf is not the same size as buf"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/__init__.c
|
||||
msgid "readonly attribute"
|
||||
msgstr ""
|
||||
|
||||
#: py/builtinimport.c
|
||||
msgid "relative import"
|
||||
msgstr ""
|
||||
@ -2609,10 +2615,6 @@ msgstr ""
|
||||
msgid "window must be <= interval"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "write_args must be a list, tuple, or None"
|
||||
msgstr ""
|
||||
|
||||
#: py/objstr.c
|
||||
msgid "wrong number of arguments"
|
||||
msgstr ""
|
||||
|
70
locale/es.po
70
locale/es.po
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-12-12 15:33-0800\n"
|
||||
"POT-Creation-Date: 2020-01-07 14:31-0800\n"
|
||||
"PO-Revision-Date: 2018-08-24 22:56-0500\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
@ -68,7 +68,8 @@ msgid "%q indices must be integers, not %s"
|
||||
msgstr "%q indices deben ser enteros, no %s"
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/displayio/Group.c shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
msgid "%q must be >= 1"
|
||||
msgstr "%q debe ser >= 1"
|
||||
|
||||
@ -379,6 +380,10 @@ msgstr ""
|
||||
msgid "Buffer must be at least length 1"
|
||||
msgstr "Buffer debe ser de longitud 1 como minimo"
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Buffer too large and unable to allocate"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
|
||||
#: ports/nrf/common-hal/displayio/ParallelBus.c
|
||||
#, c-format
|
||||
@ -397,11 +402,6 @@ msgstr "Bytes debe estar entre 0 y 255."
|
||||
msgid "Call super().__init__() before accessing native object."
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, c-format
|
||||
msgid "Can not use dotstar with %s"
|
||||
msgstr "No se puede usar dotstar con %s"
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "Can't set CCCD on local Characteristic"
|
||||
msgstr ""
|
||||
@ -596,10 +596,14 @@ msgid "Expected a %q"
|
||||
msgstr "Se espera un %q"
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/Descriptor.c
|
||||
#: shared-bindings/_bleio/Descriptor.c shared-bindings/_bleio/PacketBuffer.c
|
||||
msgid "Expected a Characteristic"
|
||||
msgstr "Se esperaba una Característica."
|
||||
|
||||
#: shared-bindings/_pixelbuf/__init__.c
|
||||
msgid "Expected a PixelBuf instance"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/Characteristic.c
|
||||
msgid "Expected a Service"
|
||||
msgstr ""
|
||||
@ -742,6 +746,10 @@ msgstr "Inválido bits por valor"
|
||||
msgid "Invalid buffer size"
|
||||
msgstr "Tamaño de buffer inválido"
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Invalid byteorder string"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
|
||||
msgid "Invalid capture period. Valid range: 1 - 500"
|
||||
msgstr "Inválido periodo de captura. Rango válido: 1 - 500"
|
||||
@ -869,6 +877,10 @@ msgstr "Micrófono demora de inicio debe estar en el rango 0.0 a 1.0"
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr "Debe de ser una subclase de %q"
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Negative step not supported"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "No CCCD for this Characteristic"
|
||||
msgstr ""
|
||||
@ -971,11 +983,6 @@ msgid ""
|
||||
"%d bpp given"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, fuzzy
|
||||
msgid "Only slices with step=1 (aka None) are supported"
|
||||
msgstr "solo se admiten segmentos con step=1 (alias None)"
|
||||
|
||||
#: shared-bindings/audiobusio/PDMIn.c
|
||||
msgid "Oversample must be multiple of 8."
|
||||
msgstr "El sobremuestreo debe ser un múltiplo de 8"
|
||||
@ -1082,7 +1089,6 @@ msgid "Sample rate must be positive"
|
||||
msgstr "Sample rate debe ser positivo"
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
|
||||
#, c-format
|
||||
msgid "Sample rate too high. It must be less than %d"
|
||||
msgstr "Frecuencia de muestreo demasiado alta. Debe ser menor a %d"
|
||||
@ -1326,6 +1332,10 @@ msgstr ""
|
||||
"\n"
|
||||
"Para listar los módulos incorporados por favor haga `help(\"modules\")`.\n"
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Writes not supported on Characteristic"
|
||||
msgstr ""
|
||||
|
||||
#: supervisor/shared/safe_mode.c
|
||||
msgid "You are in safe mode: something unanticipated happened.\n"
|
||||
msgstr ""
|
||||
@ -1464,9 +1474,8 @@ msgid "byte code not implemented"
|
||||
msgstr "codigo byte no implementado"
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, c-format
|
||||
msgid "byteorder is not an instance of ByteOrder (got a %s)"
|
||||
msgstr "byteorder no es instancia de ByteOrder (encontarmos un %s)"
|
||||
msgid "byteorder is not a string"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c
|
||||
msgid "bytes > 8 bits not supported"
|
||||
@ -2155,7 +2164,7 @@ msgstr "ningún módulo se llama '%q'"
|
||||
msgid "no reset pin available"
|
||||
msgstr ""
|
||||
|
||||
#: py/runtime.c shared-bindings/_pixelbuf/__init__.c
|
||||
#: py/runtime.c
|
||||
msgid "no such attribute"
|
||||
msgstr "no hay tal atributo"
|
||||
|
||||
@ -2340,11 +2349,6 @@ msgstr "desbordamiento de cola(queue)"
|
||||
msgid "rawbuf is not the same size as buf"
|
||||
msgstr "rawbuf no es el mismo tamaño que buf"
|
||||
|
||||
#: shared-bindings/_pixelbuf/__init__.c
|
||||
#, fuzzy
|
||||
msgid "readonly attribute"
|
||||
msgstr "atributo no legible"
|
||||
|
||||
#: py/builtinimport.c
|
||||
msgid "relative import"
|
||||
msgstr "import relativo"
|
||||
@ -2649,10 +2653,6 @@ msgstr ""
|
||||
msgid "window must be <= interval"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "write_args must be a list, tuple, or None"
|
||||
msgstr ""
|
||||
|
||||
#: py/objstr.c
|
||||
msgid "wrong number of arguments"
|
||||
msgstr "numero erroneo de argumentos"
|
||||
@ -2690,6 +2690,10 @@ msgstr "paso cero"
|
||||
#~ "Intento de allocation de heap cuando la VM de MicroPython no estaba "
|
||||
#~ "corriendo.\n"
|
||||
|
||||
#, c-format
|
||||
#~ msgid "Can not use dotstar with %s"
|
||||
#~ msgstr "No se puede usar dotstar con %s"
|
||||
|
||||
#~ msgid "Can't add services in Central mode"
|
||||
#~ msgstr "No se pueden agregar servicio en modo Central"
|
||||
|
||||
@ -2916,6 +2920,10 @@ msgstr "paso cero"
|
||||
#~ "Solo se admiten BMP monocromos, indexados de 8bpp y 16bpp o superiores:% "
|
||||
#~ "d bppdado"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Only slices with step=1 (aka None) are supported"
|
||||
#~ msgstr "solo se admiten segmentos con step=1 (alias None)"
|
||||
|
||||
#~ msgid "Only true color (24 bpp or higher) BMP supported %x"
|
||||
#~ msgstr "Solo color verdadero (24 bpp o superior) BMP admitido %x"
|
||||
|
||||
@ -3016,6 +3024,10 @@ msgstr "paso cero"
|
||||
#~ msgid "buffer too long"
|
||||
#~ msgstr "buffer demasiado largo"
|
||||
|
||||
#, c-format
|
||||
#~ msgid "byteorder is not an instance of ByteOrder (got a %s)"
|
||||
#~ msgstr "byteorder no es instancia de ByteOrder (encontarmos un %s)"
|
||||
|
||||
#~ msgid "can query only one param"
|
||||
#~ msgstr "puede consultar solo un param"
|
||||
|
||||
@ -3092,6 +3104,10 @@ msgstr "paso cero"
|
||||
#~ msgid "position must be 2-tuple"
|
||||
#~ msgstr "posición debe ser 2-tuple"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "readonly attribute"
|
||||
#~ msgstr "atributo no legible"
|
||||
|
||||
#~ msgid "row must be packed and word aligned"
|
||||
#~ msgstr "la fila debe estar empacada y la palabra alineada"
|
||||
|
||||
|
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-12-12 15:33-0800\n"
|
||||
"POT-Creation-Date: 2020-01-07 14:31-0800\n"
|
||||
"PO-Revision-Date: 2018-12-20 22:15-0800\n"
|
||||
"Last-Translator: Timothy <me@timothygarcia.ca>\n"
|
||||
"Language-Team: fil\n"
|
||||
@ -66,7 +66,8 @@ msgid "%q indices must be integers, not %s"
|
||||
msgstr "%q indeks ay dapat integers, hindi %s"
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/displayio/Group.c shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
#, fuzzy
|
||||
msgid "%q must be >= 1"
|
||||
msgstr "aarehas na haba dapat ang buffer slices"
|
||||
@ -379,6 +380,10 @@ msgstr ""
|
||||
msgid "Buffer must be at least length 1"
|
||||
msgstr "Buffer dapat ay hindi baba sa 1 na haba"
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Buffer too large and unable to allocate"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
|
||||
#: ports/nrf/common-hal/displayio/ParallelBus.c
|
||||
#, fuzzy, c-format
|
||||
@ -398,11 +403,6 @@ msgstr "Sa gitna ng 0 o 255 dapat ang bytes."
|
||||
msgid "Call super().__init__() before accessing native object."
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, c-format
|
||||
msgid "Can not use dotstar with %s"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "Can't set CCCD on local Characteristic"
|
||||
msgstr ""
|
||||
@ -602,11 +602,15 @@ msgid "Expected a %q"
|
||||
msgstr "Umasa ng %q"
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/Descriptor.c
|
||||
#: shared-bindings/_bleio/Descriptor.c shared-bindings/_bleio/PacketBuffer.c
|
||||
#, fuzzy
|
||||
msgid "Expected a Characteristic"
|
||||
msgstr "Hindi mabasa and Characteristic."
|
||||
|
||||
#: shared-bindings/_pixelbuf/__init__.c
|
||||
msgid "Expected a PixelBuf instance"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/Characteristic.c
|
||||
msgid "Expected a Service"
|
||||
msgstr ""
|
||||
@ -750,6 +754,10 @@ msgstr ""
|
||||
msgid "Invalid buffer size"
|
||||
msgstr "Mali ang buffer size"
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Invalid byteorder string"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
|
||||
msgid "Invalid capture period. Valid range: 1 - 500"
|
||||
msgstr ""
|
||||
@ -877,6 +885,10 @@ msgstr "Ang delay ng startup ng mikropono ay dapat na nasa 0.0 hanggang 1.0"
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Negative step not supported"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "No CCCD for this Characteristic"
|
||||
msgstr ""
|
||||
@ -978,11 +990,6 @@ msgid ""
|
||||
"%d bpp given"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, fuzzy
|
||||
msgid "Only slices with step=1 (aka None) are supported"
|
||||
msgstr "ang mga slices lamang na may hakbang = 1 (aka None) ang sinusuportahan"
|
||||
|
||||
#: shared-bindings/audiobusio/PDMIn.c
|
||||
msgid "Oversample must be multiple of 8."
|
||||
msgstr "Oversample ay dapat multiple ng 8."
|
||||
@ -1088,7 +1095,6 @@ msgid "Sample rate must be positive"
|
||||
msgstr "Sample rate ay dapat positibo"
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
|
||||
#, c-format
|
||||
msgid "Sample rate too high. It must be less than %d"
|
||||
msgstr "Sample rate ay masyadong mataas. Ito ay dapat hindi hiigit sa %d"
|
||||
@ -1335,6 +1341,10 @@ msgstr ""
|
||||
"\n"
|
||||
"Para makita ang listahan ng modules, `help(“modules”)`.\n"
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Writes not supported on Characteristic"
|
||||
msgstr ""
|
||||
|
||||
#: supervisor/shared/safe_mode.c
|
||||
msgid "You are in safe mode: something unanticipated happened.\n"
|
||||
msgstr ""
|
||||
@ -1474,8 +1484,7 @@ msgid "byte code not implemented"
|
||||
msgstr "byte code hindi pa implemented"
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, c-format
|
||||
msgid "byteorder is not an instance of ByteOrder (got a %s)"
|
||||
msgid "byteorder is not a string"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c
|
||||
@ -2171,7 +2180,7 @@ msgstr "walang module na '%q'"
|
||||
msgid "no reset pin available"
|
||||
msgstr ""
|
||||
|
||||
#: py/runtime.c shared-bindings/_pixelbuf/__init__.c
|
||||
#: py/runtime.c
|
||||
msgid "no such attribute"
|
||||
msgstr "walang ganoon na attribute"
|
||||
|
||||
@ -2354,11 +2363,6 @@ msgstr "puno na ang pila (overflow)"
|
||||
msgid "rawbuf is not the same size as buf"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/__init__.c
|
||||
#, fuzzy
|
||||
msgid "readonly attribute"
|
||||
msgstr "hindi mabasa ang attribute"
|
||||
|
||||
#: py/builtinimport.c
|
||||
msgid "relative import"
|
||||
msgstr "relative import"
|
||||
@ -2664,10 +2668,6 @@ msgstr ""
|
||||
msgid "window must be <= interval"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "write_args must be a list, tuple, or None"
|
||||
msgstr ""
|
||||
|
||||
#: py/objstr.c
|
||||
msgid "wrong number of arguments"
|
||||
msgstr "mali ang bilang ng argumento"
|
||||
@ -2902,6 +2902,11 @@ msgstr "zero step"
|
||||
#~ msgid "Only bit maps of 8 bit color or less are supported"
|
||||
#~ msgstr "Tanging bit maps na may 8 bit color o mas mababa ang supportado"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Only slices with step=1 (aka None) are supported"
|
||||
#~ msgstr ""
|
||||
#~ "ang mga slices lamang na may hakbang = 1 (aka None) ang sinusuportahan"
|
||||
|
||||
#~ msgid "Only true color (24 bpp or higher) BMP supported %x"
|
||||
#~ msgstr "Dapat true color (24 bpp o mas mataas) BMP lamang ang supportado %x"
|
||||
|
||||
@ -3060,6 +3065,10 @@ msgstr "zero step"
|
||||
#~ msgid "position must be 2-tuple"
|
||||
#~ msgstr "position ay dapat 2-tuple"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "readonly attribute"
|
||||
#~ msgstr "hindi mabasa ang attribute"
|
||||
|
||||
#~ msgid "row must be packed and word aligned"
|
||||
#~ msgstr "row ay dapat packed at ang word nakahanay"
|
||||
|
||||
|
73
locale/fr.po
73
locale/fr.po
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 0.1\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-12-12 15:33-0800\n"
|
||||
"POT-Creation-Date: 2020-01-07 14:31-0800\n"
|
||||
"PO-Revision-Date: 2019-04-14 20:05+0100\n"
|
||||
"Last-Translator: Pierrick Couturier <arofarn@arofarn.info>\n"
|
||||
"Language-Team: fr\n"
|
||||
@ -68,7 +68,8 @@ msgid "%q indices must be integers, not %s"
|
||||
msgstr "les indices %q doivent être des entiers, pas %s"
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/displayio/Group.c shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
#, fuzzy
|
||||
msgid "%q must be >= 1"
|
||||
msgstr "%d doit être >=1"
|
||||
@ -383,6 +384,10 @@ msgstr ""
|
||||
msgid "Buffer must be at least length 1"
|
||||
msgstr "Le tampon doit être de longueur au moins 1"
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Buffer too large and unable to allocate"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
|
||||
#: ports/nrf/common-hal/displayio/ParallelBus.c
|
||||
#, fuzzy, c-format
|
||||
@ -402,11 +407,6 @@ msgstr "Les octets 'bytes' doivent être entre 0 et 255"
|
||||
msgid "Call super().__init__() before accessing native object."
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, c-format
|
||||
msgid "Can not use dotstar with %s"
|
||||
msgstr "Impossible d'utiliser 'dotstar' avec %s"
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "Can't set CCCD on local Characteristic"
|
||||
msgstr ""
|
||||
@ -605,11 +605,15 @@ msgid "Expected a %q"
|
||||
msgstr "Attendu un %q"
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/Descriptor.c
|
||||
#: shared-bindings/_bleio/Descriptor.c shared-bindings/_bleio/PacketBuffer.c
|
||||
#, fuzzy
|
||||
msgid "Expected a Characteristic"
|
||||
msgstr "Une 'Characteristic' est attendue"
|
||||
|
||||
#: shared-bindings/_pixelbuf/__init__.c
|
||||
msgid "Expected a PixelBuf instance"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/Characteristic.c
|
||||
msgid "Expected a Service"
|
||||
msgstr ""
|
||||
@ -755,6 +759,10 @@ msgstr "Bits par valeur invalides"
|
||||
msgid "Invalid buffer size"
|
||||
msgstr "Longueur de tampon invalide"
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Invalid byteorder string"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
|
||||
msgid "Invalid capture period. Valid range: 1 - 500"
|
||||
msgstr "Période de capture invalide. Gamme valide: 1 à 500"
|
||||
@ -884,6 +892,10 @@ msgstr "Le délais au démarrage du micro doit être entre 0.0 et 1.0"
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Negative step not supported"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "No CCCD for this Characteristic"
|
||||
msgstr ""
|
||||
@ -988,11 +1000,6 @@ msgid ""
|
||||
"%d bpp given"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, fuzzy
|
||||
msgid "Only slices with step=1 (aka None) are supported"
|
||||
msgstr "seuls les slices avec 'step=1' (cad 'None') sont supportées"
|
||||
|
||||
#: shared-bindings/audiobusio/PDMIn.c
|
||||
msgid "Oversample must be multiple of 8."
|
||||
msgstr "Le sur-échantillonage doit être un multiple de 8."
|
||||
@ -1102,7 +1109,6 @@ msgid "Sample rate must be positive"
|
||||
msgstr "Le taux d'échantillonage doit être positif"
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
|
||||
#, c-format
|
||||
msgid "Sample rate too high. It must be less than %d"
|
||||
msgstr "Taux d'échantillonage trop élevé. Doit être inf. à %d"
|
||||
@ -1352,6 +1358,10 @@ msgstr ""
|
||||
"\n"
|
||||
"Pour lister les modules inclus, tapez `help(\"modules\")`.\n"
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Writes not supported on Characteristic"
|
||||
msgstr ""
|
||||
|
||||
#: supervisor/shared/safe_mode.c
|
||||
msgid "You are in safe mode: something unanticipated happened.\n"
|
||||
msgstr ""
|
||||
@ -1493,9 +1503,8 @@ msgid "byte code not implemented"
|
||||
msgstr "bytecode non implémenté"
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, c-format
|
||||
msgid "byteorder is not an instance of ByteOrder (got a %s)"
|
||||
msgstr "'byteorder' n'est pas une instance de ByteOrder (reçu un %s)"
|
||||
msgid "byteorder is not a string"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c
|
||||
msgid "bytes > 8 bits not supported"
|
||||
@ -2197,7 +2206,7 @@ msgstr "pas de module '%q'"
|
||||
msgid "no reset pin available"
|
||||
msgstr ""
|
||||
|
||||
#: py/runtime.c shared-bindings/_pixelbuf/__init__.c
|
||||
#: py/runtime.c
|
||||
msgid "no such attribute"
|
||||
msgstr "pas de tel attribut"
|
||||
|
||||
@ -2387,11 +2396,6 @@ msgstr "dépassement de file"
|
||||
msgid "rawbuf is not the same size as buf"
|
||||
msgstr "'rawbuf' n'est pas de la même taille que 'buf'"
|
||||
|
||||
#: shared-bindings/_pixelbuf/__init__.c
|
||||
#, fuzzy
|
||||
msgid "readonly attribute"
|
||||
msgstr "attribut en lecture seule"
|
||||
|
||||
#: py/builtinimport.c
|
||||
msgid "relative import"
|
||||
msgstr "import relatif"
|
||||
@ -2699,10 +2703,6 @@ msgstr "'value_count' doit être > 0"
|
||||
msgid "window must be <= interval"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "write_args must be a list, tuple, or None"
|
||||
msgstr "'write_args' doit être une liste, un tuple ou 'None'"
|
||||
|
||||
#: py/objstr.c
|
||||
msgid "wrong number of arguments"
|
||||
msgstr "mauvais nombres d'arguments"
|
||||
@ -2740,6 +2740,10 @@ msgstr "'step' nul"
|
||||
#~ msgstr ""
|
||||
#~ "Tentative d'allocation de tas alors que la VM MicroPython ne tourne pas.\n"
|
||||
|
||||
#, c-format
|
||||
#~ msgid "Can not use dotstar with %s"
|
||||
#~ msgstr "Impossible d'utiliser 'dotstar' avec %s"
|
||||
|
||||
#~ msgid "Can't add services in Central mode"
|
||||
#~ msgstr "Impossible d'ajouter des services en mode Central"
|
||||
|
||||
@ -2974,6 +2978,10 @@ msgstr "'step' nul"
|
||||
#~ "Seul les BMP monochromes, 8bit indexé et 16bit sont supportés: %d bpp "
|
||||
#~ "fourni"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Only slices with step=1 (aka None) are supported"
|
||||
#~ msgstr "seuls les slices avec 'step=1' (cad 'None') sont supportées"
|
||||
|
||||
#~ msgid "Only true color (24 bpp or higher) BMP supported %x"
|
||||
#~ msgstr "Seul les BMP 24bits ou plus sont supportés %x"
|
||||
|
||||
@ -3075,6 +3083,10 @@ msgstr "'step' nul"
|
||||
#~ msgid "buffer too long"
|
||||
#~ msgstr "tampon trop long"
|
||||
|
||||
#, c-format
|
||||
#~ msgid "byteorder is not an instance of ByteOrder (got a %s)"
|
||||
#~ msgstr "'byteorder' n'est pas une instance de ByteOrder (reçu un %s)"
|
||||
|
||||
#~ msgid "can query only one param"
|
||||
#~ msgstr "ne peut demander qu'un seul paramètre"
|
||||
|
||||
@ -3151,6 +3163,10 @@ msgstr "'step' nul"
|
||||
#~ msgid "position must be 2-tuple"
|
||||
#~ msgstr "position doit être un 2-tuple"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "readonly attribute"
|
||||
#~ msgstr "attribut en lecture seule"
|
||||
|
||||
#~ msgid "scan failed"
|
||||
#~ msgstr "échec du scan"
|
||||
|
||||
@ -3177,3 +3193,6 @@ msgstr "'step' nul"
|
||||
|
||||
#~ msgid "wifi_set_ip_info() failed"
|
||||
#~ msgstr "wifi_set_ip_info() a échoué"
|
||||
|
||||
#~ msgid "write_args must be a list, tuple, or None"
|
||||
#~ msgstr "'write_args' doit être une liste, un tuple ou 'None'"
|
||||
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-12-12 15:33-0800\n"
|
||||
"POT-Creation-Date: 2020-01-07 14:31-0800\n"
|
||||
"PO-Revision-Date: 2018-10-02 16:27+0200\n"
|
||||
"Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n"
|
||||
"Language-Team: \n"
|
||||
@ -66,7 +66,8 @@ msgid "%q indices must be integers, not %s"
|
||||
msgstr "gli indici %q devono essere interi, non %s"
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/displayio/Group.c shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
#, fuzzy
|
||||
msgid "%q must be >= 1"
|
||||
msgstr "slice del buffer devono essere della stessa lunghezza"
|
||||
@ -379,6 +380,10 @@ msgstr ""
|
||||
msgid "Buffer must be at least length 1"
|
||||
msgstr "Il buffer deve essere lungo almeno 1"
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Buffer too large and unable to allocate"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
|
||||
#: ports/nrf/common-hal/displayio/ParallelBus.c
|
||||
#, fuzzy, c-format
|
||||
@ -398,11 +403,6 @@ msgstr "I byte devono essere compresi tra 0 e 255"
|
||||
msgid "Call super().__init__() before accessing native object."
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, c-format
|
||||
msgid "Can not use dotstar with %s"
|
||||
msgstr "dotstar non può essere usato con %s"
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "Can't set CCCD on local Characteristic"
|
||||
msgstr ""
|
||||
@ -602,11 +602,15 @@ msgid "Expected a %q"
|
||||
msgstr "Atteso un %q"
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/Descriptor.c
|
||||
#: shared-bindings/_bleio/Descriptor.c shared-bindings/_bleio/PacketBuffer.c
|
||||
#, fuzzy
|
||||
msgid "Expected a Characteristic"
|
||||
msgstr "Non è possibile aggiungere Characteristic."
|
||||
|
||||
#: shared-bindings/_pixelbuf/__init__.c
|
||||
msgid "Expected a PixelBuf instance"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/Characteristic.c
|
||||
msgid "Expected a Service"
|
||||
msgstr ""
|
||||
@ -751,6 +755,10 @@ msgstr "bits per valore invalido"
|
||||
msgid "Invalid buffer size"
|
||||
msgstr "lunghezza del buffer non valida"
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Invalid byteorder string"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
|
||||
msgid "Invalid capture period. Valid range: 1 - 500"
|
||||
msgstr "periodo di cattura invalido. Zona valida: 1 - 500"
|
||||
@ -881,6 +889,10 @@ msgstr ""
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Negative step not supported"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "No CCCD for this Characteristic"
|
||||
msgstr ""
|
||||
@ -983,11 +995,6 @@ msgid ""
|
||||
"%d bpp given"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, fuzzy
|
||||
msgid "Only slices with step=1 (aka None) are supported"
|
||||
msgstr "solo slice con step=1 (aka None) sono supportate"
|
||||
|
||||
#: shared-bindings/audiobusio/PDMIn.c
|
||||
msgid "Oversample must be multiple of 8."
|
||||
msgstr "L'oversampling deve essere multiplo di 8."
|
||||
@ -1098,7 +1105,6 @@ msgid "Sample rate must be positive"
|
||||
msgstr "STA deve essere attiva"
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
|
||||
#, c-format
|
||||
msgid "Sample rate too high. It must be less than %d"
|
||||
msgstr ""
|
||||
@ -1338,6 +1344,10 @@ msgid ""
|
||||
"To list built-in modules please do `help(\"modules\")`.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Writes not supported on Characteristic"
|
||||
msgstr ""
|
||||
|
||||
#: supervisor/shared/safe_mode.c
|
||||
msgid "You are in safe mode: something unanticipated happened.\n"
|
||||
msgstr ""
|
||||
@ -1479,8 +1489,7 @@ msgid "byte code not implemented"
|
||||
msgstr "byte code non implementato"
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, c-format
|
||||
msgid "byteorder is not an instance of ByteOrder (got a %s)"
|
||||
msgid "byteorder is not a string"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c
|
||||
@ -2174,7 +2183,7 @@ msgstr "nessun modulo chiamato '%q'"
|
||||
msgid "no reset pin available"
|
||||
msgstr ""
|
||||
|
||||
#: py/runtime.c shared-bindings/_pixelbuf/__init__.c
|
||||
#: py/runtime.c
|
||||
msgid "no such attribute"
|
||||
msgstr "attributo inesistente"
|
||||
|
||||
@ -2361,11 +2370,6 @@ msgstr "overflow della coda"
|
||||
msgid "rawbuf is not the same size as buf"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/__init__.c
|
||||
#, fuzzy
|
||||
msgid "readonly attribute"
|
||||
msgstr "attributo non leggibile"
|
||||
|
||||
#: py/builtinimport.c
|
||||
msgid "relative import"
|
||||
msgstr "importazione relativa"
|
||||
@ -2671,10 +2675,6 @@ msgstr ""
|
||||
msgid "window must be <= interval"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "write_args must be a list, tuple, or None"
|
||||
msgstr ""
|
||||
|
||||
#: py/objstr.c
|
||||
msgid "wrong number of arguments"
|
||||
msgstr "numero di argomenti errato"
|
||||
@ -2707,6 +2707,10 @@ msgstr "zero step"
|
||||
#~ msgid "C-level assert"
|
||||
#~ msgstr "assert a livello C"
|
||||
|
||||
#, c-format
|
||||
#~ msgid "Can not use dotstar with %s"
|
||||
#~ msgstr "dotstar non può essere usato con %s"
|
||||
|
||||
#~ msgid "Can't add services in Central mode"
|
||||
#~ msgstr "non si può aggiungere servizi in Central mode"
|
||||
|
||||
@ -2907,6 +2911,10 @@ msgstr "zero step"
|
||||
#~ msgid "Only bit maps of 8 bit color or less are supported"
|
||||
#~ msgstr "Sono supportate solo bitmap con colori a 8 bit o meno"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Only slices with step=1 (aka None) are supported"
|
||||
#~ msgstr "solo slice con step=1 (aka None) sono supportate"
|
||||
|
||||
#~ msgid "Only true color (24 bpp or higher) BMP supported %x"
|
||||
#~ msgstr "Solo BMP true color (24 bpp o superiore) sono supportati %x"
|
||||
|
||||
@ -3044,6 +3052,10 @@ msgstr "zero step"
|
||||
#~ msgid "position must be 2-tuple"
|
||||
#~ msgstr "position deve essere una 2-tuple"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "readonly attribute"
|
||||
#~ msgstr "attributo non leggibile"
|
||||
|
||||
#~ msgid "row must be packed and word aligned"
|
||||
#~ msgstr "la riga deve essere compattata e allineata alla parola"
|
||||
|
||||
|
50
locale/ko.po
50
locale/ko.po
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-12-12 15:33-0800\n"
|
||||
"POT-Creation-Date: 2020-01-07 14:31-0800\n"
|
||||
"PO-Revision-Date: 2019-05-06 14:22-0700\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -68,7 +68,8 @@ msgid "%q indices must be integers, not %s"
|
||||
msgstr "%q 인덱스는 %s 가 아닌 정수 여야합니다"
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/displayio/Group.c shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
msgid "%q must be >= 1"
|
||||
msgstr "%q 는 >=1이어야합니다"
|
||||
|
||||
@ -377,6 +378,10 @@ msgstr ""
|
||||
msgid "Buffer must be at least length 1"
|
||||
msgstr "잘못된 크기의 버퍼. >1 여야합니다"
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Buffer too large and unable to allocate"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
|
||||
#: ports/nrf/common-hal/displayio/ParallelBus.c
|
||||
#, c-format
|
||||
@ -395,11 +400,6 @@ msgstr "바이트는 0에서 255 사이 여야합니다."
|
||||
msgid "Call super().__init__() before accessing native object."
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, c-format
|
||||
msgid "Can not use dotstar with %s"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "Can't set CCCD on local Characteristic"
|
||||
msgstr ""
|
||||
@ -594,10 +594,14 @@ msgid "Expected a %q"
|
||||
msgstr "%q 이 예상되었습니다."
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/Descriptor.c
|
||||
#: shared-bindings/_bleio/Descriptor.c shared-bindings/_bleio/PacketBuffer.c
|
||||
msgid "Expected a Characteristic"
|
||||
msgstr "특성(Characteristic)이 예상되었습니다."
|
||||
|
||||
#: shared-bindings/_pixelbuf/__init__.c
|
||||
msgid "Expected a PixelBuf instance"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/Characteristic.c
|
||||
msgid "Expected a Service"
|
||||
msgstr ""
|
||||
@ -738,6 +742,10 @@ msgstr ""
|
||||
msgid "Invalid buffer size"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Invalid byteorder string"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
|
||||
msgid "Invalid capture period. Valid range: 1 - 500"
|
||||
msgstr ""
|
||||
@ -865,6 +873,10 @@ msgstr ""
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Negative step not supported"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "No CCCD for this Characteristic"
|
||||
msgstr ""
|
||||
@ -963,10 +975,6 @@ msgid ""
|
||||
"%d bpp given"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Only slices with step=1 (aka None) are supported"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/audiobusio/PDMIn.c
|
||||
msgid "Oversample must be multiple of 8."
|
||||
msgstr ""
|
||||
@ -1067,7 +1075,6 @@ msgid "Sample rate must be positive"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
|
||||
#, c-format
|
||||
msgid "Sample rate too high. It must be less than %d"
|
||||
msgstr ""
|
||||
@ -1305,6 +1312,10 @@ msgid ""
|
||||
"To list built-in modules please do `help(\"modules\")`.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Writes not supported on Characteristic"
|
||||
msgstr ""
|
||||
|
||||
#: supervisor/shared/safe_mode.c
|
||||
msgid "You are in safe mode: something unanticipated happened.\n"
|
||||
msgstr ""
|
||||
@ -1443,8 +1454,7 @@ msgid "byte code not implemented"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, c-format
|
||||
msgid "byteorder is not an instance of ByteOrder (got a %s)"
|
||||
msgid "byteorder is not a string"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c
|
||||
@ -2124,7 +2134,7 @@ msgstr ""
|
||||
msgid "no reset pin available"
|
||||
msgstr ""
|
||||
|
||||
#: py/runtime.c shared-bindings/_pixelbuf/__init__.c
|
||||
#: py/runtime.c
|
||||
msgid "no such attribute"
|
||||
msgstr ""
|
||||
|
||||
@ -2305,10 +2315,6 @@ msgstr ""
|
||||
msgid "rawbuf is not the same size as buf"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/__init__.c
|
||||
msgid "readonly attribute"
|
||||
msgstr ""
|
||||
|
||||
#: py/builtinimport.c
|
||||
msgid "relative import"
|
||||
msgstr ""
|
||||
@ -2610,10 +2616,6 @@ msgstr ""
|
||||
msgid "window must be <= interval"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "write_args must be a list, tuple, or None"
|
||||
msgstr ""
|
||||
|
||||
#: py/objstr.c
|
||||
msgid "wrong number of arguments"
|
||||
msgstr ""
|
||||
|
66
locale/pl.po
66
locale/pl.po
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-12-12 15:33-0800\n"
|
||||
"POT-Creation-Date: 2020-01-07 14:31-0800\n"
|
||||
"PO-Revision-Date: 2019-03-19 18:37-0700\n"
|
||||
"Last-Translator: Radomir Dopieralski <circuitpython@sheep.art.pl>\n"
|
||||
"Language-Team: pl\n"
|
||||
@ -67,7 +67,8 @@ msgid "%q indices must be integers, not %s"
|
||||
msgstr "%q indeks musi być liczbą całkowitą, a nie %s"
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/displayio/Group.c shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
msgid "%q must be >= 1"
|
||||
msgstr "%q musi być >= 1"
|
||||
|
||||
@ -376,6 +377,10 @@ msgstr ""
|
||||
msgid "Buffer must be at least length 1"
|
||||
msgstr "Bufor musi mieć długość 1 lub więcej"
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Buffer too large and unable to allocate"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
|
||||
#: ports/nrf/common-hal/displayio/ParallelBus.c
|
||||
#, c-format
|
||||
@ -394,11 +399,6 @@ msgstr "Bytes musi być między 0 a 255."
|
||||
msgid "Call super().__init__() before accessing native object."
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, c-format
|
||||
msgid "Can not use dotstar with %s"
|
||||
msgstr "Nie można używać dotstar z %s"
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "Can't set CCCD on local Characteristic"
|
||||
msgstr ""
|
||||
@ -593,10 +593,14 @@ msgid "Expected a %q"
|
||||
msgstr "Oczekiwano %q"
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/Descriptor.c
|
||||
#: shared-bindings/_bleio/Descriptor.c shared-bindings/_bleio/PacketBuffer.c
|
||||
msgid "Expected a Characteristic"
|
||||
msgstr "Oczekiwano charakterystyki"
|
||||
|
||||
#: shared-bindings/_pixelbuf/__init__.c
|
||||
msgid "Expected a PixelBuf instance"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/Characteristic.c
|
||||
msgid "Expected a Service"
|
||||
msgstr ""
|
||||
@ -739,6 +743,10 @@ msgstr "Zła liczba bitów wartości"
|
||||
msgid "Invalid buffer size"
|
||||
msgstr "Zła wielkość bufora"
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Invalid byteorder string"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
|
||||
msgid "Invalid capture period. Valid range: 1 - 500"
|
||||
msgstr "Zły okres. Poprawny zakres to: 1 - 500"
|
||||
@ -866,6 +874,10 @@ msgstr "Opóźnienie włączenia mikrofonu musi być w zakresie od 0.0 do 1.0"
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Negative step not supported"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "No CCCD for this Characteristic"
|
||||
msgstr ""
|
||||
@ -964,10 +976,6 @@ msgid ""
|
||||
"%d bpp given"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Only slices with step=1 (aka None) are supported"
|
||||
msgstr "Wspierane są tylko fragmenty z step=1 (albo None)"
|
||||
|
||||
#: shared-bindings/audiobusio/PDMIn.c
|
||||
msgid "Oversample must be multiple of 8."
|
||||
msgstr "Nadpróbkowanie musi być wielokrotnością 8."
|
||||
@ -1068,7 +1076,6 @@ msgid "Sample rate must be positive"
|
||||
msgstr "Częstotliwość próbkowania musi być dodatnia"
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
|
||||
#, c-format
|
||||
msgid "Sample rate too high. It must be less than %d"
|
||||
msgstr "Zbyt wysoka częstotliwość próbkowania. Musi być mniejsza niż %d"
|
||||
@ -1308,6 +1315,10 @@ msgstr ""
|
||||
"Podręczniki dostępne na learn.adafruit.com/category/circuitpyhon.\n"
|
||||
"Aby zobaczyć wbudowane moduły, wpisz `help(\"modules\")`.\n"
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Writes not supported on Characteristic"
|
||||
msgstr ""
|
||||
|
||||
#: supervisor/shared/safe_mode.c
|
||||
msgid "You are in safe mode: something unanticipated happened.\n"
|
||||
msgstr ""
|
||||
@ -1446,9 +1457,8 @@ msgid "byte code not implemented"
|
||||
msgstr "bajtkod niezaimplemntowany"
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, c-format
|
||||
msgid "byteorder is not an instance of ByteOrder (got a %s)"
|
||||
msgstr "byteorder musi być typu ByteOrder (jest %s)"
|
||||
msgid "byteorder is not a string"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c
|
||||
msgid "bytes > 8 bits not supported"
|
||||
@ -2128,7 +2138,7 @@ msgstr "brak modułu o nazwie '%q'"
|
||||
msgid "no reset pin available"
|
||||
msgstr ""
|
||||
|
||||
#: py/runtime.c shared-bindings/_pixelbuf/__init__.c
|
||||
#: py/runtime.c
|
||||
msgid "no such attribute"
|
||||
msgstr "nie ma takiego atrybutu"
|
||||
|
||||
@ -2310,10 +2320,6 @@ msgstr "przepełnienie kolejki"
|
||||
msgid "rawbuf is not the same size as buf"
|
||||
msgstr "rawbuf nie jest tej samej wielkości co buf"
|
||||
|
||||
#: shared-bindings/_pixelbuf/__init__.c
|
||||
msgid "readonly attribute"
|
||||
msgstr "atrybut tylko do odczytu"
|
||||
|
||||
#: py/builtinimport.c
|
||||
msgid "relative import"
|
||||
msgstr "relatywny import"
|
||||
@ -2616,10 +2622,6 @@ msgstr "value_count musi być > 0"
|
||||
msgid "window must be <= interval"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "write_args must be a list, tuple, or None"
|
||||
msgstr "write_args musi być listą, krotką lub None"
|
||||
|
||||
#: py/objstr.c
|
||||
msgid "wrong number of arguments"
|
||||
msgstr "zła liczba argumentów"
|
||||
@ -2650,6 +2652,10 @@ msgstr "zerowy krok"
|
||||
#~ msgid "Attempted heap allocation when MicroPython VM not running.\n"
|
||||
#~ msgstr "Próba alokacji pamięci na stercie gdy VM nie działa.\n"
|
||||
|
||||
#, c-format
|
||||
#~ msgid "Can not use dotstar with %s"
|
||||
#~ msgstr "Nie można używać dotstar z %s"
|
||||
|
||||
#~ msgid "Can't add services in Central mode"
|
||||
#~ msgstr "Nie można dodać serwisów w trybie Central"
|
||||
|
||||
@ -2799,6 +2805,9 @@ msgstr "zerowy krok"
|
||||
#~ "bpp given"
|
||||
#~ msgstr "Wspierane są tylko pliki BMP czarno-białe, 8bpp i 16bpp: %d bpp "
|
||||
|
||||
#~ msgid "Only slices with step=1 (aka None) are supported"
|
||||
#~ msgstr "Wspierane są tylko fragmenty z step=1 (albo None)"
|
||||
|
||||
#~ msgid "Soft device assert, id: 0x%08lX, pc: 0x%08lX"
|
||||
#~ msgstr "Soft device assert, id: 0x%08lX, pc: 0x%08lX"
|
||||
|
||||
@ -2853,6 +2862,10 @@ msgstr "zerowy krok"
|
||||
#~ msgid "bad GATT role"
|
||||
#~ msgstr "zła rola GATT"
|
||||
|
||||
#, c-format
|
||||
#~ msgid "byteorder is not an instance of ByteOrder (got a %s)"
|
||||
#~ msgstr "byteorder musi być typu ByteOrder (jest %s)"
|
||||
|
||||
#~ msgid "characteristics includes an object that is not a Characteristic"
|
||||
#~ msgstr ""
|
||||
#~ "charakterystyki zawierają obiekt, który nie jest typu Characteristic"
|
||||
@ -2874,3 +2887,6 @@ msgstr "zerowy krok"
|
||||
|
||||
#~ msgid "timeout >100 (units are now seconds, not msecs)"
|
||||
#~ msgstr "timeout > 100 (jednostkami są sekundy)"
|
||||
|
||||
#~ msgid "write_args must be a list, tuple, or None"
|
||||
#~ msgstr "write_args musi być listą, krotką lub None"
|
||||
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-12-12 15:33-0800\n"
|
||||
"POT-Creation-Date: 2020-01-07 14:31-0800\n"
|
||||
"PO-Revision-Date: 2018-10-02 21:14-0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
@ -66,7 +66,8 @@ msgid "%q indices must be integers, not %s"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/displayio/Group.c shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
#, fuzzy
|
||||
msgid "%q must be >= 1"
|
||||
msgstr "buffers devem ser o mesmo tamanho"
|
||||
@ -376,6 +377,10 @@ msgstr ""
|
||||
msgid "Buffer must be at least length 1"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Buffer too large and unable to allocate"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
|
||||
#: ports/nrf/common-hal/displayio/ParallelBus.c
|
||||
#, fuzzy, c-format
|
||||
@ -395,11 +400,6 @@ msgstr "Os bytes devem estar entre 0 e 255."
|
||||
msgid "Call super().__init__() before accessing native object."
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, c-format
|
||||
msgid "Can not use dotstar with %s"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "Can't set CCCD on local Characteristic"
|
||||
msgstr ""
|
||||
@ -597,11 +597,15 @@ msgid "Expected a %q"
|
||||
msgstr "Esperado um"
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/Descriptor.c
|
||||
#: shared-bindings/_bleio/Descriptor.c shared-bindings/_bleio/PacketBuffer.c
|
||||
#, fuzzy
|
||||
msgid "Expected a Characteristic"
|
||||
msgstr "Não é possível adicionar Característica."
|
||||
|
||||
#: shared-bindings/_pixelbuf/__init__.c
|
||||
msgid "Expected a PixelBuf instance"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/Characteristic.c
|
||||
msgid "Expected a Service"
|
||||
msgstr ""
|
||||
@ -744,6 +748,10 @@ msgstr ""
|
||||
msgid "Invalid buffer size"
|
||||
msgstr "Arquivo inválido"
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Invalid byteorder string"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
|
||||
msgid "Invalid capture period. Valid range: 1 - 500"
|
||||
msgstr ""
|
||||
@ -873,6 +881,10 @@ msgstr ""
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Negative step not supported"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "No CCCD for this Characteristic"
|
||||
msgstr ""
|
||||
@ -974,10 +986,6 @@ msgid ""
|
||||
"%d bpp given"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Only slices with step=1 (aka None) are supported"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/audiobusio/PDMIn.c
|
||||
msgid "Oversample must be multiple of 8."
|
||||
msgstr ""
|
||||
@ -1080,7 +1088,6 @@ msgid "Sample rate must be positive"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
|
||||
#, c-format
|
||||
msgid "Sample rate too high. It must be less than %d"
|
||||
msgstr "Taxa de amostragem muito alta. Deve ser menor que %d"
|
||||
@ -1318,6 +1325,10 @@ msgid ""
|
||||
"To list built-in modules please do `help(\"modules\")`.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Writes not supported on Characteristic"
|
||||
msgstr ""
|
||||
|
||||
#: supervisor/shared/safe_mode.c
|
||||
msgid "You are in safe mode: something unanticipated happened.\n"
|
||||
msgstr ""
|
||||
@ -1459,8 +1470,7 @@ msgid "byte code not implemented"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, c-format
|
||||
msgid "byteorder is not an instance of ByteOrder (got a %s)"
|
||||
msgid "byteorder is not a string"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c
|
||||
@ -2141,7 +2151,7 @@ msgstr ""
|
||||
msgid "no reset pin available"
|
||||
msgstr ""
|
||||
|
||||
#: py/runtime.c shared-bindings/_pixelbuf/__init__.c
|
||||
#: py/runtime.c
|
||||
msgid "no such attribute"
|
||||
msgstr ""
|
||||
|
||||
@ -2322,11 +2332,6 @@ msgstr "estouro de fila"
|
||||
msgid "rawbuf is not the same size as buf"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/__init__.c
|
||||
#, fuzzy
|
||||
msgid "readonly attribute"
|
||||
msgstr "atributo ilegível"
|
||||
|
||||
#: py/builtinimport.c
|
||||
msgid "relative import"
|
||||
msgstr ""
|
||||
@ -2630,10 +2635,6 @@ msgstr ""
|
||||
msgid "window must be <= interval"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "write_args must be a list, tuple, or None"
|
||||
msgstr ""
|
||||
|
||||
#: py/objstr.c
|
||||
msgid "wrong number of arguments"
|
||||
msgstr ""
|
||||
@ -2925,6 +2926,10 @@ msgstr "passo zero"
|
||||
#~ msgid "pin does not have IRQ capabilities"
|
||||
#~ msgstr "Pino não tem recursos de IRQ"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "readonly attribute"
|
||||
#~ msgstr "atributo ilegível"
|
||||
|
||||
#~ msgid "row must be packed and word aligned"
|
||||
#~ msgstr "Linha deve ser comprimida e com as palavras alinhadas"
|
||||
|
||||
|
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: circuitpython-cn\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-12-12 15:33-0800\n"
|
||||
"POT-Creation-Date: 2020-01-07 14:31-0800\n"
|
||||
"PO-Revision-Date: 2019-04-13 10:10-0700\n"
|
||||
"Last-Translator: hexthat\n"
|
||||
"Language-Team: Chinese Hanyu Pinyin\n"
|
||||
@ -68,7 +68,8 @@ msgid "%q indices must be integers, not %s"
|
||||
msgstr "%q suǒyǐn bìxū shì zhěngshù, ér bùshì %s"
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/displayio/Group.c shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
msgid "%q must be >= 1"
|
||||
msgstr "%q bìxū dàyú huò děngyú 1"
|
||||
|
||||
@ -377,6 +378,10 @@ msgstr "Huǎnchōng qū chángdù%d tài dà. Tā bìxū xiǎoyú%d"
|
||||
msgid "Buffer must be at least length 1"
|
||||
msgstr "Huǎnchōng qū bìxū zhìshǎo chángdù 1"
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Buffer too large and unable to allocate"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
|
||||
#: ports/nrf/common-hal/displayio/ParallelBus.c
|
||||
#, c-format
|
||||
@ -395,11 +400,6 @@ msgstr "Zì jié bìxū jiè yú 0 dào 255 zhī jiān."
|
||||
msgid "Call super().__init__() before accessing native object."
|
||||
msgstr "Zài fǎngwèn běn jī wùjiàn zhīqián diàoyòng super().__init__()"
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, c-format
|
||||
msgid "Can not use dotstar with %s"
|
||||
msgstr "Wúfǎ yǔ dotstar yīqǐ shǐyòng %s"
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "Can't set CCCD on local Characteristic"
|
||||
msgstr ""
|
||||
@ -594,10 +594,14 @@ msgid "Expected a %q"
|
||||
msgstr "Yùqí %q"
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/Descriptor.c
|
||||
#: shared-bindings/_bleio/Descriptor.c shared-bindings/_bleio/PacketBuffer.c
|
||||
msgid "Expected a Characteristic"
|
||||
msgstr "Yùqí de tèdiǎn"
|
||||
|
||||
#: shared-bindings/_pixelbuf/__init__.c
|
||||
msgid "Expected a PixelBuf instance"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/Characteristic.c
|
||||
msgid "Expected a Service"
|
||||
msgstr "Yùqí fúwù"
|
||||
@ -740,6 +744,10 @@ msgstr "Měi gè zhí de wèi wúxiào"
|
||||
msgid "Invalid buffer size"
|
||||
msgstr "Wúxiào de huǎnchōng qū dàxiǎo"
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Invalid byteorder string"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
|
||||
msgid "Invalid capture period. Valid range: 1 - 500"
|
||||
msgstr "Wúxiào de bǔhuò zhōuqí. Yǒuxiào fànwéi: 1-500"
|
||||
@ -867,6 +875,10 @@ msgstr "Màikèfēng qǐdòng yánchí bìxū zài 0.0 Dào 1.0 De fànwéi nèi
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr "Bìxū shì %q zi lèi."
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Negative step not supported"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/Characteristic.c
|
||||
msgid "No CCCD for this Characteristic"
|
||||
msgstr "Zhège tèzhēng méiyǒu CCCD"
|
||||
@ -968,10 +980,6 @@ msgid ""
|
||||
"%d bpp given"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "Only slices with step=1 (aka None) are supported"
|
||||
msgstr "Jǐn zhīchí 1 bù qiēpiàn"
|
||||
|
||||
#: shared-bindings/audiobusio/PDMIn.c
|
||||
msgid "Oversample must be multiple of 8."
|
||||
msgstr "Guò cǎiyàng bìxū shì 8 de bèishù."
|
||||
@ -1073,7 +1081,6 @@ msgid "Sample rate must be positive"
|
||||
msgstr "Cǎiyàng lǜ bìxū wèi zhèng shù"
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
|
||||
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
|
||||
#, c-format
|
||||
msgid "Sample rate too high. It must be less than %d"
|
||||
msgstr "Cǎiyàng lǜ tài gāo. Tā bìxū xiǎoyú %d"
|
||||
@ -1317,6 +1324,10 @@ msgstr ""
|
||||
"\n"
|
||||
"Ruò yào liè chū nèizài de mókuài, qǐng qǐng zuò yǐxià `help(\"modules\")`.\n"
|
||||
|
||||
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
|
||||
msgid "Writes not supported on Characteristic"
|
||||
msgstr ""
|
||||
|
||||
#: supervisor/shared/safe_mode.c
|
||||
msgid "You are in safe mode: something unanticipated happened.\n"
|
||||
msgstr ""
|
||||
@ -1455,9 +1466,8 @@ msgid "byte code not implemented"
|
||||
msgstr "zì jié dàimǎ wèi zhíxíng"
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
#, c-format
|
||||
msgid "byteorder is not an instance of ByteOrder (got a %s)"
|
||||
msgstr "zì jié bùshì zì jié xù shílì (yǒu %s)"
|
||||
msgid "byteorder is not a string"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c
|
||||
msgid "bytes > 8 bits not supported"
|
||||
@ -2141,7 +2151,7 @@ msgstr "méiyǒu mókuài '%q'"
|
||||
msgid "no reset pin available"
|
||||
msgstr "Méiyǒu kěyòng de fùwèi yǐn jiǎo"
|
||||
|
||||
#: py/runtime.c shared-bindings/_pixelbuf/__init__.c
|
||||
#: py/runtime.c
|
||||
msgid "no such attribute"
|
||||
msgstr "méiyǒu cǐ shǔxìng"
|
||||
|
||||
@ -2322,10 +2332,6 @@ msgstr "duìliè yìchū"
|
||||
msgid "rawbuf is not the same size as buf"
|
||||
msgstr "yuánshǐ huǎnchōng qū hé huǎnchōng qū de dàxiǎo bùtóng"
|
||||
|
||||
#: shared-bindings/_pixelbuf/__init__.c
|
||||
msgid "readonly attribute"
|
||||
msgstr "zhǐ dú shǔxìng"
|
||||
|
||||
#: py/builtinimport.c
|
||||
msgid "relative import"
|
||||
msgstr "xiāngduì dǎorù"
|
||||
@ -2629,10 +2635,6 @@ msgstr "zhí jìshù bìxū wèi > 0"
|
||||
msgid "window must be <= interval"
|
||||
msgstr "Chuāngkǒu bìxū shì <= jiàngé"
|
||||
|
||||
#: shared-bindings/_pixelbuf/PixelBuf.c
|
||||
msgid "write_args must be a list, tuple, or None"
|
||||
msgstr "xiě cānshù bìxū shì yuán zǔ, lièbiǎo huò None"
|
||||
|
||||
#: py/objstr.c
|
||||
msgid "wrong number of arguments"
|
||||
msgstr "cānshù shù cuòwù"
|
||||
@ -2663,6 +2665,10 @@ msgstr "líng bù"
|
||||
#~ msgid "Attempted heap allocation when MicroPython VM not running.\n"
|
||||
#~ msgstr "MicroPython VM wèi yùnxíng shí chángshì duī fēnpèi.\n"
|
||||
|
||||
#, c-format
|
||||
#~ msgid "Can not use dotstar with %s"
|
||||
#~ msgstr "Wúfǎ yǔ dotstar yīqǐ shǐyòng %s"
|
||||
|
||||
#~ msgid "Can't add services in Central mode"
|
||||
#~ msgstr "Wúfǎ zài zhōngyāng móshì xià tiānjiā fúwù"
|
||||
|
||||
@ -2850,6 +2856,9 @@ msgstr "líng bù"
|
||||
#~ msgstr ""
|
||||
#~ "Jǐn zhīchí dān sè, suǒyǐn 8bpp hé 16bpp huò gèng dà de BMP: %d bpp tígōng"
|
||||
|
||||
#~ msgid "Only slices with step=1 (aka None) are supported"
|
||||
#~ msgstr "Jǐn zhīchí 1 bù qiēpiàn"
|
||||
|
||||
#~ msgid "Soft device assert, id: 0x%08lX, pc: 0x%08lX"
|
||||
#~ msgstr "Ruǎn shèbèi wéihù, id: 0X%08lX, pc: 0X%08lX"
|
||||
|
||||
@ -2906,6 +2915,10 @@ msgstr "líng bù"
|
||||
#~ msgid "bad GATT role"
|
||||
#~ msgstr "zǒng xiédìng de bùliáng juésè"
|
||||
|
||||
#, c-format
|
||||
#~ msgid "byteorder is not an instance of ByteOrder (got a %s)"
|
||||
#~ msgstr "zì jié bùshì zì jié xù shílì (yǒu %s)"
|
||||
|
||||
#~ msgid "characteristics includes an object that is not a Characteristic"
|
||||
#~ msgstr "tèxìng bāokuò bùshì zìfú de wùtǐ"
|
||||
|
||||
@ -2938,3 +2951,6 @@ msgstr "líng bù"
|
||||
|
||||
#~ msgid "unsupported bitmap type"
|
||||
#~ msgstr "bù zhīchí de bitmap lèixíng"
|
||||
|
||||
#~ msgid "write_args must be a list, tuple, or None"
|
||||
#~ msgstr "xiě cānshù bìxū shì yuán zǔ, lièbiǎo huò None"
|
||||
|
@ -233,7 +233,7 @@ SRC_C = \
|
||||
lib/oofatfs/ff.c \
|
||||
lib/oofatfs/option/ccsbcs.c \
|
||||
lib/timeutils/timeutils.c \
|
||||
lib/tinyusb/src/portable/microchip/$(CHIP_FAMILY)/dcd_$(CHIP_FAMILY).c \
|
||||
lib/tinyusb/src/portable/microchip/samd/dcd_samd.c \
|
||||
lib/utils/buffer_helper.c \
|
||||
lib/utils/context_manager_helpers.c \
|
||||
lib/utils/interrupt_char.c \
|
||||
|
@ -27,6 +27,9 @@
|
||||
// Explanation of how a user got into safe mode.
|
||||
#define BOARD_USER_SAFE_MODE_ACTION "pressing both buttons at start up"
|
||||
|
||||
// Increase stack size slightly due to CPX library import nesting
|
||||
#define CIRCUITPY_DEFAULT_STACK_SIZE (4504)
|
||||
|
||||
#define DEFAULT_I2C_BUS_SCL (&pin_PB03)
|
||||
#define DEFAULT_I2C_BUS_SDA (&pin_PB02)
|
||||
|
||||
|
@ -27,6 +27,9 @@
|
||||
// Explanation of how a user got into safe mode.
|
||||
#define BOARD_USER_SAFE_MODE_ACTION "pressing both buttons at start up"
|
||||
|
||||
// Increase stack size slightly due to CPX library import nesting
|
||||
#define CIRCUITPY_DEFAULT_STACK_SIZE (4504)
|
||||
|
||||
#define DEFAULT_I2C_BUS_SCL (&pin_PB03)
|
||||
#define DEFAULT_I2C_BUS_SDA (&pin_PB02)
|
||||
|
||||
|
@ -13,9 +13,10 @@ EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C"
|
||||
# Turn off features and optimizations for Crickit build to make room for additional frozen libs.
|
||||
LONGINT_IMPL = NONE
|
||||
CIRCUITPY_DISPLAYIO = 0
|
||||
CIRCUITPY_PIXELBUF = 0
|
||||
CIRCUITPY_FREQUENCYIO = 0
|
||||
CIRCUITPY_GAMEPAD = 0
|
||||
CIRCUITPY_I2CSLAVE = 0
|
||||
CIRCUITPY_PIXELBUF = 0
|
||||
|
||||
SUPEROPT_GC = 0
|
||||
CFLAGS_INLINE_LIMIT = 55
|
||||
|
@ -27,6 +27,9 @@
|
||||
// Explanation of how a user got into safe mode.
|
||||
#define BOARD_USER_SAFE_MODE_ACTION "pressing both buttons at start up"
|
||||
|
||||
// Increase stack size slightly due to CPX library import nesting.
|
||||
#define CIRCUITPY_DEFAULT_STACK_SIZE (4504) // divisible by 8
|
||||
|
||||
#define DEFAULT_I2C_BUS_SCL (&pin_PB03)
|
||||
#define DEFAULT_I2C_BUS_SDA (&pin_PB02)
|
||||
|
||||
@ -40,3 +43,5 @@
|
||||
// USB is always used internally so skip the pin objects for it.
|
||||
#define IGNORE_PIN_PA24 1
|
||||
#define IGNORE_PIN_PA25 1
|
||||
|
||||
#define MICROPY_PY_URE 0
|
||||
|
@ -23,8 +23,8 @@
|
||||
#define DEFAULT_SPI_BUS_MOSI (&pin_PB23)
|
||||
#define DEFAULT_SPI_BUS_MISO (&pin_PB22)
|
||||
|
||||
#define DEFAULT_UART_BUS_RX (&pin_PB12)
|
||||
#define DEFAULT_UART_BUS_TX (&pin_PB13)
|
||||
#define DEFAULT_UART_BUS_RX (&pin_PB13)
|
||||
#define DEFAULT_UART_BUS_TX (&pin_PB12)
|
||||
|
||||
// USB is always used internally so skip the pin objects for it.
|
||||
#define IGNORE_PIN_PA24 1
|
||||
|
@ -24,10 +24,10 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA22) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB23) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB22) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PB12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PB13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PB13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PB12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB12) },
|
||||
{ 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) },
|
||||
|
@ -19,3 +19,10 @@
|
||||
// USB is always used internally so skip the pin objects for it.
|
||||
#define IGNORE_PIN_PA24 1
|
||||
#define IGNORE_PIN_PA25 1
|
||||
|
||||
// Enable the use of 2 displays
|
||||
|
||||
#define CIRCUITPY_DISPLAY_LIMIT (2)
|
||||
|
||||
|
||||
|
||||
|
@ -35,8 +35,36 @@
|
||||
|
||||
displayio_fourwire_obj_t board_display_obj;
|
||||
|
||||
typedef struct {
|
||||
const uint32_t *config_data;
|
||||
void *handoverHID;
|
||||
void *handoverMSC;
|
||||
const char *info_uf2;
|
||||
} UF2_BInfo;
|
||||
|
||||
#define APP_START_ADDRESS 0x00004000
|
||||
#define UF2_BINFO ((UF2_BInfo *)(APP_START_ADDRESS - sizeof(UF2_BInfo)))
|
||||
|
||||
#define CFG_DISPLAY_CFG0 39
|
||||
#define CFG_MAGIC0 0x1e9e10f1
|
||||
|
||||
#define DELAY 0x80
|
||||
|
||||
uint32_t lookupCfg(uint32_t key, uint32_t defl) {
|
||||
const uint32_t *ptr = UF2_BINFO->config_data;
|
||||
if (!ptr || (((uint32_t)ptr) & 3) || *ptr != CFG_MAGIC0) {
|
||||
// no config data!
|
||||
} else {
|
||||
ptr += 4;
|
||||
while (*ptr) {
|
||||
if (*ptr == key)
|
||||
return ptr[1];
|
||||
ptr += 2;
|
||||
}
|
||||
}
|
||||
return defl;
|
||||
}
|
||||
|
||||
uint8_t display_init_sequence[] = {
|
||||
0x01, 0 | DELAY, 150, // SWRESET
|
||||
0x11, 0 | DELAY, 255, // SLPOUT
|
||||
@ -63,8 +91,6 @@ uint8_t display_init_sequence[] = {
|
||||
0x2E, 0x2C, 0x29, 0x2D,
|
||||
0x2E, 0x2E, 0x37, 0x3F,
|
||||
0x00, 0x00, 0x02, 0x10,
|
||||
0x2a, 3, 0x02, 0x00, 0x81, // _CASET XSTART = 2, XEND = 129
|
||||
0x2b, 3, 0x02, 0x00, 0x81, // _RASET XSTART = 2, XEND = 129
|
||||
0x13, 0 | DELAY, 10, // _NORON
|
||||
0x29, 0 | DELAY, 100, // _DISPON
|
||||
};
|
||||
@ -83,14 +109,17 @@ void board_init(void) {
|
||||
&pin_PA17, // TFT_RST Reset
|
||||
60000000);
|
||||
|
||||
uint32_t cfg0 = lookupCfg(CFG_DISPLAY_CFG0, 0x000000);
|
||||
uint32_t offX = (cfg0 >> 8) & 0xff;
|
||||
uint32_t offY = (cfg0 >> 16) & 0xff;
|
||||
displayio_display_obj_t* display = &displays[0].display;
|
||||
display->base.type = &displayio_display_type;
|
||||
common_hal_displayio_display_construct(display,
|
||||
bus,
|
||||
160, // Width (after rotation)
|
||||
128, // Height (after rotation)
|
||||
0, // column start
|
||||
0, // row start
|
||||
offX, // column start
|
||||
offY, // row start
|
||||
0, // rotation
|
||||
16, // Color depth
|
||||
false, // grayscale
|
||||
|
@ -10,7 +10,6 @@ INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = NONE
|
||||
|
||||
CIRCUITPY_SMALL_BUILD = 1
|
||||
CIRCUITPY_PS2IO = 0
|
||||
CIRCUITPY_AUDIOBUSIO = 0
|
||||
CIRCUITPY_BITBANGIO = 0
|
||||
CIRCUITPY_FREQUENCYIO = 0
|
||||
@ -23,7 +22,17 @@ CIRCUITPY_RTC = 0
|
||||
CIRCUITPY_TOUCHIO = 0
|
||||
CIRCUITPY_USB_HID = 0
|
||||
CIRCUITPY_USB_MIDI = 0
|
||||
CIRCUITPY_AUDIOPWMIO = 0
|
||||
CIRCUITPY_AUDIOMP3 = 0
|
||||
CIRCUITPY_BITBANG_APA102 = 0
|
||||
CIRCUITPY_BLEIO = 0
|
||||
CIRCUITPY_GAMEPADSHIFT = 0
|
||||
CIRCUITPY_NETWORK = 0
|
||||
CIRCUITPY_ROTARYIO = 0
|
||||
CIRCUITPY_SAMD = 0
|
||||
CIRCUITPY_TOUCHIO = 0
|
||||
|
||||
CIRCUITPY_AUDIOMIXER = 1
|
||||
CIRCUITPY_AUDIOIO = 1
|
||||
CIRCUITPY_DISPLAYIO = 1
|
||||
CIRCUITPY_GAMEPAD = 1
|
||||
@ -33,6 +42,8 @@ CIRCUITPY_MATH = 1
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython-stage/pewpew_m4
|
||||
CIRCUITPY_DISPLAY_FONT = $(TOP)/ports/atmel-samd/boards/ugame10/brutalist-6.bdf
|
||||
|
||||
USB_DEVICES = "CDC,MSC"
|
||||
|
||||
# Tweak inlining depending on language.
|
||||
ifeq ($(TRANSLATION), zh_Latn_pinyin)
|
||||
CFLAGS_INLINE_LIMIT = 45
|
||||
|
40
ports/atmel-samd/boards/xinabox_cc03/board.c
Normal file
40
ports/atmel-samd/boards/xinabox_cc03/board.c
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
}
|
||||
|
||||
bool board_requests_safe_mode(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void reset_board(void) {
|
||||
}
|
24
ports/atmel-samd/boards/xinabox_cc03/mpconfigboard.h
Normal file
24
ports/atmel-samd/boards/xinabox_cc03/mpconfigboard.h
Normal file
@ -0,0 +1,24 @@
|
||||
#define MICROPY_HW_BOARD_NAME "XinaBox CC03"
|
||||
#define MICROPY_HW_MCU_NAME "samd21g18"
|
||||
|
||||
#define MICROPY_PORT_A (0)
|
||||
#define MICROPY_PORT_B (0)
|
||||
#define MICROPY_PORT_C (0)
|
||||
|
||||
#define CIRCUITPY_INTERNAL_NVM_SIZE 256
|
||||
|
||||
#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 - CIRCUITPY_INTERNAL_NVM_SIZE)
|
||||
|
||||
#define DEFAULT_I2C_BUS_SCL (&pin_PA23)
|
||||
#define DEFAULT_I2C_BUS_SDA (&pin_PA22)
|
||||
|
||||
#define DEFAULT_SPI_BUS_SCK (&pin_PB11)
|
||||
#define DEFAULT_SPI_BUS_MOSI (&pin_PB10)
|
||||
#define DEFAULT_SPI_BUS_MISO (&pin_PA12)
|
||||
|
||||
#define DEFAULT_UART_BUS_RX (&pin_PA11)
|
||||
#define DEFAULT_UART_BUS_TX (&pin_PA10)
|
||||
|
||||
// USB is always used internally so skip the pin objects for it.
|
||||
#define IGNORE_PIN_PA24 1
|
||||
#define IGNORE_PIN_PA25 1
|
26
ports/atmel-samd/boards/xinabox_cc03/mpconfigboard.mk
Normal file
26
ports/atmel-samd/boards/xinabox_cc03/mpconfigboard.mk
Normal file
@ -0,0 +1,26 @@
|
||||
LD_FILE = boards/samd21x18-bootloader.ld
|
||||
USB_VID = 0x04D8
|
||||
USB_PID = 0xEC72
|
||||
USB_PRODUCT = "XinaBox CC03"
|
||||
USB_MANUFACTURER = "XinaBox"
|
||||
|
||||
CHIP_VARIANT = SAMD21G18A
|
||||
CHIP_FAMILY = samd21
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
CIRCUITPY_SMALL_BUILD = 1
|
||||
|
||||
SUPEROPT_GC = 0
|
||||
|
||||
# Make room for frozen libs.
|
||||
CIRCUITPY_FREQUENCYIO = 0
|
||||
CIRCUITPY_ANALOGIO=0
|
||||
CIRCUITPY_NEOPIXEL_WRITE=0
|
||||
CIRCUITPY_PULSEIO=0
|
||||
CIRCUITPY_ROTARYIO=0
|
||||
CIRCUITPY_TOUCHIO_USE_NATIVE=0
|
||||
CIRCUITPY_TOUCHIO=0
|
||||
|
||||
# Include these Python libraries in firmware.
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
|
15
ports/atmel-samd/boards/xinabox_cc03/pins.c
Normal file
15
ports/atmel-samd/boards/xinabox_cc03/pins.c
Normal file
@ -0,0 +1,15 @@
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
|
||||
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_RED), MP_ROM_PTR(&pin_PA05) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GREEN), MP_ROM_PTR(&pin_PA06) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_BLUE), MP_ROM_PTR(&pin_PA07) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA22) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA23) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }
|
||||
};
|
||||
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
|
40
ports/atmel-samd/boards/xinabox_cs11/board.c
Normal file
40
ports/atmel-samd/boards/xinabox_cs11/board.c
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
}
|
||||
|
||||
bool board_requests_safe_mode(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void reset_board(void) {
|
||||
}
|
24
ports/atmel-samd/boards/xinabox_cs11/mpconfigboard.h
Normal file
24
ports/atmel-samd/boards/xinabox_cs11/mpconfigboard.h
Normal file
@ -0,0 +1,24 @@
|
||||
#define MICROPY_HW_BOARD_NAME "XinaBox CS11"
|
||||
#define MICROPY_HW_MCU_NAME "samd21g18"
|
||||
|
||||
#define MICROPY_PORT_A (0)
|
||||
#define MICROPY_PORT_B (0)
|
||||
#define MICROPY_PORT_C (0)
|
||||
|
||||
#define CIRCUITPY_INTERNAL_NVM_SIZE 256
|
||||
|
||||
#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 - CIRCUITPY_INTERNAL_NVM_SIZE)
|
||||
|
||||
#define DEFAULT_I2C_BUS_SCL (&pin_PA23)
|
||||
#define DEFAULT_I2C_BUS_SDA (&pin_PA22)
|
||||
|
||||
#define DEFAULT_SPI_BUS_SCK (&pin_PB11)
|
||||
#define DEFAULT_SPI_BUS_MOSI (&pin_PB10)
|
||||
#define DEFAULT_SPI_BUS_MISO (&pin_PA12)
|
||||
|
||||
#define DEFAULT_UART_BUS_RX (&pin_PA11)
|
||||
#define DEFAULT_UART_BUS_TX (&pin_PA10)
|
||||
|
||||
// USB is always used internally so skip the pin objects for it.
|
||||
#define IGNORE_PIN_PA24 1
|
||||
#define IGNORE_PIN_PA25 1
|
29
ports/atmel-samd/boards/xinabox_cs11/mpconfigboard.mk
Normal file
29
ports/atmel-samd/boards/xinabox_cs11/mpconfigboard.mk
Normal file
@ -0,0 +1,29 @@
|
||||
LD_FILE = boards/samd21x18-bootloader.ld
|
||||
USB_VID = 0x04D8
|
||||
USB_PID = 0xEC75
|
||||
USB_PRODUCT = "XinaBox CS11"
|
||||
USB_MANUFACTURER = "XinaBox"
|
||||
|
||||
CHIP_VARIANT = SAMD21G18A
|
||||
CHIP_FAMILY = samd21
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
CIRCUITPY_SMALL_BUILD = 1
|
||||
|
||||
SUPEROPT_GC = 0
|
||||
|
||||
# Make room for frozen libs.
|
||||
CIRCUITPY_FREQUENCYIO = 0
|
||||
CIRCUITPY_ANALOGIO=0
|
||||
CIRCUITPY_NEOPIXEL_WRITE=0
|
||||
CIRCUITPY_PULSEIO=0
|
||||
CIRCUITPY_ROTARYIO=0
|
||||
CIRCUITPY_TOUCHIO_USE_NATIVE=0
|
||||
CIRCUITPY_TOUCHIO=0
|
||||
CIRCUITPY_USB_MIDI=0
|
||||
CIRCUITPY_RTC=0
|
||||
|
||||
# Include these Python libraries in firmware.
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SD
|
20
ports/atmel-samd/boards/xinabox_cs11/pins.c
Normal file
20
ports/atmel-samd/boards/xinabox_cs11/pins.c
Normal file
@ -0,0 +1,20 @@
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
|
||||
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_CS), MP_ROM_PTR(&pin_PA09) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_ALERT), MP_ROM_PTR(&pin_PA07) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_RED), MP_ROM_PTR(&pin_PA16) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GREEN), MP_ROM_PTR(&pin_PA19) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_BLUE), MP_ROM_PTR(&pin_PA17) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA22) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA23) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB10) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }
|
||||
};
|
||||
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
|
@ -76,6 +76,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
|
||||
mp_raise_ValueError(translate("Invalid pins"));
|
||||
}
|
||||
|
||||
#if CIRCUITPY_REQUIRE_I2C_PULLUPS
|
||||
// Test that the pins are in a high state. (Hopefully indicating they are pulled up.)
|
||||
gpio_set_pin_function(sda->number, GPIO_PIN_FUNCTION_OFF);
|
||||
gpio_set_pin_function(scl->number, GPIO_PIN_FUNCTION_OFF);
|
||||
@ -98,6 +99,8 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
|
||||
reset_pin_number(scl->number);
|
||||
mp_raise_RuntimeError(translate("SDA or SCL needs a pull up"));
|
||||
}
|
||||
#endif
|
||||
|
||||
gpio_set_pin_function(sda->number, sda_pinmux);
|
||||
gpio_set_pin_function(scl->number, scl_pinmux);
|
||||
|
||||
|
@ -42,7 +42,6 @@
|
||||
#define CIRCUITPY_MCU_FAMILY samd21
|
||||
#define MICROPY_PY_SYS_PLATFORM "Atmel SAMD21"
|
||||
#define SPI_FLASH_MAX_BAUDRATE 8000000
|
||||
#define CIRCUITPY_DEFAULT_STACK_SIZE 4096
|
||||
#define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (0)
|
||||
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (0)
|
||||
#define MICROPY_PY_FUNCTION_ATTRS (0)
|
||||
@ -74,8 +73,6 @@
|
||||
#define CIRCUITPY_MCU_FAMILY samd51
|
||||
#define MICROPY_PY_SYS_PLATFORM "MicroChip SAMD51"
|
||||
#define SPI_FLASH_MAX_BAUDRATE 24000000
|
||||
// 24kiB stack
|
||||
#define CIRCUITPY_DEFAULT_STACK_SIZE 0x6000
|
||||
#define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (1)
|
||||
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1)
|
||||
#define MICROPY_PY_FUNCTION_ATTRS (1)
|
||||
@ -108,6 +105,10 @@
|
||||
#define CIRCUITPY_INTERNAL_NVM_SIZE (256)
|
||||
#endif
|
||||
|
||||
#ifndef CIRCUITPY_DEFAULT_STACK_SIZE
|
||||
#define CIRCUITPY_DEFAULT_STACK_SIZE 4096
|
||||
#endif
|
||||
|
||||
#endif // SAMD21
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -118,6 +119,10 @@
|
||||
#define CIRCUITPY_INTERNAL_NVM_SIZE (8192)
|
||||
#endif
|
||||
|
||||
#ifndef CIRCUITPY_DEFAULT_STACK_SIZE
|
||||
#define CIRCUITPY_DEFAULT_STACK_SIZE (24*1024)
|
||||
#endif
|
||||
|
||||
// If CIRCUITPY is internal, use half of flash for it.
|
||||
#if INTERNAL_FLASH_FILESYSTEM
|
||||
#ifndef CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 4c0deecf889da0074c1dbc9a5e2d24cb7c7a31c6
|
||||
Subproject commit b89811f22a24ac350079ceaf0cdf0e62aa03f4f4
|
@ -131,6 +131,7 @@ LDFLAGS = \
|
||||
-o $(BUILD)/firmware.elf \
|
||||
--start-group \
|
||||
-u spresense_main \
|
||||
-u board_timerhook \
|
||||
$(BUILD)/libmpy.a \
|
||||
$(SPRESENSE_SDK)/sdk/libs/libapps.a \
|
||||
$(SPRESENSE_SDK)/sdk/libs/libsdk.a \
|
||||
|
1
ports/mimxrt10xx/.gitignore
vendored
Normal file
1
ports/mimxrt10xx/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
build-*/
|
253
ports/mimxrt10xx/Makefile
Normal file
253
ports/mimxrt10xx/Makefile
Normal file
@ -0,0 +1,253 @@
|
||||
# This file is part of the MicroPython project, http://micropython.org/
|
||||
#
|
||||
# The MIT License (MIT)
|
||||
#
|
||||
# Copyright (c) 2019 Dan Halbert for Adafruit Industries
|
||||
# Copyright (c) 2019 Artur Pacholec
|
||||
#
|
||||
# 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.
|
||||
|
||||
# Select the board to build for.
|
||||
ifeq ($(BOARD),)
|
||||
$(error You must provide a BOARD parameter)
|
||||
else
|
||||
ifeq ($(wildcard boards/$(BOARD)/.),)
|
||||
$(error Invalid BOARD specified)
|
||||
endif
|
||||
endif
|
||||
|
||||
# If the build directory is not given, make it reflect the board name.
|
||||
BUILD ?= build-$(BOARD)
|
||||
|
||||
include ../../py/mkenv.mk
|
||||
# Board-specific
|
||||
include boards/$(BOARD)/mpconfigboard.mk
|
||||
# Port-specific
|
||||
include mpconfigport.mk
|
||||
# CircuitPython-specific
|
||||
include $(TOP)/py/circuitpy_mpconfig.mk
|
||||
|
||||
# qstr definitions (must come before including py.mk)
|
||||
QSTR_DEFS = qstrdefsport.h
|
||||
|
||||
# include py core make definitions
|
||||
include $(TOP)/py/py.mk
|
||||
|
||||
include $(TOP)/supervisor/supervisor.mk
|
||||
|
||||
# Include make rules and variables common across CircuitPython builds.
|
||||
include $(TOP)/py/circuitpy_defns.mk
|
||||
|
||||
CROSS_COMPILE = arm-none-eabi-
|
||||
|
||||
INC += \
|
||||
-I. \
|
||||
-I../.. \
|
||||
-I../lib/mp-readline \
|
||||
-I../lib/timeutils \
|
||||
-I../../lib/tinyusb/src \
|
||||
-I../../supervisor/shared/usb \
|
||||
-I$(BUILD) \
|
||||
-Iboards/ \
|
||||
-Iboards/$(BOARD) \
|
||||
-Iperipherals/ \
|
||||
-Iperipherals/mimxrt10xx/ \
|
||||
-Isdk/CMSIS/Include \
|
||||
-Isdk/devices/$(CHIP_FAMILY) \
|
||||
-Isdk/devices/$(CHIP_FAMILY)/drivers \
|
||||
|
||||
# NDEBUG disables assert() statements. This reduces code size pretty dramatically, per tannewt.
|
||||
|
||||
CFLAGS += -Os -DNDEBUG
|
||||
|
||||
# TinyUSB defines
|
||||
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_MIMXRT10XX -DCFG_TUD_MIDI_RX_BUFSIZE=128 -DCFG_TUD_CDC_RX_BUFSIZE=256 -DCFG_TUD_MIDI_TX_BUFSIZE=128 -DCFG_TUD_CDC_TX_BUFSIZE=256 -DCFG_TUD_MSC_BUFSIZE=1024
|
||||
|
||||
#Debugging/Optimization
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -ggdb
|
||||
# You may want to disable -flto if it interferes with debugging.
|
||||
#CFLAGS += -flto -flto-partition=none
|
||||
# You may want to enable these flags to make setting breakpoints easier.
|
||||
CFLAGS += -fno-inline -fno-ipa-sra
|
||||
else
|
||||
# -finline-limit can shrink the image size.
|
||||
# -finline-limit=80 or so is similar to not having it on.
|
||||
# There is no simple default value, though.
|
||||
|
||||
# Do a default shrink for small builds.
|
||||
ifndef CFLAGS_INLINE_LIMIT
|
||||
ifeq ($(CIRCUITPY_SMALL_BUILD),1)
|
||||
CFLAGS_INLINE_LIMIT = 50
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef CFLAGS_INLINE_LIMIT
|
||||
CFLAGS += -finline-limit=$(CFLAGS_INLINE_LIMIT)
|
||||
endif
|
||||
#CFLAGS += -flto -flto-partition=none
|
||||
endif
|
||||
|
||||
CFLAGS += $(INC) -Wall -Wno-cast-align -std=gnu11 -nostdlib $(BASE_CFLAGS) $(CFLAGS_MOD) $(COPT)
|
||||
|
||||
CFLAGS += \
|
||||
-mthumb \
|
||||
-mapcs \
|
||||
-mcpu=cortex-m7 \
|
||||
-mfloat-abi=hard \
|
||||
-mfpu=fpv5-sp-d16 \
|
||||
-DCPU_$(CHIP_VARIANT) \
|
||||
-DDEBUG \
|
||||
-DXIP_EXTERNAL_FLASH=1 \
|
||||
-DXIP_BOOT_HEADER_ENABLE=1 \
|
||||
-D__START=main \
|
||||
-Os -g3 -Wno-unused-parameter \
|
||||
-ffunction-sections -fdata-sections -fstack-usage \
|
||||
-D__STARTUP_CLEAR_BSS
|
||||
|
||||
LDFLAGS = $(CFLAGS) -nostartfiles -fshort-enums -Wl,-nostdlib -Wl,-T,$(LD_FILE) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections -specs=nano.specs
|
||||
LIBS := -lgcc -lc -lnosys -lm
|
||||
|
||||
# Use toolchain libm if we're not using our own.
|
||||
ifndef INTERNAL_LIBM
|
||||
LIBS += -lm
|
||||
endif
|
||||
|
||||
LDFLAGS += -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-sp-d16 -mthumb -mapcs
|
||||
BOOTLOADER_SIZE := 0x6000C000
|
||||
|
||||
SRC_SDK := \
|
||||
drivers/fsl_adc.c \
|
||||
drivers/fsl_cache.c \
|
||||
drivers/fsl_clock.c \
|
||||
drivers/fsl_common.c \
|
||||
drivers/fsl_flexspi.c \
|
||||
drivers/fsl_gpio.c \
|
||||
drivers/fsl_lpi2c.c \
|
||||
drivers/fsl_lpspi.c \
|
||||
drivers/fsl_lpuart.c \
|
||||
drivers/fsl_ocotp.c \
|
||||
drivers/fsl_pwm.c \
|
||||
drivers/fsl_snvs_hp.c \
|
||||
drivers/fsl_tempmon.c \
|
||||
drivers/fsl_trng.c \
|
||||
system_$(CHIP_FAMILY).c \
|
||||
|
||||
SRC_SDK := $(addprefix sdk/devices/$(CHIP_FAMILY)/, $(SRC_SDK))
|
||||
|
||||
SRC_C = \
|
||||
background.c \
|
||||
boards/$(BOARD)/board.c \
|
||||
boards/$(BOARD)/pins.c \
|
||||
fatfs_port.c \
|
||||
lib/mp-readline/readline.c \
|
||||
lib/oofatfs/ff.c \
|
||||
lib/oofatfs/option/ccsbcs.c \
|
||||
lib/timeutils/timeutils.c \
|
||||
lib/utils/buffer_helper.c \
|
||||
lib/utils/context_manager_helpers.c \
|
||||
lib/utils/interrupt_char.c \
|
||||
lib/utils/pyexec.c \
|
||||
lib/utils/stdout_helpers.c \
|
||||
lib/utils/sys_stdio_mphal.c \
|
||||
lib/tinyusb/src/portable/nxp/transdimension/dcd_transdimension.c \
|
||||
mphalport.c \
|
||||
peripherals/mimxrt10xx/$(CHIP_FAMILY)/clocks.c \
|
||||
peripherals/mimxrt10xx/$(CHIP_FAMILY)/periph.c \
|
||||
peripherals/mimxrt10xx/$(CHIP_FAMILY)/pins.c \
|
||||
reset.c \
|
||||
supervisor/flexspi_nor_flash_ops.c \
|
||||
supervisor/shared/memory.c \
|
||||
tick.c
|
||||
|
||||
ifeq ($(CIRCUITPY_NETWORK),1)
|
||||
CFLAGS += -DMICROPY_PY_NETWORK=1
|
||||
|
||||
SRC_MOD += lib/netutils/netutils.c
|
||||
|
||||
ifneq ($(MICROPY_PY_WIZNET5K),0)
|
||||
WIZNET5K_DIR=drivers/wiznet5k
|
||||
INC += -I$(TOP)/$(WIZNET5K_DIR)
|
||||
CFLAGS_MOD += -DMICROPY_PY_WIZNET5K=$(MICROPY_PY_WIZNET5K) -D_WIZCHIP_=$(MICROPY_PY_WIZNET5K)
|
||||
SRC_MOD += $(addprefix $(WIZNET5K_DIR)/,\
|
||||
ethernet/w$(MICROPY_PY_WIZNET5K)/w$(MICROPY_PY_WIZNET5K).c \
|
||||
ethernet/wizchip_conf.c \
|
||||
ethernet/socket.c \
|
||||
internet/dns/dns.c \
|
||||
internet/dhcp/dhcp.c \
|
||||
)
|
||||
|
||||
endif # MICROPY_PY_WIZNET5K
|
||||
endif # CIRCUITPY_NETWORK
|
||||
|
||||
ifeq ($(CIRCUITPY_NETWORK),1)
|
||||
ifneq ($(MICROPY_PY_WIZNET5K),0)
|
||||
SRC_SHARED_MODULE += wiznet/__init__.c wiznet/wiznet5k.c
|
||||
endif
|
||||
endif
|
||||
|
||||
# TODO
|
||||
#ifeq ($(CIRCUITPY_AUDIOBUSIO),1)
|
||||
#SRC_C += peripherals/samd/i2s.c peripherals/samd/$(CHIP_FAMILY)/i2s.c
|
||||
#endif
|
||||
#
|
||||
SRC_COMMON_HAL_EXPANDED = $(addprefix shared-bindings/, $(SRC_COMMON_HAL)) \
|
||||
$(addprefix shared-bindings/, $(SRC_BINDINGS_ENUMS)) \
|
||||
$(addprefix common-hal/, $(SRC_COMMON_HAL))
|
||||
|
||||
SRC_SHARED_MODULE_EXPANDED = $(addprefix shared-bindings/, $(SRC_SHARED_MODULE)) \
|
||||
$(addprefix shared-module/, $(SRC_SHARED_MODULE)) \
|
||||
$(addprefix shared-module/, $(SRC_SHARED_MODULE_INTERNAL))
|
||||
|
||||
SRC_S = \
|
||||
sdk/devices/$(CHIP_FAMILY)/gcc/startup_$(CHIP_FAMILY).S \
|
||||
supervisor/cpu.S
|
||||
|
||||
OBJ = $(PY_O) $(SUPERVISOR_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
|
||||
OBJ += $(addprefix $(BUILD)/, $(SRC_SDK:.c=.o))
|
||||
OBJ += $(addprefix $(BUILD)/, $(SRC_COMMON_HAL_EXPANDED:.c=.o))
|
||||
OBJ += $(addprefix $(BUILD)/, $(SRC_SHARED_MODULE_EXPANDED:.c=.o))
|
||||
ifeq ($(INTERNAL_LIBM),1)
|
||||
OBJ += $(addprefix $(BUILD)/, $(SRC_LIBM:.c=.o))
|
||||
endif
|
||||
OBJ += $(addprefix $(BUILD)/, $(SRC_S:.S=.o))
|
||||
OBJ += $(addprefix $(BUILD)/, $(SRC_MOD:.c=.o))
|
||||
|
||||
SRC_QSTR += $(SRC_C) $(SRC_SUPERVISOR) $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_MODULE_EXPANDED)
|
||||
|
||||
all: $(BUILD)/firmware.bin $(BUILD)/firmware.uf2
|
||||
|
||||
$(BUILD)/firmware.elf: $(LD_FILE) $(OBJ)
|
||||
$(STEPECHO) "LINK $@"
|
||||
$(Q)$(CC) -o $@ $(LDFLAGS) $(filter-out $<,$^) -Wl,--start-group $(LIBS) -Wl,--end-group
|
||||
|
||||
$(BUILD)/firmware.bin: $(BUILD)/firmware.elf
|
||||
$(STEPECHO) "Create $@"
|
||||
$(Q)$(OBJCOPY) -O binary -j .interrupts -j .text -j .ARM.exidx -j .data $^ $@
|
||||
|
||||
$(BUILD)/firmware.uf2: $(BUILD)/firmware.bin
|
||||
$(STEPECHO) "Create $@"
|
||||
$(Q)$(PYTHON3) $(TOP)/tools/uf2/utils/uf2conv.py -b $(BOOTLOADER_SIZE) -f MIMXRT10XX -c -o $@ $^
|
||||
|
||||
include $(TOP)/py/mkrules.mk
|
||||
|
||||
# Print out the value of a make variable.
|
||||
# https://stackoverflow.com/questions/16467718/how-to-print-out-a-variable-in-makefile
|
||||
print-%:
|
||||
@echo $* = $($*)
|
3
ports/mimxrt10xx/README.md
Normal file
3
ports/mimxrt10xx/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# CircuitPython Port To The NXP i.MX RT10xx Series
|
||||
|
||||
This is a port of CircuitPython to the i.MX RT10xx series of chips.
|
82
ports/mimxrt10xx/background.c
Normal file
82
ports/mimxrt10xx/background.c
Normal file
@ -0,0 +1,82 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
|
||||
* Copyright (c) 2019 Artur Pacholec
|
||||
*
|
||||
* 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 "background.h"
|
||||
|
||||
//#include "audio_dma.h"
|
||||
#include "tick.h"
|
||||
#include "supervisor/filesystem.h"
|
||||
#include "supervisor/shared/tick.h"
|
||||
#include "supervisor/usb.h"
|
||||
|
||||
#include "py/runtime.h"
|
||||
#include "shared-module/network/__init__.h"
|
||||
#include "supervisor/shared/stack.h"
|
||||
|
||||
// TODO
|
||||
#ifdef CIRCUITPY_DISPLAYIO
|
||||
//#include "shared-module/displayio/__init__.h"
|
||||
#endif
|
||||
|
||||
volatile uint64_t last_finished_tick = 0;
|
||||
|
||||
bool stack_ok_so_far = true;
|
||||
|
||||
static bool running_background_tasks = false;
|
||||
|
||||
void background_tasks_reset(void) {
|
||||
running_background_tasks = false;
|
||||
}
|
||||
|
||||
void run_background_tasks(void) {
|
||||
// Don't call ourselves recursively.
|
||||
if (running_background_tasks) {
|
||||
return;
|
||||
}
|
||||
assert_heap_ok();
|
||||
running_background_tasks = true;
|
||||
|
||||
#if CIRCUITPY_AUDIOIO || CIRCUITPY_AUDIOBUSIO
|
||||
audio_dma_background();
|
||||
#endif
|
||||
#if CIRCUITPY_DISPLAYIO
|
||||
displayio_background();
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_NETWORK
|
||||
network_module_background();
|
||||
#endif
|
||||
filesystem_background();
|
||||
usb_background();
|
||||
running_background_tasks = false;
|
||||
assert_heap_ok();
|
||||
|
||||
last_finished_tick = supervisor_ticks_ms64();
|
||||
}
|
||||
|
||||
bool background_tasks_ok(void) {
|
||||
return supervisor_ticks_ms64() - last_finished_tick < 1000;
|
||||
}
|
38
ports/mimxrt10xx/background.h
Normal file
38
ports/mimxrt10xx/background.h
Normal 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
|
||||
* Copyright (c) 2019 Artur Pacholec
|
||||
*
|
||||
* 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_MIMXRT10XX_BACKGROUND_H
|
||||
#define MICROPY_INCLUDED_MIMXRT10XX_BACKGROUND_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
void background_tasks_reset(void);
|
||||
void run_background_tasks(void);
|
||||
void run_background_vm_tasks(void);
|
||||
bool background_tasks_ok(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_MIMXRT10XX_BACKGROUND_H
|
48
ports/mimxrt10xx/boards/board.h
Normal file
48
ports/mimxrt10xx/boards/board.h
Normal file
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// This file defines board specific functions.
|
||||
|
||||
#ifndef MICROPY_INCLUDED_MIMXRT10XX_BOARDS_BOARD_H
|
||||
#define MICROPY_INCLUDED_MIMXRT10XX_BOARDS_BOARD_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "py/mpconfig.h"
|
||||
#include "fsl_common.h"
|
||||
|
||||
// Initializes board related state once on start up.
|
||||
void board_init(void);
|
||||
|
||||
// Returns true if the user initiates safe mode in a board specific way.
|
||||
// Also add BOARD_USER_SAFE_MODE in mpconfigboard.h to explain the board specific
|
||||
// way.
|
||||
bool board_requests_safe_mode(void);
|
||||
|
||||
// Reset the state of off MCU components such as neopixels.
|
||||
void reset_board(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_MIMXRT10XX_BOARDS_BOARD_H
|
55
ports/mimxrt10xx/boards/feather_mimxrt1011/board.c
Normal file
55
ports/mimxrt10xx/boards/feather_mimxrt1011/board.c
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2019 Scott Shawcroft for Adafruit Industries
|
||||
* Copyright (c) 2019 Artur Pacholec
|
||||
*
|
||||
* 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 "fsl_iomuxc.h"
|
||||
|
||||
void board_init(void) {
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_06_FLEXSPI_A_SS0_B, 1U);
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_07_FLEXSPI_A_DATA1,1U);
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_08_FLEXSPI_A_DATA2, 1U);
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_09_FLEXSPI_A_DATA0, 1U);
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_10_FLEXSPI_A_SCLK, 1U);
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_11_FLEXSPI_A_DATA3, 1U);
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_12_FLEXSPI_A_DQS, 1U);
|
||||
|
||||
IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_06_FLEXSPI_A_SS0_B,0x10E1U);
|
||||
IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_07_FLEXSPI_A_DATA1, 0x10E1U);
|
||||
IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_08_FLEXSPI_A_DATA2, 0x10E1U);
|
||||
IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_09_FLEXSPI_A_DATA0, 0x10E1U);
|
||||
IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_10_FLEXSPI_A_SCLK, 0x10E1U);
|
||||
IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_11_FLEXSPI_A_DATA3, 0x10E1U);
|
||||
IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_12_FLEXSPI_A_DQS, 0x10E1U);
|
||||
}
|
||||
|
||||
bool board_requests_safe_mode(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void reset_board(void) {
|
||||
}
|
31
ports/mimxrt10xx/boards/feather_mimxrt1011/mpconfigboard.h
Normal file
31
ports/mimxrt10xx/boards/feather_mimxrt1011/mpconfigboard.h
Normal file
@ -0,0 +1,31 @@
|
||||
#define MICROPY_HW_BOARD_NAME "Feather MIMXRT1011"
|
||||
#define MICROPY_HW_MCU_NAME "IMXRT1011DAE5A"
|
||||
|
||||
//TODO
|
||||
//#define MICROPY_HW_LED_STATUS (&pin_PA27)
|
||||
|
||||
#define MICROPY_HW_NEOPIXEL (&pin_GPIO_SD_05)
|
||||
|
||||
// These are pins not to reset.
|
||||
// QSPI Data pins
|
||||
//#define MICROPY_PORT_A ( PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11 )
|
||||
// QSPI CS, and QSPI SCK
|
||||
//#define MICROPY_PORT_B ( PORT_PB10 | PORT_PB11 | PORT_PB22 )
|
||||
//#define MICROPY_PORT_C ( 0 )
|
||||
//#define MICROPY_PORT_D ( 0 )
|
||||
|
||||
// If you change this, then make sure to update the linker scripts as well to
|
||||
// make sure you don't overwrite code
|
||||
#define CIRCUITPY_INTERNAL_NVM_SIZE 0
|
||||
|
||||
#define BOARD_FLASH_SIZE (8 * 1024 * 1024)
|
||||
|
||||
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO_10)
|
||||
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO_09)
|
||||
|
||||
#define DEFAULT_SPI_BUS_SCK (&pin_GPIO_AD_06)
|
||||
#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO_AD_04)
|
||||
#define DEFAULT_SPI_BUS_MISO (&pin_GPIO_AD_03)
|
||||
|
||||
#define DEFAULT_UART_BUS_RX (&pin_GPIO_AD_01)
|
||||
#define DEFAULT_UART_BUS_TX (&pin_GPIO_AD_02)
|
21
ports/mimxrt10xx/boards/feather_mimxrt1011/mpconfigboard.mk
Normal file
21
ports/mimxrt10xx/boards/feather_mimxrt1011/mpconfigboard.mk
Normal file
@ -0,0 +1,21 @@
|
||||
LD_FILE = boards/mimxrt1011-bootloader-external-flash.ld
|
||||
USB_VID = 0x239A
|
||||
USB_PID = 0x8074
|
||||
USB_PRODUCT = "Feather MIMXRT1011"
|
||||
USB_MANUFACTURER = "arturo182"
|
||||
USB_DEVICES = "CDC,MSC,HID"
|
||||
|
||||
CHIP_VARIANT = MIMXRT1011DAE5A
|
||||
CHIP_FAMILY = MIMXRT1011
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
|
||||
CIRCUITPY_DISPLAYIO = 0
|
||||
CIRCUITPY_AUDIOIO = 0
|
||||
CIRCUITPY_AUDIOBUSIO = 0
|
||||
CIRCUITPY_FREQUENCYIO = 0
|
||||
CIRCUITPY_I2CSLAVE = 0
|
||||
CIRCUITPY_NVM = 0
|
||||
CIRCUITPY_ROTARYIO = 0
|
||||
|
||||
LONGINT_IMPL = MPZ
|
52
ports/mimxrt10xx/boards/feather_mimxrt1011/pins.c
Normal file
52
ports/mimxrt10xx/boards/feather_mimxrt1011/pins.c
Normal file
@ -0,0 +1,52 @@
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
|
||||
#include "boards/board.h"
|
||||
|
||||
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
// Analog
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO_AD_14) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO_AD_11) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO_AD_10) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO_AD_09) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO_AD_08) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO_AD_07) },
|
||||
|
||||
// Digital
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO_06) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO_05) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO_04) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO_03) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO_02) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO_01) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO_00) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO_AD_05) },
|
||||
|
||||
// SPI
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO_AD_06) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO_AD_03) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO_AD_04) },
|
||||
|
||||
// UART
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO_AD_02) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO_AD_01) },
|
||||
|
||||
// I2C
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO_09) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO_10) },
|
||||
|
||||
// ESP control
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_CS), MP_ROM_PTR(&pin_GPIO_13) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_GPIO0), MP_ROM_PTR(&pin_GPIO_07) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_BUSY), MP_ROM_PTR(&pin_GPIO_08) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RESET), MP_ROM_PTR(&pin_GPIO_AD_00) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_TX), MP_ROM_PTR(&pin_GPIO_12) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RX), MP_ROM_PTR(&pin_GPIO_11) },
|
||||
//{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RTS), MP_ROM_PTR(&pin_) },
|
||||
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO_SD_05) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
|
||||
};
|
||||
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
|
55
ports/mimxrt10xx/boards/feather_mimxrt1062/board.c
Normal file
55
ports/mimxrt10xx/boards/feather_mimxrt1062/board.c
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2019 Scott Shawcroft for Adafruit Industries
|
||||
* Copyright (c) 2019 Artur Pacholec
|
||||
*
|
||||
* 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 "fsl_iomuxc.h"
|
||||
|
||||
void board_init(void) {
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_06_FLEXSPIA_SS0_B, 1U);
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_07_FLEXSPIA_SCLK,1U);
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_08_FLEXSPIA_DATA00, 1U);
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_09_FLEXSPIA_DATA01, 1U);
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_10_FLEXSPIA_DATA02, 1U);
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_11_FLEXSPIA_DATA03, 1U);
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_05_FLEXSPIA_DQS, 1U);
|
||||
|
||||
IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_B1_06_FLEXSPIA_SS0_B,0x10E1U);
|
||||
IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_B1_09_FLEXSPIA_DATA01, 0x10E1U);
|
||||
IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_B1_10_FLEXSPIA_DATA02, 0x10E1U);
|
||||
IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_B1_08_FLEXSPIA_DATA00, 0x10E1U);
|
||||
IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_B1_07_FLEXSPIA_SCLK, 0x10E1U);
|
||||
IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_B1_11_FLEXSPIA_DATA03, 0x10E1U);
|
||||
IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_B1_05_FLEXSPIA_DQS, 0x10E1U);
|
||||
}
|
||||
|
||||
bool board_requests_safe_mode(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void reset_board(void) {
|
||||
}
|
31
ports/mimxrt10xx/boards/feather_mimxrt1062/mpconfigboard.h
Normal file
31
ports/mimxrt10xx/boards/feather_mimxrt1062/mpconfigboard.h
Normal file
@ -0,0 +1,31 @@
|
||||
#define MICROPY_HW_BOARD_NAME "Feather MIMXRT1062"
|
||||
#define MICROPY_HW_MCU_NAME "IMXRT1062DVJ6A"
|
||||
|
||||
//TODO
|
||||
//#define MICROPY_HW_LED_STATUS (&pin_PA27)
|
||||
|
||||
//#define MICROPY_HW_NEOPIXEL (&pin_PB22)
|
||||
|
||||
// These are pins not to reset.
|
||||
// QSPI Data pins
|
||||
//#define MICROPY_PORT_A ( PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11 )
|
||||
// QSPI CS, and QSPI SCK
|
||||
//#define MICROPY_PORT_B ( PORT_PB10 | PORT_PB11 | PORT_PB22 )
|
||||
//#define MICROPY_PORT_C ( 0 )
|
||||
//#define MICROPY_PORT_D ( 0 )
|
||||
|
||||
// If you change this, then make sure to update the linker scripts as well to
|
||||
// make sure you don't overwrite code
|
||||
#define CIRCUITPY_INTERNAL_NVM_SIZE 0
|
||||
|
||||
#define BOARD_FLASH_SIZE (8 * 1024 * 1024)
|
||||
|
||||
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO_EMC_22)
|
||||
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO_EMC_21)
|
||||
|
||||
#define DEFAULT_SPI_BUS_SCK (&pin_GPIO_B1_07)
|
||||
#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO_B1_06)
|
||||
#define DEFAULT_SPI_BUS_MISO (&pin_GPIO_B1_05)
|
||||
|
||||
#define DEFAULT_UART_BUS_RX (&pin_GPIO_B1_03)
|
||||
#define DEFAULT_UART_BUS_TX (&pin_GPIO_B1_02)
|
21
ports/mimxrt10xx/boards/feather_mimxrt1062/mpconfigboard.mk
Normal file
21
ports/mimxrt10xx/boards/feather_mimxrt1062/mpconfigboard.mk
Normal file
@ -0,0 +1,21 @@
|
||||
LD_FILE = boards/mimxrt1062-bootloader-external-flash.ld
|
||||
USB_VID = 0x239A
|
||||
USB_PID = 0x8076
|
||||
USB_PRODUCT = "Feather MIMXRT1062"
|
||||
USB_MANUFACTURER = "arturo182"
|
||||
USB_DEVICES = "CDC,MSC,HID"
|
||||
|
||||
CHIP_VARIANT = MIMXRT1062DVJ6A
|
||||
CHIP_FAMILY = MIMXRT1062
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
|
||||
CIRCUITPY_DISPLAYIO = 0
|
||||
CIRCUITPY_AUDIOIO = 0
|
||||
CIRCUITPY_AUDIOBUSIO = 0
|
||||
CIRCUITPY_FREQUENCYIO = 0
|
||||
CIRCUITPY_I2CSLAVE = 0
|
||||
CIRCUITPY_NVM = 0
|
||||
CIRCUITPY_ROTARYIO = 0
|
||||
|
||||
LONGINT_IMPL = MPZ
|
45
ports/mimxrt10xx/boards/feather_mimxrt1062/pins.c
Normal file
45
ports/mimxrt10xx/boards/feather_mimxrt1062/pins.c
Normal file
@ -0,0 +1,45 @@
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
|
||||
#include "boards/board.h"
|
||||
|
||||
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
// Analog
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO_AD_B0_13) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO_AD_B1_10) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO_AD_B0_12) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO_AD_B1_15) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO_AD_B1_11) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO_AD_B0_14) },
|
||||
|
||||
// Digital
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO_EMC_15) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO_EMC_28) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO_EMC_29) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO_EMC_04) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO_EMC_10) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO_EMC_23) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO_EMC_12) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO_B1_08) },
|
||||
|
||||
// SPI
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO_B1_07) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO_B1_05) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO_B1_06) },
|
||||
|
||||
// UART
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO_B1_02) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO_B1_03) },
|
||||
|
||||
// I2C
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO_EMC_21) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO_EMC_22) },
|
||||
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO_SD_B1_01) },
|
||||
|
||||
// TODO: Big connector
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
|
||||
};
|
||||
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
|
55
ports/mimxrt10xx/boards/imxrt1010_evk/board.c
Normal file
55
ports/mimxrt10xx/boards/imxrt1010_evk/board.c
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2019 Scott Shawcroft for Adafruit Industries
|
||||
* Copyright (c) 2019 Artur Pacholec
|
||||
*
|
||||
* 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 "fsl_iomuxc.h"
|
||||
|
||||
void board_init(void) {
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_06_FLEXSPI_A_SS0_B, 1U);
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_07_FLEXSPI_A_DATA1,1U);
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_08_FLEXSPI_A_DATA2, 1U);
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_09_FLEXSPI_A_DATA0, 1U);
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_10_FLEXSPI_A_SCLK, 1U);
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_11_FLEXSPI_A_DATA3, 1U);
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_12_FLEXSPI_A_DQS, 1U);
|
||||
|
||||
IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_06_FLEXSPI_A_SS0_B,0x10E1U);
|
||||
IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_07_FLEXSPI_A_DATA1, 0x10E1U);
|
||||
IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_08_FLEXSPI_A_DATA2, 0x10E1U);
|
||||
IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_09_FLEXSPI_A_DATA0, 0x10E1U);
|
||||
IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_10_FLEXSPI_A_SCLK, 0x10E1U);
|
||||
IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_11_FLEXSPI_A_DATA3, 0x10E1U);
|
||||
IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_12_FLEXSPI_A_DQS, 0x10E1U);
|
||||
}
|
||||
|
||||
bool board_requests_safe_mode(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void reset_board(void) {
|
||||
}
|
31
ports/mimxrt10xx/boards/imxrt1010_evk/mpconfigboard.h
Normal file
31
ports/mimxrt10xx/boards/imxrt1010_evk/mpconfigboard.h
Normal file
@ -0,0 +1,31 @@
|
||||
#define MICROPY_HW_BOARD_NAME "IMXRT1010-EVK"
|
||||
#define MICROPY_HW_MCU_NAME "IMXRT1011DAE5A"
|
||||
|
||||
//TODO
|
||||
//#define MICROPY_HW_LED_STATUS (&pin_PA27)
|
||||
|
||||
//#define MICROPY_HW_NEOPIXEL (&pin_PB22)
|
||||
|
||||
// These are pins not to reset.
|
||||
// QSPI Data pins
|
||||
//#define MICROPY_PORT_A ( PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11 )
|
||||
// QSPI CS, and QSPI SCK
|
||||
//#define MICROPY_PORT_B ( PORT_PB10 | PORT_PB11 | PORT_PB22 )
|
||||
//#define MICROPY_PORT_C ( 0 )
|
||||
//#define MICROPY_PORT_D ( 0 )
|
||||
|
||||
// If you change this, then make sure to update the linker scripts as well to
|
||||
// make sure you don't overwrite code
|
||||
#define CIRCUITPY_INTERNAL_NVM_SIZE 0
|
||||
|
||||
#define BOARD_FLASH_SIZE (16 * 1024 * 1024)
|
||||
|
||||
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO_02)
|
||||
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO_01)
|
||||
|
||||
#define DEFAULT_SPI_BUS_SCK (&pin_GPIO_AD_06)
|
||||
#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO_AD_04)
|
||||
#define DEFAULT_SPI_BUS_MISO (&pin_GPIO_AD_03)
|
||||
|
||||
#define DEFAULT_UART_BUS_RX (&pin_GPIO_09)
|
||||
#define DEFAULT_UART_BUS_TX (&pin_GPIO_10)
|
22
ports/mimxrt10xx/boards/imxrt1010_evk/mpconfigboard.mk
Normal file
22
ports/mimxrt10xx/boards/imxrt1010_evk/mpconfigboard.mk
Normal file
@ -0,0 +1,22 @@
|
||||
LD_FILE = boards/mimxrt1011-bootloader-external-flash.ld
|
||||
USB_VID = 0x239A
|
||||
USB_PID = 0x8078
|
||||
USB_PRODUCT = "IMXRT1010-EVK"
|
||||
USB_MANUFACTURER = "NXP"
|
||||
USB_DEVICES = "CDC,MSC,HID"
|
||||
|
||||
CHIP_VARIANT = MIMXRT1011DAE5A
|
||||
CHIP_FAMILY = MIMXRT1011
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
|
||||
CIRCUITPY_DISPLAYIO = 0
|
||||
CIRCUITPY_AUDIOIO = 0
|
||||
CIRCUITPY_AUDIOBUSIO = 0
|
||||
CIRCUITPY_FREQUENCYIO = 0
|
||||
CIRCUITPY_I2CSLAVE = 0
|
||||
CIRCUITPY_NEOPIXEL_WRITE = 0
|
||||
CIRCUITPY_NVM = 0
|
||||
CIRCUITPY_ROTARYIO = 0
|
||||
|
||||
LONGINT_IMPL = MPZ
|
37
ports/mimxrt10xx/boards/imxrt1010_evk/pins.c
Normal file
37
ports/mimxrt10xx/boards/imxrt1010_evk/pins.c
Normal file
@ -0,0 +1,37 @@
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
|
||||
#include "boards/board.h"
|
||||
|
||||
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO_09) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO_10) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO_AD_05) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO_AD_06) },
|
||||
//{ MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO_08) }, // Connected to audio codec
|
||||
//{ MP_OBJ_NEW_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO_01) }, // Connected to audio codec
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO_AD_01) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO_AD_02) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO_SD_02) },
|
||||
//{ MP_OBJ_NEW_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO_03) }, // Connected to audio codec
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO_AD_05) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO_AD_04) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO_AD_03) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO_AD_06) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO_01) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO_02) },
|
||||
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO_AD_07) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO_AD_09) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO_AD_10) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO_AD_14) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO_AD_01) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO_AD_02) },
|
||||
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_USR_LED), MP_ROM_PTR(&pin_GPIO_11) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_USR_SW), MP_ROM_PTR(&pin_GPIO_SD_05) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
|
||||
};
|
||||
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
|
106
ports/mimxrt10xx/boards/mimxrt1011-bootloader-external-flash.ld
Normal file
106
ports/mimxrt10xx/boards/mimxrt1011-bootloader-external-flash.ld
Normal file
@ -0,0 +1,106 @@
|
||||
ENTRY(Reset_Handler)
|
||||
|
||||
_minimum_stack_size = 64K;
|
||||
_minimum_heap_size = 0;
|
||||
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x60000000, LENGTH = 8M
|
||||
FLASH_BOOTLOADER (rx) : ORIGIN = 0x60000000, LENGTH = 48K
|
||||
FLASH_ISR (rx) : ORIGIN = 0x6000C000, LENGTH = 1K
|
||||
FLASH_TEXT (rx) : ORIGIN = 0x6000C400, LENGTH = 975K
|
||||
FLASH_FATFS (r) : ORIGIN = 0x60100000, LENGTH = 7M
|
||||
RAM (rwx) : ORIGIN = 0x00000000, LENGTH = 32K
|
||||
OCRAM (rwx) : ORIGIN = 0x20200000, LENGTH = 64K
|
||||
}
|
||||
|
||||
_estack = ORIGIN(OCRAM) + LENGTH(OCRAM);
|
||||
_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4;
|
||||
|
||||
__fatfs_flash_start_addr = ORIGIN(FLASH_FATFS);
|
||||
__fatfs_flash_length = LENGTH(FLASH_FATFS);
|
||||
|
||||
__RAM_VECTOR_TABLE_SIZE_BYTES = 0;
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.interrupts :
|
||||
{
|
||||
__VECTOR_TABLE = .;
|
||||
__VECTOR_RAM = .;
|
||||
|
||||
. = ALIGN(4);
|
||||
KEEP(*(.isr_vector)) /* Startup code */
|
||||
. = ALIGN(4);
|
||||
} > FLASH_ISR
|
||||
|
||||
.text :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(EXCLUDE_FILE(
|
||||
*flexspi_nor_flash_ops.o
|
||||
*fsl_flexspi.o
|
||||
) .text*) /* .text* sections (code) */
|
||||
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
|
||||
. = ALIGN(4);
|
||||
} > FLASH_TEXT
|
||||
|
||||
.ARM.exidx :
|
||||
{
|
||||
*(.ARM.exidx*)
|
||||
*(.gnu.linkonce.armexidx.*)
|
||||
_etext = .; /* define a global symbol at end of code */
|
||||
__etext = .; /* define a global symbol at end of code */
|
||||
} > FLASH_TEXT
|
||||
|
||||
/* used by the startup to initialize data */
|
||||
_sidata = .;
|
||||
|
||||
.data : AT (_sidata)
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__data_start__ = .; /* create a global symbol at data start */
|
||||
|
||||
*(.data*) /* .data* sections */
|
||||
*flexspi_nor_flash_ops.o(.text*)
|
||||
*fsl_flexspi.o(.text*)
|
||||
. = ALIGN(4);
|
||||
|
||||
__data_end__ = .; /* define a global symbol at data end */
|
||||
} > RAM
|
||||
|
||||
/* Uninitialized data section */
|
||||
.bss :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__bss_start__ = .;
|
||||
|
||||
*(.bss*)
|
||||
*(COMMON)
|
||||
|
||||
. = ALIGN(4);
|
||||
__bss_end__ = .;
|
||||
PROVIDE(end = .);
|
||||
} > RAM
|
||||
|
||||
.heap :
|
||||
{
|
||||
. = ALIGN(8);
|
||||
_heap_start = .; /* define a global symbol at heap start */
|
||||
|
||||
. += _minimum_heap_size;
|
||||
|
||||
__HeapLimit = .;
|
||||
} > OCRAM
|
||||
|
||||
.stack :
|
||||
{
|
||||
. = ALIGN(8);
|
||||
. += _minimum_stack_size;
|
||||
} > OCRAM
|
||||
|
||||
.ARM.attributes 0 : { *(.ARM.attributes) }
|
||||
}
|
||||
|
||||
ASSERT(__data_end__ <= ORIGIN(FLASH_TEXT) + LENGTH(FLASH_TEXT), "region FLASH_TEXT overflowed with text and data")
|
||||
ASSERT(_estack - _minimum_stack_size >= __HeapLimit, "region OCRAM overflowed with stack and heap")
|
123
ports/mimxrt10xx/boards/mimxrt1011-external-flash.ld
Normal file
123
ports/mimxrt10xx/boards/mimxrt1011-external-flash.ld
Normal file
@ -0,0 +1,123 @@
|
||||
ENTRY(Reset_Handler)
|
||||
|
||||
_minimum_stack_size = 64K;
|
||||
_minimum_heap_size = 0;
|
||||
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x60000000, LENGTH = 8M
|
||||
FLASH_CONFIG (rx) : ORIGIN = 0x60000400, LENGTH = 3K
|
||||
FLASH_IVT (rx) : ORIGIN = 0x60001000, LENGTH = 4K
|
||||
FLASH_ISR (rx) : ORIGIN = 0x60002000, LENGTH = 1K
|
||||
FLASH_TEXT (rx) : ORIGIN = 0x60002400, LENGTH = 1015K
|
||||
FLASH_FATFS (r) : ORIGIN = 0x60100000, LENGTH = 7M
|
||||
RAM (rwx) : ORIGIN = 0x00000000, LENGTH = 32K
|
||||
OCRAM (rwx) : ORIGIN = 0x20200000, LENGTH = 64K
|
||||
}
|
||||
|
||||
_estack = ORIGIN(OCRAM) + LENGTH(OCRAM);
|
||||
_bootloader_dbl_tap = 0;
|
||||
|
||||
__fatfs_flash_start_addr = ORIGIN(FLASH_FATFS);
|
||||
__fatfs_flash_length = LENGTH(FLASH_FATFS);
|
||||
|
||||
__RAM_VECTOR_TABLE_SIZE_BYTES = 0;
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.flash_config :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
KEEP(* (.boot_hdr.conf))
|
||||
. = ALIGN(4);
|
||||
} > FLASH_CONFIG
|
||||
|
||||
.ivt :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
KEEP(* (.boot_hdr.ivt))
|
||||
KEEP(* (.boot_hdr.boot_data))
|
||||
KEEP(* (.boot_hdr.dcd_data))
|
||||
. = ALIGN(4);
|
||||
} > FLASH_IVT
|
||||
|
||||
.interrupts :
|
||||
{
|
||||
__VECTOR_TABLE = .;
|
||||
__VECTOR_RAM = .;
|
||||
|
||||
. = ALIGN(4);
|
||||
KEEP(*(.isr_vector)) /* Startup code */
|
||||
. = ALIGN(4);
|
||||
} > FLASH_ISR
|
||||
|
||||
.text :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(EXCLUDE_FILE(
|
||||
*flexspi_nor_flash_ops.o
|
||||
*fsl_flexspi.o
|
||||
) .text*) /* .text* sections (code) */
|
||||
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
|
||||
. = ALIGN(4);
|
||||
} > FLASH_TEXT
|
||||
|
||||
.ARM.exidx :
|
||||
{
|
||||
*(.ARM.exidx*)
|
||||
*(.gnu.linkonce.armexidx.*)
|
||||
_etext = .; /* define a global symbol at end of code */
|
||||
__etext = .; /* define a global symbol at end of code */
|
||||
} > FLASH_TEXT
|
||||
|
||||
/* used by the startup to initialize data */
|
||||
_sidata = .;
|
||||
|
||||
.data : AT (_sidata)
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__data_start__ = .; /* create a global symbol at data start */
|
||||
|
||||
*(.data*) /* .data* sections */
|
||||
*flexspi_nor_flash_ops.o(.text*)
|
||||
*fsl_flexspi.o(.text*)
|
||||
. = ALIGN(4);
|
||||
|
||||
__data_end__ = .; /* define a global symbol at data end */
|
||||
} > RAM
|
||||
|
||||
/* Uninitialized data section */
|
||||
.bss :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__bss_start__ = .;
|
||||
|
||||
*(.bss*)
|
||||
*(COMMON)
|
||||
|
||||
. = ALIGN(4);
|
||||
__bss_end__ = .;
|
||||
PROVIDE(end = .);
|
||||
} > RAM
|
||||
|
||||
.heap :
|
||||
{
|
||||
. = ALIGN(8);
|
||||
_heap_start = .; /* define a global symbol at heap start */
|
||||
|
||||
. += _minimum_heap_size;
|
||||
|
||||
__HeapLimit = .;
|
||||
} > OCRAM
|
||||
|
||||
.stack :
|
||||
{
|
||||
. = ALIGN(8);
|
||||
. += _minimum_stack_size;
|
||||
} > OCRAM
|
||||
|
||||
.ARM.attributes 0 : { *(.ARM.attributes) }
|
||||
}
|
||||
|
||||
ASSERT(__data_end__ <= ORIGIN(FLASH_TEXT) + LENGTH(FLASH_TEXT), "region FLASH_TEXT overflowed with text and data")
|
||||
ASSERT(_estack - _minimum_stack_size >= __HeapLimit, "region OCRAM overflowed with stack and heap")
|
106
ports/mimxrt10xx/boards/mimxrt1062-bootloader-external-flash.ld
Normal file
106
ports/mimxrt10xx/boards/mimxrt1062-bootloader-external-flash.ld
Normal file
@ -0,0 +1,106 @@
|
||||
ENTRY(Reset_Handler)
|
||||
|
||||
_minimum_stack_size = 64K;
|
||||
_minimum_heap_size = 0;
|
||||
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x60000000, LENGTH = 8M
|
||||
FLASH_BOOTLOADER (rx) : ORIGIN = 0x60000000, LENGTH = 48K
|
||||
FLASH_ISR (rx) : ORIGIN = 0x6000C000, LENGTH = 1K
|
||||
FLASH_TEXT (rx) : ORIGIN = 0x6000C400, LENGTH = 975K
|
||||
FLASH_FATFS (r) : ORIGIN = 0x60100000, LENGTH = 7M
|
||||
RAM (rwx) : ORIGIN = 0x00000000, LENGTH = 128K
|
||||
OCRAM (rwx) : ORIGIN = 0x20200000, LENGTH = 768K
|
||||
}
|
||||
|
||||
_estack = ORIGIN(OCRAM) + LENGTH(OCRAM);
|
||||
_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4;
|
||||
|
||||
__fatfs_flash_start_addr = ORIGIN(FLASH_FATFS);
|
||||
__fatfs_flash_length = LENGTH(FLASH_FATFS);
|
||||
|
||||
__RAM_VECTOR_TABLE_SIZE_BYTES = 0;
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.interrupts :
|
||||
{
|
||||
__VECTOR_TABLE = .;
|
||||
__VECTOR_RAM = .;
|
||||
|
||||
. = ALIGN(4);
|
||||
KEEP(*(.isr_vector)) /* Startup code */
|
||||
. = ALIGN(4);
|
||||
} > FLASH_ISR
|
||||
|
||||
.text :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(EXCLUDE_FILE(
|
||||
*flexspi_nor_flash_ops.o
|
||||
*fsl_flexspi.o
|
||||
) .text*) /* .text* sections (code) */
|
||||
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
|
||||
. = ALIGN(4);
|
||||
} > FLASH_TEXT
|
||||
|
||||
.ARM.exidx :
|
||||
{
|
||||
*(.ARM.exidx*)
|
||||
*(.gnu.linkonce.armexidx.*)
|
||||
_etext = .; /* define a global symbol at end of code */
|
||||
__etext = .; /* define a global symbol at end of code */
|
||||
} > FLASH_TEXT
|
||||
|
||||
/* used by the startup to initialize data */
|
||||
_sidata = .;
|
||||
|
||||
.data : AT (_sidata)
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__data_start__ = .; /* create a global symbol at data start */
|
||||
|
||||
*(.data*) /* .data* sections */
|
||||
*flexspi_nor_flash_ops.o(.text*)
|
||||
*fsl_flexspi.o(.text*)
|
||||
. = ALIGN(4);
|
||||
|
||||
__data_end__ = .; /* define a global symbol at data end */
|
||||
} > RAM
|
||||
|
||||
/* Uninitialized data section */
|
||||
.bss :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__bss_start__ = .;
|
||||
|
||||
*(.bss*)
|
||||
*(COMMON)
|
||||
|
||||
. = ALIGN(4);
|
||||
__bss_end__ = .;
|
||||
PROVIDE(end = .);
|
||||
} > RAM
|
||||
|
||||
.heap :
|
||||
{
|
||||
. = ALIGN(8);
|
||||
_heap_start = .; /* define a global symbol at heap start */
|
||||
|
||||
. += _minimum_heap_size;
|
||||
|
||||
__HeapLimit = .;
|
||||
} > OCRAM
|
||||
|
||||
.stack :
|
||||
{
|
||||
. = ALIGN(8);
|
||||
. += _minimum_stack_size;
|
||||
} > OCRAM
|
||||
|
||||
.ARM.attributes 0 : { *(.ARM.attributes) }
|
||||
}
|
||||
|
||||
ASSERT(__data_end__ <= ORIGIN(FLASH_TEXT) + LENGTH(FLASH_TEXT), "region FLASH_TEXT overflowed with text and data")
|
||||
ASSERT(_estack - _minimum_stack_size >= __HeapLimit, "region OCRAM overflowed with stack and heap")
|
88
ports/mimxrt10xx/common-hal/analogio/AnalogIn.c
Normal file
88
ports/mimxrt10xx/common-hal/analogio/AnalogIn.c
Normal file
@ -0,0 +1,88 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2016 Scott Shawcroft for Adafruit Industries
|
||||
* Copyright (c) 2019 Artur Pacholec
|
||||
*
|
||||
* 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/analogio/AnalogIn.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "py/runtime.h"
|
||||
|
||||
#include "fsl_adc.h"
|
||||
|
||||
#define ADC_CHANNEL_GROUP 0
|
||||
|
||||
void common_hal_analogio_analogin_construct(analogio_analogin_obj_t* self,
|
||||
const mcu_pin_obj_t *pin) {
|
||||
adc_config_t config = {0};
|
||||
|
||||
if (pin->adc == NULL) {
|
||||
mp_raise_ValueError(translate("Pin does not have ADC capabilities"));
|
||||
}
|
||||
|
||||
ADC_GetDefaultConfig(&config);
|
||||
|
||||
config.enableLongSample = true;
|
||||
config.samplePeriodMode = kADC_SamplePeriod8or24Clocks;
|
||||
|
||||
ADC_Init(pin->adc, &config);
|
||||
ADC_SetHardwareAverageConfig(pin->adc, kADC_HardwareAverageCount32);
|
||||
ADC_DoAutoCalibration(pin->adc);
|
||||
|
||||
claim_pin(pin);
|
||||
|
||||
self->pin = pin;
|
||||
}
|
||||
|
||||
bool common_hal_analogio_analogin_deinited(analogio_analogin_obj_t *self) {
|
||||
return self->pin == mp_const_none;
|
||||
}
|
||||
|
||||
void common_hal_analogio_analogin_deinit(analogio_analogin_obj_t *self) {
|
||||
if (common_hal_analogio_analogin_deinited(self)) {
|
||||
return;
|
||||
}
|
||||
reset_pin_number(self->pin->number);
|
||||
self->pin = mp_const_none;
|
||||
}
|
||||
|
||||
uint16_t common_hal_analogio_analogin_get_value(analogio_analogin_obj_t *self) {
|
||||
adc_channel_config_t config = { 0 };
|
||||
config.channelNumber = self->pin->adc_channel;
|
||||
|
||||
ADC_SetChannelConfig(self->pin->adc, ADC_CHANNEL_GROUP, &config);
|
||||
|
||||
while (!ADC_GetChannelStatusFlags(self->pin->adc, ADC_CHANNEL_GROUP)) {
|
||||
|
||||
}
|
||||
|
||||
// Shift the value to be 16 bit
|
||||
return ADC_GetChannelConversionValue(self->pin->adc, ADC_CHANNEL_GROUP) << 4;
|
||||
}
|
||||
|
||||
float common_hal_analogio_analogin_get_reference_voltage(analogio_analogin_obj_t *self) {
|
||||
return 3.3f;
|
||||
}
|
40
ports/mimxrt10xx/common-hal/analogio/AnalogIn.h
Normal file
40
ports/mimxrt10xx/common-hal/analogio/AnalogIn.h
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2016 Scott Shawcroft
|
||||
* Copyright (c) 2019 Artur Pacholec
|
||||
*
|
||||
* 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_MIMXRT10XX_COMMON_HAL_ANALOGIO_ANALOGIN_H
|
||||
#define MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_ANALOGIO_ANALOGIN_H
|
||||
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
typedef struct {
|
||||
mp_obj_base_t base;
|
||||
const mcu_pin_obj_t *pin;
|
||||
} analogio_analogin_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_ANALOGIO_ANALOGIN_H
|
46
ports/mimxrt10xx/common-hal/analogio/AnalogOut.c
Normal file
46
ports/mimxrt10xx/common-hal/analogio/AnalogOut.c
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2013, 2014 Damien P. George
|
||||
* Copyright (c) 2019 Artur Pacholec
|
||||
*
|
||||
* 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 "shared-bindings/analogio/AnalogOut.h"
|
||||
#include "shared-bindings/microcontroller/Pin.h"
|
||||
#include "supervisor/shared/translate.h"
|
||||
|
||||
void common_hal_analogio_analogout_construct(analogio_analogout_obj_t* self, const mcu_pin_obj_t *pin) {
|
||||
mp_raise_NotImplementedError(translate("AnalogOut functionality not supported"));
|
||||
}
|
||||
|
||||
bool common_hal_analogio_analogout_deinited(analogio_analogout_obj_t *self) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void common_hal_analogio_analogout_deinit(analogio_analogout_obj_t *self) {
|
||||
}
|
||||
|
||||
void common_hal_analogio_analogout_set_value(analogio_analogout_obj_t *self, uint16_t value) {
|
||||
}
|
37
ports/mimxrt10xx/common-hal/analogio/AnalogOut.h
Normal file
37
ports/mimxrt10xx/common-hal/analogio/AnalogOut.h
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2016 Scott Shawcroft
|
||||
* Copyright (c) 2019 Artur Pacholec
|
||||
*
|
||||
* 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_MIMXRT10XX_COMMON_HAL_ANALOGIO_ANALOGOUT_H
|
||||
#define MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_ANALOGIO_ANALOGOUT_H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
typedef struct {
|
||||
mp_obj_base_t base;
|
||||
} analogio_analogout_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_ANALOGIO_ANALOGOUT_H
|
1
ports/mimxrt10xx/common-hal/analogio/__init__.c
Normal file
1
ports/mimxrt10xx/common-hal/analogio/__init__.c
Normal file
@ -0,0 +1 @@
|
||||
// No analogio module functions.
|
35
ports/mimxrt10xx/common-hal/board/__init__.c
Normal file
35
ports/mimxrt10xx/common-hal/board/__init__.c
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2013, 2014 Damien P. George
|
||||
* Copyright (c) 2019 Artur Pacholec
|
||||
*
|
||||
* 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 <string.h>
|
||||
|
||||
#include "py/runtime.h"
|
||||
#include "py/mphal.h"
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
|
||||
// Pins aren't actually defined here. They are in the board specific directory
|
||||
// such as boards/imxrt1010_evk/pins.c.
|
194
ports/mimxrt10xx/common-hal/busio/I2C.c
Normal file
194
ports/mimxrt10xx/common-hal/busio/I2C.c
Normal file
@ -0,0 +1,194 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2016 Scott Shawcroft
|
||||
* Copyright (c) 2019 Artur Pacholec
|
||||
*
|
||||
* 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 <stdio.h>
|
||||
|
||||
#include "shared-bindings/busio/I2C.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "py/runtime.h"
|
||||
#include "periph.h"
|
||||
|
||||
#include "fsl_lpi2c.h"
|
||||
|
||||
//TODO
|
||||
|
||||
#define I2C_CLOCK_SOURCE_DIVIDER (5U)
|
||||
#define I2C_CLOCK_FREQ (CLOCK_GetFreq(kCLOCK_Usb1PllClk) / 8 / (I2C_CLOCK_SOURCE_DIVIDER + 1U))
|
||||
|
||||
static void config_periph_pin(const mcu_periph_obj_t *periph) {
|
||||
IOMUXC_SetPinMux(
|
||||
periph->pin->mux_reg, periph->mux_mode,
|
||||
periph->input_reg, periph->input_idx,
|
||||
0,
|
||||
1);
|
||||
|
||||
IOMUXC_SetPinConfig(0, 0, 0, 0,
|
||||
periph->pin->cfg_reg,
|
||||
IOMUXC_SW_PAD_CTL_PAD_HYS(0)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_PUS(3)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_PUE(0)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_PKE(1)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_ODE(1)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_SPEED(2)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_DSE(4)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_SRE(0));
|
||||
}
|
||||
|
||||
void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
|
||||
const mcu_pin_obj_t *scl, const mcu_pin_obj_t *sda, uint32_t frequency, uint32_t timeout) {
|
||||
|
||||
const uint32_t sda_count = sizeof(mcu_i2c_sda_list) / sizeof(mcu_periph_obj_t);
|
||||
const uint32_t scl_count = sizeof(mcu_i2c_scl_list) / sizeof(mcu_periph_obj_t);
|
||||
|
||||
for (uint32_t i = 0; i < sda_count; ++i) {
|
||||
if (mcu_i2c_sda_list[i].pin != sda)
|
||||
continue;
|
||||
|
||||
for (uint32_t j = 0; j < scl_count; ++j) {
|
||||
if (mcu_i2c_scl_list[j].pin != scl)
|
||||
continue;
|
||||
|
||||
if (mcu_i2c_scl_list[j].bank_idx != mcu_i2c_sda_list[i].bank_idx)
|
||||
continue;
|
||||
|
||||
self->sda_pin = &mcu_i2c_sda_list[i];
|
||||
self->scl_pin = &mcu_i2c_scl_list[j];
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(self->sda_pin == NULL || self->scl_pin == NULL) {
|
||||
mp_raise_RuntimeError(translate("Invalid I2C pin selection"));
|
||||
} else {
|
||||
self->i2c = mcu_i2c_banks[self->sda_pin->bank_idx - 1];
|
||||
}
|
||||
|
||||
config_periph_pin(self->sda_pin);
|
||||
config_periph_pin(self->scl_pin);
|
||||
|
||||
lpi2c_master_config_t config = { 0 };
|
||||
LPI2C_MasterGetDefaultConfig(&config);
|
||||
|
||||
config.baudRate_Hz = frequency;
|
||||
|
||||
LPI2C_MasterInit(self->i2c, &config, I2C_CLOCK_FREQ);
|
||||
|
||||
#if CIRCUITPY_REQUIRE_I2C_PULLUPS
|
||||
// if (!gpio_get_pin_level(sda->number) || !gpio_get_pin_level(scl->number)) {
|
||||
// reset_pin_number(sda->number);
|
||||
// reset_pin_number(scl->number);
|
||||
// mp_raise_RuntimeError(translate("SDA or SCL needs a pull up"));
|
||||
// }
|
||||
#endif
|
||||
|
||||
claim_pin(self->sda_pin->pin);
|
||||
claim_pin(self->scl_pin->pin);
|
||||
}
|
||||
|
||||
bool common_hal_busio_i2c_deinited(busio_i2c_obj_t *self) {
|
||||
return self->sda_pin == NULL;
|
||||
}
|
||||
|
||||
void common_hal_busio_i2c_deinit(busio_i2c_obj_t *self) {
|
||||
if (common_hal_busio_i2c_deinited(self)) {
|
||||
return;
|
||||
}
|
||||
|
||||
LPI2C_MasterDeinit(self->i2c);
|
||||
|
||||
// reset_pin_number(self->sda_pin);
|
||||
// reset_pin_number(self->scl_pin);
|
||||
|
||||
self->sda_pin = NULL;
|
||||
self->scl_pin = NULL;
|
||||
}
|
||||
|
||||
bool common_hal_busio_i2c_probe(busio_i2c_obj_t *self, uint8_t addr) {
|
||||
lpi2c_master_transfer_t xfer = { 0 };
|
||||
xfer.slaveAddress = addr;
|
||||
|
||||
return LPI2C_MasterTransferBlocking(self->i2c, &xfer) == kStatus_Success;
|
||||
}
|
||||
|
||||
bool common_hal_busio_i2c_try_lock(busio_i2c_obj_t *self) {
|
||||
bool grabbed_lock = false;
|
||||
// CRITICAL_SECTION_ENTER()
|
||||
if (!self->has_lock) {
|
||||
grabbed_lock = true;
|
||||
self->has_lock = true;
|
||||
}
|
||||
// CRITICAL_SECTION_LEAVE();
|
||||
return grabbed_lock;
|
||||
}
|
||||
|
||||
bool common_hal_busio_i2c_has_lock(busio_i2c_obj_t *self) {
|
||||
return self->has_lock;
|
||||
}
|
||||
|
||||
void common_hal_busio_i2c_unlock(busio_i2c_obj_t *self) {
|
||||
self->has_lock = false;
|
||||
}
|
||||
|
||||
uint8_t common_hal_busio_i2c_write(busio_i2c_obj_t *self, uint16_t addr,
|
||||
const uint8_t *data, size_t len, bool transmit_stop_bit) {
|
||||
|
||||
lpi2c_master_transfer_t xfer = { 0 };
|
||||
xfer.flags = transmit_stop_bit ? kLPI2C_TransferDefaultFlag : kLPI2C_TransferNoStopFlag;
|
||||
xfer.slaveAddress = addr;
|
||||
xfer.data = (uint8_t*)data;
|
||||
xfer.dataSize = len;
|
||||
|
||||
const status_t status = LPI2C_MasterTransferBlocking(self->i2c, &xfer);
|
||||
if (status == kStatus_Success)
|
||||
return 0;
|
||||
|
||||
return MP_EIO;
|
||||
}
|
||||
|
||||
uint8_t common_hal_busio_i2c_read(busio_i2c_obj_t *self, uint16_t addr,
|
||||
uint8_t *data, size_t len) {
|
||||
|
||||
lpi2c_master_transfer_t xfer = { 0 };
|
||||
xfer.direction = kLPI2C_Read;
|
||||
xfer.slaveAddress = addr;
|
||||
xfer.data = data;
|
||||
xfer.dataSize = len;
|
||||
|
||||
const status_t status = LPI2C_MasterTransferBlocking(self->i2c, &xfer);
|
||||
if (status == kStatus_Success)
|
||||
return 0;
|
||||
|
||||
return MP_EIO;
|
||||
}
|
||||
|
||||
void common_hal_busio_i2c_never_reset(busio_i2c_obj_t *self) {
|
||||
// never_reset_sercom(self->i2c_desc.device.hw);
|
||||
//
|
||||
// never_reset_pin_number(self->scl_pin);
|
||||
// never_reset_pin_number(self->sda_pin);
|
||||
}
|
44
ports/mimxrt10xx/common-hal/busio/I2C.h
Normal file
44
ports/mimxrt10xx/common-hal/busio/I2C.h
Normal file
@ -0,0 +1,44 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2016 Scott Shawcroft
|
||||
* Copyright (c) 2019 Artur Pacholec
|
||||
*
|
||||
* 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_MIMXRT10XX_COMMON_HAL_BUSIO_I2C_H
|
||||
#define MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_BUSIO_I2C_H
|
||||
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
#include "fsl_common.h"
|
||||
#include "periph.h"
|
||||
#include "py/obj.h"
|
||||
|
||||
typedef struct {
|
||||
mp_obj_base_t base;
|
||||
LPI2C_Type *i2c;
|
||||
bool has_lock;
|
||||
const mcu_periph_obj_t *scl_pin;
|
||||
const mcu_periph_obj_t *sda_pin;
|
||||
} busio_i2c_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_BUSIO_I2C_H
|
33
ports/mimxrt10xx/common-hal/busio/OneWire.h
Normal file
33
ports/mimxrt10xx/common-hal/busio/OneWire.h
Normal file
@ -0,0 +1,33 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2016 Scott Shawcroft
|
||||
*
|
||||
* 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_MIMXRT10XX_COMMON_HAL_BUSIO_ONEWIRE_H
|
||||
#define MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_BUSIO_ONEWIRE_H
|
||||
|
||||
// Use bitbangio.
|
||||
#include "shared-module/busio/OneWire.h"
|
||||
|
||||
#endif // MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_BUSIO_ONEWIRE_H
|
318
ports/mimxrt10xx/common-hal/busio/SPI.c
Normal file
318
ports/mimxrt10xx/common-hal/busio/SPI.c
Normal file
@ -0,0 +1,318 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2016 Scott Shawcroft
|
||||
* Copyright (c) 2019 Artur Pacholec
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
//TODO
|
||||
#include "shared-bindings/busio/SPI.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "py/runtime.h"
|
||||
#include "periph.h"
|
||||
|
||||
#include "fsl_lpspi.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
//bool never_reset_sercoms[SERCOM_INST_NUM];
|
||||
//
|
||||
//void never_reset_sercom(Sercom* sercom) {
|
||||
// // Reset all SERCOMs except the ones being used by on-board devices.
|
||||
// Sercom *sercom_instances[SERCOM_INST_NUM] = SERCOM_INSTS;
|
||||
// for (int i = 0; i < SERCOM_INST_NUM; i++) {
|
||||
// if (sercom_instances[i] == sercom) {
|
||||
// never_reset_sercoms[i] = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//void allow_reset_sercom(Sercom* sercom) {
|
||||
// // Reset all SERCOMs except the ones being used by on-board devices.
|
||||
// Sercom *sercom_instances[SERCOM_INST_NUM] = SERCOM_INSTS;
|
||||
// for (int i = 0; i < SERCOM_INST_NUM; i++) {
|
||||
// if (sercom_instances[i] == sercom) {
|
||||
// never_reset_sercoms[i] = false;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//void reset_sercoms(void) {
|
||||
// // Reset all SERCOMs except the ones being used by on-board devices.
|
||||
// Sercom *sercom_instances[SERCOM_INST_NUM] = SERCOM_INSTS;
|
||||
// for (int i = 0; i < SERCOM_INST_NUM; i++) {
|
||||
// if (never_reset_sercoms[i]) {
|
||||
// continue;
|
||||
// }
|
||||
// #ifdef MICROPY_HW_APA102_SERCOM
|
||||
// if (sercom_instances[i] == MICROPY_HW_APA102_SERCOM) {
|
||||
// continue;
|
||||
// }
|
||||
// #endif
|
||||
// // SWRST is same for all modes of SERCOMs.
|
||||
// sercom_instances[i]->SPI.CTRLA.bit.SWRST = 1;
|
||||
// }
|
||||
//}
|
||||
|
||||
static void config_periph_pin(const mcu_periph_obj_t *periph) {
|
||||
IOMUXC_SetPinMux(
|
||||
periph->pin->mux_reg, periph->mux_mode,
|
||||
periph->input_reg, periph->input_idx,
|
||||
0,
|
||||
0);
|
||||
|
||||
IOMUXC_SetPinConfig(0, 0, 0, 0,
|
||||
periph->pin->cfg_reg,
|
||||
IOMUXC_SW_PAD_CTL_PAD_HYS(0)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_PUS(0)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_PUE(0)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_PKE(1)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_ODE(0)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_SPEED(2)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_DSE(4)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_SRE(0));
|
||||
}
|
||||
|
||||
#define LPSPI_CLOCK_SOURCE_DIVIDER (7U)
|
||||
#define LPSPI_MASTER_CLK_FREQ (CLOCK_GetFreq(kCLOCK_Usb1PllPfd0Clk) / (LPSPI_CLOCK_SOURCE_DIVIDER + 1U))
|
||||
|
||||
void common_hal_busio_spi_construct(busio_spi_obj_t *self,
|
||||
const mcu_pin_obj_t *clock, const mcu_pin_obj_t *mosi,
|
||||
const mcu_pin_obj_t *miso) {
|
||||
|
||||
// TODO: Allow none mosi or miso
|
||||
|
||||
const uint32_t sck_count = sizeof(mcu_spi_sck_list) / sizeof(mcu_periph_obj_t);
|
||||
const uint32_t miso_count = sizeof(mcu_spi_miso_list) / sizeof(mcu_periph_obj_t);
|
||||
const uint32_t mosi_count = sizeof(mcu_spi_mosi_list) / sizeof(mcu_periph_obj_t);
|
||||
|
||||
for (uint32_t i = 0; i < sck_count; ++i) {
|
||||
if (mcu_spi_sck_list[i].pin != clock)
|
||||
continue;
|
||||
|
||||
for (uint32_t j = 0; j < miso_count; ++j) {
|
||||
if (mcu_spi_miso_list[j].pin != miso)
|
||||
continue;
|
||||
|
||||
if (mcu_spi_miso_list[j].bank_idx != mcu_spi_sck_list[i].bank_idx)
|
||||
continue;
|
||||
|
||||
for (uint32_t k = 0; k < mosi_count; ++k) {
|
||||
if (mcu_spi_mosi_list[k].pin != mosi)
|
||||
continue;
|
||||
|
||||
if (mcu_spi_mosi_list[k].bank_idx != mcu_spi_miso_list[j].bank_idx)
|
||||
continue;
|
||||
|
||||
self->clock_pin = &mcu_spi_sck_list[i];
|
||||
self->miso_pin = &mcu_spi_miso_list[j];
|
||||
self->mosi_pin = &mcu_spi_mosi_list[k];
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(self->clock_pin == NULL || self->mosi_pin == NULL || self->miso_pin == NULL) {
|
||||
mp_raise_RuntimeError(translate("Invalid SPI pin selection"));
|
||||
} else {
|
||||
self->spi = mcu_spi_banks[self->clock_pin->bank_idx - 1];
|
||||
}
|
||||
|
||||
config_periph_pin(self->mosi_pin);
|
||||
config_periph_pin(self->miso_pin);
|
||||
config_periph_pin(self->clock_pin);
|
||||
|
||||
lpspi_master_config_t config = { 0 };
|
||||
LPSPI_MasterGetDefaultConfig(&config);
|
||||
|
||||
// Always start at 250khz which is what SD cards need. They are sensitive to
|
||||
// SPI bus noise before they are put into SPI mode.
|
||||
config.baudRate = 250000;
|
||||
|
||||
LPSPI_MasterInit(self->spi, &config, LPSPI_MASTER_CLK_FREQ);
|
||||
|
||||
LPSPI_Enable(self->spi, false);
|
||||
uint32_t tcrPrescaleValue;
|
||||
self->baudrate = LPSPI_MasterSetBaudRate(self->spi, config.baudRate, LPSPI_MASTER_CLK_FREQ, &tcrPrescaleValue);
|
||||
LPSPI_Enable(self->spi, true);
|
||||
|
||||
claim_pin(self->clock_pin->pin);
|
||||
|
||||
// if (mosi_none) {
|
||||
// self->MOSI_pin = NO_PIN;
|
||||
// } else {
|
||||
// gpio_set_pin_direction(mosi->number, GPIO_DIRECTION_OUT);
|
||||
// gpio_set_pin_pull_mode(mosi->number, GPIO_PULL_OFF);
|
||||
// gpio_set_pin_function(mosi->number, mosi_pinmux);
|
||||
// self->MOSI_pin = mosi->number;
|
||||
claim_pin(self->mosi_pin->pin);
|
||||
// }
|
||||
|
||||
// if (miso_none) {
|
||||
// self->MISO_pin = NO_PIN;
|
||||
// } else {
|
||||
// gpio_set_pin_direction(miso->number, GPIO_DIRECTION_IN);
|
||||
// gpio_set_pin_pull_mode(miso->number, GPIO_PULL_OFF);
|
||||
// gpio_set_pin_function(miso->number, miso_pinmux);
|
||||
// self->MISO_pin = miso->number;
|
||||
claim_pin(self->miso_pin->pin);
|
||||
// }
|
||||
}
|
||||
|
||||
void common_hal_busio_spi_never_reset(busio_spi_obj_t *self) {
|
||||
// never_reset_sercom(self->spi_desc.dev.prvt);
|
||||
|
||||
// never_reset_pin_number(self->clock_pin);
|
||||
// never_reset_pin_number(self->MOSI_pin);
|
||||
// never_reset_pin_number(self->MISO_pin);
|
||||
}
|
||||
|
||||
bool common_hal_busio_spi_deinited(busio_spi_obj_t *self) {
|
||||
return self->clock_pin == NULL;
|
||||
}
|
||||
|
||||
void common_hal_busio_spi_deinit(busio_spi_obj_t *self) {
|
||||
if (common_hal_busio_spi_deinited(self)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// allow_reset_sercom(self->spi_desc.dev.prvt);
|
||||
|
||||
// spi_m_sync_disable(&self->spi_desc);
|
||||
// spi_m_sync_deinit(&self->spi_desc);
|
||||
// reset_pin_number(self->clock_pin);
|
||||
// reset_pin_number(self->MOSI_pin);
|
||||
// reset_pin_number(self->MISO_pin);
|
||||
self->clock_pin = NULL;
|
||||
}
|
||||
|
||||
bool common_hal_busio_spi_configure(busio_spi_obj_t *self,
|
||||
uint32_t baudrate, uint8_t polarity, uint8_t phase, uint8_t bits) {
|
||||
lpspi_master_config_t config = { 0 };
|
||||
LPSPI_MasterGetDefaultConfig(&config);
|
||||
|
||||
config.baudRate = baudrate;
|
||||
config.cpol = polarity;
|
||||
config.cpha = phase;
|
||||
config.bitsPerFrame = bits;
|
||||
|
||||
LPSPI_Deinit(self->spi);
|
||||
LPSPI_MasterInit(self->spi, &config, LPSPI_MASTER_CLK_FREQ);
|
||||
|
||||
LPSPI_Enable(self->spi, false);
|
||||
uint32_t tcrPrescaleValue;
|
||||
self->baudrate = LPSPI_MasterSetBaudRate(self->spi, config.baudRate, LPSPI_MASTER_CLK_FREQ, &tcrPrescaleValue);
|
||||
LPSPI_Enable(self->spi, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool common_hal_busio_spi_try_lock(busio_spi_obj_t *self) {
|
||||
bool grabbed_lock = false;
|
||||
// CRITICAL_SECTION_ENTER()
|
||||
if (!self->has_lock) {
|
||||
grabbed_lock = true;
|
||||
self->has_lock = true;
|
||||
}
|
||||
// CRITICAL_SECTION_LEAVE();
|
||||
return grabbed_lock;
|
||||
}
|
||||
|
||||
bool common_hal_busio_spi_has_lock(busio_spi_obj_t *self) {
|
||||
return self->has_lock;
|
||||
}
|
||||
|
||||
void common_hal_busio_spi_unlock(busio_spi_obj_t *self) {
|
||||
self->has_lock = false;
|
||||
}
|
||||
|
||||
bool common_hal_busio_spi_write(busio_spi_obj_t *self,
|
||||
const uint8_t *data, size_t len) {
|
||||
if (len == 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
lpspi_transfer_t xfer = { 0 };
|
||||
xfer.txData = (uint8_t*)data;
|
||||
xfer.dataSize = len;
|
||||
xfer.configFlags = kLPSPI_MasterPcs0;
|
||||
|
||||
const status_t status = LPSPI_MasterTransferBlocking(self->spi, &xfer);
|
||||
if (status != kStatus_Success)
|
||||
printf("%s: status %ld\r\n", __func__, status);
|
||||
|
||||
return (status == kStatus_Success);
|
||||
}
|
||||
|
||||
bool common_hal_busio_spi_read(busio_spi_obj_t *self,
|
||||
uint8_t *data, size_t len, uint8_t write_value) {
|
||||
if (len == 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
LPSPI_SetDummyData(self->spi, write_value);
|
||||
|
||||
lpspi_transfer_t xfer = { 0 };
|
||||
xfer.rxData = data;
|
||||
xfer.dataSize = len;
|
||||
|
||||
const status_t status = LPSPI_MasterTransferBlocking(self->spi, &xfer);
|
||||
if (status != kStatus_Success)
|
||||
printf("%s: status %ld\r\n", __func__, status);
|
||||
|
||||
return (status == kStatus_Success);
|
||||
}
|
||||
|
||||
bool common_hal_busio_spi_transfer(busio_spi_obj_t *self, uint8_t *data_out, uint8_t *data_in, size_t len) {
|
||||
if (len == 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
LPSPI_SetDummyData(self->spi, 0xFF);
|
||||
|
||||
lpspi_transfer_t xfer = { 0 };
|
||||
xfer.txData = data_out;
|
||||
xfer.rxData = data_in;
|
||||
xfer.dataSize = len;
|
||||
|
||||
const status_t status = LPSPI_MasterTransferBlocking(self->spi, &xfer);
|
||||
if (status != kStatus_Success)
|
||||
printf("%s: status %ld\r\n", __func__, status);
|
||||
|
||||
return (status == kStatus_Success);
|
||||
}
|
||||
|
||||
uint32_t common_hal_busio_spi_get_frequency(busio_spi_obj_t* self) {
|
||||
return self->baudrate;
|
||||
}
|
||||
|
||||
uint8_t common_hal_busio_spi_get_phase(busio_spi_obj_t* self) {
|
||||
return ((self->spi->TCR & LPSPI_TCR_CPHA_MASK) == LPSPI_TCR_CPHA_MASK);
|
||||
}
|
||||
|
||||
uint8_t common_hal_busio_spi_get_polarity(busio_spi_obj_t* self) {
|
||||
return ((self->spi->TCR & LPSPI_TCR_CPOL_MASK) == LPSPI_TCR_CPOL_MASK);
|
||||
}
|
46
ports/mimxrt10xx/common-hal/busio/SPI.h
Normal file
46
ports/mimxrt10xx/common-hal/busio/SPI.h
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2016 Scott Shawcroft
|
||||
* Copyright (c) 2019 Artur Pacholec
|
||||
*
|
||||
* 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_MIMXRT10XX_COMMON_HAL_BUSIO_SPI_H
|
||||
#define MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_BUSIO_SPI_H
|
||||
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
#include "fsl_common.h"
|
||||
#include "periph.h"
|
||||
#include "py/obj.h"
|
||||
|
||||
typedef struct {
|
||||
mp_obj_base_t base;
|
||||
LPSPI_Type *spi;
|
||||
bool has_lock;
|
||||
uint32_t baudrate;
|
||||
const mcu_periph_obj_t *clock_pin;
|
||||
const mcu_periph_obj_t *mosi_pin;
|
||||
const mcu_periph_obj_t *miso_pin;
|
||||
} busio_spi_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_BUSIO_SPI_H
|
252
ports/mimxrt10xx/common-hal/busio/UART.c
Normal file
252
ports/mimxrt10xx/common-hal/busio/UART.c
Normal file
@ -0,0 +1,252 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2016 Damien P. George
|
||||
* Copyright (c) 2019 Artur Pacholec
|
||||
*
|
||||
* 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/microcontroller/__init__.h"
|
||||
#include "shared-bindings/busio/UART.h"
|
||||
|
||||
#include "mpconfigport.h"
|
||||
#include "lib/utils/interrupt_char.h"
|
||||
#include "supervisor/shared/tick.h"
|
||||
#include "py/gc.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "py/runtime.h"
|
||||
#include "py/stream.h"
|
||||
#include "periph.h"
|
||||
|
||||
#include "fsl_lpuart.h"
|
||||
|
||||
// TODO
|
||||
|
||||
#define UART_CLOCK_FREQ (CLOCK_GetPllFreq(kCLOCK_PllUsb1) / 6U) / (CLOCK_GetDiv(kCLOCK_UartDiv) + 1U)
|
||||
|
||||
static void config_periph_pin(const mcu_periph_obj_t *periph) {
|
||||
IOMUXC_SetPinMux(
|
||||
periph->pin->mux_reg, periph->mux_mode,
|
||||
periph->input_reg, periph->input_idx,
|
||||
0,
|
||||
0);
|
||||
|
||||
IOMUXC_SetPinConfig(0, 0, 0, 0,
|
||||
periph->pin->cfg_reg,
|
||||
IOMUXC_SW_PAD_CTL_PAD_HYS(0)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_PUS(0)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_PUE(0)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_PKE(1)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_ODE(0)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_SPEED(1)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_DSE(6)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_SRE(0));
|
||||
}
|
||||
|
||||
void LPUART_UserCallback(LPUART_Type *base, lpuart_handle_t *handle, status_t status, void *user_data)
|
||||
{
|
||||
busio_uart_obj_t *self = (busio_uart_obj_t*)user_data;
|
||||
|
||||
if (status == kStatus_LPUART_RxIdle) {
|
||||
self->rx_ongoing = false;
|
||||
}
|
||||
}
|
||||
|
||||
void common_hal_busio_uart_construct(busio_uart_obj_t *self,
|
||||
const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx, uint32_t baudrate,
|
||||
uint8_t bits, uart_parity_t parity, uint8_t stop, mp_float_t timeout,
|
||||
uint16_t receiver_buffer_size) {
|
||||
|
||||
// TODO: Allow none rx or tx
|
||||
|
||||
bool have_tx = tx != mp_const_none;
|
||||
bool have_rx = rx != mp_const_none;
|
||||
if (!have_tx && !have_rx) {
|
||||
mp_raise_ValueError(translate("tx and rx cannot both be None"));
|
||||
}
|
||||
|
||||
self->baudrate = baudrate;
|
||||
self->character_bits = bits;
|
||||
self->timeout_ms = timeout * 1000;
|
||||
|
||||
const uint32_t rx_count = sizeof(mcu_uart_rx_list) / sizeof(mcu_periph_obj_t);
|
||||
const uint32_t tx_count = sizeof(mcu_uart_tx_list) / sizeof(mcu_periph_obj_t);
|
||||
|
||||
for (uint32_t i = 0; i < rx_count; ++i) {
|
||||
if (mcu_uart_rx_list[i].pin != rx)
|
||||
continue;
|
||||
|
||||
for (uint32_t j = 0; j < tx_count; ++j) {
|
||||
if (mcu_uart_tx_list[j].pin != tx)
|
||||
continue;
|
||||
|
||||
if (mcu_uart_tx_list[j].bank_idx != mcu_uart_rx_list[i].bank_idx)
|
||||
continue;
|
||||
|
||||
self->rx_pin = &mcu_uart_rx_list[i];
|
||||
self->tx_pin = &mcu_uart_tx_list[j];
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(self->rx_pin == NULL || self->tx_pin == NULL) {
|
||||
mp_raise_RuntimeError(translate("Invalid UART pin selection"));
|
||||
} else {
|
||||
self->uart = mcu_uart_banks[self->tx_pin->bank_idx - 1];
|
||||
}
|
||||
|
||||
config_periph_pin(self->rx_pin);
|
||||
config_periph_pin(self->tx_pin);
|
||||
|
||||
lpuart_config_t config = { 0 };
|
||||
LPUART_GetDefaultConfig(&config);
|
||||
|
||||
config.dataBitsCount = self->character_bits == 8 ? kLPUART_EightDataBits : kLPUART_SevenDataBits;
|
||||
config.baudRate_Bps = self->baudrate;
|
||||
config.enableTx = self->tx_pin != NULL;
|
||||
config.enableRx = self->rx_pin != NULL;
|
||||
|
||||
LPUART_Init(self->uart, &config, UART_CLOCK_FREQ);
|
||||
|
||||
claim_pin(self->tx_pin->pin);
|
||||
|
||||
if (self->rx_pin != NULL) {
|
||||
ringbuf_alloc(&self->rbuf, receiver_buffer_size, true);
|
||||
|
||||
if (!self->rbuf.buf) {
|
||||
LPUART_Deinit(self->uart);
|
||||
mp_raise_msg(&mp_type_MemoryError, translate("Failed to allocate RX buffer"));
|
||||
}
|
||||
|
||||
LPUART_TransferCreateHandle(self->uart, &self->handle, LPUART_UserCallback, self);
|
||||
LPUART_TransferStartRingBuffer(self->uart, &self->handle, self->rbuf.buf, self->rbuf.size);
|
||||
|
||||
claim_pin(self->rx_pin->pin);
|
||||
}
|
||||
}
|
||||
|
||||
bool common_hal_busio_uart_deinited(busio_uart_obj_t *self) {
|
||||
return self->rx_pin == NULL && self->tx_pin == NULL;
|
||||
}
|
||||
|
||||
void common_hal_busio_uart_deinit(busio_uart_obj_t *self) {
|
||||
if (common_hal_busio_uart_deinited(self)) {
|
||||
return;
|
||||
}
|
||||
|
||||
LPUART_Deinit(self->uart);
|
||||
|
||||
gc_free(self->rbuf.buf);
|
||||
self->rbuf.size = 0;
|
||||
self->rbuf.iput = self->rbuf.iget = 0;
|
||||
|
||||
// reset_pin_number(self->rx_pin);
|
||||
// reset_pin_number(self->tx_pin);
|
||||
|
||||
self->rx_pin = NULL;
|
||||
self->tx_pin = NULL;
|
||||
}
|
||||
|
||||
// Read characters.
|
||||
size_t common_hal_busio_uart_read(busio_uart_obj_t *self, uint8_t *data, size_t len, int *errcode) {
|
||||
if (self->rx_pin == NULL) {
|
||||
mp_raise_ValueError(translate("No RX pin"));
|
||||
}
|
||||
|
||||
if (len == 0) {
|
||||
// Nothing to read.
|
||||
return 0;
|
||||
}
|
||||
|
||||
lpuart_transfer_t xfer = {
|
||||
.data = data,
|
||||
.dataSize = len,
|
||||
};
|
||||
|
||||
self->rx_ongoing = true;
|
||||
LPUART_TransferReceiveNonBlocking(self->uart, &self->handle, &xfer, NULL);
|
||||
|
||||
uint64_t start_ticks = supervisor_ticks_ms64();
|
||||
|
||||
// Wait for all bytes received or timeout
|
||||
while (self->rx_ongoing && (supervisor_ticks_ms64() - start_ticks < self->timeout_ms) ) {
|
||||
RUN_BACKGROUND_TASKS;
|
||||
|
||||
// Allow user to break out of a timeout with a KeyboardInterrupt.
|
||||
if (mp_hal_is_interrupted()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// if we timed out, stop the transfer
|
||||
if (self->rx_ongoing) {
|
||||
LPUART_TransferAbortReceive(self->uart, &self->handle);
|
||||
}
|
||||
|
||||
return len - self->handle.rxDataSize;
|
||||
}
|
||||
|
||||
// Write characters.
|
||||
size_t common_hal_busio_uart_write(busio_uart_obj_t *self, const uint8_t *data, size_t len, int *errcode) {
|
||||
if (self->tx_pin == NULL) {
|
||||
mp_raise_ValueError(translate("No TX pin"));
|
||||
}
|
||||
|
||||
LPUART_WriteBlocking(self->uart, data, len);
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
uint32_t common_hal_busio_uart_get_baudrate(busio_uart_obj_t *self) {
|
||||
return self->baudrate;
|
||||
}
|
||||
|
||||
void common_hal_busio_uart_set_baudrate(busio_uart_obj_t *self, uint32_t baudrate) {
|
||||
if (LPUART_SetBaudRate(self->uart, baudrate, UART_CLOCK_FREQ) == kStatus_Success) {
|
||||
self->baudrate = baudrate;
|
||||
}
|
||||
}
|
||||
|
||||
mp_float_t common_hal_busio_uart_get_timeout(busio_uart_obj_t *self) {
|
||||
return (mp_float_t) (self->timeout_ms / 1000.0f);
|
||||
}
|
||||
|
||||
void common_hal_busio_uart_set_timeout(busio_uart_obj_t *self, mp_float_t timeout) {
|
||||
self->timeout_ms = timeout * 1000;
|
||||
}
|
||||
|
||||
uint32_t common_hal_busio_uart_rx_characters_available(busio_uart_obj_t *self) {
|
||||
return LPUART_TransferGetRxRingBufferLength(self->uart, &self->handle);
|
||||
}
|
||||
|
||||
void common_hal_busio_uart_clear_rx_buffer(busio_uart_obj_t *self) {
|
||||
self->handle.rxRingBufferHead = self->handle.rxRingBufferTail;
|
||||
}
|
||||
|
||||
bool common_hal_busio_uart_ready_to_tx(busio_uart_obj_t *self) {
|
||||
if (self->tx_pin == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return LPUART_GetStatusFlags(self->uart) & kLPUART_TxDataRegEmptyFlag;
|
||||
}
|
54
ports/mimxrt10xx/common-hal/busio/UART.h
Normal file
54
ports/mimxrt10xx/common-hal/busio/UART.h
Normal file
@ -0,0 +1,54 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2016 Scott Shawcroft
|
||||
* Copyright (c) 2019 Artur Pacholec
|
||||
*
|
||||
* 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_MIMXRT10XX_COMMON_HAL_BUSIO_UART_H
|
||||
#define MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_BUSIO_UART_H
|
||||
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
|
||||
#include "py/ringbuf.h"
|
||||
#include "py/obj.h"
|
||||
#include "periph.h"
|
||||
|
||||
#include "fsl_lpuart.h"
|
||||
|
||||
typedef struct {
|
||||
mp_obj_base_t base;
|
||||
LPUART_Type *uart;
|
||||
lpuart_handle_t handle;
|
||||
ringbuf_t rbuf;
|
||||
bool rx_ongoing;
|
||||
uint32_t baudrate;
|
||||
uint8_t character_bits;
|
||||
uint32_t timeout_ms;
|
||||
const mcu_periph_obj_t *rx_pin;
|
||||
const mcu_periph_obj_t *tx_pin;
|
||||
const mcu_periph_obj_t *cts_pin;
|
||||
const mcu_periph_obj_t *rts_pin;
|
||||
} busio_uart_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_BUSIO_UART_H
|
1
ports/mimxrt10xx/common-hal/busio/__init__.c
Normal file
1
ports/mimxrt10xx/common-hal/busio/__init__.c
Normal file
@ -0,0 +1 @@
|
||||
// No busio module functions.
|
170
ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c
Normal file
170
ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c
Normal file
@ -0,0 +1,170 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
|
||||
* Copyright (c) 2019 Artur Pacholec
|
||||
*
|
||||
* 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 <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "py/runtime.h"
|
||||
#include "py/mphal.h"
|
||||
|
||||
#include "fsl_gpio.h"
|
||||
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
#include "shared-bindings/digitalio/DigitalInOut.h"
|
||||
#include "supervisor/shared/translate.h"
|
||||
|
||||
#define IOMUXC_SW_MUX_CTL_PAD_MUX_MODE_ALT5 5U
|
||||
|
||||
void pin_config(const mcu_pin_obj_t *pin, bool open_drain, digitalio_pull_t pull)
|
||||
{
|
||||
IOMUXC_SetPinConfig(0, 0, 0, 0, pin->cfg_reg,
|
||||
IOMUXC_SW_PAD_CTL_PAD_HYS(1)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_PUS((pull == PULL_UP) ? 2 : 0)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_PUE(pull != PULL_NONE)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_PKE(1)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_ODE(open_drain)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_SPEED(2)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_DSE(1)
|
||||
| IOMUXC_SW_PAD_CTL_PAD_SRE(0));
|
||||
}
|
||||
|
||||
digitalinout_result_t common_hal_digitalio_digitalinout_construct(
|
||||
digitalio_digitalinout_obj_t* self, const mcu_pin_obj_t* pin) {
|
||||
claim_pin(pin);
|
||||
self->pin = pin;
|
||||
self->output = false;
|
||||
self->open_drain = false;
|
||||
self->pull = PULL_NONE;
|
||||
|
||||
// GPIO is always IOMUXC_SW_MUX_CTL_PAD_MUX_MODE_ALT5 until proven otherwise
|
||||
IOMUXC_SetPinMux(pin->mux_reg, IOMUXC_SW_MUX_CTL_PAD_MUX_MODE_ALT5, 0, 0, 0, 0);
|
||||
|
||||
pin_config(pin, self->open_drain, self->pull);
|
||||
|
||||
const gpio_pin_config_t config = { kGPIO_DigitalInput, 0, kGPIO_NoIntmode };
|
||||
GPIO_PinInit(self->pin->gpio, self->pin->number, &config);
|
||||
|
||||
return DIGITALINOUT_OK;
|
||||
}
|
||||
|
||||
void common_hal_digitalio_digitalinout_never_reset(
|
||||
digitalio_digitalinout_obj_t *self) {
|
||||
never_reset_pin_number(self->pin->number);
|
||||
}
|
||||
|
||||
bool common_hal_digitalio_digitalinout_deinited(digitalio_digitalinout_obj_t* self) {
|
||||
return self->pin == mp_const_none;
|
||||
}
|
||||
|
||||
void common_hal_digitalio_digitalinout_deinit(digitalio_digitalinout_obj_t* self) {
|
||||
if (common_hal_digitalio_digitalinout_deinited(self)) {
|
||||
return;
|
||||
}
|
||||
reset_pin_number(self->pin->number);
|
||||
self->pin = mp_const_none;
|
||||
}
|
||||
|
||||
void common_hal_digitalio_digitalinout_switch_to_input(
|
||||
digitalio_digitalinout_obj_t* self, digitalio_pull_t pull) {
|
||||
self->output = false;
|
||||
|
||||
// This also sets direction to input.
|
||||
common_hal_digitalio_digitalinout_set_pull(self, pull);
|
||||
}
|
||||
|
||||
void common_hal_digitalio_digitalinout_switch_to_output(
|
||||
digitalio_digitalinout_obj_t* self, bool value,
|
||||
digitalio_drive_mode_t drive_mode) {
|
||||
self->output = true;
|
||||
self->open_drain = drive_mode == DRIVE_MODE_OPEN_DRAIN;
|
||||
self->pull = PULL_NONE;
|
||||
|
||||
pin_config(self->pin, self->open_drain, self->pull);
|
||||
|
||||
const gpio_pin_config_t config = { kGPIO_DigitalOutput, value, kGPIO_NoIntmode };
|
||||
GPIO_PinInit(self->pin->gpio, self->pin->number, &config);
|
||||
}
|
||||
|
||||
digitalio_direction_t common_hal_digitalio_digitalinout_get_direction(
|
||||
digitalio_digitalinout_obj_t* self) {
|
||||
return self->output ? DIRECTION_OUTPUT : DIRECTION_INPUT;
|
||||
}
|
||||
|
||||
void common_hal_digitalio_digitalinout_set_value(
|
||||
digitalio_digitalinout_obj_t* self, bool value) {
|
||||
GPIO_PinWrite(self->pin->gpio, self->pin->number, value);
|
||||
}
|
||||
|
||||
bool common_hal_digitalio_digitalinout_get_value(
|
||||
digitalio_digitalinout_obj_t* self) {
|
||||
return GPIO_PinRead(self->pin->gpio, self->pin->number);
|
||||
}
|
||||
|
||||
void common_hal_digitalio_digitalinout_set_drive_mode(
|
||||
digitalio_digitalinout_obj_t* self,
|
||||
digitalio_drive_mode_t drive_mode) {
|
||||
bool value = common_hal_digitalio_digitalinout_get_value(self);
|
||||
self->open_drain = drive_mode == DRIVE_MODE_OPEN_DRAIN;
|
||||
|
||||
pin_config(self->pin, self->open_drain, self->pull);
|
||||
|
||||
// True is implemented differently between modes so reset the value to make
|
||||
// sure it's correct for the new mode.
|
||||
if (value) {
|
||||
common_hal_digitalio_digitalinout_set_value(self, value);
|
||||
}
|
||||
}
|
||||
|
||||
digitalio_drive_mode_t common_hal_digitalio_digitalinout_get_drive_mode(
|
||||
digitalio_digitalinout_obj_t* self) {
|
||||
if (self->open_drain) {
|
||||
return DRIVE_MODE_OPEN_DRAIN;
|
||||
} else {
|
||||
return DRIVE_MODE_PUSH_PULL;
|
||||
}
|
||||
}
|
||||
|
||||
void common_hal_digitalio_digitalinout_set_pull(
|
||||
digitalio_digitalinout_obj_t* self, digitalio_pull_t pull) {
|
||||
self->pull = pull;
|
||||
|
||||
pin_config(self->pin, self->open_drain, self->pull);
|
||||
|
||||
const gpio_pin_config_t config = { kGPIO_DigitalInput, 0, kGPIO_NoIntmode };
|
||||
GPIO_PinInit(self->pin->gpio, self->pin->number, &config);
|
||||
}
|
||||
|
||||
digitalio_pull_t common_hal_digitalio_digitalinout_get_pull(
|
||||
digitalio_digitalinout_obj_t* self) {
|
||||
if (self->output) {
|
||||
mp_raise_AttributeError(translate("Cannot get pull while in output mode"));
|
||||
return PULL_NONE;
|
||||
} else {
|
||||
return self->pull;
|
||||
}
|
||||
}
|
43
ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.h
Normal file
43
ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.h
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
|
||||
* Copyright (c) 2019 Artur Pacholec
|
||||
*
|
||||
* 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_MIMXRT10XX_COMMON_HAL_DIGITALIO_DIGITALINOUT_H
|
||||
#define MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_DIGITALIO_DIGITALINOUT_H
|
||||
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
#include "shared-bindings/digitalio/Pull.h"
|
||||
#include "py/obj.h"
|
||||
|
||||
typedef struct {
|
||||
mp_obj_base_t base;
|
||||
const mcu_pin_obj_t *pin;
|
||||
bool output;
|
||||
bool open_drain;
|
||||
digitalio_pull_t pull;
|
||||
} digitalio_digitalinout_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_DIGITALIO_DIGITALINOUT_H
|
1
ports/mimxrt10xx/common-hal/digitalio/__init__.c
Normal file
1
ports/mimxrt10xx/common-hal/digitalio/__init__.c
Normal file
@ -0,0 +1 @@
|
||||
// No digitalio module functions.
|
226
ports/mimxrt10xx/common-hal/microcontroller/Pin.c
Normal file
226
ports/mimxrt10xx/common-hal/microcontroller/Pin.c
Normal file
@ -0,0 +1,226 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2016 Scott Shawcroft for Adafruit Industries
|
||||
* Copyright (c) 2019 Artur Pacholec
|
||||
*
|
||||
* 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/microcontroller/Pin.h"
|
||||
#include "supervisor/shared/rgb_led_status.h"
|
||||
|
||||
#ifdef MICROPY_HW_NEOPIXEL
|
||||
bool neopixel_in_use;
|
||||
#endif
|
||||
#ifdef MICROPY_HW_APA102_MOSI
|
||||
bool apa102_sck_in_use;
|
||||
bool apa102_mosi_in_use;
|
||||
#endif
|
||||
#ifdef SPEAKER_ENABLE_PIN
|
||||
bool speaker_enable_in_use;
|
||||
#endif
|
||||
|
||||
//TODO
|
||||
|
||||
#define PORT_COUNT (IOMUXC_SW_PAD_CTL_PAD_COUNT / 32 + 1)
|
||||
|
||||
//STATIC uint32_t never_reset_pins[PORT_COUNT];
|
||||
|
||||
void reset_all_pins(void) {
|
||||
// uint32_t pin_mask[PORT_COUNT] = PORT_OUT_IMPLEMENTED;
|
||||
|
||||
// // Do not full reset USB lines.
|
||||
// pin_mask[0] &= ~(PORT_PA24 | PORT_PA25);
|
||||
|
||||
// // Do not reset SWD when a debugger is present.
|
||||
// if (DSU->STATUSB.bit.DBGPRES == 1) {
|
||||
// pin_mask[0] &= ~(PORT_PA30 | PORT_PA31);
|
||||
// }
|
||||
|
||||
// for (uint32_t i = 0; i < PORT_COUNT; i++) {
|
||||
// pin_mask[i] &= ~never_reset_pins[i];
|
||||
// }
|
||||
|
||||
// gpio_set_port_direction(GPIO_PORTA, pin_mask[0] & ~MICROPY_PORT_A, GPIO_DIRECTION_OFF);
|
||||
// gpio_set_port_direction(GPIO_PORTB, pin_mask[1] & ~MICROPY_PORT_B, GPIO_DIRECTION_OFF);
|
||||
// #if PORT_BITS > 64
|
||||
// gpio_set_port_direction(GPIO_PORTC, pin_mask[2] & ~MICROPY_PORT_C, GPIO_DIRECTION_OFF);
|
||||
// #endif
|
||||
// #if PORT_BITS > 96
|
||||
// gpio_set_port_direction(GPIO_PORTD, pin_mask[3] & ~MICROPY_PORT_D, GPIO_DIRECTION_OFF);
|
||||
// #endif
|
||||
//
|
||||
// // Configure SWD. SWDIO will be automatically switched on PA31 when a signal is input on
|
||||
// // SWCLK.
|
||||
// #ifdef SAMD51
|
||||
// gpio_set_pin_function(PIN_PA30, MUX_PA30H_CM4_SWCLK);
|
||||
// #endif
|
||||
// #ifdef SAMD21
|
||||
// gpio_set_pin_function(PIN_PA30, GPIO_PIN_FUNCTION_G);
|
||||
// gpio_set_pin_function(PIN_PA31, GPIO_PIN_FUNCTION_G);
|
||||
// #endif
|
||||
//
|
||||
#ifdef MICROPY_HW_NEOPIXEL
|
||||
neopixel_in_use = false;
|
||||
#endif
|
||||
#ifdef MICROPY_HW_APA102_MOSI
|
||||
apa102_sck_in_use = false;
|
||||
apa102_mosi_in_use = false;
|
||||
#endif
|
||||
|
||||
// After configuring SWD because it may be shared.
|
||||
#ifdef SPEAKER_ENABLE_PIN
|
||||
speaker_enable_in_use = false;
|
||||
// gpio_set_pin_function(SPEAKER_ENABLE_PIN->number, GPIO_PIN_FUNCTION_OFF);
|
||||
// gpio_set_pin_direction(SPEAKER_ENABLE_PIN->number, GPIO_DIRECTION_OUT);
|
||||
// gpio_set_pin_level(SPEAKER_ENABLE_PIN->number, false);
|
||||
#endif
|
||||
}
|
||||
|
||||
void never_reset_pin_number(uint8_t pin_number) {
|
||||
// never_reset_pins[GPIO_PORT(pin_number)] |= 1 << GPIO_PIN(pin_number);
|
||||
}
|
||||
|
||||
void reset_pin_number(uint8_t pin_number) {
|
||||
// never_reset_pins[GPIO_PORT(pin_number)] &= ~(1 << GPIO_PIN(pin_number));
|
||||
|
||||
if (pin_number >= IOMUXC_SW_PAD_CTL_PAD_COUNT) {
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef MICROPY_HW_NEOPIXEL
|
||||
if (pin_number == MICROPY_HW_NEOPIXEL->number) {
|
||||
neopixel_in_use = false;
|
||||
rgb_led_status_init();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#ifdef MICROPY_HW_APA102_MOSI
|
||||
if (pin_number == MICROPY_HW_APA102_MOSI->number ||
|
||||
pin_number == MICROPY_HW_APA102_SCK->number) {
|
||||
// apa102_mosi_in_use = apa102_mosi_in_use && pin_number != MICROPY_HW_APA102_MOSI->number;
|
||||
// apa102_sck_in_use = apa102_sck_in_use && pin_number != MICROPY_HW_APA102_SCK->number;
|
||||
if (!apa102_sck_in_use && !apa102_mosi_in_use) {
|
||||
// rgb_led_status_init();
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
// if (pin_number == PIN_PA30
|
||||
// #ifdef SAMD51
|
||||
// ) {
|
||||
// #endif
|
||||
// #ifdef SAMD21
|
||||
// || pin_number == PIN_PA31) {
|
||||
// #endif
|
||||
// gpio_set_pin_function(pin_number, SWD_MUX);
|
||||
// } else {
|
||||
// gpio_set_pin_direction(pin_number, GPIO_DIRECTION_OFF);
|
||||
// gpio_set_pin_function(pin_number, GPIO_PIN_FUNCTION_OFF);
|
||||
// }
|
||||
//
|
||||
#ifdef SPEAKER_ENABLE_PIN
|
||||
if (pin_number == SPEAKER_ENABLE_PIN->number) {
|
||||
speaker_enable_in_use = false;
|
||||
// gpio_set_pin_function(pin_number, GPIO_PIN_FUNCTION_OFF);
|
||||
// gpio_set_pin_direction(SPEAKER_ENABLE_PIN->number, GPIO_DIRECTION_OUT);
|
||||
// gpio_set_pin_level(SPEAKER_ENABLE_PIN->number, false);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void claim_pin(const mcu_pin_obj_t* pin) {
|
||||
#ifdef MICROPY_HW_NEOPIXEL
|
||||
if (pin == MICROPY_HW_NEOPIXEL) {
|
||||
neopixel_in_use = true;
|
||||
}
|
||||
#endif
|
||||
#ifdef MICROPY_HW_APA102_MOSI
|
||||
if (pin == MICROPY_HW_APA102_MOSI) {
|
||||
apa102_mosi_in_use = true;
|
||||
}
|
||||
if (pin == MICROPY_HW_APA102_SCK) {
|
||||
apa102_sck_in_use = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SPEAKER_ENABLE_PIN
|
||||
if (pin == SPEAKER_ENABLE_PIN) {
|
||||
speaker_enable_in_use = true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool pin_number_is_free(uint8_t pin_number) {
|
||||
// PortGroup *const port = &PORT->Group[(enum gpio_port)GPIO_PORT(pin_number)];
|
||||
// uint8_t pin_index = GPIO_PIN(pin_number);
|
||||
// volatile PORT_PINCFG_Type *state = &port->PINCFG[pin_index];
|
||||
// volatile PORT_PMUX_Type *pmux = &port->PMUX[pin_index / 2];
|
||||
//
|
||||
// if (pin_number == PIN_PA30 || pin_number == PIN_PA31) {
|
||||
// if (DSU->STATUSB.bit.DBGPRES == 1) {
|
||||
// return false;
|
||||
// }
|
||||
// if (pin_number == PIN_PA30
|
||||
// #ifdef SAMD51
|
||||
// ) {
|
||||
// #endif
|
||||
// #ifdef SAMD21
|
||||
// || pin_number == PIN_PA31) {
|
||||
// #endif) {
|
||||
// return state->bit.PMUXEN == 1 && ((pmux->reg >> (4 * pin_index % 2)) & 0xf) == SWD_MUX;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// return state->bit.PMUXEN == 0 && state->bit.INEN == 0 &&
|
||||
// state->bit.PULLEN == 0 && (port->DIR.reg & (1 << pin_index)) == 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool common_hal_mcu_pin_is_free(const mcu_pin_obj_t* pin) {
|
||||
#ifdef MICROPY_HW_NEOPIXEL
|
||||
if (pin == MICROPY_HW_NEOPIXEL) {
|
||||
return !neopixel_in_use;
|
||||
}
|
||||
#endif
|
||||
#ifdef MICROPY_HW_APA102_MOSI
|
||||
if (pin == MICROPY_HW_APA102_MOSI) {
|
||||
return !apa102_mosi_in_use;
|
||||
}
|
||||
if (pin == MICROPY_HW_APA102_SCK) {
|
||||
return !apa102_sck_in_use;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SPEAKER_ENABLE_PIN
|
||||
if (pin == SPEAKER_ENABLE_PIN) {
|
||||
return !speaker_enable_in_use;
|
||||
}
|
||||
#endif
|
||||
|
||||
return pin_number_is_free(pin->number);
|
||||
}
|
||||
|
||||
void common_hal_reset_pin(const mcu_pin_obj_t* pin) {
|
||||
// reset_pin_number(pin->number);
|
||||
}
|
51
ports/mimxrt10xx/common-hal/microcontroller/Pin.h
Normal file
51
ports/mimxrt10xx/common-hal/microcontroller/Pin.h
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2016 Scott Shawcroft
|
||||
* Copyright (c) 2019 Artur Pacholec
|
||||
*
|
||||
* 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_MIMXRT10XX_COMMON_HAL_MICROCONTROLLER_PIN_H
|
||||
#define MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_MICROCONTROLLER_PIN_H
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "pins.h"
|
||||
|
||||
#ifdef MICROPY_HW_NEOPIXEL
|
||||
extern bool neopixel_in_use;
|
||||
#endif
|
||||
#ifdef MICROPY_HW_APA102_MOSI
|
||||
extern bool apa102_sck_in_use;
|
||||
extern bool apa102_mosi_in_use;
|
||||
#endif
|
||||
|
||||
void reset_all_pins(void);
|
||||
// reset_pin_number takes the pin number instead of the pointer so that objects don't
|
||||
// need to store a full pointer.
|
||||
void reset_pin_number(uint8_t pin_number);
|
||||
void never_reset_pin_number(uint8_t pin_number);
|
||||
void claim_pin(const mcu_pin_obj_t* pin);
|
||||
bool pin_number_is_free(uint8_t pin_number);
|
||||
|
||||
#endif // MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_MICROCONTROLLER_PIN_H
|
65
ports/mimxrt10xx/common-hal/microcontroller/Processor.c
Normal file
65
ports/mimxrt10xx/common-hal/microcontroller/Processor.c
Normal file
@ -0,0 +1,65 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2017 Dan Halbert for Adafruit Industries
|
||||
* Copyright (c) 2019 Artur Pacholec
|
||||
*
|
||||
* 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 <math.h>
|
||||
|
||||
#include "common-hal/microcontroller/Processor.h"
|
||||
|
||||
#include "fsl_tempmon.h"
|
||||
#include "fsl_ocotp.h"
|
||||
#include "clocks.h"
|
||||
|
||||
float common_hal_mcu_processor_get_temperature(void) {
|
||||
tempmon_config_t config;
|
||||
TEMPMON_GetDefaultConfig(&config);
|
||||
|
||||
TEMPMON_Init(TEMPMON, &config);
|
||||
TEMPMON_StartMeasure(TEMPMON);
|
||||
|
||||
const float temp = TEMPMON_GetCurrentTemperature(TEMPMON);
|
||||
TEMPMON_Deinit(TEMPMON);
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
float common_hal_mcu_processor_get_voltage(void) {
|
||||
return NAN;
|
||||
}
|
||||
|
||||
uint32_t common_hal_mcu_processor_get_frequency(void) {
|
||||
return SystemCoreClock;
|
||||
}
|
||||
|
||||
void common_hal_mcu_processor_get_uid(uint8_t raw_id[]) {
|
||||
OCOTP_Init(OCOTP, CLOCK_GetFreq(kCLOCK_IpgClk));
|
||||
|
||||
// Reads shadow registers 0x01 - 0x04 (Configuration and Manufacturing Info)
|
||||
for (int i = 0; i < 4; ++i)
|
||||
((uint32_t*) raw_id)[i] = OCOTP_ReadFuseShadowRegister(OCOTP, i + 1);
|
||||
|
||||
OCOTP_Deinit(OCOTP);
|
||||
}
|
40
ports/mimxrt10xx/common-hal/microcontroller/Processor.h
Normal file
40
ports/mimxrt10xx/common-hal/microcontroller/Processor.h
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2017 Dan Halbert for Adafruit Industries
|
||||
* Copyright (c) 2019 Artur Pacholec
|
||||
*
|
||||
* 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_MIMXRT10XX_COMMON_HAL_MICROCONTROLLER_PROCESSOR_H
|
||||
#define MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_MICROCONTROLLER_PROCESSOR_H
|
||||
|
||||
#define COMMON_HAL_MCU_PROCESSOR_UID_LENGTH 16
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
typedef struct {
|
||||
mp_obj_base_t base;
|
||||
// Stores no state currently.
|
||||
} mcu_processor_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_MICROCONTROLLER_PROCESSOR_H
|
284
ports/mimxrt10xx/common-hal/microcontroller/__init__.c
Normal file
284
ports/mimxrt10xx/common-hal/microcontroller/__init__.c
Normal file
@ -0,0 +1,284 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2016 Scott Shawcroft for Adafruit Industries
|
||||
* Copyright (c) 2019 Artur Pacholec
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
//TODO
|
||||
#include "py/mphal.h"
|
||||
#include "py/obj.h"
|
||||
#include "py/runtime.h"
|
||||
|
||||
#include "fsl_device_registers.h"
|
||||
|
||||
#include "reset.h"
|
||||
|
||||
#include "shared-bindings/microcontroller/__init__.h"
|
||||
#include "shared-bindings/microcontroller/Pin.h"
|
||||
#include "shared-bindings/microcontroller/Processor.h"
|
||||
#include "supervisor/shared/safe_mode.h"
|
||||
#include "supervisor/shared/translate.h"
|
||||
|
||||
void common_hal_mcu_delay_us(uint32_t delay) {
|
||||
mp_hal_delay_us(delay);
|
||||
}
|
||||
|
||||
volatile uint32_t nesting_count = 0;
|
||||
void common_hal_mcu_disable_interrupts(void) {
|
||||
__disable_irq();
|
||||
__DMB();
|
||||
nesting_count++;
|
||||
}
|
||||
|
||||
void HardFault_Handler(void);
|
||||
void common_hal_mcu_enable_interrupts(void) {
|
||||
if (nesting_count == 0) {
|
||||
// This is very very bad because it means there was mismatched disable/enables so we
|
||||
// "HardFault".
|
||||
HardFault_Handler();
|
||||
}
|
||||
nesting_count--;
|
||||
if (nesting_count > 0) {
|
||||
return;
|
||||
}
|
||||
__DMB();
|
||||
__enable_irq();
|
||||
}
|
||||
|
||||
void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) {
|
||||
if (runmode == RUNMODE_BOOTLOADER) {
|
||||
if (!bootloader_available()) {
|
||||
mp_raise_ValueError(translate("Cannot reset into bootloader because no bootloader is present."));
|
||||
}
|
||||
// Pretend to be the first of the two reset presses needed to enter the
|
||||
// bootloader. That way one reset will end in the bootloader.
|
||||
_bootloader_dbl_tap = DBL_TAP_MAGIC;
|
||||
} else {
|
||||
// Set up the default.
|
||||
_bootloader_dbl_tap = DBL_TAP_MAGIC_QUICK_BOOT;
|
||||
}
|
||||
if (runmode == RUNMODE_SAFE_MODE) {
|
||||
safe_mode_on_next_reset(PROGRAMMATIC_SAFE_MODE);
|
||||
}
|
||||
}
|
||||
|
||||
void common_hal_mcu_reset(void) {
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
|
||||
// The singleton microcontroller.Processor object, bound to microcontroller.cpu
|
||||
// It currently only has properties, and no state.
|
||||
const mcu_processor_obj_t common_hal_mcu_processor_obj = {
|
||||
.base = {
|
||||
.type = &mcu_processor_type,
|
||||
},
|
||||
};
|
||||
|
||||
// NVM is only available on Express boards for now.
|
||||
#if CIRCUITPY_INTERNAL_NVM_SIZE > 0
|
||||
// The singleton nvm.ByteArray object.
|
||||
const nvm_bytearray_obj_t common_hal_mcu_nvm_obj = {
|
||||
.base = {
|
||||
.type = &nvm_bytearray_type,
|
||||
},
|
||||
.len = CIRCUITPY_INTERNAL_NVM_SIZE,
|
||||
.start_address = (uint8_t*) (FLASH_SIZE - CIRCUITPY_INTERNAL_NVM_SIZE)
|
||||
};
|
||||
#endif
|
||||
|
||||
// This maps MCU pin names to pin objects.
|
||||
STATIC const mp_rom_map_elem_t mcu_pin_global_dict_table[] = {
|
||||
#ifdef MIMXRT1011_SERIES
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_00), MP_ROM_PTR(&pin_GPIO_00) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_01), MP_ROM_PTR(&pin_GPIO_01) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_02), MP_ROM_PTR(&pin_GPIO_02) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_03), MP_ROM_PTR(&pin_GPIO_03) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_04), MP_ROM_PTR(&pin_GPIO_04) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_05), MP_ROM_PTR(&pin_GPIO_05) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_06), MP_ROM_PTR(&pin_GPIO_06) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_07), MP_ROM_PTR(&pin_GPIO_07) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_08), MP_ROM_PTR(&pin_GPIO_08) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_09), MP_ROM_PTR(&pin_GPIO_09) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_10), MP_ROM_PTR(&pin_GPIO_10) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_11), MP_ROM_PTR(&pin_GPIO_11) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_12), MP_ROM_PTR(&pin_GPIO_12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_13), MP_ROM_PTR(&pin_GPIO_13) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_00), MP_ROM_PTR(&pin_GPIO_SD_00) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_01), MP_ROM_PTR(&pin_GPIO_SD_01) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_02), MP_ROM_PTR(&pin_GPIO_SD_02) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_03), MP_ROM_PTR(&pin_GPIO_SD_03) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_04), MP_ROM_PTR(&pin_GPIO_SD_04) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_05), MP_ROM_PTR(&pin_GPIO_SD_05) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_06), MP_ROM_PTR(&pin_GPIO_SD_06) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_07), MP_ROM_PTR(&pin_GPIO_SD_07) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_08), MP_ROM_PTR(&pin_GPIO_SD_08) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_09), MP_ROM_PTR(&pin_GPIO_SD_09) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_10), MP_ROM_PTR(&pin_GPIO_SD_10) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_11), MP_ROM_PTR(&pin_GPIO_SD_11) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_12), MP_ROM_PTR(&pin_GPIO_SD_12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_13), MP_ROM_PTR(&pin_GPIO_SD_13) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_00), MP_ROM_PTR(&pin_GPIO_AD_00) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_01), MP_ROM_PTR(&pin_GPIO_AD_01) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_02), MP_ROM_PTR(&pin_GPIO_AD_02) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_03), MP_ROM_PTR(&pin_GPIO_AD_03) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_04), MP_ROM_PTR(&pin_GPIO_AD_04) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_05), MP_ROM_PTR(&pin_GPIO_AD_05) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_06), MP_ROM_PTR(&pin_GPIO_AD_06) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_07), MP_ROM_PTR(&pin_GPIO_AD_07) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_08), MP_ROM_PTR(&pin_GPIO_AD_08) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_09), MP_ROM_PTR(&pin_GPIO_AD_09) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_10), MP_ROM_PTR(&pin_GPIO_AD_10) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_11), MP_ROM_PTR(&pin_GPIO_AD_11) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_12), MP_ROM_PTR(&pin_GPIO_AD_12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_13), MP_ROM_PTR(&pin_GPIO_AD_13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_14), MP_ROM_PTR(&pin_GPIO_AD_14) },
|
||||
#else
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_00), MP_ROM_PTR(&pin_GPIO_EMC_00) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_01), MP_ROM_PTR(&pin_GPIO_EMC_01) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_02), MP_ROM_PTR(&pin_GPIO_EMC_02) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_03), MP_ROM_PTR(&pin_GPIO_EMC_03) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_04), MP_ROM_PTR(&pin_GPIO_EMC_04) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_05), MP_ROM_PTR(&pin_GPIO_EMC_05) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_06), MP_ROM_PTR(&pin_GPIO_EMC_06) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_07), MP_ROM_PTR(&pin_GPIO_EMC_07) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_08), MP_ROM_PTR(&pin_GPIO_EMC_08) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_09), MP_ROM_PTR(&pin_GPIO_EMC_09) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_10), MP_ROM_PTR(&pin_GPIO_EMC_10) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_11), MP_ROM_PTR(&pin_GPIO_EMC_11) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_12), MP_ROM_PTR(&pin_GPIO_EMC_12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_13), MP_ROM_PTR(&pin_GPIO_EMC_13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_14), MP_ROM_PTR(&pin_GPIO_EMC_14) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_15), MP_ROM_PTR(&pin_GPIO_EMC_15) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_16), MP_ROM_PTR(&pin_GPIO_EMC_16) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_17), MP_ROM_PTR(&pin_GPIO_EMC_17) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_18), MP_ROM_PTR(&pin_GPIO_EMC_18) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_19), MP_ROM_PTR(&pin_GPIO_EMC_19) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_20), MP_ROM_PTR(&pin_GPIO_EMC_20) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_21), MP_ROM_PTR(&pin_GPIO_EMC_21) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_22), MP_ROM_PTR(&pin_GPIO_EMC_22) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_23), MP_ROM_PTR(&pin_GPIO_EMC_23) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_24), MP_ROM_PTR(&pin_GPIO_EMC_24) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_25), MP_ROM_PTR(&pin_GPIO_EMC_25) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_26), MP_ROM_PTR(&pin_GPIO_EMC_26) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_27), MP_ROM_PTR(&pin_GPIO_EMC_27) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_28), MP_ROM_PTR(&pin_GPIO_EMC_28) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_29), MP_ROM_PTR(&pin_GPIO_EMC_29) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_30), MP_ROM_PTR(&pin_GPIO_EMC_30) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_31), MP_ROM_PTR(&pin_GPIO_EMC_31) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_32), MP_ROM_PTR(&pin_GPIO_EMC_32) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_33), MP_ROM_PTR(&pin_GPIO_EMC_33) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_34), MP_ROM_PTR(&pin_GPIO_EMC_34) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_35), MP_ROM_PTR(&pin_GPIO_EMC_35) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_36), MP_ROM_PTR(&pin_GPIO_EMC_36) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_37), MP_ROM_PTR(&pin_GPIO_EMC_37) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_38), MP_ROM_PTR(&pin_GPIO_EMC_38) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_39), MP_ROM_PTR(&pin_GPIO_EMC_39) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_40), MP_ROM_PTR(&pin_GPIO_EMC_40) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_EMC_41), MP_ROM_PTR(&pin_GPIO_EMC_41) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B0_00), MP_ROM_PTR(&pin_GPIO_AD_B0_00) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B0_01), MP_ROM_PTR(&pin_GPIO_AD_B0_01) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B0_02), MP_ROM_PTR(&pin_GPIO_AD_B0_02) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B0_03), MP_ROM_PTR(&pin_GPIO_AD_B0_03) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B0_04), MP_ROM_PTR(&pin_GPIO_AD_B0_04) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B0_05), MP_ROM_PTR(&pin_GPIO_AD_B0_05) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B0_06), MP_ROM_PTR(&pin_GPIO_AD_B0_06) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B0_07), MP_ROM_PTR(&pin_GPIO_AD_B0_07) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B0_08), MP_ROM_PTR(&pin_GPIO_AD_B0_08) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B0_09), MP_ROM_PTR(&pin_GPIO_AD_B0_09) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B0_10), MP_ROM_PTR(&pin_GPIO_AD_B0_10) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B0_11), MP_ROM_PTR(&pin_GPIO_AD_B0_11) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B0_12), MP_ROM_PTR(&pin_GPIO_AD_B0_12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B0_13), MP_ROM_PTR(&pin_GPIO_AD_B0_13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B0_14), MP_ROM_PTR(&pin_GPIO_AD_B0_14) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B0_15), MP_ROM_PTR(&pin_GPIO_AD_B0_15) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B1_00), MP_ROM_PTR(&pin_GPIO_AD_B1_00) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B1_01), MP_ROM_PTR(&pin_GPIO_AD_B1_01) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B1_02), MP_ROM_PTR(&pin_GPIO_AD_B1_02) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B1_03), MP_ROM_PTR(&pin_GPIO_AD_B1_03) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B1_04), MP_ROM_PTR(&pin_GPIO_AD_B1_04) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B1_05), MP_ROM_PTR(&pin_GPIO_AD_B1_05) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B1_06), MP_ROM_PTR(&pin_GPIO_AD_B1_06) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B1_07), MP_ROM_PTR(&pin_GPIO_AD_B1_07) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B1_08), MP_ROM_PTR(&pin_GPIO_AD_B1_08) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B1_09), MP_ROM_PTR(&pin_GPIO_AD_B1_09) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B1_10), MP_ROM_PTR(&pin_GPIO_AD_B1_10) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B1_11), MP_ROM_PTR(&pin_GPIO_AD_B1_11) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B1_12), MP_ROM_PTR(&pin_GPIO_AD_B1_12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B1_13), MP_ROM_PTR(&pin_GPIO_AD_B1_13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B1_14), MP_ROM_PTR(&pin_GPIO_AD_B1_14) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B1_15), MP_ROM_PTR(&pin_GPIO_AD_B1_15) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B0_00), MP_ROM_PTR(&pin_GPIO_B0_00) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B0_01), MP_ROM_PTR(&pin_GPIO_B0_01) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B0_02), MP_ROM_PTR(&pin_GPIO_B0_02) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B0_03), MP_ROM_PTR(&pin_GPIO_B0_03) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B0_04), MP_ROM_PTR(&pin_GPIO_B0_04) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B0_05), MP_ROM_PTR(&pin_GPIO_B0_05) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B0_06), MP_ROM_PTR(&pin_GPIO_B0_06) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B0_07), MP_ROM_PTR(&pin_GPIO_B0_07) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B0_08), MP_ROM_PTR(&pin_GPIO_B0_08) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B0_09), MP_ROM_PTR(&pin_GPIO_B0_09) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B0_10), MP_ROM_PTR(&pin_GPIO_B0_10) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B0_11), MP_ROM_PTR(&pin_GPIO_B0_11) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B0_12), MP_ROM_PTR(&pin_GPIO_B0_12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B0_13), MP_ROM_PTR(&pin_GPIO_B0_13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B0_14), MP_ROM_PTR(&pin_GPIO_B0_14) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B0_15), MP_ROM_PTR(&pin_GPIO_B0_15) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B1_00), MP_ROM_PTR(&pin_GPIO_B1_00) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B1_01), MP_ROM_PTR(&pin_GPIO_B1_01) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B1_02), MP_ROM_PTR(&pin_GPIO_B1_02) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B1_03), MP_ROM_PTR(&pin_GPIO_B1_03) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B1_04), MP_ROM_PTR(&pin_GPIO_B1_04) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B1_05), MP_ROM_PTR(&pin_GPIO_B1_05) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B1_06), MP_ROM_PTR(&pin_GPIO_B1_06) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B1_07), MP_ROM_PTR(&pin_GPIO_B1_07) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B1_08), MP_ROM_PTR(&pin_GPIO_B1_08) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B1_09), MP_ROM_PTR(&pin_GPIO_B1_09) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B1_10), MP_ROM_PTR(&pin_GPIO_B1_10) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B1_11), MP_ROM_PTR(&pin_GPIO_B1_11) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B1_12), MP_ROM_PTR(&pin_GPIO_B1_12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B1_13), MP_ROM_PTR(&pin_GPIO_B1_13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B1_14), MP_ROM_PTR(&pin_GPIO_B1_14) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_B1_15), MP_ROM_PTR(&pin_GPIO_B1_15) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_B0_00), MP_ROM_PTR(&pin_GPIO_SD_B0_00) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_B0_01), MP_ROM_PTR(&pin_GPIO_SD_B0_01) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_B0_02), MP_ROM_PTR(&pin_GPIO_SD_B0_02) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_B0_03), MP_ROM_PTR(&pin_GPIO_SD_B0_03) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_B0_04), MP_ROM_PTR(&pin_GPIO_SD_B0_04) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_B0_05), MP_ROM_PTR(&pin_GPIO_SD_B0_05) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_B1_00), MP_ROM_PTR(&pin_GPIO_SD_B1_00) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_B1_01), MP_ROM_PTR(&pin_GPIO_SD_B1_01) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_B1_02), MP_ROM_PTR(&pin_GPIO_SD_B1_02) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_B1_03), MP_ROM_PTR(&pin_GPIO_SD_B1_03) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_B1_04), MP_ROM_PTR(&pin_GPIO_SD_B1_04) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_B1_05), MP_ROM_PTR(&pin_GPIO_SD_B1_05) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_B1_06), MP_ROM_PTR(&pin_GPIO_SD_B1_06) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_B1_07), MP_ROM_PTR(&pin_GPIO_SD_B1_07) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_B1_08), MP_ROM_PTR(&pin_GPIO_SD_B1_08) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_B1_09), MP_ROM_PTR(&pin_GPIO_SD_B1_09) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_B1_10), MP_ROM_PTR(&pin_GPIO_SD_B1_10) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_B1_11), MP_ROM_PTR(&pin_GPIO_SD_B1_11) },
|
||||
#endif
|
||||
};
|
||||
MP_DEFINE_CONST_DICT(mcu_pin_globals, mcu_pin_global_dict_table);
|
106
ports/mimxrt10xx/common-hal/neopixel_write/__init__.c
Normal file
106
ports/mimxrt10xx/common-hal/neopixel_write/__init__.c
Normal file
@ -0,0 +1,106 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2019 Lucian Copeland for Adafruit Industries
|
||||
* Copyright (c) 2020 Artur Pacholec
|
||||
*
|
||||
* 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/mphal.h"
|
||||
#include "shared-bindings/neopixel_write/__init__.h"
|
||||
|
||||
#include "tick.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "py/runtime.h"
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
#include "fsl_gpio.h"
|
||||
|
||||
uint64_t next_start_tick_ms = 0;
|
||||
uint32_t next_start_tick_us = 1000;
|
||||
|
||||
//sysclock divisors
|
||||
#define MAGIC_800_INT 900000 // ~1.11 us -> 1.2 field
|
||||
#define MAGIC_800_T0H 2800000 // ~0.36 us -> 0.44 field
|
||||
#define MAGIC_800_T1H 1350000 // ~0.74 us -> 0.84 field
|
||||
|
||||
#pragma GCC push_options
|
||||
#pragma GCC optimize ("Os")
|
||||
|
||||
void common_hal_neopixel_write (const digitalio_digitalinout_obj_t* digitalinout, uint8_t *pixels,
|
||||
uint32_t numBytes) {
|
||||
uint8_t *p = pixels, *end = p + numBytes, pix = *p++, mask = 0x80;
|
||||
uint32_t start = 0;
|
||||
uint32_t cyc = 0;
|
||||
|
||||
//assumes 800_000Hz frequency
|
||||
//Theoretical values here are 800_000 -> 1.25us, 2500000->0.4us, 1250000->0.8us
|
||||
//TODO: try to get dynamic weighting working again
|
||||
#ifdef MIMXRT1011_SERIES
|
||||
uint32_t sys_freq = CLOCK_GetCoreFreq();
|
||||
#else
|
||||
uint32_t sys_freq = CLOCK_GetAhbFreq();
|
||||
#endif
|
||||
uint32_t interval = sys_freq/MAGIC_800_INT;
|
||||
uint32_t t0 = (sys_freq/MAGIC_800_T0H);
|
||||
uint32_t t1 = (sys_freq/MAGIC_800_T1H);
|
||||
|
||||
// This must be called while interrupts are on in case we're waiting for a
|
||||
// future ms tick.
|
||||
wait_until(next_start_tick_ms, next_start_tick_us);
|
||||
|
||||
GPIO_Type *gpio = digitalinout->pin->gpio;
|
||||
const uint32_t pin = digitalinout->pin->number;
|
||||
|
||||
__disable_irq();
|
||||
// Enable DWT in debug core. Useable when interrupts disabled, as opposed to Systick->VAL
|
||||
CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;
|
||||
DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk;
|
||||
DWT->CYCCNT = 0;
|
||||
|
||||
for(;;) {
|
||||
cyc = (pix & mask) ? t1 : t0;
|
||||
start = DWT->CYCCNT;
|
||||
GPIO_PinWrite(gpio, pin, 1);
|
||||
while((DWT->CYCCNT - start) < cyc);
|
||||
GPIO_PinWrite(gpio, pin, 0);
|
||||
while((DWT->CYCCNT - start) < interval);
|
||||
if(!(mask >>= 1)) {
|
||||
if(p >= end) break;
|
||||
pix = *p++;
|
||||
mask = 0x80;
|
||||
}
|
||||
}
|
||||
|
||||
// Enable interrupts again
|
||||
__enable_irq();
|
||||
|
||||
// Update the next start.
|
||||
current_tick(&next_start_tick_ms, &next_start_tick_us);
|
||||
if (next_start_tick_us < 100) {
|
||||
next_start_tick_ms += 1;
|
||||
next_start_tick_us = 100 - next_start_tick_us;
|
||||
} else {
|
||||
next_start_tick_us -= 100;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GCC pop_options
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user